Add Pandoc to API

This is a proposed endpoint to resolve: https://github.com/BookStackApp/BookStack/issues/2491
As can be seen from the conversation in that thread, adding more complex means of exporting HTML (i.e. via Pandoc or other third party means) may be complex to integrate and to maintain.
Instead, this API endpoint provides the HTML file with its original HREFs that point back to the server hosting BookStack. It provides a much lighter weight file due to images not being encoded into the file, and provides users more options to build on BookStack with their own third party solutions to processing exported content than can be achieved with contained HTML.
My personal use case, as an example, will be to then process this output via Pandoc or WGET to generate an offline version which I have more control over the formats/content/sizes. It will also allow me greater control over extracting embedded videos.
Note: This is for discussion over whether it would be merged. The following further commits are required at a minimum before ready:

[x] Integrate the new endpoint in to the API docs (appears to auto generate them, haven't identified how yet).
[ ] Consider the endpoint names. My suggestion would be to rename the current exportHtml (which is the original contained HTML endpoint) to exportContainedHtml and then have this new endpoint as exportHtml.

Would be helpful hear whether this is within the scope of the project before putting in these other changes.
I would welcome edits from maintainers directly into the repo if you so desire.

Thank you for offering this @maggie0002. That said, I don't think I'd want to include this. This would be a slippery slope in my view, of creating new endpoints for somewhat subtle changes in export requirements. Nor would I want a mass of options to build up on a single endpoint.
Additionally, this content already provided in the page endpoint is the plain content HTML; If anything, this adds export specific content. If you have a real need for this I could try to find some time to collate the content used in an export to get you pretty much the same using the normal page GET API? Is a case of going through the export views and gathering the required styles and HTML used.

Hi @ssddanbrown,
As you can probably tell, I'm maxing out on what I can do here, and it is indeed something I have a real need for. Any help would be hugely appreciated.
The API script you shared (https://github.com/BookStackApp/api-scripts/blob/19f9a5bcf215fa84010c72dc99bff5c199120bf8/php-book-to-static-site/book-to-static.php#L238) does look hopeful, but I would need to be able to export all three, pages, chapters and books like the API endpoint I tried to add here. I would also need to be able to use it without having to provide the tokens too, i.e. if the user is already logged in then it shouldn't require them. That is something the additional endpoint would allow, but I'm not sure how I would pass on the tokens through a separate PHP page, which ideally would be hosted on a server users could call.
Ultimately, the workflow will be:

User is shown a lightweight minimalist interface that displays all their available books, chapters and pages that they can download (this interface will be compiled from the API) (this is part of a vue.js web interface).
When user clicks the link to download an item, it will download the book or chapter or page as HTML with all the images and videos included with it so it can be used offline (separate rather than embedded images for space saving).

The idea of having an API endpoint that displays the HTML with original HREFs is it would be easy enough to then create the HTML with separate videos and images from it.

@maggie0002 Since it sounded like you were doing things front-end I done a quick example in JavaScript:
https://gist.github.com/ssddanbrown/6e19f39684696ea01002e4d155c0ffd2
Should be able to just paste this into the browser console to trial it (As long as you're logged into BookStack); No token-auth as requested but you may need to consider CORS if your JS app is on another domain.
It's most of the content that makes up the export layout, apart from the metadata footer. I've trimmed the styles a bit but they could probably be trimmed further with more time.

Thanks @ssddanbrown for the time putting this together, really appreciate it.
The CORS thing is a bit of an issue having to allow it on the server for the endpoint, but understandable. I think the bigger challenge is it involves so much code to maintain. Would need to add on to that more code to cycle through all the pages in a chapter or book to create them and format the HTML accordingly, and then still build on top the process that takes that HTML and creates a package of all the content for offline use. Especially when most of what is needed is already in Bookstack and can be tapped into directly without too significant a change to the endpoints rather than placing parts in-between to redo the same task.
That's not your problem of course, I pitched the pull request suggesting the endpoint to provide a means to tap in directly to the content in more malleable forms and was a swing and a miss. I'm wondering if you could take a look at this pull request though and point me in the direction of how to resolve the issue with the API docs not generating since the changes I apply? I will have to give the issue some more thought, but may end up forking the BookStack repo and adding in these changes, would be good to know how to get it working.

@maggie0002 Docs work fine for me with these changes.
Try adding this to your .env file:
APP_ENV=development

The docs are cached in production mode (Using the app version number within the key) so it doesn't have to re-scan them from source each time (can see this done here).

@ssddanbrown, thanks for the pointer. Indeed somewhere along the way I had switched back to prod to early. The docs do appear to work ok.
I am going to have a look at integrating Pandoc into the endpoint in this pull request at some point. If you're interested in taking a look either for interest, future reference etc. then I will keep adding here. Otherwise feel free to close the pull request.
Thanks again

This hasn’t been forgotten, just a bit backed up.
After some research it seems like a Pandoc wrapper would be the way to go: https://github.com/ueberdosis/pandoc
It would align with the approach used in the PDF export which is nice, and is PhP so no need for hacking away. Been meaning to have a go at experimenting with it, but wanted to check in and see if this is something you think may be viable for merging as a Pandoc integration? If so would be good to get input as it would entail designing an endpoint that can receive the options through the URL, or to have just a few export options available hardcoded in, such as a PDF and HTML option. I go back and forth on what may be best.

Hoping to pick this up again this weekend. Any thoughts on the API endpoints?
That said, having given it some more thought, how would you feel about this as an optional exporter similar to how wkhtmltopdf is currently integrated? The wrapper is proving effective: https://github.com/ueberdosis/pandoc
Would also help resolve some other issues that I don't think we will find a way around:
https://github.com/linuxserver/docker-bookstack/issues/80
https://github.com/BookStackApp/BookStack/issues/2459

This pull request has become a mix of different buts of code and objective. Going to close this pull request and move feature request to: https://github.com/BookStackApp/BookStack/issues/2491


Make liveness and readiness probes configurable

What this PR does / why we need it:
Closes #19623
Which issue this PR fixes

fixes # #19623

Special notes for your reviewer:
Tagging the maintainers so this can be merged quickly
@geekgonecrazy @pierreozoux @verwilst @srueg
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

/ok-to-test

Thanks for the suggestions! I amended the previous commit with the right README values

pull-charts-e2e failed. What does this test do? Is it related to my changes?

/test pull-charts-e2e

/retest

@srueg it seems like these test failures are not related to the rocketchat chart? If I understand the logs correctly it starts the pods correctly, everything's fine, then something weird happens..? I don't think I have access to the test source, so I can't really see what causes this python error:
...
 I1217 14:38:09.624] ========================================================================================================================
I1217 14:38:09.624] Deleting release 'rocketchat-q4ipib8tcc'...
I1217 14:38:10.680] release "rocketchat-q4ipib8tcc" deleted
I1217 14:38:10.684] Deleting namespace 'rocketchat-presubmit-19637-1206943879878676480-q4ipib8tcc'...
I1217 14:38:10.983] namespace "rocketchat-presubmit-19637-1206943879878676480-q4ipib8tcc" deleted
I1217 14:38:49.895] Namespace 'rocketchat-presubmit-19637-1206943879878676480-q4ipib8tcc' terminated.
I1217 14:38:49.896] Error linting and installing charts: Error processing charts
I1217 14:38:49.896] ------------------------------------------------------------------------------------------------------------------------
I1217 14:38:49.896]  ✖ rocketchat => (version: "2.0.1", path: "stable/rocketchat") > Error waiting for process: exit status 1
I1217 14:38:49.896] ------------------------------------------------------------------------------------------------------------------------
I1217 14:38:50.357] b682dc5dabd91826a24abc9849467f3bd353d0e4001e9e8db00a048e5e689d5f
W1217 14:38:50.370] Traceback (most recent call last):
W1217 14:38:50.370]   File "/workspace/./test-infra/jenkins/../scenarios/execute.py", line 50, in <module>
W1217 14:38:50.370]     main(ARGS.env, ARGS.cmd + ARGS.args)
W1217 14:38:50.370]   File "/workspace/./test-infra/jenkins/../scenarios/execute.py", line 41, in main
W1217 14:38:50.371]     check(*cmd)
W1217 14:38:50.371]   File "/workspace/./test-infra/jenkins/../scenarios/execute.py", line 30, in check
W1217 14:38:50.371]     subprocess.check_call(cmd)
W1217 14:38:50.371]   File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
W1217 14:38:50.371]     raise CalledProcessError(retcode, cmd)
W1217 14:38:50.371] subprocess.CalledProcessError: Command '('./test/e2e.sh',)' returned non-zero exit status 1

@srueg @davidkarlsen is there anything I can do to speed up this process? I need this change for my project and I don't like having to use my own fork to install the chart. If you can point me to why the test is failing I'd be happy to fix it
/retest

/test pull-charts-e2e

I also don't know the test setup that well and can't see the obvious error. I'll take another look.

I opened another PR without any changes to test the CI process: https://github.com/helm/charts/pull/19696 which also failed.
You can find the logs here: https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/helm_charts/19637/pull-charts-e2e/1207613472548851712/
It seems that the Rocke.Chat container crashes for some reason. Unfortunately the logs only show the current pod which didn't fail (or didn't log anything).

Maybe @unguiculus could give us a hand here?

/lgtm

Hi, this MR has been approved by 1 reviewer. Some tests still fail, but that shouldn't be due to my changes. Do you want me to merge master into this branch to see if that fixes the problem? Or can it otherwise be approved by a second reviewer? Thanks!

Yes, let's try to merge (or rebase) master. The tests are required to succeed in order to merge it...

I0224 13:28:26.352] Installing chart with values file 'stable/rocketchat/ci/ci-values.yaml'...
I0224 13:28:26.352]
I0224 13:38:28.077] Error: release rocketchat-o311slu9hb failed: timed out waiting for the condition
I0224 13:38:28.078] ========================================================================================================================
I0224 13:38:28.078] ........................................................................................................................
I0224 13:38:28.079] ==> Events of namespace rocketchat-presubmit-19637-1231933663680139264-o311slu9hb
I0224 13:38:28.079] ........................................................................................................................

Should I increase the timeout in values.yaml?

No idea why this fails. In the logs it looks like RocketChat successfully starts up...
Which timeout would you increase? You could also change this in ci/ci-values.yaml if it's specific to CI

/retest
Hmm, I'm not sure which timeout it runs into exactly, TBH. On slow systems, we have seen that pods get restarted because they don't react to the liveness probe in time, so we've increased the livenessProbe.initialDelaySeconds for other projects.
We can also try to retest to see if it's a consistent problem

/retest

Yay, test finally succeeded!

/approve

/lgtm


Add basic specs and license

@nickcharlton Hey! can you take a look at this?

This should somewhat address #3


Add other data ingestion methods to EDA notebook

Added in data ingestion methods for reading directly from GCS and reading directly from BQ
Should I add in more Markdown code highlighting the steps in the EDA process?

* Added in data ingestion methods for reading directly from GCS and reading directly from BQ

* Should I add in more Markdown code highlighting the steps in the EDA process?

BQ ingest should use the same project as amazing public datasets (not sure what the id is) instead of mwpmltr
More markdown for the EDA would be nice but i'm not gonna hold up this PR just for that


Code Review and Enhancements for Cipher Implementations

I would like to request a code review and suggestions for enhancements on the following cipher implementations in you'r project:
I'm expecting a gssoc-ext with level label. @UTSAVS26
1. Affine Cipher (affine_cipher.py):

Currently implements encryption and decryption using the Affine cipher.

Potential Improvements:

Validate that the 'a' parameter is coprime with 26.

Consider supporting lowercase characters without losing case sensitivity.

2. Caesar Cipher (caesar_cipher.py):

Implements a Caesar cipher with encryption, decryption, and brute-force decryption functionality.

Potential Improvements:

Add handling for non-string inputs in the encrypt and decrypt methods.
Consider modularizing the class structure to facilitate state management.

3. Playfair Cipher (playfair_cipher.py):

Implements Playfair cipher encryption and decryption with key table generation and text preprocessing.

Potential Improvements:

Add error handling for non-alphabetic characters during text preprocessing.

Consider encapsulating the functionality within a class for better organization and state management.

thx for pointing out the problems in my code @smog-root buddy, appreciate the efforts

@smog-root work on it and i will directly check the PR and label on it.

@UTSAVS26 assign me!


New_Navbar_Styling

Hey There,
I am adding new style to the Navbar components of your website.

Yess I have Commented on the issue please assign me the task.

I have also created a new issue please assign me this task and get merged.


Allowing CSS Keyframe Syntax with Percentages would Help

Is your feature request related to a problem? Please describe.
There are many CSS library's for creating animated effects. I am planning to making an effect library based on AnimateCSS that could be used with Animejs. The problem is that the CSS keyframes syntax is very different from what is expected by Anime and the conversion process is not simple.
Describe the solution you'd like
To make my task easier I wrote a parsing function that allows me to convert keyframes animations in CSS into an array that is consumable by Animejs with minimal syntax changes:
Converter:
function parseEffect(params) {
   var keyframes = params.keyframes;
  //Convert CSS style keyframe object into array to be flattened
  if (Array.isArray(keyframes) === false) {
    var keys = Object.keys(keyframes);
    if (keys.length > 0) {
      var duration: number = params.duration || 1000;
      var splitKeysMap = keys.reduce(function (accumulator, key, i, array) {
        key.split(',').forEach(function (k, i) {
          let mk = (parseFloat(k) / 100.0);
          accumulator.has(mk) ? Object.assign(accumulator.get(mk), keyframes[key]) : accumulator.set(mk, keyframes[key]);
        });
        return accumulator;
      }, new Map());

      var splitKeys = [].concat(_toConsumableArray(splitKeysMap.keys())).sort();

      keyframes = splitKeys.map(function (value, i) {
        var d = duration * value;
        if (i > 0) {
          d -= duration * splitKeys[i - 1];
        }
        return Object.assign({}, { duration: d }, splitKeysMap.get(value));
      });
      params.keyframes = keyframes;
    }
  }
  return params;
}

CSS
/* Bounce animation from Animate.css
   https://daneden.github.io/animate.css/
*/

@keyframes bounce {
    0%,20%,53%,80%,100% {
        animation-timing-function: cubic-bezier(.215,.61,.355,1);
        transform: translateZ(0)
    }

    40%,43% {
        animation-timing-function: cubic-bezier(.755,.05,.855,.06);
        transform: translate3d(0,-30px,0)
    }

    70% {
        animation-timing-function: cubic-bezier(.755,.05,.855,.06);
        transform: translate3d(0,-15px,0)
    }

    90% {
        transform: translate3d(0,-4px,0)
    }
}

.bounce {
    animation-name: bounce;
    transform-origin: center bottom
}

AnimeJs
// Based on: Bounce animation from Animate.css
// https://daneden.github.io/animate.css/

var bounceEffect = {
  duration: 1000,
  keyframes: {
    "0%,100%": {
      transformOrigin: "50% 0px 0px",
    },
    "0%,20%,53%,80%,100%": {
      translateY: "0px",
      easing: "easeOutCubic"
    },
    "40%,43%": {
      translateY: "-30px",
      easing: "easeInQuint"
    },
    "70%": {
      translateY: "-15px",
      easing: "easeInQuint"
    },
    "90%": {
      translateY: "-4px"
    }
  }
};
var bounceAnime= anime.timeline({
  targets: '.bounce',
  loop: true
});
bounceAnime.add(parseEffect(bounceEffect));

Here is a working example: https://codepen.io/GooeyIdeas/pen/RdPzyX
I personally think this should be built in. Like in this example:
https://codepen.io/GooeyIdeas/pen/QobXBd
Would you be willing to consider this feature? If so I can make a pull request.

Amazing code that saved me hours. Thank you. @gooeyideas

+1.. this doesn't work exactly like css keyframes :( @juliangarnier are you looking into this? there are a buncha issues on this topic.. this project def needs proper css-like keyframes value tweening

+1, today while I was going to integrate animejs in VueJS I have also felt the same need. @juliangarnier My humble opinion it would be really good if you could integrate such feature in keyframe module.


Added running the test suite for the travis.

Motivation and Context

Added running the test suite for the travis.
How Has This Been Tested
Will check travis build passes.

Types of changes

New feature (non-breaking change which adds functionality)

Closing for now.


Allow API to create file on empty repo

This PR adds the necessary work to make it possible to create files on empty
repos using the API.
Fix #10993
Signed-off-by: Andrew Thornton<EMAIL_ADDRESS>

I think we need a testcase for empty repository.

done

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@54961f3). Click here to learn what that means.
The diff coverage is 54.33%.

@@           Coverage Diff           @@
##             main   #19224   +/-   ##
=======================================
  Coverage        ?   46.57%
=======================================
  Files           ?      860
  Lines           ?   123267
  Branches        ?        0
=======================================
  Hits            ?    57409
  Misses          ?    58908
  Partials        ?     6950

Impacted Files
Coverage Δ

routers/api/v1/repo/file.go
77.47% <ø> (ø)

services/repository/files/cherry_pick.go
0.00% <0.00%> (ø)

services/repository/files/patch.go
0.00% <0.00%> (ø)

services/repository/files/upload.go
0.00% <0.00%> (ø)

services/repository/files/update.go
36.38% <49.46%> (ø)

services/repository/files/temp_repo.go
60.53% <77.77%> (ø)

services/repository/files/delete.go
51.44% <100.00%> (ø)

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 54961f3...23b9926. Read the comment docs.


podman static binary name is changed and now contain arch info

https://github.com/containers/podman/releases/tag/v4.4.1 now have podman-remote-static-linux_arm64.tar.gz  and podman-remote-static-linux_amd64.tar.gz instead podman-remote-static.tar.gz , this need to updated in our podman bundle creation side.

In 4.4.2 release looks like after extracting the bundle there is /bin folder so we again need to change it for #633 PR once we start generating bundle for 4.4.2 . We either keep this issue open or create a new one once #633 is merged.


Adding select or input fields as additional fields

At the moment the adding of additional field only works for text fields.
However one wants to ask the user for the gender or the language a radio or select field is better suited. This is currently not possible.
A nice syntax would be somethink like:
 gender: {
                    id: 'gender',
                    label: 'gender',
                    type: 'radio',
                    select: [
                        {
                            text: 'm',
                            value: 'm',
                        },
                        {
                            text: 'f',
                            value: 'f',
                        },
                    ],
                },

Closing due to inactivity @DavidSichau
Open new issue if it still persists.


shouldCloseOnOverlayClick and shouldCloseOnEsc don't work, even in React Modal's examples

Summary:
Steps to reproduce:

Go here and click on the codepen link https://reactcommunity.org/react-modal/examples/minimal/
Add shouldCloseOnOverlayClick and shouldCloseOnEsc props to the modal
Try to close the modal on overlay click or by pressing escape

Expected behavior:
shouldCloseOnOverlayClick should close on overlay click and shouldCloseOnEsc should close on esc!
Link to example of issue:
https://reactcommunity.org/react-modal/examples/minimal/
Additional notes:

Hi @nth-chile, yeah...the examples is very old. It's using<EMAIL_ADDRESS>but it's weird that it's not working 🤔.

Yeah I first noticed because I wanted to use these two flags in my app today, so it seems like an issue with current version

Have you used read-modal on the latest version?

It is ^3.12.1

Thanks. Can you make a reproducible example?

Let me know if this demonstrates the issue: https://codesandbox.io/s/dreamy-cannon-9r360?file=/src/App.js

react-modal used a callback function onRequestClose that is called in this cases.
Try to add to your code and let me know if it solves your problem.

onRequestClose is used to control the state of isOpen flag.

Here is one way to do it. https://codesandbox.io/s/priceless-bouman-f9hq9

...but we definitely need to update the docs. I'll flag this as documentation.

Ah ok, so the two flags I mentioned just fire onRequestClose

Awesome, @nth-chile.


feat: add ffmpeg images

Description
This PR fixes #281

@mudler small mistake, only one build should have tag-latest: 'auto' and you forgot to add tag-suffix: '-ffmpeg' in the first new image


Crash on World Load

https://pastebin.com/dLmi4kYS
I am trying to load a world with the lostcities biosphere worldtype
I do not have made any changes to the configs

Please post the full crash report.


update dependencies & align etl titles w orig docs

README.md: Specified the ETL8/9 being ref'd (acc. to currently existing dirs)
Requirements.txt: Updated previously deprecated versions & added new compatible yaml pkg

Thank you so much for your PR!


[js] DATA_PACKAGE_URL is not passed from dpr-api

In new implementation of dpr-js in index.jsx the container DataPackageView needs two parameters

DATA_PACKAGE
DATA_PACKAGE_URL

In the previous implementation this container needed publisher and package as parameters.
So we need to pass these two variables form API GET /<publisher>/<package>
and set these two parameters in dataset.html
Tasks

[x] Set  DATA_PACKAGE and DATA_PACKAGE_URL in _snippets.html
[x] Update API GET /<publisher>/<package> parameters.

I'll fix this now. Forgot to make this change when i updated the submodule.

@rufuspollock i was doing this. Already finished. Should i raise pull?

FIXED.
Addressed in this commit: https://github.com/frictionlessdata/dpr-api/commit/4e47b26e8f2a8889dbfb689be38dd456c80cfe6e


[Flow][Backend] Delete/Add user, Delete/Add chat

See issue #312 for more info

[ ] Delete user
[ ] Add user
[ ] Delete chat
[ ] Add chat

@JorisBassle @EdwardKerckhof is this ticket still relevant?

@ken-de-moor this has already been added into the refactor. You now have a separate list for contacts and chats.


[import csv] ensure directory exists before saving csv file

Some users complained of the error while uploading CSV whereby the first uploading phase fails because directory does not exist. This PR adds an extra check to ensure the directory exists before saving the csv file.
Fixes https://github.com/apache/incubator-superset/issues/4576

Codecov Report

Merging #4829 into master will increase coverage by 0.01%.
The diff coverage is 84.61%.

@@            Coverage Diff             @@
##           master    #4829      +/-   ##
==========================================
+ Coverage   72.36%   72.37%   +0.01%
==========================================
  Files         208      208
  Lines       15662    15672      +10
  Branches     1227     1227
==========================================
+ Hits        11334    11343       +9
- Misses       4325     4326       +1
  Partials        3        3

Impacted Files
Coverage Δ

superset/views/core.py
74.68% <80%> (+0.03%)
:arrow_up:

superset/utils.py
88.09% <87.5%> (-0.02%)
:arrow_down:

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 23a3365...2657299. Read the comment docs.

@john-bodley Done

@timifasubaa if you rebase your change the CI should succeed.

@john-bodley Succeeded. Ready for merge


Remove worldwide priorities from the database

The worldwide priority format is being deleted, therefore its artefacts must be removed from the DB.
Here's the PR that deletes worldwide priorities from Whitehall:
https://github.com/alphagov/whitehall/pull/2246
Trello

I think this is ok, but would appreciate a check from someone on Finding Things, /cc @tijmenb @jackscotti @MatMoore et al

This seems fine. How are you going to delete the things from rummager?

Good question! Had a look earlier and decided I needed to talk to someone from your team @tijmenb ;-)


Replace no-break and figure spaces

This patch ensures that no-break, figure and zero-width spaces are replaced correctly. These spaces are sometimes used to format phone numbers or monetary values.

In the meantime, the build on HHVM no longer fails because Travis updated the default distribution.


Converting bytes into a private key

Firstly I apologize as this isn't exactly an issue, but a request for help.
Secondly thanks for your amazing work with your library, it is in some cases is 39x faster than a pure javascript solution that I've been trying to port.
The only operation I need which I can't figure out to do is how to convert a 40 byte hash as a PrivateKey. In the javascript version it starts with a hash, e.g.
[202, 109, 60, 56, 243, 94, 234, 17, 222, 103, 73, 119, 83, 36, 172, 68, 181, 27, 66, 32, 61, 12, 118, 192, 255, 103, 26, 98, 247, 20, 156, 130, 140, 217, 185, 187, 43, 215, 139, 219]
then reads it as a bigint:<PHONE_NUMBER>067354517797306176892828000911014916050637590219351031477825861890959663243477624057290
Then it does (num % (ORDER - 1)) + 1
where ORDER is defined as:<PHONE_NUMBER>5126190479447740508185965837690552500527637822603658699938581184513 aka 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001  (and the same as MODULUS in blsful)
Which gives a final result of<PHONE_NUMBER>058959301707420087865031789140716346047138769054786295276093541340
thus the private key should be: [   220, 139, 215,  43, 196,   7,  64, 103,    91, 124, 132, 104, 105,  60,  61, 183,   200,  59, 106, 227,  61, 213, 187, 251,   112, 208, 101,   3,  93, 218, 208,  21 ]
This operation needs to be done extensively, so I want to make sure I'm doing it in the best way possible rather than something naive like converting it to bignum's and doing maths.
Thanks!

I'm able to get close to a solution with:
    // I have prepended 24 0's to the vector i'm working with
    let bytes = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 109, 60, 56, 243, 94, 234, 17, 222, 103, 73, 119, 83, 36, 172, 68, 181, 27, 66, 32, 61, 12, 118, 192, 255, 103, 26, 98, 247, 20, 156, 130, 140, 217, 185, 187, 43, 215, 139, 219];
   bytes.reverse();
   let s = Scalar::from_bytes_wide(&bytes);

Then when I print  s I get a value of 0x15d0da5d0365d070fbbbd53de36a3bc8b73d3c6968847c59a83d39f451713dd2 which is rather close to the private key I'm after: 0x15d0da5d0365d070fbbbd53de36a3bc8b73d3c6968847c5b674007c42bd78bdc but not exactly the same

You might be encountering the big vs little endian ordering issue. from_okm expects big endian which it looks like your expecting. However are your original bytes in that order?

Yeah there is no built in method to do the (ORDER - 1) + 1. Not sure why you would do it that way

Yeah there is no built in method to do the (ORDER - 1) + 1. Not sure why you would do it that way

Presumably because 0 is not a valid private key, and this removes the (negligible) chance of it happening. I need to retain compatibility in how I derive the private key, so unfortunately I can't change it. Do you have any tips of how I'd do the (ORDER - 1) + 1  reasonably efficiently?

Yeah you could use blsful::elliptic_curve::bigint library to do it.

I tried this, but impl_modulus panics with modulus must be odd :(

Then you'll have to use the div_rem method where the modulus is what you are looking to use.

Thank you kind sir. That did the trick.


Add a Gitter chat badge to README.md

crowbar/crowbar now has a Chat Room on Gitter
@tboerger has just created a chat room. You can visit it here: https://gitter.im/crowbar/crowbar.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

-1, we should use IRC not Gitter.

I definitly prefer gitter.

If you want us to switch from IRC to Gitter, please provide concrete reasons justifying the switch.  I already provided some concrete reasons against it.  If your reasons outweigh those then I am happy to vote for switching.  But the reasons need to be more persuasive than "it's cool and shiny".

And BTW this discussion should happen using the community's existing communication channels, i.e. IRC and/or the mailing list.  It makes no sense to argue for switching to Gitter on the Gitter channel itself before any switch is decided.

@aspiers I have announced that on IRC as well, currently you are the only one that complains about it. As there is currently simply no community it makes sense to open multiple channels to get in contact with developers. And btw there is an IRC gateway, so you can use it with your IRC client as well.

We should try everything which brings us near to the community and this includes new communication ways. So when there is a gateway it has no negative effects. I like gitter, it's much more comfortable as IRC and it's easier to join the channel and ask questions.
But we should use https://gitter.im/crowbar instead of https://gitter.im/crowbar/crowbar.

I have no strong opinion on crowbar/crowbar or just crowbar. I just have not seen the org only chat before :)

@aspiers I have announced that on IRC as well, currently you are the only one that complains about it.

Probably I am the only one who noticed ;-p  The mailing list would be the right place to discuss this ...  unfortunately it seems we have no mailing list any longer :-(  (I don't count the opencrowbar google group.)  Actually I added that issue to our backlog earlier today - we really must have a mailing list.

As there is currently simply no community

That is not accurate.  Your personal opinion represents something like 5% of active developers, and much less than that if you count users.  So please ask the other 95+% for their opinions before making decisions which affect us all.

it makes sense to open multiple channels to get in contact with developers.

It seems you are assuming that creating more places to talk is likely to encourage more discussion?  But I don't know why you think that.  People don't randomly guess the location of chat forums - typically they search for them on the project's website.  And there are multiple downsides of having two separate channels:

It creates a big risk of people missing discussions by only being in one channel
It requires people to monitor two channels
It's confusing to newbies
It creates unnecessary maintenance overhead

And btw there is an IRC gateway, so you can use it with your IRC client as well.

Well OK, that's nice.  In that case, I am personally willing to consider moving to Gitter, even though I don't like that it is a move from a free (libre) technology to a proprietary one (BTW don't you care about that at all?).
But please let's have a proper discussion with everyone about it, instead of one or two people just making the decision without first asking the rest of the community.

@rsalevsky  wrote:

We should try everything which brings us near to the community and this includes new communication ways.

I'm always open to trying things.  But sorry, IMHO claiming that moving to gitter "brings us near to the community" is totally false.  If you really believe that, please explain why.  I am willing to be convinced if you have good reasons ;-)

So when there is a gateway it has no negative effects.

Not true, because people are already using #crowbar on Freenode.  Unless you have a proper discussion with those people about the idea of switching, there are definitely negative effects.

I like gitter, it's much more comfortable as IRC and it's easier to join the channel and ask questions.

That's your personal opinion, but it's not shared by everyone.  For example, why do you think it's easier to join?  Can you explain that in detail?  Why is it more comfortable?  I suspect if you think carefully about why you like it, you will find the main reason is that it looks nicer.  I agree that it looks nice and shiny, but that is not the only thing you should think about, or even the most important one :-)

@aspiers:

I'm always open to trying things. But sorry, IMHO claiming that moving to gitter "brings us near to the community" is totally false. If you really believe that, please explain why. I am willing to be convinced if you have good reasons ;-)

Sure, new communication ways opens always new possibility's to get in touch with the other community members. That's basically the same system why the most company's / community's uses Facebook / Twitter. The first touch with someone is the biggest barrier between people. Conversely, that means they uses always the most comfortable way and IRC is not that comfortable. We can not expect that everyone uses IRC so the barrier is higher.

Not true, because people are already using #crowbar on Freenode. Unless you have a proper discussion with those people about the idea of switching, there are definitely negative effects.

Maybe I misunderstood something, I thought gateway means a connection between the IRC channel and the gitter channel. So everyone can choose what they prefer and all are happy. When gateway means just a way to connect with a IRC client to gitter then let's implement a "real" gateway as bridge. Should be very easy and finished with few lines of code.

That's your personal opinion, but it's not shared by everyone. For example, why do you think it's easier to join? Can you explain that in detail? Why is it more comfortable? I suspect if you think carefully about why you like it, you will find the main reason is that it looks nicer. I agree that it looks nice and shiny, but that is not the only thing you should think about, or even the most important one :-)

What's easier and faster? Click two buttons or search for a IRC client install them, search for all the config stuff and so on. It's the same reason as I sayed above. You can not expect that everyone has experience with IRC and uses IRC. My experience is that the most people will join ask few questions and leave and only a small amount stays for a longer time. But this is the way how a community grows.

I moved this discussion to<EMAIL_ADDRESS>so that the whole community can see it.  Please do not continue discussing here - thanks.

I don't have any strong feeling, but I think we should list the mailing list and IRC too (not just gitter) if we do this change.

I will create a pull request for that. Let's close this wrong one for now.


Deeply nested namespaced messages

en:
  errors:
    rules:
      email:
        filled?: "the email is missing"

      user:
        filled?: "name cannot be blank"

        rules:
          address:
            filled?: "You gotta tell us where you live"

Please example for more nested rule message.

ping @solnic

You can configure namespace:
Dry::Validation.Schema do
  configure { config.namespace = :user }
end

I can't define message for rule deeper 2 levels

Oh I see, yeah it would be nice if that worked. I guess this could be considered as a bug then.

@solnic Is there anything I can help you with?

@ndrluis hey, thanks man, development is on-hold until we have dry-schema ready, then we'll update dry-validation to use it, and start addressing issues here. More info is right here


WebSocket WebRTC 403 FORBIDDEN

What kind of issue is this?

[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do
something, or to understand why something isn't working the way you expect it to, use Stack
Overflow. https://stackoverflow.com/questions/tagged/okhttp

[ ] Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests
get fixed. Here’s an example: https://gist.github.com/swankjesse/981fcae102f513eb13ed

[x] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.

By default autobahn work well in WebRTC's android demo without extra config. I like square's okhttp so I want to replace autobahn by okhttp's websocket:
WebSocket mWebSocket = mClient.newWebSocket(Request.Builder().url(wsUrl).build(), WebSocketListener())
and get 403 FORBIDDEN, After research I add:
mWebSocket = mClient.newWebSocket(Request.Builder()                 .url(wsUrl)                 .header("Origin", wsUrl)                 .build(), WebSocketListener())
then it work well. We can test by curl:
curl --include
--no-buffer
--header "Connection: Upgrade"
--header "Upgrade: websocket"
--header "Host: apprtc-ws.webrtc.org:443"
--header "Origin: wss://apprtc-ws.webrtc.org:443/ws"
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ=="
--header "Sec-WebSocket-Version: 13"
https://apprtc-ws.webrtc.org:443/ws
note:
wsUrl = "wss://apprtc-ws.webrtc.org:443/ws"
I don't know how header("Origin",...) work, but hope it useful

The spec is clear that OkHttp is doing the right thing
https://tools.ietf.org/html/rfc6455

The |Origin| header field [RFC6454] is used to protect against
unauthorized cross-origin use of a WebSocket server by scripts using
the WebSocket API in a web browser.  The server is informed of the
script origin generating the WebSocket connection request.  If the
server does not wish to accept connections from this origin, it can
choose to reject the connection by sending an appropriate HTTP error
code.  This header field is sent by browser clients; for non-browser
clients, this header field may be sent if it makes sense in the
context of those clients.

It's focus is clearly around CORS requests, where the browser is trusted and will accurately report the Origin (the website making the websocket request).  Setting it automatically seems surprising, particularly as it's trivial (once discovered) to send with OkHttp.
On the other side https://en.wikipedia.org/wiki/WebSocket

It is important (from a security perspective) to validate the "Origin" header during the connection establishment process on the server side (against the expected origins) to avoid Cross-Site WebSocket Hijacking attacks, which might be possible when the connection is authenticated with Cookies or HTTP authentication. It is better to use tokens or similar protection mechanisms to authenticate the WebSocket connection when sensitive (private) data is being transferred over the WebSocket.[33]

Possibilities are

Don't send by default (current status)
Send an Origin by default, but that might send one that causes other servers to start rejecting traffic that is currently accepted.  Other WebSocket servers might now assume the new requests are browser based.
Include in WebSocket API to force clients to provide a valid Origin, as an assumption that websocket servers will generally want to validate this accurately.

I'd argue against changing anything here as it risky and makes OkHttp look like a browser user agent.

Thanks for your explanation.


Error: model is not configured properly!

When I try to run php artisan generate:factory User Companies
I get the following error Database driver (mysql) for App\Models\Companies model is not configured properly!
I get the same error on all models when running php artisan generate:factory
Companies migration
Schema::create('companies', function (Blueprint $table) {
    $table->id();
    $table->string('company_name', 100);
    $table->unsignedBigInteger('user_id')->index();
    $table->timestamps();
});

Schema::table('companies', function (Blueprint $table) {
    $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});

Companies Model
class Companies extends Model
{
    use HasFactory;
    public $guarded = [];

    public function clusters(): HasMany {
        return $this->hasMany(PosClusters::class);
    }

    public function user(): BelongsTo {
        return $this->belongsTo(User::class);
    }
}

Hello @warmwhisky.
The generator fetched a table schema from the database.
This error clearly suggests that the database connection cannot be established.

@TheDoctor0 I believe the connection is fine as I can run migrations and also log in with the user.

@warmwhisky that would mean that this line fails anyway.
I would suggest simply adding a dd($exception) in the catch closure so that you can get an actual error message for it.


Add tini

Closes #161

References: https://github.com/krallin/tini-images/issues/9

@wperron any word about the distroless approach? It's the only place where we pin the tini version.


Prevent click events from firing twice on Windows Phone

On Windows Phone 8.1 and 10, Ionic (1.1.1) invokes click events twice in certain situations (caused by the tap handler). This patch filters out these events on the affected element types.
Note: I recognise that Windows Phone is not currently officially supported. However, this is literally the only issue I've encountered when targeting Windows Phone - which is pretty good going for an unsupported platform.

Regarding the failed tests - it looks like the things it fails on are precisely what this change is supposed to do (but only affects the windowsPhone platform). I'm not familiar with karma, so if someone else is able to look at this, it'd be much appreciated.

+1

I discoverd that by this bug fix (thank you for that ;-)) the "activated" class does not apply on the appropriated html elements on windows...


Erro installing homebridge-broadlink-rm in raspberry pi

I have node version v.14.4.0, i installed last version of homebridge UI X. Its working. But when i try install this plugin, i get this error:
`root@raspberrypi:~# npm i -g homebridge-broadlink-rm

<EMAIL_ADDRESS>install /usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket
node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket/.node-gyp'
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket
gyp ERR! node -v v14.4.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!  I am using last version of node..

same for me...
node -v v10.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

still works:
sudo -E -n npm install<EMAIL_ADDRESS>

I had a similar issue. Running this fixed it for me:
sudo chown $USER /usr/lib/node_modules

If not, try running your install command with sudo.


Esp wifi/fix wifi logs

Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝

[ ] I have updated existing examples or added new ones (if applicable).
[ ] I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
[ ] My changes were added to the CHANGELOG.md in the proper section.
[ ] I have added necessary changes to user code to the Migration Guide.
[ ] My changes are in accordance to the esp-rs API guidelines

Extra:

[ ] I have read the CONTRIBUTING.md guide and followed its instructions.

Pull Request Details 📖
Description
We broke esp-wifi's wifi-log feature - this is a fix.
Additionally add some clarifications to the migrations guide including how to use your own allocator instead of esp-alloc
Not sure if this would deserve a 0.9.2 release (I tend to say no)
Testing
Examples still work - even with wifi-logs enabled

Could we also add CI checks for this feature (and also any other relevant ones)?

Added wifi-logs and sniffer - pretty much everything else should be covered (with the exception of the somewhat obscure have-strchr) besides log - we check defmt but given locally examples are using log that should be fine


chunk queue

Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
Package version, Laravel version 5.2
I import the XLS file, use the queue, but the queue is not executed

Are you running a queue listener?

yes.


Feedback Needed - Refactored SpMxSpM

Single API is now split into multiple API's in order to allow the application to allocate memory rather than the library.
I have written the sample code on how to use this API.
Is this the better-way ? See the code @
sample file : https://github.com/kvaragan/clSPARSE/blob/kvaragan_PR150/samples/sample-spmspm.cpp
refactor code: https://github.com/kvaragan/clSPARSE/blob/kvaragan_PR150/src/library/blas3/clsparse-spm-spm.cpp
API's : https://github.com/kvaragan/clSPARSE/blob/kvaragan_PR150/src/include/clSPARSE.h

I'm checking it right now.

I think the way to multiply two sparse matrices here is way too complicated. I understand that the issue is related to the concept that user is responsible for buffer allocation. Here are my general comments

Users should not see the rowPtrCtSizeInBytes  and buffer_d_SizeInBytes I think they should be hidden in spgemmInfo
I would rename clsparseSpGEMM to clsparseSpGEMMInfo or clsparseSpGEMMInfoHelper not to confuse that with function name.
I can't say that I like the names of the explicit functions like here

The general explicit call for spGemm should be done at most in two separated functions. The first one calculates the necessary memory requirements for result matrix, second is doing actual spmm.
clsparseSpGEMM spgemmInfo;

clsparseStatus status = clsparse<S/D>SpmmAnalyse(&A, &B, &spgemmInfo, control);

if (status == clsparseSuccess)
{
//check the spgemmInfo additional information, i.e. if there is enough memory to
//complete spmm operation.
//allocate the C matrix according to spgemminfo content;

//do the spmm
status = clsparse<S/D>Spmm(&A, &B, &C, &spgemmInfo, control);
}

clsparseReleaseSpGEMMInfo(&spgemmInfo);

I see that it might be difficult at the moment, but I would like to see that every iteration of this algorithm bring us to this kind of concept.
Here some more details inside of clsparse-spm-spm.cpp:

[This] (https://github.com/kvaragan/clSPARSE/blob/kvaragan_PR150/src/library/blas3/clsparse-spm-spm.cpp#L47) defines as previously should be defined in the places where they are used.

I would rename [those] (https://github.com/kvaragan/clSPARSE/blob/kvaragan_PR150/src/library/blas3/clsparse-spm-spm.cpp#L725) and those variables to Anum_rows, Anum_cols, etc. for the sake of clarity, it will be easier to maintain the code later.

This kind of interface is unacceptable in my opinion. We will be flooded by issues from the users in cases when they will put something wrong there.

In several places like here you were using explicit scan. I would create an internal function for that.

I would use ```clsparse::vector`` here and in any other places where you allocating cl_mem buffer instead. Here as well

Why dont pass ref to std::vector instead of raw pointers here. In addition templetize the statistics funcion for various int types.

Another scan. Maybe int nnzC = computeCsrNNZ(...) whould be more convinient

I did not go trough the internal spmm functions deeply for now, but I saw that they need to be templetized for various types, the kernels should be feeded with additional definitions group size, tuple_queue etc. In the final optimisation stages several kernels like compute_nnz_Ct looks like spmv traversal so they might be optimised for vectorized versions.

Thanks for the feedback @jpola . I agree with all comments and your suggestions can be incorporated, but before I do that should we go ahead with this design. Basic principle of this design is, to separate memory allocations from computation and user should have control for buffer allocation.

@kvaragan
I approve of your goal here, but I have to agree with Jakub that this interface is not finished yet.  If I have to ask users to change their SpM-SpM interface 1 time before v1.0, I would rather ask them to change from using this API:
 CLSPARSE_EXPORT clsparseStatus
        clsparseScsrSpGemm(
        const clsparseCsrMatrix* sparseMatA,
        const clsparseCsrMatrix* sparseMatB,
              clsparseCsrMatrix* sparseMatC,
        const clsparseControl control );

than to change from these API's
 clstatus = clsparseSpMSpM_CreateInit(&A, &B, control,
                                         &spgemmInfo,            // output
                                         &rowPtrCtSizeInBytes,   // output
                                         &buffer_d_SizeInBytes); // output

clstatus = clsparseSpMSpM_ComputennzCtExt(csrRowPtrCt_d,
                                               rowPtrCtSizeInBytes,
                                               sizeof(cl_int),
                                               buffer_d,
                                               buffer_d_SizeInBytes,
                                               &nnzCt,
                                               spgemmInfo,
                                               control);

clstatus = clsparseSpMSpM_ScsrSpmSpmnnzC(C.rowOffsets,          // ( m+1) * sizeof(int) - memory allocated
                                              csrRowPtrCt_d,         // ( m+1) * sizeof(int) - memory allocated
                                              &csrColIndCt_d,        // nnzCt * sizeof(int)
                                              &csrValCt_d,           // nnzCt * sizeof(float) - Single Precision
                                              &nnzC,                    // nnz of Output matrix
                                              spgemmInfo,
                                              control);

clstatus = clsparseSpMSpM_FillScsrOutput(C.rowOffsets,
                                              C.colIndices,
                                              C.values,
                                              csrRowPtrCt_d,
                                              csrColIndCt_d,
                                              csrValCt_d,
                                              nnzC,
                                              spgemmInfo,
                                              control);

I agree that currently the SpM-SpM is allocating a lot of internal memory, but the user experience of the original API is more in line with what we want present to our users.  I have not combed through the implementation files, but I trust that Jakub has given sufficient feedback for this iteration.
Here's your challenge: can you design a working implementation with an API like what Jakub mocked above? 1 helper clsparse<S/D>SpmmAnalyse(), 1 worker clsparse<S/D>Spmm()

@jpola
Will it be possible to just typedef clsparse::vector to the boost.compute vector?  Same with array?

I wish but I think it would not be possible. I'll take a closer look on
that tomorrow.
2015-09-29 23:37 GMT+02:00 Kent Knox<EMAIL_ADDRESS>
@jpola https://github.com/jpola
Will it be possible to just typedef clsparse::vector to the boost.compute
vector? Same with array?
—
Reply to this email directly or view it on GitHub
https://github.com/clMathLibraries/clSPARSE/issues/158#issuecomment-144198544
.

@jpola using clsparse::vector is same as using clCreateBuffer(),because internally that's what clsparse::vector is doing. If I use clsparse::vector then it will defeat the purpose of this design.

@kknox Because of the nature of the algorithm, 2 APIs are not enough but if we clsparse::vector may be it can be done, but that means memory allocations inside the library and that will be as good as our first implementation.
So can I conclude we that will be going with the 1 API design which is already present in the develop branch?

@kvaragan of course the clsparse::vector is built over the opencl buffer. It was just my suggestion that I would use it because it have more benefits among many I think those are the most important:

Code is more readible which means that it is easier to understand and maintain.
clsparse::vector manages the memory for you. You can avoid potential memory leaks. Even if i saw that the code seems not to have any we can't be sure that in the future we do not make any mistake. The use of clsparse::vector or array will minimise the issues related to the code by enforcing future developers to adopt to the present style.
In the near future it seems that we are moving to the boost::compute. It will indicate where the old clsparse::vector might be substituted for more advanced / user friendly data structure.
vector know its size, We  will be able to simplify the code greatly by using proper constructor of std::vector, compute::vector and compute::copy functions to eliminate clEnqueueWrite/Read/Copy functions.

@jpola If this is the case, then why don't we  expose this header to application, so that application can start using clsparse::vector. I don't know whether this is currently possible or not. We will have advantages of what you mentioned and advantages of user having control over memory allocations.
If we can't expose this header, then we don't need this new design we can stick to the old one and just replace explicit device memory allocations with clsparse::vector.

Sorry Kiran, I might misunderstood you. The concept I mentioned before is
applicable only for internal code of our library. My answer was referring
to the point 5. from my list of feedbacks.  Instead of cl_mem I wish to use
clsparse::vector.
When it comes to interface functions from clSPARSE.h header we are passing
cl_mem due to fact that we want that clSPARSE is having C style interface.
Library then can be easily adopted to other programming languages like
python or fortran.
However when you are implementing interface functions you can put a
clsparse::vector interface temporary for input and output parameters with
this constructor:
//create vector from preinitialized buffer.
vector (clsparseControl control, const cl::Buffer& buffer, size_t size) :
BASE::_buff(buffer), BASE::_size(size), queue(control->queue)
You may see the
https://github.com/clMathLibraries/clSPARSE/blob/master/src/library/solvers/conjugate-gradients.hpp
to check how it's done.
Concluding, I wanted to suggest that when you are in the definition of the
interface functions or in any other internal clSPARSE function use
clsparse::vector or some more use-friendly datatype than cl_mem or put the
clsparse::vector interface on incomming function parameters of type cl_mem.
Kuba.
2015-09-30 10:42 GMT+02:00 Kiran<EMAIL_ADDRESS>
@jpola https://github.com/jpola If this is the case, then why don't we
expose this header to application, so that application can start using
clsparse::vector. I don't know whether this is currently possible or not.
We will have advantages of what you mentioned and advantages of user having
control over memory allocations.
If we can't expose this header, then we don't need this new design we can
stick to the old one and just replace explicit device memory allocations
with clsparse::vector.
—
Reply to this email directly or view it on GitHub
https://github.com/clMathLibraries/clSPARSE/issues/158#issuecomment-144329072
.

Understood, I missed the point C-style interface. So we will stick to the 1 API design + your suggestions about memory allocations (clsparse::vector). Thanks for clarifying.

@kvaragan I looks like @jpola answered the majority of your questions, but to close this out I think we need to ship Beta2 with the 1 API version.  It's not optimal, but its easy to document and use.  I think a good approach to use is to try to simplify the guts of the SpM-SpM routine first (starting with the recommendations above), and once the current codepaths are simpler (possibly leveraging boost.compute) it may be easier to refactor the memory allocations in a cleaner way.
In the ideal world (I like Jakub's proposed names), the *Analyze function would 'simulate' what would happen end to end in the SpM-SpM call, and can record/store all required temp buffers needed for the algorithm.  The user would then be free to allocate those buffers as they see fit and put the buffer handles into the spmminfo structure to be passed into the *spmm compute routine.
Everything included in or included by clsparse.h should be extern C.  We can use C++ inside the library and user can use c++ in the application.  Users are able to use boost.compute on their own if they wish, but they need to pass handles into the library.  As a future enhancement request, a c++ wrapper could be provided for the library to provide convenience objects and functions.

@kknox I am closing this issue, with conclusion for Beta 2 release we will go with 1 API version. I will add rest of the suggestions to future enhancements #152. Thank You for the feedback


Fix too many events tracked by screen view autotracking (close #689)

This PR addresses issue #689.
The problem was that the screen view autotracking tracked too many events for non-relevant views (e.g., for the on-screen keyboard). I found a simple solution for it – just filter out views that are not in the main bundle.
Not sure if that condition is too strict. I don't expect users to have views in different bundles, but don't have much experience with UIKit, so correct me if I'm wrong.

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

Thanks @AlexBenny, checking for the bundle path is a better solution! I changed it to check if the class bundle starts with the path of the main bundle.


An existing connection was forcibly closed by the remote host

From @sepehr1014 on May 8, 2018 10:25
Using ASP.NET Core 2.1 RC1 the process is killed after an hour or so and we see these logs:
Application: dotnet.exe
CoreCLR Version: 4.6.26426.2
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AggregateException: One or more errors occurred. (An existing connection was forcibly closed by the remote host) ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Shutdown()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Abort()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1OutputProducer.Abort(Exception error)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Abort(Exception error)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.Abort(Exception ex)
   at System.IO.Pipelines.PipeCompletionCallbacks.Execute()
   --- End of inner exception stack trace ---
   at System.IO.Pipelines.PipeCompletionCallbacks.Execute()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Faulting application name: dotnet.exe, version: 2.1.26426.3, time stamp: 0x5ae1770d
Faulting module name: KERNELBASE.dll, version: 10.0.14393.2189, time stamp: 0x5abdad60
Exception code: 0xe0434352
Fault offset: 0x0000000000033c58
Faulting process id: 0x2e90
Faulting application start time: 0x01d3e6aa48e5f5c6
Faulting application path: C:\Program Files\dotnet\dotnet.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: f10816d3-b0de-49bc-9745-60f9b7dea199
Faulting package full name:
Faulting package-relative application ID:

BTW we're using web sockets without SignalR.
Copied from original issue: aspnet/Home#3125

From @davidfowl on May 8, 2018 10:34
Looks like this: https://github.com/aspnet/KestrelHttpServer/issues/2536

From @davidfowl on May 8, 2018 10:34
/cc @halter73

From @sepehr1014 on May 8, 2018 12:38
We're having this issue on production and relying on memory cache, it's quite frustrating to have the process killed. Is there any workaround we could use until this is fixed?

From @Ikcelaks on May 8, 2018 14:1
I am getting the EXACT same Unhandled Exception trace on my development machine using Core 2.1 rc1 and a freshly created MVC project.  The Exception can be triggered reliably within a minute by rapidly clicking between "Home", "About", and "Contacts" from multiple browsers (Multiple browsers aren't required, but I find that it makes the problem happen quicker).
This development machine formerly ran 2.1 preview2 (without Kestrel crashes).

I'm moving this comment, which I submitted just after the issue was moved:
Troubleshooting Update:
I attempted to recreate this bug with a fresh install of DotNet-2.1-RC1 on a fresh Windows 1709 VM, and I was unable to do so. All of my projects ran just fine without crashing.
I returned to my original dev machine (also Windows 1709) and attempted to recreate a fresh environment by uninstalling all versions of DotNet Core and manually removing the NuGetFallbackFolder before reinstalling RC1. This did not resolve the issue.
Then I realized that the fresh VM was on a network that bypasses Web-Filtering. I put my original dev machine on that same network, and suddenly I was no longer able to trigger the Uncaught Exception error. Fortunately/Unfortunately, returning the device to the original filtered network did not cause the bug to return. I'm also unable to correlate the Uncaught Exceptions with any events logged by the Web Filter, but that doesn't mean much, because the kinds of rules that telemetry reporting would trigger don't show up in the log.
Question:
Is there any chance that the development WebHost is attempting to communicate out to the internet and crashing when the communication is cut off (possibly mid-stream) by a web-filter?

We are having the same issue after upgrading to 2.1 RC1.
The issue can be reliably recreated (if manually at this stage) by aborting the client socket in chrome when making a request to kestrel. With the chrome dev tools I turned the network speed down to slow 3g and while chrome was loading pages, I hit the button to stop requests. As soon as this happens, Kestrel has an unhandled exception with call stack below. What is bad is there looks to be no way to handle the exception.
This looks to be a critical showstopper bug!
System.AggregateException: One or more errors occurred. (An existing connection was forcibly closed by the remote host) ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)    at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Shutdown()    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Abort()    at Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection.Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature.Abort()    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1OutputProducer.Abort(Exception error)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Abort(Exception error)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.Abort(Exception ex)    at System.IO.Pipelines.PipeCompletionCallbacks.Execute()    --- End of inner exception stack trace ---    at System.IO.Pipelines.PipeCompletionCallbacks.Execute()    at System.IO.Pipelines.Pipe.<>c.<.cctor>b__79_2(Object state)    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown ---    at System.Threading.ThreadPoolWorkQueue.Dispatch() ---> (Inner Exception #0) System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)    at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Shutdown()    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection.Abort()    at Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.TransportConnection.Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature.Abort()    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1OutputProducer.Abort(Exception error)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.Abort(Exception error)    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.Abort(Exception ex)    at System.IO.Pipelines.PipeCompletionCallbacks.Execute()<---

@neilcawse We're looking into it. In the meantime you can still use the old libuv transport in 2.1. This doc-in-progress shows which package to add. From there, you can just call IWebHostBuilder.UseLibuv() extension method.

Just a heads up that I am still seeing this in 2.1.0-rc1-final

@sonicmouse Unfortunately, 2.1.0-rc1-final is the first (and last) release with this issue. It will be fixed in rtm. You can work around the issue by selecting the libuv transport in the meantime.

I facing this problem today.
I'm using asp.net core 2.1.0 on .net461.
here's the error log
2018-06-27 15:22:59.1865|13|ERROR|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HLERVO6PKH3B", Request id "0HLERVO6PKH3B:00000001": An unhandled exception was thrown by the application. System.IO.IOException: 远程主机强迫关闭了一个现有的连接。 ---> System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。

Comments on closed issues are not tracked, please open a new issue with the details for your scenario.


Ninja should have a way to trigger compiles through IPC instead of CreateProcess

CreateProcess on Windows is slow at the best of times, and Chrome developers often find themselves not in the best of times. Some process creation/destruction issues that have been dealt with over the last few years in the Chrome build include:

Chrome builds hit UserCrit lock contention during process destruction causing build slowdowns and significant mouse stuttering during goma builds due to a Windows regression. Fixed in Windows, fix eventually propagated to all relevant Windows 10 builds (https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and-i-cant-move-my-mouse/)
Chrome builds hit UserCrit lock contention during process destruction causing build slowdowns and significant mouse stuttering during goma builds due to gomacc.exe indirectly pulling in gdi32.dll. Fixed in gomacc by avoiding gdi32.dll.
Anti-malware software caused an ~11 ms regression in CreateProcess making it impossible for a full Chrome build to be faster than ~ten minutes, and slowing all builds. Fixed by disabling this anti-malware software.
At least two variations on problem number 3 including other anti-malware software that is either not correctly disabled or still has overhead (MsMpEng.exe) even when disabled.
The high process creation rate in Chrome's build triggered bugs in SCCM that caused zombie processes that eventually led to up to 32 GB of lost memory (https://randomascii.wordpress.com/2018/02/11/zombie-processes-are-eating-your-memory/)
Enabling App Verifier for gomacc.exe to investigate occasional heap corruption hit an O(n^2) performance issue in log-file creation (https://randomascii.wordpress.com/2018/10/15/making-windows-slower-part-2-process-creation/)

Other process creation/destruction issues that didn't affect Chrome builds include:

Chromium's large test binaries hit an O(n^2) CFG performance bug hit in Windows which caused unit_tests.exe to take approximately 5x as long as it should on Windows 10. Fixed by disabling CFG in test binaries (https://randomascii.wordpress.com/2019/04/21/on2-in-createprocess/)
clang-cl unit tests hit UserCrit lock contention during process destruction causing the tests to take 5x as long as they should on Windows 10 and causing significant mouse stuttering. Fixed by avoiding pulling in gdi32.dll.

Currently all of these issues are mitigated, with the exception of MsMpEng.exe causing non-zero overhead even when everything is in excluded folders. However there is ongoing effort needed to keep all Chrome developers' machines properly configured, and some loss of security because of the many exclusions needed to maintain decent build performance. There is also ongoing effort to detect and investigate these issues.
At some point it is no longer worth tilting at the CreateProcess windmill and instead avoid calling CreateProcess so frequently. ninja.exe could be taught how to use IPC to communicate with a local server process that would manage a pool of compile processes (goma and/or clang-cl) in order to avoid 99% of CreateProcess calls during a build.
Doing this would reduce the CPU cost of CreateProcess, would remove CreateProcess from the serialized critical path in ninja, would allow more security monitoring to be enabled with fewer exclusions, and would save us from the costs (investigation time and build time) of future regressions.
Alternately ninja could multi-thread CreateProcess but this is not as complete a solution.
Switching from CreateProcess to IPC in ninja is not clearly the right thing to do, but it is worth discussing. A prototype has been created so test results should be shared here.

It seems to me like library-ifying Ninja would allow for efforts like this to more easily inject the behavior that they want, such as by deriving from an interface class to customize the process creation behavior.

Not surprisingly, I strongly disagree with this. Ninja is a simple build system that assumes that the build environment is sane. There are other build systems with different designs that might assume hostile build environments, but ninja is not that system.
It sounds like ninja's current design help identify lots of bugs that were worth fixing. I consider this a feature.

@nico, I strongly disagree with your opinion on this matter.
To begin with, Ninja started as a tool to improve the compile times of the Chrome project. http://neugierig.org/software/chromium/notes/2011/02/ninja.html
Now you're telling someone who's talking about ways to improve compile times for the chrome project that their contribution isn't welcome.
Ninja would easily accommodate using IPC to execute build jobs if it was a graph execution library first, and a build tool second. That would allow for the IPC logic to be injected into the library, instead of living in the core code.
Furthermore, as a "maintainer" of a project that rarely sees such sophisticated bug reports (with the implied promise to follow up with actual code), it's rather ridiculous that you would close this one with absolutely no discussion of the topic, but none of the 189 other issues that remain open, some as old as 8 years old.
And, of course, calling Windows a hostile build environment may well be true, but it's not a valid justification for ignoring a contribution. Windows is still one of the most widely used development operating systems, and ignoring that is disingenuous at best.
@nico I encourage you to step away from the Ninja project. Your only action in months is to dismiss a sophisticated contribution, with heaps of documentation explaining the problem and solutions that have been pursued.

@randomascii I would be happy to see a contribution like what you're talking about here integrated into Ninja. At my last workplace, I strongly suspect that an IPC mechanism like this could have cut build times by at least several minutes per build, which would have been wonderful.
Could you describe more how a pool of compile processes would be managed? Does windows have a mechanism that allows a process to be re-used to execute something else? Or would this require the compiler process to be reusable?

I would encourage your colleague to submit a Pull Request here on github with their prototype, so that the implementation can be discussed.


Discussion: Should we remove "trivial" constraints as part of normalization?

For constraints like x <= 1, we can trivially convert them into bounds. The question is whether that's a normalization step or a presolve step. This becomes most relevant in the infeasible case.
Argument for normalization
One argument for doing it in normalization is that these sorts of trivial constraints are easy to construct when a user is not familiar with the API. It may seem more intuitive to do
x = cqm.add_variable("INTEGER", "x")
cqm.add_constraint(x <= 5)

than
cqm.add_variable("INTEGER", "x", upper_bound=5)

so the user's "intention" may be to treat these constraints as bounds.
Another reason is that having trivially infeasible bounds is likely to indicate a bug in the user's code.
Argument for presolve
This is (to me) the more consistent approach.

As of https://github.com/dwavesystems/dwave-preprocessing/pull/103 we do not remove the trivial constraints as part of normalization.


Update for a new version of scala-logging

Including spray-swagger to any project using scala-logging in version > "2" causes "ImplementationClass" errors during startup.
Can we bump scala-logging version to "3"?

:+1:


NoClassDefFoundError: com/sun/javafx/application/ParametersImpl

I can not build the Launcher since i have upgraded from Java 8 to openJDK 11.
i got the following Error when i run the deployApp-Task:
Execution failed for task ':generateApplicationManifest'.
Root cause: java.lang.ClassNotFoundException: com.sun.javafx.application.ParametersImpl
I use org.openjfx.javafxplugin version 0.0.7 ( or 0.0.4) with all Modules imported.
Has anyone an Idea?

Fxlauncher does not support java 11, you can take a look here.
and i dont think the support for 11 will come soon, also the java 8 will be supported for long time.
you can make it work on your own, but out of the box it will not work properly with java 11.

https://github.com/update4j/update4j

https://github.com/update4j/update4j

Does your program support spring boot based javafx applications?

As long your code doesn't run in a container (i.e. It has it's own main method) it should work.

More clearly, if it has an application entry point, even it is triggered by a framework, it should work.
It will not work for servlets which doesn't have it's own lifecycle, but completely dependent on a container.

https://github.com/update4j/update4j

I have seen this yesterday but i'am not sure how to implement it on my application.

Run the update4j jar file and read the instructions. You'll only need to understand how to create configurations to get your app up and running. More advanced features exists, as service providers but leave this for later.
It has a slightly harder learning curve than fxlauncher I agree, but is way more powerful.

but how do i publish the update4j.jar to other clients? They don't want to start the app on the console.

You're touching the subject of service providers. You'll supply your own UpdateHandler which does the JavaFX download progress drawing. Nothing will show when started via the console and you can use java packager or bat2exe to create a clickable executable to your users.
Currently it does not have a default JavaFX interface as FXLauncher has; it was built at a more abstract level (you might want to use it for Swing or console apps or host an embedded Jetty server etc.). The console version is just to get starters to see their app running without much configuration.
Check out the demo app for ideas how to get a nice JavaFX progress monitor.

Sorry but i dont understand what im having to do.. i have created a nwe javafx-application. on MainController i have create an Configuration and run config.update(); and config.launch();
but how do i add my other Project wich is my main-application?
How do i export my app to add it to launcher-app with FileMetadata.streamDirectory?

Since I expect you to use the default update interface for now (with console output) until you can get it to run, you should not call update() or launch() yourself. It is done internally for you.
Code your business application separately as if it has no updater framework involved. When you're ready for updatable deployment and you have all files you need, you should then build a configuration (using the builder API) and output it to a file. This is actually the biggest hurdle for starters; once you passed this (mentally and practically) you're open to much more features.
Now, simply pass the config file to the --remote or --local options (or both as a fallback plan in case of Internet outage) and everything will be done for you. In order to find the main class you'll have to add a special property as explained in the launch output, but this is only for the default behaviour; totally overridable.

I think this issue should be closed, since it was answered. All other questions regarding upload4j you can ask on its own github page.
cheers


Upload and Download Artifacts?

What about upload and download artifact commands, does this cover that?  I noticed even though it deleted some artifacts I still hit the Artifact storage quota has been hit. Unable to upload any new artifacts
sigh:

it must not take effect immediately on the quota. I waited for like an hour and must be the ones it removed actually worked.


[Merge once SCDF M3/RC1 is released] Include new doc section. Depend on newest SCDF version

Fixes https://github.com/spring-cloud/spring-cloud-dataflow-server-cloudfoundry/issues/200

Also updated parent pom in a later commit to 1.1 build snapshot https://github.com/spring-cloud/spring-cloud-dataflow-server-cloudfoundry/commit/e0388b07029881c3f6d1442c3627694ccc868e68


expose syntax theme colors to julia?

Hi, I saw that @pkofod have been doing some themes for Plots.jl, among them a dark theme that would fit well with Atom I'm sure (PlotThemes.jl). I had the idea that it would be cool to have a Plots color scheme for use specifically in Atom that automatically selected colors based on Atom's current syntax color theme. Is that less file exposed by Atom in some way (or could it be)? Thanks!

I don't see why this wouldn't be possible. One of the obstructions would be that I don't think this information could be gotten directly via Juno.jl, so it would require an Atom dependency. But Juno.jl could export a macro which will error when Atom isn't installed, but gives this information when it is (by simply making the expression which calls that right Atom.jl function). Then it would just require a Juno.jl dependency for PlotThemes.jl (which is a light dependency) and work on @pkofod's side to integrate it.

For the record, I don't mind adding Juno.jl as a dependency, and think this is a cool idea.

Thanks @pkofod. I don't mind making the PR on PlotThemes if I can work out how to get this info from Atom. Would be cool (I think?) to also use the Atom font for axis labels etc.

Another way to do this without dependencies is to use Main.Atom. ... to preface the function calls. This form of conditional dependencies is safe, but only will work with something like Juno since it requires that the user has imported Atom. Luckily, that is done in the Juno startup process, so Main.Atom will always be able to call the function if the user has Atom installed.
You can combine this by checking isdefined(Main,:Atom) which is true only if Atom has been imported into Main (i.e. only if the user is using Juno).

I think this should be doable – but I'm not yet sure how to do the appropriate reflection inside Atom. Will look into it.

Hi, I still think it would be cool to do this and wouldn't mind putting it together (though I am not sure it is still viable to depend on Juno, as PlotThemes is now a Plots dependency).


Update speed for Ghost_enemy and funtion take damage for enemy

Speed for enemy now is 300
Health is 2 and every time enemy get shot so it minus 1 health .

You have conflicts in your branch. Sync and rebase your fork.


FIX Filter hostname in TrustedProxyMiddleware

In depth defense, rather than a security vulnerability.
The trusted proxy IP list is empty by default, meaning no request can set this information.
Systems need to opt in to this behaviour by setting specific proxy IPs.
While there is an "all IPs" option, it's not documented on
https://docs.silverstripe.org/en/4/developer_guides/security/secure_coding/#request-hostname-forgery.
If you find and configure this option, you're also expected to sanitise these layers (e.g. a load balancer).
This issue was originally referred to as SS-2018-024

I'll have to confirm what we want to do with localhost:8080 and punny code.

Thanks for adding more test coverage! Looking at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Host, https://tools.ietf.org/html/rfc7230#section-5.4, https://tools.ietf.org/html/rfc3986#section-3.2.2. IPv6 can be covered by FILTER_VALIDATE_IP. Any host can have a port, which isn't covered by FILTER_VALIDATE_DOMAIN or FILTER_VALIDATE_IP. We can strip it, but that gets complicated with IPv6 which also uses double colons as delimiters. If I'm reading https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2 correctly, this is solved by marking the host in square brackets:

A host identified by an IPv6 literal address is represented inside the square brackets without a preceding version flag.

Now, I could parse out the port, account for IPv4 and IPv6. But this is getting into diminishing returns for an in-depth defense. In the end, it's up to devs in complex setups (with reverse proxies etc) to secure their setups, and we already go through great lengths to describe the ins and outs of that in https://docs.silverstripe.org/en/4/developer_guides/security/secure_coding/#request-hostname-forgery. I don't see us making any insecure recommendations there, in particular this sentence is accurate:

If only trusted servers will make requests then you can use '*' to trust all clients.

Closing this.


HTML5 Songs Not Working

Describe your bug here.
The Songs Are Not Working In My HTML5 Build.
When I try to load one of the songs, it just gives me an error.
[lime.utils.Assets] ERROR: SOUND asset "songs:assets/songs/pb-extended/Voices.mp3" exists, but only asynchronously
Is there a fix for it?
What do I have to do to fix it?
Command Prompt/Terminal logs (if existing)
[lime.utils.Assets] ERROR: SOUND asset "songs:assets/songs/pb-extended/Voices.mp3" exists, but only asynchronously

Are you modding a build from source or with Lua?
Source
What is your build target?
HTML5
Did you edit anything in this build? If so, mention or summarize your changes.
I was making a mod for pc, so i decided to make a html build.

convert ogg to mp3

convert ogg to mp3

I did that already, i also tried to recompile the source code using the original assets, and they have the same error.

Fixed.


flutter web textfield  is hard to open copy and paste menu with double-tap on ios phone

Steps to reproduce
On Flutter Web for Android, after long-pressing a TextField, the paste functionality appears correctly. However, on Flutter Web for iOS, users typically double-tap to bring up the paste menu. When double-tapping, the menu briefly appears but quickly disappears. If the TextField contains text, it gets fully selected. It seems that the "select all" action overrides the paste menu. Long-pressing, however, works as expected and correctly opens the paste functionality.
Expected results
When double-tapping on ios web, shows the copy and paste menu.
Actual results
When double-tapping, the menu briefly appears but quickly disappears.
Code sample
Code sample
  @override
  Widget build(BuildContext context) {
    return  TextField();
  }

Screenshots or Video

Screenshots / Video demonstration
https://github.com/user-attachments/assets/59595084-3379-40f4-a5b1-e51f6a67a66e

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.1, on macOS 14.5 23F79 darwin-arm64, locale zh-Hant-TW)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.92.2)

@hakama99 Thanks for the report.
I tried the same on iPhone 6s device's safari browser, but wasn't able to replicate the reported behavior. Upon double tapping, the text selection toolbar properly appears as shown below:
https://github.com/user-attachments/assets/9e094e44-e0fb-4cdc-b697-9398b7eee6a7
I tried on latest stable version.
Can you provide the device details such as OS version and device make ?

Iphone14
Ios version 17.6.1

Other issues in the same environment
https://github.com/flutter/flutter/issues/155388

here is my sample
https://www.emmt-system.com/ecsale_test/OrderSearch

@hakama99 I was able to replicate with this link, running on iOS 14 device, but not on iOS 13 pro max simulator. Can you provide a complete but minimal runnable code sample ?

test.zip
in order_search.dart

@hakama99
I looked at the zip file. It contains third party package implementation, but in order to properly address the issue, we would need a minimal reproducible code sample only without third party code.
https://stackoverflow.com/help/minimal-reproducible-example

OK
flutter_web.zip

Thanks for the update. I was able to replicate this on iOS 14 device's safari browser, but not on 6s device, so this seems to be OS version specific issue which currently seems to be only occuring on iOS devices, not on Android + browsers.

 runnable code
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // TRY THIS: Try running your application with "flutter run". You'll see
        // the application has a purple toolbar. Then, without quitting the app,
        // try changing the seedColor in the colorScheme below to Colors.green
        // and then invoke "hot reload" (save your changes or press the "hot
        // reload" button in a Flutter-supported IDE, or press "r" if you used
        // the command line to start the app).
        //
        // Notice that the counter didn't reset back to zero; the application
        // state is not lost during the reload. To reset the state, use hot
        // restart instead.
        //
        // This works for code too, not just values: Most code changes can be
        // tested with just a hot reload.
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  var text = "textfield action";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: SingleChildScrollView(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.stretch,
                mainAxisSize: MainAxisSize.max,
                children: [
                  SizedBox(height: 500),
                  TextField(
                    onEditingComplete: () {
                      print("onEditingComplete");
                      text = "onEditingComplete";
                      setState(() {});
                    },
                    onSubmitted: (value) {
                      print("onSubmitted");
                      text = "onSubmitted";
                      setState(() {});
                    },
                  ),
                  Text(text),
                  SizedBox(height: 100),
                ],
              ),
            ),
          ),
          Container(color: Colors.blue, height: 100),
        ],
      ),
    );
  }
}

Stable : 3.24.3
Master: 3.26.0-1.0.pre.183

thanks for trigger!

@yjbanov Any idea why this would depend on the iOS version? Related to double tapping and/or the built-in browser context menu.

Not sure. Someone will have to investigate.


Cleanup of various RIO settings create an inadvertent breaking change between RDF4J 4.3 and 5.0

This is an issue to explore the possibility of reverting the breaking changes.


fix: correctly add units to float sizes #42

Fixes issue #42

Hi @tim-evans  don't know if you noticed but I edited my PR per your request.

Thanks for the poke


Simplification of derivatives

More simpler by calling other functions of CAS;
removed superelement? and Berechne;
added a few comments;
"Unbekannt" is now "Unknown"

Thanks for your commitment!


Adding functions documentaion for go docs & codes table in README

Hi @escalopa, I'm just noticing this PR. Can you please pull the latest changes I made in the repo, so that I can merge your changes.

Hey @lordvidex, I resolved the merge conflicts into a new branch docs on my side, Now this PR is merge from my branch docs to  yours main.


docs: fix file-based-routing.md link

Encountered a broken link while reading the docs.

Just needs a rebase

@tannerlinsley done :)

Looks like this got fixed in #1189

Thanks for the catch @mgcrea!
I'm going ahead and closing this one as it got fixed in #1189.


"Net Calorie Goal" appears to actually be using kilocalories

Looking at the data coming in, it appears to be represented in kilocalories, like the other fields. I think they're using the colloquial usage of "calorie" to refer to kilocalories.
To fix this, I think we can just modify this line to use "kcal" instead of "cal".

@justin-sleep Fixed it in 0.2.1 thanks for reporting!

Hey, @cyberjunky , thanks again for your quick fix. You are awesome! ;-)


Add offsetstore persistence subsystem.

This PR adds offset persistence subsystem. The offset tracking is designed to track the offset of the application that the current application is interacting with.

I linked to some tests from queuestore that should have equivalents in this PR, in no particular order. Notice though that I make use of When() blocks in the other tests for scenarios like "when the message is already in the queue"... you could have similar ones here like "when the application already has an associated offset", etc.
These combinations blow out the tests a bit, but it's important that we actually verify "inserts and updates" both work, in different orders, etc even though it is obvious from the SQL implementations, it's not as obvious for BoltDB and the memory ones.

OK, thanks I will get down to those tests.

you guys are awesome thanks very much for all your help!!!


RateLimit-Reset is set to delay-seconds in IETF draft, not UTC time

From the docs:

The middleware automatically set the following headers, conforming to the latest RFCs:
...
X-RateLimit-Reset - UTC time when the limit resets.

In what I think is the latest IETF draft on RateLimit Header Fields for HTTP the header RateLimit-Reset is set to delay-seconds because it doesn't rely on clock synchronization and mitigates thundering heard if too many clients are given the same timestamp.
Will you consider changing and use delay-seconds?
Or is this what is also mentioned in the docs what enables a resolution higher than one second and focus more on rate limiting other services than HTTP?

Hey @estensen
I think those are still draft. For example, GitHub's X-RateLimit-Reset value is "The time at which the current rate limit window resets in UTC epoch seconds."
There's a difference between X-RateLimit-Reset and RateLimit-Reset though, since X- headers are defined by the application. If IETF accepts the proposal, we can add RateLimit-Reset as defined by the spec while keeping X-RateLimit-Reset be the UTC time.
However, since these things tend to change over time, I'm hesitant to add RateLimit-Reset now, since that proposal is still a draft.

Thanks for responding!
Was not aware of the X- headers being different. Feel free to close this if you don't want it as a reminder to look at it later.

The upstream proposal has expired and is archived.


Cask request: Pianobar

Cask details
Please fill out as much as possible. Before you do, note we cannot support Mac App Store-only apps.
Name: Pianobar
Homepage: https://github.com/PromyLOPh/pianobar
Download URL: https://github.com/PromyLOPh/pianobar.git
Description: Command line Pandora player

This seems to be a CLI-only open-source tool. It belongs in Homebrew.
This policy is documented in faq/rejected_casks:

The app is both open-source and CLI-only (i.e. it only uses the binary artifact). In that case, and in the spirit of deduplication, submit it first to Homebrew. If it is rejected there, you may then try again in Homebrew-Cask (link us to the issue on Homebrew so we can see their reasoning for rejection).