Utils.insertCSS fix

Please see http://share.framerjs.com/u8u9oefbf3mi/

Seems like we may want two functions here.
InsertCSS and InsertCSSPath as the way the it worked before this commit is to
Inject CSS in the page from a string.

Yeah this breaks the previous function (see the failing test).
This could be useful and I'll add it but:

It needs tests.
It needs to adhere to styling (" over ' etc).
It needs to be a separate method with a good name :-)

Oh crap, I thought the existing Utils.insertCSS was supposed to work this way, hence why I replaced (fixed ha!) it. Obviously I didn't look carefully enough, I'm sorry!
Anyway, in this case, I'm not even sure if you should add it, as it could encourage people to use Framer with stylesheets ... which is probably not a good idea.

Test proposal:
describe "insertStyleSheet", ->
		it "should work", ->
			Utils.insertStyleSheet("https://fonts.googleapis.com/icon?family=Material+Icons")
			document.styleSheets[document.styleSheets.length - 1].href.should.notEqual(null)

Pros & Cons:

also checks if inserted stylesheet('s href) is valid

o couldn't get reliable results on fileLoad, correct results after reload

only works with externally hosted files

As an alternative, .type could be evaluated, which should return a string of "text/css". This would also work with local stylesheets, however the downside of this method is that it doesn't care if the href is valid or not.

I believe all that you can accurately do is test that the nose was added to
the DOM. Maybe test the path provided is actually added correctly.
On Mon, Dec 28, 2015 at 11:24 AM marckrenn<EMAIL_ADDRESS>wrote:

Test proposal:
describe "insertStyleSheet", ->
it "should work", ->
Utils.insertStyleSheet("https://fonts.googleapis.com/icon?family=Material+Icons")
document.styleSheets[document.styleSheets.length - 1].href.should.notEqual(null)
Pros & Cons:

also checks if inserted stylesheet('s href) is valid

o couldn't get reliable results on fileLoad, correct results after
reload

only works with externally hosted files

As an alternative, .type could be evaluated, which should return a
string of "text/css". This would also work with local stylesheets, however
the downside of this method is that it doesn't care if the href is valid or
not.
—
Reply to this email directly or view it on GitHub
https://github.com/koenbok/Framer/pull/280#issuecomment-167632767.

Test proposal v2:
describe "insertStyleSheet", ->
		it "should be added", ->
			Utils.delay 0.1, ->
				styleSheetCount = document.styleSheets.length
				Utils.insertStyleSheet("https://fonts.googleapis.com/icon?family=Material+Icons")
				document.styleSheets.length.should.equal(styleSheetCount + 1)

This works reliable, but still only for external stylesheets! To be honest, I can't get my head around why local stylesheets seemingly don't increase document.styleSheets.length while working perfectly fine. Evaluating document.styleSheets.length seems to be the way to go as it's a definitive confirmation that a new stylesheet was successfully added ... contrary to document.body.childNodes.length, which ...

... I believe is prone to "background noise" ( = other nodes being added at the same time) and therefore being unreliable.
... doesn't validate the file / happily accepts invalid paths, types etc. which would render the test itself obsolete.

Name proposals:

Utils.insertStyleSheet
Utils.insertStylesheet
Utils.injectStyleSheet
Utils.injectStylesheet

Isn't this just an async thing? So to test it you'll have to wait for the style sheet to load (use the onload attr): http://www.phpied.com/when-is-a-stylesheet-really-loaded/

Isn't this just an async thing? So to test it you'll have to wait for the style sheet to load (use the onload attr): http://www.phpied.com/when-is-a-stylesheet-really-loaded/

#4 document.styleSheets.length is pretty much what I've tried above. This method doesn't like locally hosted stylesheets for some reason.
#1 To me it seems like styleElement.onload needs to be in the same scope where styleElement was created (please correct me if I'm wrong) ...
Utils.insertStyleSheet = (url) ->

	styleElement = document.createElement("link")
	styleElement.rel = "stylesheet"
	styleElement.type = "text/css"
	styleElement.href = url

	Utils.domComplete ->
		document.body.appendChild(styleElement)

	styleElement.onload = ->
		return true

... which should make it testable by doing something like this ...
describe "insertStyleSheet", ->
	it "should be added", ->
		Utils.insertStyleSheet("https://fonts.googleapis.com/icon?family=Material+Icons").should.equal(true)
		Utils.insertStyleSheet("bogusUrl").should.notEqual(true)
		Utils.insertStyleSheet("mdl/material.css").should.equal(true)

... but since the stylesheet obviously hasn't been loaded at the time of calling the Utils.insertStyleSheet-function, it will always return the styleElement.onload-function (and never true, even if it was successfully added).
Am I missing something here?

Yep. Let me show you, I'll make a JSFiddle to explain.

Here you go: https://jsfiddle.net/LtgLw3pv/1/

Try and understand how the event listener works
Implement the function above with the signature: Utils.insertStyleSheet = (url, callback) ->
Make the test work
Use Framers dom event wrapper (ask Koen)

Also:

it will always return the styleElement.onload-function (and never true, even if it was successfully added).

This is a sometimes confusing part of CoffeeScript: implicit returns:
a = -> b = 1 actually gets translated to a = -> return b = 1
It's sometimes handy, and sometimes it bites you.
More here: http://blog.artillery.com/2014/06/working-with-coffeescript-common-gotchas.html

Thanks for taking the time, Koen! Really appreciate it. :)
I'll try my best tomorrow, please keep your fingers crossed, haha.
And I'm truly sorry for causing so much trouble for a function only maybe a handful of people will ever use. As I said before, using Framer with stylesheets - the way it works right now - is borderline useless anyway but I believe this topic holds some untapped potential.

This is a sometimes confusing part of CoffeeScript: implicit returns:
Believe me or not, I grasped the concept of implicit returns rather quickly some time ago. Actually, I think it's pretty nifty and quite in line with the overall concept and semantics(?) of coffeescript. What confused me in this particular case was the additional component of time, which gave me some head-scratching "inconsistencies". The unexpected implicit returns were just a sign that my code wasn't working properly.

Don't worry, getting you to be able to contribute is an upside for me too :-)

Don't worry, getting you to be able to contribute is an upside for me too :-)

I'll take that as a compliment, yet I'd like to dampen your expectations: With 25 I'm pretty late to the party anyway and after failing to come up with a working solution to this problem, it seems like I'll never become a decent coder - let alone a code ninja.
Anyway, after putting way too many hours into solving this problem, coming up with four vastly different approaches  - with at least one or two promising ones - I'm drained, out of ideas and I finally have to give up.
I think one major piece I'm missing is how to successfully pass an argument (url) to a function (Utils.insertStylesheet) with a callback. I've looked up at least 5 different tutorials, stackoverflow threads etc. and I'd say I get the concept, but once I'm trying to adapt them, it all falls apart ...
Utils.insertStylesheet = (url, callback) ->

	styleElement = document.createElement("link")
	styleElement.rel = "stylesheet"
	styleElement.type = "text/css"
	styleElement.href = url

	Utils.domComplete ->
		document.body.appendChild(styleElement)

	styleElement.addEventListener "load", ->
		callback()

confirm = ->
	return true

Utils.insertStylesheet("https://fonts.googleapis.com/icon?family=Material+Icons") ->
	print confirm() # should equal true

(Also, now that I'm looking at this code again, I think this would also need a callback timeout for testing non-working URLs)

Tests are hard and take practice.
One main thing. Make sure you add the event listener to the Dom object
before you add it to the document. If you do it afterwards I'm not sure it
will get called.
On Wed, Dec 30, 2015 at 11:10 AM marckrenn<EMAIL_ADDRESS>wrote:

Don't worry, getting you to be able to contribute is an upside for me too
:-)
I'll take that as a compliment, yet I'd like to dampen your expectations:
With 25 I'm pretty late to the party anyway and after failing to come up
with a working solution to this problem, it seems like I'll never become a
decent coder - let alone a code ninja.
Anyway, after putting way too many hours into solving this problem, coming
up with four vastly different approaches - with at least one or two
promising ones - I'm drained, out of ideas and I finally have to give up.
I think one major piece I'm missing is how to successfully pass an
argument (url) to a function (Utils.insertStylesheet) with a callback.
I've looked up at least 5 different tutorials, stackoverflow threads etc.
and I'd say I get the concept, but once I'm trying to adapt them, it all
falls apart ...
Utils.insertStylesheet = (url, callback) ->
styleElement = document.createElement("link")
styleElement.rel = "stylesheet"
styleElement.type = "text/css"
styleElement.href = url

Utils.domComplete ->
    document.body.appendChild(

styleElement)
styleElement.addEventListener "load", ->
    callback()

confirm = ->
return true
Utils.insertStylesheet("https://fonts.googleapis.com/icon?family=Material+Icons") ->
print confirm() # should equal true
(Also, now that I'm looking at this code again, I think this would also
need a callback timeout for testing non-working URLs)
—
Reply to this email directly or view it on GitHub
https://github.com/koenbok/Framer/pull/280#issuecomment-168057708.

Haha, true. That's (unfortunately) not causing the trouble, though ;)

Utils.insertStylesheet = (url, callback) ->

	styleElement = document.createElement("link")
	styleElement.rel = "stylesheet"
	styleElement.type = "text/css"
	styleElement.href = url

	styleElement.addEventListener "load", ->
		callback()

	Utils.domComplete ->
		document.body.appendChild(styleElement)

Utils.confirmStylesheet = ->
	return true

Utils.insertStylesheet "https://fonts.googleapis.com/icon?family=Material+Icons", ->
	print Utils.confirmStylesheet() # returns true

WHAT THE HELL


is heatmap supported? need some sample

Hi guys, i need some sample with heapmap
https://developers.google.com/maps/documentation/android-api/utility/heatmap?hl=es-419
I would be grateful, Thanks!

Cool feature!  No, this library doesn't have support for heatmap but you could add it :)


Screen goes blank (with console error) when clicking Exit from action screen.

Issues
Screen is blank with the URL: http://localhost:3000/agent/5/dialogue?filter=undefined&page=undefined&tab=sayings, with a blank screen again.
Got an error:
Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

From Git bash:
api_1            |     Error: handler method did not return a value, a promise, or throw an error
api_1            |     at module.exports.internals.Manager.execute (/usr/src/app/node_modules/hapi/lib/toolkit.js:52:29)
api_1            |     at process._tickCallback (internal/process/next_tick.js:68:7)
api_1            | Debug: internal, implementation, error
api_1            |     Error: handler method did not return a value, a promise, or throw an error
api_1            |     at module.exports.internals.Manager.execute (/usr/src/app/node_modules/hapi/lib/toolkit.js:52:29)
api_1            |     at process._tickCallback (internal/process/next_tick.js:68:7)
elasticsearch_1  | [2019-05-23T10:04:40,401][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
api_1            | Debug: internal, implementation, error
api_1            |     Error: handler method did not return a value, a promise, or throw an error
api_1            |     at module.exports.internals.Manager.execute (/usr/src/app/node_modules/hapi/lib/toolkit.js:52:29)
api_1            |     at process._tickCallback (internal/process/next_tick.js:68:7)
elasticsearch_1  | [2019-05-23T10:05:10,409][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:05:40,416][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:06:10,426][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:06:40,438][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:07:10,445][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:07:40,453][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:08:10,461][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:08:40,470][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:09:10,478][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:09:40,485][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:10:10,495][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:10:40,502][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node
elasticsearch_1  | [2019-05-23T10:11:10,511][INFO ][o.e.c.r.a.DiskThresholdMonitor] [kGcxbRv] low disk watermark [85%] exceeded on [kGcxbRvHT62S--5NN7q8kQ][kGcxbRv][/usr/share/elasticsearch/data/nodes/0] free: 15.8gb[13.3%], replicas will not be assigned to this node

Step 1.25 on Break Script v22.0

Did you download a release or pull from Master? Which release?
release
What operating system are you running?
10 pro
Are you running locally or in the cloud?
local
Which browser are you using?
FF

couldn't reproduce

How did it happen?

Was creating an action right after the agent, hit the Exit button.

I think this is related to your own Docker instance. Can you reset Docker data? On Mac it looks like this:


service descriptor json file naming

Please note service descriptor json file name needs to match maven coords for vertx-maven-service-factory dynamic deployment to work correctly, see recent vertx-dev discussion

fixed with 2476ce722f224a65351d1f57b0897836231c48e3


integrate codecov into test CI workflow

Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


UnboundLocalError: local variable 'input' referenced before assignment

When I run the main program with "python main. py . /data", the following error occurs:

D:\Python36\lib\site-packages\torchvision\transforms\transforms.py:258: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
Traceback (most recent call last):
File "main.py", line 948, in
main()
File "main.py", line 664, in main
optimizers=optimizers)
File "main.py", line 746, in train_one_epoch
for batch_idx, (input, target) in enumerate(loader):
File "D:\Python36\lib\site-packages\tlt\data\loader.py", line 105, in iter
yield input, target
UnboundLocalError: local variable 'input' referenced before assignment
Please give me more advice and look forward to your reply. thank you very much.

If you want to train our models, following the training scripts.


feat(schema-type): add new 'schema-type' rule

PR summary

This rule validates that a schema has a non-empty type field.
Resolves #444
PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] Dependencies have been updated as needed
[x] .secrets.baseline updated as needed?

Checklist for adding a new validation rule:

[x] Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
[x] If necessary, added new validation rule implementation (packages/ruleset/src/functions/*.js, updated index.js)
[x] Added new rule to default configuration (packages/ruleset/src/ibm-oas.js)
[x] Added tests for new rule (packages/ruleset/test/*.test.js)
[x] Added docs for new rule (docs/ibm-cloud-rules.md)

Checklist for removing an old validation rule:

[ ] Removed old rule implementation (packages/validator/src/plugins/validation/*.js)
[ ] Removed or adjusted testcases (packages/validator/test)
[ ] Updated default configuration to deprecate old rule (packages/validator/src/.defaultsForValidator.js)
[ ] Removed docs of old rule (docs/ibm-legacy-rules.md)

It's actually valid to not specify the type field for a schema (that's an "any type").   Plus, if a schema has no type field, but specifies "properties", then we have always interpretted that as type=object in the generator (actually down in the swagger-parser I think).
So, I'm not sure we actually want to introduce this rule unless it's disabled by default and individual users can choose to enable it.

@padamstx Indeed, I commented in #444 that I'd be fine with requiring this rule to be explicitly enabled.  At least in the VPC API, we do not make use of "any" types, and do not want to rely on consumer-specific heuristics such as the presence of properties inferring an object type.


Bump pip-tools from 5.4.0 to 5.5.0 in /python/helpers and update test spec

As of pip-tools 5.5, the output format changed to always put via comments on separate lines, and no longer include a trailing \ when using --generate-hashes.
so it changed from this output:
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements/test.txt requirements/test.in
#
apipkg==1.4               # via execnet
attrs==18.1.0             # via -r requirements/test.in, pytest
execnet==1.5.0            # via pytest-xdist
flaky==3.4.0              # via -r requirements/test.in
mock==2.0.0               # via -r requirements/test.in
more-itertools==4.1.0     # via pytest
pbr==4.0.2                # via mock
pluggy==0.6.0             # via pytest
py==1.5.3                 # via pytest
pytest-forked==0.2        # via pytest-xdist
pytest-xdist==1.22.2      # via -r requirements/test.in
pytest==3.5.1             # via -r requirements/test.in, pytest-forked, pytest-xdist
six==1.11.0               # via mock, more-itertools, pytest

to this output:
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements/test.txt requirements/test.in
#
apipkg==1.4
    # via execnet
attrs==20.3.0
    # via
    #   -r requirements/test.in
    #   pytest
execnet==1.5.0
    # via pytest-xdist
flaky==3.4.0
    # via -r requirements/test.in
mock==2.0.0
    # via -r requirements/test.in
more-itertools==4.1.0
    # via pytest
pbr==4.2.0
    # via mock
pluggy==0.6.0
    # via pytest
py==1.5.3
    # via pytest
pytest-forked==0.2
    # via pytest-xdist
pytest-xdist==1.22.2
    # via -r requirements/test.in
pytest==3.5.1
    # via
    #   -r requirements/test.in
    #   pytest-forked
    #   pytest-xdist
six==1.11.0
    # via
    #   mock
    #   more-itertools
    #   pytest

@relud thanks for updating the tests. Looks like this change is breaking so not sure what the best course of action is yet. Also seems breaking with the current version if you start using the new version so wondering if the best approach would be install both versions and switch based on the formatting.
Ref: https://github.com/jazzband/pip-tools/pull/1237#issuecomment-754514296

@relud thanks for updating the tests. Looks like this change is breaking so not sure what the best course of action is yet. Also seems breaking with the current version if you start using the new version so wondering if the best approach would be install both versions and switch based on the formatting.
Ref: https://github.com/jazzband/pip-tools/pull/1237#issuecomment-754514296

As mentioned in the issue @feelepxyz linked to, I wouldn't feel terrible for just merging this as the conflicts are merely cosmetic. There shouldn't be anything stopping people from upgrading their own version of pip-tools, and in the worst case our diffs will be a little noisy.

As mentioned in the issue @feelepxyz linked to, I wouldn't feel terrible for just merging this as the conflicts are merely cosmetic. There shouldn't be anything stopping people from upgrading their own version of pip-tools, and in the worst case our diffs will be a little noisy.

Yeah agreed, I think we should go ahead and merge this. Will have a look over and test tomorrow.

Yeah agreed, I think we should go ahead and merge this. Will have a look over and test tomorrow.

@feelepxyz just replying from your question in https://github.com/jazzband/pip-tools/pull/1237#issuecomment-754514296
Considering the rendered output of pip-compile cannot be relied on, I wondered if an approach of installing the version of pip-tools referenced in the requirements.in file itself (if exists) and using that version to compile the requirements may be an option?

@feelepxyz just replying from your question in https://github.com/jazzband/pip-tools/pull/1237#issuecomment-754514296
Considering the rendered output of pip-compile cannot be relied on, I wondered if an approach of installing the version of pip-tools referenced in the requirements.in file itself (if exists) and using that version to compile the requirements may be an option?

Considering the rendered output of pip-compile cannot be relied on, I wondered if an approach of installing the version of pip-tools referenced in the project's requirements.in file itself (if it exists) and using that version to compile the requirements may be an option?

Yeah good suggestion, not sure it's worth the effort to parse and install a custom version based on the requirements.in though, seems ok to not treat this change as breaking following the sentiment from the pip-tools folks.

Considering the rendered output of pip-compile cannot be relied on, I wondered if an approach of installing the version of pip-tools referenced in the project's requirements.in file itself (if it exists) and using that version to compile the requirements may be an option?

Yeah good suggestion, not sure it's worth the effort to parse and install a custom version based on the requirements.in though, seems ok to not treat this change as breaking following the sentiment from the pip-tools folks.

This will probably generate some support volume as the first PR with 5.5 will re-write the entire generated requirements file creating a potentially large and hard to parse diff.
We could offset this by including a message in the pull request description about the upgrade to 5.5 but not entirely sure how to do this yet. Will have a quick look at this.
Checking the first 10 pages of open public dependabot PRs not many are using pip-compile, I only found one repo + forks of it: https://github.com/SFDO-Tooling/Metecho/pull/408/files
Source: https://github.com/pulls?q=is%3Apr+author%3Aapp%2Fdependabot+label%3Apython+is%3Aopen

This will probably generate some support volume as the first PR with 5.5 will re-write the entire generated requirements file creating a potentially large and hard to parse diff.
We could offset this by including a message in the pull request description about the upgrade to 5.5 but not entirely sure how to do this yet. Will have a quick look at this.
Checking the first 10 pages of open public dependabot PRs not many are using pip-compile, I only found one repo + forks of it: https://github.com/SFDO-Tooling/Metecho/pull/408/files
Source: https://github.com/pulls?q=is%3Apr+author%3Aapp%2Fdependabot+label%3Apython+is%3Aopen

Hi, just want to give some feedback from someone using pip-tools in my repos (and private repos), since we have pip-tools in our requirements-dev.in file we saw the release notes about the changed requirements.txt format. I understand there's not really an easy way to support a smooth migration, but I think the "best" approach for these is to use the newer version, as the newer version's format makes diffs a bit better (after the first reformat) and Dependabot opens the pip-tools PR for us anyways.
If there are some confused people, perhaps a pinned issue can help mitigate some of the support traffic?

Hi, just want to give some feedback from someone using pip-tools in my repos (and private repos), since we have pip-tools in our requirements-dev.in file we saw the release notes about the changed requirements.txt format. I understand there's not really an easy way to support a smooth migration, but I think the "best" approach for these is to use the newer version, as the newer version's format makes diffs a bit better (after the first reformat) and Dependabot opens the pip-tools PR for us anyways.
If there are some confused people, perhaps a pinned issue can help mitigate some of the support traffic?

@feelepxyz, why did this get reverted?

@feelepxyz, why did this get reverted?

@cancan101 yeah sorry about this, we're planning to release on Tuesday following some delays getting docs published on github.

@cancan101 yeah sorry about this, we're planning to release on Tuesday following some delays getting docs published on github.

The new PR is #2985 (to help linking these PRs and issues)

The new PR is #2985 (to help linking these PRs and issues)


Formatting, mostly indent

Well 161 and 162 are already up for vote, so maybe we shouldn't change those yet. If/when they need a revision, we can possibly apply these formatting changes to them too. But for the others, we can apply them now, if you all agree.
This fixes some tabs and alignment of constraint text. The bulk of the formatting is in the misc edits paper, where I try to make the wording and formatting more consistent across all the many small edits in that paper.

I'm not allowed to request a review apparently, so I'll just @ you two: @everythingfunctional  @tclune


Bug report for trillium-rustls: Please publish a new version with 6a72b1b0ea51e638ee92b0e45a3a8f3bcde69f62 included

Would it be possible to get a trillium-rustls 0.4.1 package with commit 6a72b1b0ea51e638ee92b0e45a3a8f3bcde69f62 included?
Thank you!

I believe this is resolved by the recent batch of releases


Poor performance of arrangodb on simple AQL query

My Environment

ArangoDB Version: 3.4.9 Community Edition
Storage Engine: RocksDB
Deployment Mode:   Single Server
Deployment Strategy:  Manual start
Configuration: vCPU 2
Infrastructure: AWS - t2.medium
Operating System: Centos 7
Total RAM in your machine: 4Gb
Disks in use:  DataVolume 100Gb with IOPS=5000
Used Package: rpm

Component, Query & Data
Affected feature:
AQL query using web interface
AQL query (if applicable):
FOR d IN Document FILTER d.dataSetId == '4336520' RETURN d._key
AQL explain (if applicable):
Query String (63 chars, cacheable: false):
 FOR d IN Document FILTER d.dataSetId == '4336520' RETURN d._key

Execution plan:
 Id   NodeType          Calls   Items   Runtime [s]   Comment
  1   SingletonNode         1       1       0.00000   * ROOT
  7   IndexNode            21   20126     250.27828     - FOR d IN Document   /* persistent index scan, projections: `_key` */
  5   CalculationNode      21   20126       0.00642       - LET #3 = d.`_key`   /* attribute expression */   /* collections used: d : Document */
  6   ReturnNode           21   20126       0.00007       - RETURN #3

Indexes used:
 By   Type         Collection   Unique   Sparse   Selectivity   Fields            Ranges
  7   persistent   Document     false    false         0.01 %   [ `dataSetId` ]   (d.`dataSetId` == "4336520")

Optimization rules applied:
 Id   RuleName
  1   move-calculations-up
  2   move-filters-up
  3   move-calculations-up-2
  4   move-filters-up-2
  5   use-indexes
  6   remove-filter-covered-by-index
  7   remove-unnecessary-calculations-2
  8   reduce-extraction-to-projection

Query Statistics:
 Writes Exec   Writes Ign   Scan Full   Scan Index   Filtered   Exec Time [s]
           0            0           0        20126          0       250.28706

Query Profile:
 Query Stage           Duration [s]
 initializing               0.00000
 parsing                    0.00005
 optimizing ast             0.00001
 loading collections        0.00001
 instantiating plan         0.00002
 optimizing plan            0.00014
 executing                250.28671
 finalizing                 0.00012

Dataset:
{
  "name": "SOME NAME",
  "dataSetId": "4336520",
  "createdAt": "2020-07-07T12:52:01Z",
  "metaData": {
    "setid": "2bdc3116-75c6-4ff2-b7f5-c38f52691878",
    "splVersion": "1",
    "publishedDate": "Jul 06, 2020",
    "title": "some title",
    "genericMedicine": "SENNOSIDES",
    "effectiveTime": "2020-07-02T00:00:00Z",
    "documentCode": {
      "name": "HUMAN OTC DRUG LABEL",
      "code": "34390-5",
      "codeSystem": "2.16.840.1.113883.6.1"
    },
    "manufacturedProduct": {
      "name": "VALUMEDS  NATURAL LAXATIVE",
      "suffix": "",
      "fullName": "VALUMEDS  NATURAL LAXATIVE",
      "code": "68210-4101",
      "codeSystem": "2.16.840.1.113883.6.69"
    },
    "ingredientSubstance": [
      {
        "name": "SENNOSIDES",
        "code": "3FYP5M0IJX",
        "codeSystem": "2.16.840.1.113883.4.9",
        "classCode": "ACTIB"
      }
    ]
  },
  "html": "<!DOCTYPE html PUBLIC \"-\">\n<html> \n </html>"
}

Size of your Dataset on disk:
~60Gb
Problem:
AQL took 250s to scan 20k documents. Index for dataSetId field is defined. What can be wrong in configuration or in my query
Expected result:
AQL took up to 5s to execute.

The index has a verry bad selectivity:
Indexes used:
 By   Type         Collection   Unique   Sparse   Selectivity   Fields            Ranges
  7   persistent   Document     false    false         0.01 %   [ `dataSetId` ]   (d.`dataSetId` == "4336520")

this means grabbing items from it will probably give you many items, your dataSetId is probably not very unique, hence the index doesn't give you a good performance.

also please note that you're using an EOLed version: https://www.arangodb.com/eol-notice/

probably not very unique

Can you please share how to have better selectivity value?

you probably have many documents where dataSetIdare similar. Hence its not a good criteria to distinguish documents - hence bad selectivity.

So do you mean overlapped dataSetId values leads to large number of matching documents in-turn leading to poor performance? Does applying a limit for the results to be returned won't help?
Also, its very common to index on a similar values attribute (for ex: sortKey). Anything i'm missing?
For ex: Players scores table can have gameMode which is repetitive and won't be unique. If performance won't be good for those, I see it a big concern. Can you please clarify?

After deep and detailed investigation it was identified that size of document in collection affect performance drastically. Our documents has stored pictures coded in BASE64 format.
Moving out fields which are used for searching to separate collection without pictures increased performance to acceptable level.
Closing issue.

Ok, probably the big documents poison your block cache:
https://www.arangodb.com/docs/stable/tutorials-reduce-memory-footprint.html
Can you give estimates on document sizes avg/min/max before / after?


Model weights

Hi @dotchen,
When are you planning to release the real model weights?

Sorry for the delay, it's now released, please let me know if you run into any issues using it.


v2.0.1: TypeError: first argument must be a string or Buffer

After upgrading superagent-mock from 1.12.0 -> 2.x, all my unit tests which has a request.post.send
request.post(login_url)
  .send({
     username: username,
     token: token
  }).then((res) =>
     // assertions
  )

are failing with the following error
TypeError: first argument must be a string or Buffer

at ClientRequest.OutgoingMessage.end (_http_outgoing.js:542:11)
      at Request.end (/opt/default/lib/node_modules/superagent/lib/node/index.js:873:9)
      at Request.end (/opt/default/lib/node_modules/superagent-mock/lib/superagent-mock.js:153:21)
      at /opt/default/lib/node_modules/superagent/lib/request-base.js:72:12
      at Request.then (/opt/default/lib/node_modules/superagent/lib/request-base.js:71:31)

The same code works fine if I revert to 1.12.0. I am using superagent v2.3.0 and superagent-mock v2.0.1.

It seems to be related to the use of promises

If a real http call is made by superagent, it means no patterns match your login_url anymore. What is your pattern and your post url ?
The error seems to be related to the body type of your request.

Was able to finally get this fixed in my project. The issue was:
I had 2 unit test files testA and testB. testA was encountering the issue I reported above which did not use superagent-mock at all. However, testB was calling superagent-mock but did not do an unset() in the teardown.  I used MOCHA with --grep option to run only the tests of testA.
superagent-mock in testB monkey patched superagent which caused the tests fail in testA
Closing this bug for now. Feel free to open if you see this as a bug with superagent-mock.


fix: Upgrade dependencies

Upgrade babylon-mtoon-material 1.8.7 -> 1.9.0

:tada: This PR is included in version 1.4.7 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Fix pause logic

The only reason for pause is to avoid unnecessary push - so 1 sec pause is always present after req. Growing backoff is to avoid spamming the push api, so if we've waited enough (at night?) and have new req - can send immediately.
If req comes set 'pending=true' and set 'timer' to 1 sec. If 'timer' fires and next_push_time < now - send push and set 'backoff' to MIN_PAUSE or if not 0 - increase by 2x, set next_push_time to now+backoff. If timer fires and next_push_time > 0 then ignore - user should go and wake up the app manually. On rep clear 'timer' and set backoff to 0.

Fixed, merge feature/new-pause-logic to main


Made some small updates to classes.xml

I wanted to add a some of my notes on matrix32, array, color, and sprite/set_modulate()
I goofed on the tilemap_cpp updates and submitted those as an independent pull request but I reverted them so there's a lot of commits here.  So this should only update classes.xml

It would be better to cleanup your fork to keep only the relevant commits. The rest add unnecessary clutter, and since it's in a fork, you can edit it as much as you want so that only relevant stuff gets pushed upstream.
You can e.g. rewrite your commit history with:
git rebase -i HEAD~8
It will open an editor that will list the 8 last commits of your branch (i.e. the seven listed above and the one before, just so you know where you stand in the history).
Then you can edit each line to define what you want to do with the related commit. You could then remove the lines that correspond to irrelevant changes, and keep only the three commits about classes.xml.

@akien-mga Akien-mga, I tried to update it using the command you gave me and it seems to have created even more commits instead!

Hm, then I would suggest that you close this PR, and then create a new clean branch from okamstudio/godot and cherry-pick the relevant commits there.
Once in the new branch, you should be able to cherry-pick them with "git cherry-pick".

I'm gonna resubmit this and hopefully do it properly.


Android tablets are detected as "mobile"  :(

Android tablets are detected as "mobile"  :(

Tested with Nexus 7


chore: add payloadbodies v2 to capabilities set

Does this constant belong in alloy?

not really,
I will move this to reth separately, but imo, it's useful to a a set of all engine API endpoints


Cannot delete test products

I am receiving the following error when trying to delete the starter demo products:
A document of the unknown type homePage
A document of the unknown type shopPage
When trying to "delete anyway" I receive the following error:
the mutation(s) failed: Document "product-6584939413682" cannot be deleted as there are references to it from "homePage"
All connections have been removed from the products as well.

This is due to some legacy documents that are still present in the bundled sanity demo data. You can remove these documents from your terminal with the Sanity CLI. Simply run the following from your studio folder:
sanity documents delete homePage && sanity documents delete shopPage

I'll have this cleaned up in the next release this week 🤘

@ndimatteo Thanks. I still seem to be getting an error after running that:
Error: Failed to delete document: the mutation(s) failed: Document "homePage" cannot be deleted as there are references to it from "errorPage"     at Object.<anonymous> (~/Documents/GitHub/camp-final/studio/node_modules/@sanity/core/lib/commands/documents/deleteDocumentsCommand.js:55:15)     at Generator.throw (<anonymous>)     at asyncGeneratorStep (~/Documents/GitHub/camp-final/studio/node_modules/@sanity/core/lib/commands/documents/deleteDocumentsCommand.js:12:103)     at _throw (~/Documents/GitHub/camp-final/studio/node_modules/@sanity/core/lib/commands/documents/deleteDocumentsCommand.js:14:291)

@justinjerrick go ahead and delete that document first before running the original command I mentioned:
sanity documents delete errorPage

@ndimatteo Thanks that worked 👍

Hi, I am still getting the exact problem. When I run the command on the cli, I get
'Document not found: homePage
Document not found: shopPage'

@GodwinEbikwo not sure what you mean? The error that the original issue outlines is due to the presence of both of those documents...
If they don't exist, you should not be seeing an error like this.
Please elaborate on what error you are seeing and the steps you are taking to get there. Thanks!


MSBUILD : error MSB1001: Unknown swith.

Problem encountered on https://dotnet.microsoft.com/learn/web/aspnet-hello-world-tutorial/create
Operating System: windows
Provide details about the problem you are experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

when I ran new webApp -o --no--https
error for #2800.txt

I attempted to attach the command verbiage.

What is the --no--https option is not present in dotnet new -h. Are you sure it is correct?
If you read the error output, that is exactly what dotnet is telling you - it used it as project name, but interpretted as option because it starts with --:
C:\Users\Craig Danforth\myApp>dotnet new webApp -o --no--https
The template "ASP.NET Core Web App" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore-template-3pn-210 for details.

Processing post-creation actions...
Running 'dotnet restore' on --no--https\--no--https.csproj...
MSBUILD : error MSB1001: Unknown switch.
Switch: --no--https\--no--https.csproj

What is the --no--https option is not present in dotnet new -h. Are you sure it is correct?
If you read the error output, that is exactly what dotnet is telling you - it used it as project name, but interpretted as option because it starts with --:
C:\Users\Craig Danforth\myApp>dotnet new webApp -o --no--https
The template "ASP.NET Core Web App" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore-template-3pn-210 for details.

Processing post-creation actions...
Running 'dotnet restore' on --no--https\--no--https.csproj...
MSBUILD : error MSB1001: Unknown switch.
Switch: --no--https\--no--https.csproj


If doing custom getter/setter pair, you should ideally only have to annotate the getter

Today you have to annotate the setter as well with @reflectable :(.
example:
@PolymerRegister('my-element')
class MyElement extends PolymerElement {
  MyElement.created() : super.created();

  @property
  int get foo => _foo;
  @reflectable // ouch :(
  void set foo(int value) {
    _foo = value;
    notifyPath('foo', foo);
  }
  int _foo;
}

yep that one bit me today

See update on https://github.com/dart-lang/reflectable/issues/42.

Done in commit 7800cb0a48b7cdf3561337de3374398b2980b9ba.


nixos/vdirsyncer: fix description

The nixos-search import is currently failing because of this, please merge ASAP.
ping @schnusch @SuperSandro2000
(One might also wonder if there's any sense in having two markers with the same semantics ("this is a MarkDown string") and whether we should merge them... cc @pennae)

I am also confused by them. I am not sure what literalMD is for.

literalMD is meant to be used for defaultText and example (to give a "literal" documentation string instead of a Nix value), while mdDoc is for description.

Does it replace literalExpression?

oops.

No, literalExpression is for Nix values represented as strings. As a silly example:
default = 42;
defaultText = literalExpression "40 + 2";
defaultText = literalMD "the number forty-two";

(the first one would obviously be preferred here)

Why is ofborg not catching this?

That makes sense.
Since the entire pipeline (from Nix to HTML) is untyped, it's not surprising that we fail to catch type errors. XSLT certainly won't help with that. It's a sad state of affairs.
I guess this check would belong in mergeJSON.py.

We should at least ensure that every option meets the NixOption type expected by nixos-search (minus the name and flake fields).
Going further: https://github.com/NixOS/nixpkgs/issues/141103


Ditto.ModelFactory NuGet package

Creates NuGet package for Ditto.ModelFactory.
Closes #43

The package.proj build script is starting to feel quite long.
I'm considering splitting it up, so that the ModelFactory build is kept separate.
// @Jeavon What are your thoughts on this? Better to have an MSBuild script for each project/package?

@leekelleher yes, I would go with a different MsBuild Script for each NuGet package being published.

Cool! :100: I'll fix it up with separate MSBuild scripts :+1:

I've separated out the MSBuild scripts for each project/package.  I wasn't sure about the naming, so have called them Ditto.proj and Ditto.ModelFactory.proj for now.


dom.lib.ts: MediaDevices.getDisplayMedia is in the wrong place

TypeScript Version:  3.5.1
https://w3c.github.io/mediacapture-screen-share/#mediadevices-additions
in dom.lib.ts navigator.mediaDevices.getDisplayMedia is not found. it looks like it's defined on navigator whereas it should be in the MediaDevices type.
https://github.com/microsoft/TypeScript/blob/87058448797597e6e8bd13ff3d8823fff5607df6/lib/lib.dom.d.ts#L10579-L10583

Broken since 2.9 (or maybe 2.8, hard to tell where the cutoff is).

I'm not sure where this is coming from actually. It's not anywhere in src/lib and a recursive grep of the typescript repo only turns up the one hit for getDisplayMedia (outside tests). I need to look at the code that generates the LKG I guess.

This goes away entirely in https://github.com/microsoft/TypeScript/pull/32578. That explains why I can't find any mention of it in the source.

Closing for now. We can investigate re-adding it under MediaDevices, based on the w3c spec.

Hi @sandersn this is a huge issue for us, can you please tell us what is the status of it or a workaround we can use ?? We don't find the getDisplayMedia anywhere

It's been a while since I looked at this, so this is a bit of a guess:

getDisplayMedia was in the wrong place.
In July (which was TS 3.7 I think?), getDisplayMedia got deleted entirely.
The next step for a fix is to add MediaDevices to microsoft/TSJS-lib-generator, based on the w3c spec ideally.

How about not closing issue until they, you know, actually get fixed?  Then, maybe, they won’t get dropped on the floor like this?

@Spongman you are looking for #33232 I think. This issue tracked getDisplayMedia being in the wrong place.

surely that's a duplicate of this issue?

I finally fix the issue by using Javascript instead of typescript

in vue add interfaces in shims-tsx.d.ts
`import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode { }
// tslint:disable no-empty-interface
interface ElementClass extends Vue { }
interface IntrinsicElements {
[elem: string]: any;
}
}
interface MediaDevices {
getDisplayMedia(constraints?: MediaStreamConstraints): Promise;
}
interface MediaTrackConstraintSet {
cursor?: string;
}
}`
this is a temporary solution


Staking tutorial

A big tutorial focused on creating an omnichain contract that works both with EVM-based connected chains as well as Bitcoin.
This tutorial shows how to:

create an omnichain contract that can receive tokens from connected chains
use the parameters of the onCrossChainCall function to:

decode the staker address from the context.origin parameter
decode the contents of the message parameter
determine the chain ID from context.chainID

dispatch different logic using an action code
how to withdraw tokens correctly both to EVM-based chains and to Bitcoin

Related: https://github.com/zeta-chain/example-contracts/pull/60

I'm sure there are some areas for improvements, but if there are no critical errors, I'd prefer to ship it and make it better later.


Add force-amo feature (portable_atomic_force_amo cfg)

On RISC-V (without A-extension) with the force-amo feature, this uses AMO instructions for RMWs that have corresponding AMO instructions even if A-extension is disabled. For other RMWs, this disables interrupts as usual.

Some operations don't require disabling interrupts (loads and stores on targets except for AVR, but additionally on MSP430 {8,16}-bit add,sub,and,or,xor,not, on RISC-V with the force-amo feature 32-bit(RV32)/{32,64}-bit(RV64) swap,fetch_{add,sub,and,or,xor,not,max,min},add,sub,and,or,xor,not and {8,16}-bit fetch_{and,or,xor,not},and,or,xor,not). However, when the critical-section feature is enabled, critical sections are taken for all atomic operations.

Closes #123
This feature requires Rust 1.72+ because .option arch requires it. (https://github.com/rust-lang/llvm-project/pull/147)
Currently, enabling this on older compilers will result in an error, but it might be better to fallback to implementation disabling interrupts.

fallback to implementation disabling interrupts.

I won't implement it for now, but if anyone actually needs this, I'll consider implementing it.


Improve overview for Astroplan in various places

@bmorris3 – Could you please try to improve the overview description for Astroplan in various places before the 0.1 release today?
One place is the "long description" that gets displayed on PyPI, and I think it would be good to have at least a sentence or two and a link e.g. to the docs. Just as an example, see https://pypi.python.org/pypi/gammapy/0.3
The text you see there is from https://github.com/gammapy/gammapy/blob/master/LONG_DESCRIPTION.rst  which gets pulled in like this: https://github.com/gammapy/gammapy/blob/master/setup.py#L40
Really, there's four "landing pages" for new users where we could use the same basic info about Astroplan:

first part of README.rst for someone that goes to the Github repo or has the code locally
LONG_DESCRIPTION.rst for PyPI
first part of docs/index.rst for the docs
astroplan/__init__.py docstring for someone that does import astroplan and would like to know how to get started.

I think in all cases one sentence and a link to the online repo and the docs is sufficient, but of course some more info is OK as well.
From Gammapy I know that it's hard to implement this without avoiding some duplication, but I guess that's OK if ingesting the description from another file isn't possible somewhere.
One more thing ... eventually I wanted the top-level docs page to be short and added an About page for Gammapy (https://gammapy.readthedocs.org/en/latest/about.html) ... I think that could be a good idea for Astroplan as well.
PS: I think "Observation planning package for astronomers" is a bit boring  .... "Observing like a boss! –– Astroplan is is the observation planning Kepler and Hubble wished they had." ... @bmorris3 I trust you can come up with some better slogan / short description for astroplan!

Closed by merge of #79.


Do not pack foreign code into spine-protoc-plugin JAR

Now the JAR contains:

com.google: common, errorprone, gson, j2objc, protobuf, thirdparty`
google/protobuf proto types
io.spine + everyting.
javax.annotation
org.checkerframework
org.codehaus
org.slf4j
spine/* proto types

It should have only code relevant to the plugin.

@armiol, FYI.

We need to carry all the code that we depend on to avoid requiring explicit dependencies from buildscript.


Size limit for file

I was trying to open my xml file by uploading but it doesnt seem to do anything. it is 3.5GB, is there a size limit?

Same here, but mine is only 1.5 gigs, looking to do the same thing.

Same issue. 775MB XML failed to load in both Chrome and Firefox (both current versions). Console not showing any useful errors.

Same here but my file is an absolute whopper. Has this project been abandoned? I don't show that the dev has logged in since 2018. Has anyone been able to get this to work?

Hi folks, there's no explicit file size limit, as it depends on the browser, operating system, and machine. I previously explored changes to support larger files, but that resulted in extremely slow file loading. I have been looking at alternative technologies outside of the browser to handle these scenarios, but none have the level of cross-platform support we need.

Hi folks, there's no explicit file size limit, as it depends on the browser, operating system, and machine. I previously explored changes to support larger files, but that resulted in extremely slow file loading. I have been looking at alternative technologies outside of the browser to handle these scenarios, but none have the level of cross-platform support we need.

Thank you for the response! I’m playing around with a truly massive (approx 10GB) decrypted Signal backup and this seemed like my best shot for getting that stuff viewable outside of just buying a cheap Android phone to pop an SD Card into.

Just found and tried this. XML is only 340MB and it loads quickly on a laptop with i7 and 32GB RAM.
Maybe the answer for larger files is to find a way to split files up first and then load pieces separately. There are few applications that require simultaneous access to every byte of a multi-GB dataset.
We might be able to split a file by conversation size, like all contacts with < 2000 messages get put into a single file, and all other conversations are put into individual files.
If the load is still too large, like for a single conversation with a huge number of MMS, further split the files, remove the MMS, and make the images links or thumbnails. This can be done easily - Under tags mms>parts, for any 'part' element with a size > nMB and text="null", just replace the 'data' node with something tiny so that there is a marker. Create or replace the text node and add the value of 'name'. Another program might be created that scans a file for all 'part' nodes with 'ct' = image format, export those as files, and the generated web page can link to those. So this becomes (at least) a two-phase process specifically to deal with huge files.
Note, as a side benefit of the above, we get the image export that many of us want too. Export the images info a folder structure that corresponds to the conversation, date, originator phone ('address'), 'contact_name', etc. Can code from the Java v1 project be used for this?
Different people with different needs and preferences will have varying opinions on this. It's possible that there might be one solution that fits 90% of use cases, and the final 10% of users/cases will need to wait for a more advanced solution.


feat: add venice.ai image generation

Relates to:
Second portion of Venice.ai model provider api: adding image generation.

Risks
Very low, just adds the ability to use the imageGeneration plugin with the venice api
Background
Venice.ai is a private AI platform that offers uncensored interactions, storing user data only in the browser. It supports document uploads, including PDFs, and features an image generation mode available to all users, allowing them to create images.
What does this PR do?
Adds the ability to use the Venice AI API for image generation.
What kind of change is this?
Features (non-breaking change which adds functionality)

Documentation changes needed?
These changes don't require updates to the documentation. If there is a section that lists the available providers for image generation I will find and submit a PR adding it.

Testing
Where should a reviewer start?
Add venice API key. Load a character with images enabled (add imageSettings section). Load character (pnpm start --characters=/path/to/character) and then ask your agent to generate an image.
Detailed testing steps
Load a character with images enabled (add imageSettings section). Load character (pnpm start --characters=/path/to/character) and then ask your agent to generate an image.

Screenshots
Some screens (with extra logging I took out before PR). My agent is an obnoxious bitcoin puppet though, my apologies.

LGTM - feel free to add a screenshot if you can

Added some screenshots.


how to change voice style?

I did not find any parameter that can change the voice style, it seem openvoice2 can not change the voice style?

MeloTTS doesn't support change voice style.

but, they said they can change voice style in the demo website


Please upgrade just_audio pub requirements

It's too low and some basic package will conflict:
and just_audio >=0.3.0 <0.7.0-nullsafety.0 then image >=2.1.18 <3.0.0-nullsafety.0.
And because chat_ui_kit >=1.1.5 depends on just_audio ^0.6.13 and image >=2.1.14 <3.0.0-nullsafety.0 depends on xml ^4.2.0, if karyo from git and chat_ui_kit >=1.1.5 then xml ^4.2.0.

Some mordern pakcage already using latest package. But just_audio inside this repo doesn't update yet.
It still needs some lower basic lib which conficts with other mordern lib

Do you mean upgrading to null safety? That would also require migrating this package to null safety, which is planned but sadly not right now.

@themadmrj My project also do not have null safety, but it doesn't matter you using package with null safety...
Just upgrade and make your lib compilable is OK

You are right about being able to use a null safe package in a project that has not migrated yet. However, since this library also depends on flutter_video_info, I cannot migrate just yet. If you cannot wait and want a faster migration, you can clone the package, migrate it, and I'll change the flutter_video_info dependency to your git url.

Null safe version published in pre-release, until all dependencies are safe.
See 1.2.0-nullsafety.0.


Provide license

Hello, I am referencing your code recently. Could you provide the license of your repository? I found that your repository does not add any license. Thank you.

Check the repo page, the are a dedicated tab to license:

I don't take any responsibility for how you'll use the source code you find in my Git repository.


BottomNavigationAction style disabled not working

Warning:Failed prop type: style may be false but not true
in BottomNavigationAction disabled style setting
My code is:<BottomNavigation.Action
key="Bookmark"
icon="bookmark"
label="Bookmark"
style={{disabled:true}}
onPress={this.bookmarkNavigate}
/>

@ruchikam My apologies, you are right. I did not notice the disabled is not implemented yet: https://github.com/xotahal/react-native-material-ui/blob/master/src/BottomNavigation/BottomNavigationAction.react.js

It's been implemented but I don't think the patch is released yet.
https://github.com/xotahal/react-native-material-ui/blob/master/src/BottomNavigation/BottomNavigationAction.react.js#L120

@jiangman123456 this is how you can use custom icon and style it.
import Icon from 'react-native-vector-icons/dist/MaterialCommunityIcons';
	<BottomNavigation.Action
				key="key1"
				icon={<Icon name="playlist-music"/>}
				label="some-name"
	                        style={{icon: {fontSize: 25, color:"red"}}}
			/>

Hi, i want to change the color of the icon & text when active, what style should i add to do that?
`	<BottomNavigation.Action
key="key1"
icon={}
label="some-name"
style={{icon: {fontSize: 25, color:"red"}}}
/>
`


(Bug) send confirmation is not immediate

after #1784 the confirm isn't immediate
this is because an await was added to the blockchain tx promise
Send confirmation should be immediate, the setLink can be called before TX is completed (we already have the link).
Error in TX need to be handled async.
If it makes "Try Again" impossible, then perhaps try again should redirect user to the send page again
preferabably with the data he already enetered (ie amount, reason, to)

The confirmation is handled immediately and the user couldn't get the error message
Checked on DEV V0.21.0
LG V30+ // Android 8.0 // Google Chrome 81.0.4044.138
Desktop: Windows 10 // Google Chrome Version 83.0.4103.6


Integrate with AWS cloud to appropriately tag control-plane instances

Adds cloud_integration.py to prepare for all clouds Charmed-Kubernetes must relate to -- starting with AWS

Addresses LP#2055337


fix: improve detection of msys2/mingw in startup and wrapper scripts

Context
While running Gradle on Windows under Msys2 / MinGW  bash shell - the special path handling is required.
Gradle startup and Gradle wrapper bash scripts are using command uname to detect environment.
Recently msys2 shell started to produce different output for uname command, e.g.
$ uname
MSYS_NT-10.0-19042

This completely breaks Gradle usage, since startup and wrapper scripts are producing following error.
$ ./gradlew --version
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

As far as I see - this bug affects all the versions of Gradle, personally tested on : 6.6.x, 6.8.x, 7.0.x.
Unfortunately I can't provide the date when exactly Msys2 introduced this new behavior, 2-3 months ago it worked fine.
Contributor Checklist

[x] Review Contribution Guidelines
[x] Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
[x] Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
[x] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
[ ] ~Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective~ Unable to find Msys2/MinGW specific tests
[ ] ~Provide unit tests (under <subproject>/src/test) to verify logic~ Unable to find Msys2/MinGW specific tests
[ ] ~Update User Guide, DSL Reference, and Javadoc for public-facing changes~ no public changes
[x] Ensure that tests pass sanity check: ./gradlew sanityCheck
[x] Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation
[ ] Recognize contributor in release notes

@bot-gradle test and merge

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test and merge

OK, I've already triggered a build for you.

Thanks @eshepelyuk


Trigger docker build only on branch push and tag push

:rocket: PR was released in v0.0.2 :rocket:

:rocket: PR was released in v0.0.2 :rocket:


Normalize url

Create helper functions urlSerializer and setSearchQuery to handle setting the url and setting the url params to the store.

On hitting search the url is 'switched out' with the machine readable version
App.jsx is listening for lastSearch time as well as if there are query params in the url
If there are the proper query terms in the url, the url will be parsed and information put into state (setSearchQuery)

Fix bug with query generator to respect and/or constraints

-deleted accidental commits from a pr check


cocoapods update script prompts for password to write to system RubyGems

Issue description
The cocoapods package has an update script that's used to update the package. This script in its entirety is
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p bash ruby bundler bundix

rm Gemfile.lock
bundler install
bundix

if [ "clean" == "$1" ]; then
  rm -rf ~/.gem
fi

If I run this script on my macOS system, the bundler install command says my user account isn't allowed to install to the system RubyGems and gives me a sudo prompt. This is rather concerning because the Nix-installed bundler shouldn't be touching my system RubyGems, and my user account does have full write access to the Nix store (this is a single-user install).
> ./update
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Following files may not be writable, so sudo is needed:
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/bin
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/build_info
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/cache
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/doc
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/extensions
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/gems
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/nix
  /nix/store/0s16iyiaaw0c3rlqpj9vbd8df2nzmg5z-ruby-2.5.3/lib/ruby/gems/2.5.0/specifications
Fetching CFPropertyList 3.0.0

Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password:

I've never tried to update a ruby package before so I don't know if this update script is standard practice and if other packages have the same issue, or if this is unique to cocoapods.
Steps to reproduce

cd pkgs/development/mobile/cocoapods
./update

Technical details

system: "x86_64-darwin"
host os: Darwin 18.2.0, macOS 10.14.3
multi-user?: no
sandbox: no
version: nix-env (Nix) 2.2
channels(eridius): "nixpkgs-19.03pre168597.d2904c8fbd4"
nixpkgs: /Users/eridius/.nix-defexpr/channels/nixpkgs

/cc @peterromfeldhk

After looking at this again, I'm pretty sure the "system RubyGems" it means is writing to the nix-installed ruby, and I don't know why I didn't realize this earlier but the nix-installed ruby is of course marked as not writable so I don't corrupt my own store.
So I guess this is a problem with the script, it's trying to install gems globally instead of vendoring it into a local directory. Not that it actually needs to install the gems at all, it just needs to update the lockfile.
From the fact that this script takes an optional clean argument I assume it was expecting to install the gems into ~/.gem.


Incorrect set documentation?

According to https://help.amplitude.com/hc/en-us/articles/115002889587-JavaScript-SDK-Reference the 2nd param of set needs to be: number | string | list | object. The DefinitelyTyped typings are currently number | string | any[] | object, because of this. Two questions:

Is boolean not allowed? I used that in the past and it seems to work well.
Can object be indefinitely nested or does it need to be flat? Can the unspecific "list" be more specific? Can it contain objects as well or just other primitives? And can an object store a
"list" in one of its fields?

Thank you!

@donaldpipowitch

Yes, the doc needs to be fixed. It supports bool.
We do support one level nested object for user and event properties, which means you can query against the keys in the nested JSON.

Does it make sense to you?

Thank you for the quick response. Can you illustrate 2. with some examples? I'm not sure I understood it completely. Thank you

{
	"user_properties": {
		"nested_json": {
			"nested_id": "id",
			"nested_name": "name"
		}
	}
}

For above example, the nested_json will be a parameter that you can make a query against in Amplitude dashboard. However, nested_id and nested_name wouldn't be read as query parameters.

Thank for the quick response. To sum up - is this possible as well?:
{
	"user_properties": {
		"nested_list": [{
			"nested_id": "id",
			"nested_name": "name"
		}]
	}
}

// or

[{"hello": "id"}]

You said nested_json. Does this include null as well? If yes, can't we basically say it's a JSON-stringifyable object? E.g. this type: type Json = string | number | boolean | null | Json[] | { [key: string]: Json };
If yes, I think that would it way clearer.

Our doc has been migrated. Closing it for now. Feel free to reopen it.


core: document hard-wired JWK sets

How do we manually add keys for challenges, etc so they don't change constantly on restart or have to request them specifically from the endpoint every time we need them?
Or is that the point? That challenge keys for the consent server, etc need to be requested from Hydra every single time they're used?
I see key endpoints, but nowhere to see what keys we're meant to setup and exactly what each is used for.

How do we manually add keys for challenges, etc so they don't change constantly on restart

Keys only change on new installs or if there is no way to persist them. This usually happens if you use hydra without a database. Once you've setup rethinkdb with hydra, hydra will generate them only once.

That challenge keys for the consent server, etc need to be requested from Hydra every single time they're used?

In the future, there will be key rotation but you shouldn't be required to lookup the keys always. It is enough to look them up if validation fails.

I see key endpoints, but nowhere to see what keys we're meant to setup and exactly what each is used for.

Good point, this isn't documented at the moment. Here is a list of keys: #239
Usually, you should not need to modify them, except for the HTTPS TLS key, which can also be set using environment variables or a command line flag.

Just to confirm, the intention is to change the keys to all the hydra.* prefixed forms?

Yes, this already happened on the 0.5.0 PR

Am 12.09.2016 um 07:10 schrieb Wayne Robinson<EMAIL_ADDRESS>Just to confirm, the intention is to change the keys to all the hydra.* prefixed forms?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ory-am/hydra/issues/247#issuecomment-246251034, or mute the thread https://github.com/notifications/unsubscribe-auth/ADN1eiRSIcu5Cz9ng4BZMPgULxCNhXAzks5qpN6rgaJpZM4J3qu-.


fix: add auth list to rpc

Cherry-picked from frontiers changes
Requires alloy bump

Superseded by #10590


There is no definition of class Parser in utils

Hi , I also meet this error ! Can you or anyone show me how to fix it ?


minecraft-proxy: Correct rendering with toYaml in ConfigMap

This PR corrects an issue caused by a duplicate block scaler token in the ConfigMap created when the minecraftProxy.config value is supplied.
The current ConfigMap template defines the config.yml file as follows:
data:
  config.yml: |
{{ toYaml .Values.minecraftProxy.config | indent 4 }}

Using the following custom-values.yml as an example:
minecraftProxy:
  config: |
    ---
    online_mode: true
    servers:
      lobby:
        motd: 'Testing...'
        address: minecraft-minecraft:25565
        restricted: false

and after rendering the template, the resulting config.yml file is not valid yaml:
keith.king at jump in ~/.../charts/minecraft-proxy on (HEAD detached at minecraft-proxy-2.0.1)*
$ helm template -f values.yaml -f custom-values.yml bungeecord .
<truncated for brevity>
---
# Source: minecraft-proxy/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: bungeecord-minecraft-proxy-config
  labels:
    app: bungeecord-minecraft-proxy
    chart: "minecraft-proxy-2.0.1"
    release: "bungeecord"
    heritage: "Helm"
data:
  config.yml: |
    |
      ---
      online_mode: true
      servers:
        lobby:
          motd: 'Testing...'
          address: minecraft-minecraft:25565
          restricted: false
<truncated for brevity>

Note the extra block scaler appearing on the newline, this results in config.yml being rendered containing the block scaler, and subsequently bungeecord fails to startup since it cannot successfully parse the config file.
After the change introduced in this PR, the template is rendered to valid yaml:
keith.king at jump in ~/.../charts/minecraft-proxy on fix-config*
$ helm template -f values.yaml -f custom-values.yml bungeecord .
<truncated for brevity>
---
# Source: minecraft-proxy/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: bungeecord-minecraft-proxy-config
  labels:
    app: bungeecord-minecraft-proxy
    chart: "minecraft-proxy-2.0.1"
    release: "bungeecord"
    heritage: "Helm"
data:
  config.yml:   |
    ---
    online_mode: true
    servers:
      lobby:
        motd: 'Testing...'
        address: minecraft-minecraft:25565
        restricted: false
<truncated for brevity>

@ChipWolf can you review this also? I'm sure you would have tested the use of minecraftProxy.config and maybe there's something missing from the values comment.

No problem, glad to see this was merged. Thanks!


Colour control characters causing bias in string width evaluation.

If you have the strings "This is a yellow string" and "This is a ~y~yellow string", the width is being evaluated taking into account the colour control characters. The consequence of this is text wrapping when there is sufficient space left to display the wrapped words.
To see an example of this, create a UIMenuItem with the following properties.
new UIMenuItem("Some text", "~w~Type: ~y~Off-Road, ~w~Difficulty: ~y~Professional")
and another with these
new UIMenuItem("Some text", "Type: ~y~Off-Road, ~w~Difficulty: ~y~Professional")
Even though the visible textual content is identical, the top one will force the word Professional onto the second line, whereas the second one will leave everything on one line. The second one is fine if you want the first word to be white but it fails if you don't.
Ideally, upon creation of any menu item subtitle, the string needs to be passed through a control code removal function before being passed to the string width checking and then the width of that processed string storing as a value in the class. That way, the only additional processing that occurs is at creation time, which won't impact on performance... plus you get accurately wrapped coloured strings. There is an ideal Dictionary based solution on this page: https://stackoverflow.com/questions/1321331/replace-multiple-string-elements-in-c-sharp
You can see an example of how this affects presentation in this image. The amount of space in the top box makes it look really bad.

Ideally you'd use game's text measuring system with 0x9040DFB09BE75706 to get the text's line count.

I have no control over the measuring, that's being done by NativeUI. Is that what NativeUI uses?
It doesn't actually matter what I would use because it can't affect anything. I can't measure a string and then say to NativeUI "This string is X units wide, display it all on one line". I could process the string with replacement functions and everything but it would still wrap incorrectly.
Or are you saying that I can override the wrapping functionality of NativeUI to force things to not wrap?

Currently NativeUI just counts the characters. What I meant is, ideally NativeUI would use that native. I'll get around to it someday

Ah, right... I understand now.
I only noticed it because I am doing a collaboration with someone using a NativeUI menu system and just thought it was worth mentioning. I'll close this then.

It's okay, I'll close this when I fix it

For now, you can use this regex \~(.*?)\~ to strip the colour codes under the string measurer?

If I'm not wrong, we are running the width evaluation every tick. We know that regex is slow so adding it is going to cause performance issues when the menus are open (I guess around a 30%).

My advice would be to not run width evaluation every tick, on something that only changes width when the content changes. That would also mean the regex would only ever run once when the content changed, which would get you a chunk of performance back.
The less calculating you can do when it only needs to be drawing things, the better it will perform when the menu is open. Might be worth looking into that as an optimisation step perhaps.

It can be easily changed to only calculate when the text changes.

There is also the native mentioned by Guad to measure the width correctly. We need to try that first and then use regex as our last resort.

I'm just saying if anyone wants a fast fix. Because it seems like Guad is busy anyway noone else seems to be attempting a pull request.

Attempted to use the native mentioned by @Guad, because there is not a lot of documentation it appears that I did something wrong.

The code is on the lemon/string-measurement branch.

Added the Help Wanted tag because I don't know how to make this work.

This is actually more tricky than it seems, because you can't just strip out the control codes, you have to remember where they all were, so you can put them back into the adjusted string. I can't do anything directly with the code because I don't use all this git stuff. I'll post what I have written, just in case it will help. This was written in a winforms app but the core code will work.
I have this struct to store the control codes as an index and string value.
`public struct ControlChar
{
public int Index;
public string ControlString;
public ControlChar(int index, string controlString)
{
	Index = index;
	ControlString = controlString;
}

}`
Then I first run this code to collect and store those codes... testString would be replaced with your actual string being measured.
`List ControlCharIndexes = new List();
// sample string...
string testString = "~y~Hello there ~r~I am some text that is ~g~too long.";
int indexOffset = 0;
for (int x = 0; x < testString.Length; x++)
{
if (testString.Substring(x, 1) == "~")
{
string controlCode = testString.Substring(x, 3); // Get the control code string
ControlCharIndexes.Add(new ControlChar(x + indexOffset, controlCode)); // Store the control code in the list
testString = testString.Remove(x, 3); // Remove the code from the string
indexOffset += 3; // add 3 to the index offset to compensate for the removed string
}
}`
Then you would do your string measuring and every time you insert a "~n~" to force a newline, you would add 3 to any stored index values at that position or later. So if for example you had inserted one at index 21, then you would run this code to add 3 to the indexes of the stored control codes that are currently 21 or higher. insertIndex would be the position you had inserted the "~n~" code
`for (int i = 0; i < ControlCharIndexes.Count; i++)
{
ControlChar cc = ControlCharIndexes[i];
if (cc.Index >= insertIndex)
{
	cc.Index += 3;
	ControlCharIndexes[i] = cc;
}

}`
Finally, this would add the original control codes back into the string, taking into account the additional "~n~" insertions.
for (int i = 0; i < ControlCharIndexes.Count; i++) { 	ControlChar cc = ControlCharIndexes[i]; 	testString = testString.Insert(cc.Index,cc.ControlString); }
After processing, the original string looks like this "~y~Hello there ~r~I am some~n~ text that is ~g~too long."
If you were to strip out excess spaces, like the one before "text", then you'd have to adjust the indexes to compensate for that as well.
I have a habit of writing code that isn't probably the best way but this might give you some help to solving the problem. Sorry if this causes more confusion that it tries to solve.

I don't know why the code formatting isn't working properly, I don't think GitHub likes Opera, sorry :(

Sorry, I deleted the comment I made, the screwed up code formatting just made it a confusing mess. I will try and find another way of posting the code later. :(

Hmmm, okay... now I am confused. I added some string measuring code to a mod I am writing yesterday and decided to test it with some colour codes.
This:
"This is some text"
Returned the exact same length as this:
"~r~This is ~y~some text"

This is the code my measure is using.
        private static float GetStringWidth(string text, Font font, float scale)         {             Function.Call(Hash._SET_TEXT_ENTRY_FOR_WIDTH, "STRING");             Function.Call((Hash)0x6C188BE134E074AA, text);             Function.Call(Hash.SET_TEXT_FONT, (int)font);             Function.Call(Hash.SET_TEXT_SCALE, scale, scale);             return Function.Call<float>(Hash._GET_TEXT_SCREEN_WIDTH, true);         }

Hold on, I notice your getTextScreenWidth is true?
I use false for some reason... have u tested the difference when its false and true?
		mp.game.ui.setTextEntryForWidth("STRING");
		ResText.AddLongString(input);
		mp.game.ui.setTextFont(0);
		mp.game.ui.setTextScale(0.35 * 1.25, 0.35);
		return mp.game.ui.getTextScreenWidth(false);
	}

	public static MeasureString(str: string) {
		const screenw = Screen.width;
		const screenh = Screen.height;
		const height = 1080.0;
		const ratio = screenw / screenh;
		const width = height * ratio;
		return this.MeasureStringWidthNoConvert(str) * width;
	}```

Just tested with false and they still both return the same length. So that begs the question, if that measurement code always returns the same length, no matter whether control codes are used or not, where does the problem here come from?
Just noticed, the string measuring code uses different hash values in NativeUI, I wonder if that has anything to do with it?
	public static float MeasureStringWidthNoConvert(string str, Font font, float scale) 	{ 		Function.Call((Hash)0x54CE8AC98E120CAB, "STRING"); 		AddLongString(str); 		return Function.Call<float>((Hash)0x85F061DA64ED2F67, (int)font) * scale; 	}

Well AFAIK 0x85F061DA64ED2F67 = _GET_TEXT_SCREEN_WIDTH = _END_TEXT_COMMAND_GET_WIDTH but I was wondering, why is it passing font as an int? and then multiplying it by scale?

It's so confusing with different native names being used all over the place. Maybe the original parameter was marked as a float, which might have caused the confusion over what it actually requires.
Perhaps this issue doesn't exist anymore though, a lot can happen in 18 months as more is discovered about how the natives are used.

Just created a quick project and both of them wrap at the same length now, so whatever the problem used to be, it's no longer present. It does seem to wrap a bit early but it's consistent when it wraps, so I would suggest that this issue be finally laid to rest.
Top line has 4 control codes in the description, the bottom line has none,.

And this is confirmed using the current version with no modifications?
Did you try different resolutions?

Just put the old 1.7 dll in and the problem returned, so this is something that is definitely fixed in versions later than 1.7. This is with the old dll.

No, didn't try different resolutions, I only run at 1920x1200 and I don't use NativeUI now to be honest.

Ah, it seems like before .. at 1.7 it still uses the character calculating instead of the game functions.
https://github.com/Guad/NativeUI/commit/8de27741b484d0681c7ef85d3d3b2dd6181281f9
So the game function more or less fixed it.

Yep, I think this can be closed now.

Great news everyone! We now use the native mentioned by @Guad to accurately calculate the number of lines that a specific string uses:


Track and Playlist Embedded Player

We need an HTML player for

Twitter player cards (See https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/player-card.html)
Artist embedding on their websites

Bandcamp probably implements this best currently:
https://daily.bandcamp.com/2013/06/12/all-new-players-up-twitter-too/
I'd be happy with just having a single track player and a playlist player to start. The question is if we should use an off the shelf solution or write something from scratch.

Closing this for now, going to sleep on it.


[Bug] Ray client timeout errors using v0.3.0

Search before asking

[X] I searched the issues and found no similar issues.

KubeRay Component
ray-operator
What happened + What you expected to happen
Using kuberay v0.3.0 (cluster version 1.21.13-gke.900, ray client version 1.13.1), I am always seeing ray client timeout errors:
/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client/worker.py:258: UserWarning: Ray Client connection timed out. Ensure that the Ray Client port on the head node is reachable from your local machine. See https://docs.ray.io/en/latest/cluster/ray-client.html#step-2-check-ports for more information.
  "Ray Client connection timed out. Ensure that "
Traceback (most recent call last):
  File "job_example.py", line 54, in <module>
    ray.init("ray://example-cluster-ray-head-svc:10001")
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
    return func(*args, **kwargs)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/worker.py", line 887, in init
    return builder.connect()
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/client_builder.py", line 164, in connect
    ray_init_kwargs=self._remote_init_kwargs,
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client_connect.py", line 45, in connect
    ray_init_kwargs=ray_init_kwargs,
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client/__init__.py", line 243, in connect
    conn = self.get_context().connect(*args, **kw_args)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client/__init__.py", line 91, in connect
    connection_retries=connection_retries,
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client/worker.py", line 143, in __init__
    self._connect_channel()
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/util/client/worker.py", line 264, in _connect_channel
    raise ConnectionError("ray client connection timeout")
ConnectionError: ray client connection timeout

Reproduction script
This is my job yaml:
apiVersion: batch/v1
kind: Job
metadata:
  namespace: [name]
  name: ray-test-job
spec:
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      restartPolicy: Never
      containers:
        - name: ray
          image: rayproject/ray:latest
          imagePullPolicy: Always
          command: [ "/bin/bash", "-c", "--" ]
          args:
            - "wget https://raw.githubusercontent.com/ray-project/ray/master/doc/kubernetes/example_scripts/job_example.py &&
              sed -i 's/example-cluster-ray-head/example-cluster-ray-head-svc/g' job_example.py && python job_example.py"
          resources:
            requests:
              cpu: 100m
              memory: 512Mi

Anything else
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

@richardsliu Can you share the cluster pods & service status? Seem client can not connect to Ray service

make sure the service name is correct
Make sure there're endpoints for the service
Make sure head is up and running. Let's check /tmp/ray/xxx to see whether the main process reports any issue.

This is the service:
Name:              example-cluster-ray-head-svc
Namespace:         ricliu
Labels:            app.kubernetes.io/created-by=kuberay-operator
                   app.kubernetes.io/name=kuberay
                   ray.io/cluster=example-cluster-ray
                   ray.io/identifier=example-cluster-ray-head
                   ray.io/node-type=head
Annotations:       cloud.google.com/neg: {"ingress":true}
Selector:          app.kubernetes.io/created-by=kuberay-operator,app.kubernetes.io/name=kuberay,ray.io/cluster=example-cluster-ray,ray.io/identifier=example-cluster-ray-head,ray.io/node-type=head
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                <IP_ADDRESS>
IPs:               <IP_ADDRESS>
Port:              dashboard  8265/TCP
TargetPort:        8265/TCP
Endpoints:         <none>
Port:              metrics  8080/TCP
TargetPort:        8080/TCP
Endpoints:         <none>
Port:              serve  8000/TCP
TargetPort:        8000/TCP
Endpoints:         <none>
Port:              client  10001/TCP
TargetPort:        10001/TCP
Endpoints:         <none>
Port:              redis  6379/TCP
TargetPort:        6379/TCP
Endpoints:         <none>
Session Affinity:  None
Events:            <none>

The cluster was deployed using the example cluster config here: https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/values.yaml
I didn't see any obvious errors in the ray head, but the workers seem to have a lot of errors:
2022-08-25 17:13:05,401 WARNING utils.py:1243 -- Unable to connect to GCS at example-cluster-ray-head-svc:6379. Check that (1) Ray GCS with matching version started successfully at the specified address, and (2) there is no firewall setting preventing access.
2022-08-25 17:09:31,183 INFO scripts.py:870 -- Local node IP: <IP_ADDRESS>
Traceback (most recent call last):
  File "/home/ray/anaconda3/bin/ray", line 8, in <module>
    sys.exit(main())
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/scripts/scripts.py", line 2339, in main
    return cli()
  File "/home/ray/anaconda3/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ray/anaconda3/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/autoscaler/_private/cli_logger.py", line 852, in wrapper
    return f(*args, **kwargs)
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/scripts/scripts.py", line 873, in start
    ray_params, head=False, shutdown_at_exit=block, spawn_reaper=block
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/node.py", line 189, in __init__
    num_retries=NUM_REDIS_GET_RETRIES,
  File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/_private/utils.py", line 1259, in internal_kv_get_with_retry
    f"Could not read '{key.decode()}' from GCS. Did GCS start successfully?"
RuntimeError: Could not read 'session_name' from GCS. Did GCS start successfully?

Repro steps:
$ git clone https://github.com/ray-project/kuberay
$ git checkout v0.3.0
$ cd kuberay/helm-chart/
$ helm -n ricliu install example-cluster ./ray-cluster/ --create-namespace

Tried it again on clusters from https://github.com/ray-project/kuberay/tree/master/ray-operator/config/samples and it doesn't seem to repro, so it is likely a problem with the helm installation charts.
@Jeffwan


WEB UI not working with the SQL.

Prism already created the tables, but when I do a search on the WEB UI, the following error appears:
Error returning results:

The Ajax request failed.

Make sure WEB_UI_DEBUG is turned off in the config.php file. Otherwise, if you're unsure how to resolve this error please contact Prism support.

The web UI is not supported for Prism for Sponge. You can file an issue with https://github.com/prism/Prism-Bukkit but that project is no longer supported.

Well, so no one can answer our askings? Even if is not about requests...

I did answer. The web UI is not designed to work with Prism for Sponge which is where you're filing this issue. If you're using it for bukkit/spigot, it's not supported anymore. I will say that the issue you filed would be closed anyway because you have WEB_UI_DEBUG enabled which it specifically says to disable. If you disable it and still have errors then you need to run the sql manually and look at what MySQL complains about.

Prism-Bukkit doesn't have issues allowed, anyway one or another will come here asking about it, bcs we dont have another place to ask things... So, prism-bukkit devs dont want even simple askings? oh god.

It's not supported anymore, so issues filed against it are worthless. Filing a ticket is not the appropriate place to ask for help. Considering you're not answering my most basic questions I'm going to mute this thread.

Same thing without the debug option.

If you expect help, you have to stop wasting my time. Two days ago I said:

If you disable it and still have errors then you need to run the sql manually and look at what MySQL complains about.


TextStyle Alignment using left instead of number

I was wondering if it's correct to set the alignment to left instead of actually a number.
I looked at a Sketch file and the JSON shows the following:
"paragraphStyle": {
  "_class": "paragraphStyle",
  "alignment": 2,
  "maximumLineHeight": 17,
  "minimumLineHeight": 17,
  "paragraphSpacing": 0.699999988079071
},

The correct values should be:
"alignment": 3, // block
"alignment": 0, // left
"alignment": 1, // right
"alignment": 2, // center

So I guess what I'm trying to point out is that instead of the || left we should add 1, see here:
https://github.com/amzn/sketch-constructor/blob/master/models/TextStyle/TextStyle.js#L51
Happy about some input from all of you.
Cheers

Closing because this is actually implemented here: https://github.com/amzn/sketch-constructor/blob/master/utils/maps.js


Being able to turn off not important logs

Currently all logs are logged with the standard log package, would be nice to be able to disable all the info logs if we call it that.
I could make a PR but since the flavor or logging these days seem to be split, I would still use logrus and could do a PR if that's OK with you.

@xonvanetta some time ago I created a PR/branch (I will look for it in a moment) with some of structured logs, but I remember I encountered problems that I haven't dealt before and just abandoned it.
Also, I would prefer using slog package, which will probably become a part of the standard library, than adding external dependency

I'm open to propositions on how logging should be done there, however before implementing it please present examples, so we can elaborate on its consequences

Never worked with slog but I can write some examples, probably even in an fork to verify behavior and also to test

So pushed a POC branch on my fork, also don't know if i got every log correct as in which level it should be logged on but that's up for discussion, same for default log level and default text formatter or json formatter.
Lil examples here from the POC:
https://github.com/xonvanetta/logstash-exporter/commit/6dc5d2f1dfc643d85ab7a76611de7810f69072fa#diff-1fabb01a2607990d88b8259081c988c3bb7b601909c2484573ead734f3e2c56fL76-R80
time=2023-07-18T12:35:51.553+02:00 level=ERROR msg="executor failed" name=nodeinfo duration=992.183µs err="Get \"http://localhost:9600\": dial tcp [::1]:9600: connect: connection refused"

https://github.com/xonvanetta/logstash-exporter/commit/6dc5d2f1dfc643d85ab7a76611de7810f69072fa#diff-87a14da5a23cb0add260fbc88283bec5f8b2caeea3aefb8794f9a4c0277bb061L177-R178
time=2023-07-18T12:39:14.201+02:00 level=DEBUG msg="collecting pipeline plugin stats for pipeline" pipelineID=beats "plugin type"=output name=opensearch id=36b2dd9dbac4bb4e07e8755b4eba1703f59d76fee0c8188b221a5de79eced88f

What more kind of examples would you like to have? Like how to use it and how it's being used?

@xonvanetta I like it so far, feel free to keep going with it. also, please tell me if you need any help with converting the project to use slog, so I may help

I fixed some small typos but we could move the more fine detail discussion to the PR, otherwise I haven't had any problems so far with it

@xonvanetta I just released v1.5.0 version that contains the slog


How to pass flash message after submitting from a custom controller?

Following this Stack Exchange question, I can redirect to a URL after submitting to a custom controller using this:
Craft::$app->getResponse()->getHeaders()->set('HX-Redirect', $url);

This works as expected. However, it failed to pass my flash message:
Craft::$app->getSession()->set('my-flash-key', 'My flash message');

if (Craft::$app->plugins->isPluginEnabled('sprig')) {
    Craft::$app->getResponse()->getHeaders()->set('HX-Redirect', $url);
    return $this->asSuccess();
} else {
    return $this->redirect($url);
}

When using $this->redirect($url), it works. But with Sprig, it seems like the message in the session is lost during the redirect.
As an alternative, I also tried using Craft::$app->getSession()->set('my-flash-key', 'My flash message'), but it still does not get passed.
How to pass flash message after submitting from my custom controller?

I’d expect that to work. Are you fetching the session value as follows?
{{ craft.app.session.get('myFlashKey') ?? '' }}

Great!


Error while moving node between trees

From documentation:

Moving a record
Warning! You can move record only if it's a valid node == it has its own place in the tree == it has left and right values. If it doesn't, please see Creating a record page.
Creating a record
Warning! You can use these functions only with records w/o its own place in the tree (w/o left and right values in other words). If you need to move the existing records, see Moving a record page.

For example method: moveAsFirstChildOf.
If source node and dest node has different rootId, then called moveBetweenTrees, that call insertAsFirstChildOf, that throw exception: "Cannot insert the node that has its place in the tree", becouse node exists and we can't use methotds insertXXX.
So no one moveXXX from different trees is not working.
Maybe need to call detach(), before insertXXX methods?
Or i some where have mistake?

@ilgiz-badamshin you are right. It's a bug. Thank you for reporting.
If you have ideas how to fix it, PR is welcome!

@ilgiz-badamshin you are right. It's a bug. Thank you for reporting.
If you have ideas how to fix it, PR is welcome!

#19 - fix moveBetweenTrees
#20 - fix bug with siblings

#19 - fix moveBetweenTrees
#20 - fix bug with siblings

@ilgiz-badamshin thank you for your PRs! I merged them and created a new release with the changes - see v 1.5.1

@ilgiz-badamshin thank you for your PRs! I merged them and created a new release with the changes - see v 1.5.1


Quick clean up: markdown syntax and JSON formatting

Speaking about standards, let's apply the ones for Markdown and JSON formatting (not really standards, more conventions).

corrigé