hexa and 0

Hi,
It seems that printf("%#x", 0) outputs 0 instead of 0x0.
Is that normal ?
Thanks !

Indeed, that's not a bug, it's a feature defined by the standard. I don't like it as well, but yeah, the specification has the last word 😉


Reproductivity of IP2

ssspy.bss._update_spatial_model:update_by_ip2 returns different result from old one.

The older one updates auxiliary variables per two columns. In contrast, the new counterpart updates them per iteration.
Both satisfy the monotonic nonincreasing.

This is resolved by #110.


Fix phpcbf hanging issue by closing stdin

What does this implement/fix? Explain your changes.
This is a fix for issue #893.
There is an issue squizlabs/PHP_CodeSniffer#993 in phpcbf where it hangs when waiting for stdin.
The workaround is to close stdin of the child process since it is not being used anyway.
Checklist
Check all those that are applicable and complete.

[x] Merged with latest master branch
[ ] Added examples for testing to examples/ directory
[x] Travis CI passes (Mac support)
[ ] AppVeyor passes (Windows support)

Thank you for contributing!

Published to v0.29.11


There is no AGENT_TOOLSDIRECTORY on GitHub images

This change reflects what the Windows installer already does:  https://github.com/mjpieters/python-versions/blob/c0e7ef2c3c5b8e3dce50c0caceaafb4a5266a36c/installers/win-setup-template.ps1#L82-L87

Incidentally: the setup-python README tells us to open issues here in the python-versions repository to request new Python releases:

If there is a specific version of Python that is not available, you can open an issue in the python-versions repository.

Yet this repository doesn’t have the issues option enabled. Oversight perhaps?

Hello @mjpieters
Apologies for the README discrepancies (I've updated it now). I forgot to update that section, when i removed some other references to creating issues in this repository.
The reason issues are closed in this repo is so that it is easier to maintain and triage. Python issues come in setup-python and virtual-environments so having a third repository to regularly check on would become difficult

@maxim-lobanov, @MaksimZhukov could you take a look at this small code change?

/azp run

Hello @mjpieters, your changes LGTM. We didn't do these changes initially because Hosted Ubuntu images have AGENT_TOOLSDIRECTORY as far as I know. But your fix is important to support self-hosted agents properly.
Currently, CI fails on your changes because of the way that we use to generate installer scripts. I have improved it in scope of #22 . Could you please pull latest master to your branch and I will rerun CI?

@MaksimZhukov I rebased and force-pushed, I suspect that now means you have to run the pipeline manually. GitHub doesn't think there is a need for any checks, at any rate.
Let's see if I have permission to trigger a run:
/azp run

/azp run

/azp run

looks like azp run doesn't run build properly :(
I have run checks manually: https://github.visualstudio.com/virtual-environments/_build/results?buildId=67728&view=logs&j=a851cb31-2814-50bb-6af1-fa649763ba71&t=f0eef93c-9563-5abf-9747-41cd68506a2a

Looks like the manual build completed successfully.

@mjpieters  , merged. I will re-upload existing versions with this fix.

All versions were regenerated and re-uploaded with this fix


make main gives error

Steps to reproduce

Expected behavior
Actual behavior
error  : make: *** No rule to make target `main'.  Stop.
Environment configuration
Operating system:ubuntu
Compiler:gcc
Compiler version:4.8.4

The makefile is updated as of now and the README is not yet updated, but simply a make command will
do here:
make


Can't build on Windows: called Option::unwrap() on a None value

On https://github.com/dabreegster/abstreet/blob/38bc88d54bcc3716987e67513ab2400efbba9537/game/build.rs#L12, the build script does something for each file, but skips the file "src/helpers.rs". However, on windows the path is "src\\helpers.rs", so the file isn't skipped and something down the line fails.
I haven't figured out exactly what fails or why, but adding "src\\helpers.rs" to the comparison lets the build complete.

There are a few other places in the abstutil crate especially that try to do Unixy path things. Let me know if you hit any more problems.

Thanks! I'm normally on Linux, just had to use windows while I was home for the holidays, so don't expect too many more windows bugs from me!


[Feature][Connector] Support Rsync to transfer clickhouse data file

Search before asking

[X] I had searched in the feature and found no similar feature requirement.

Description
Import the project rsync4j to support transfer clickhouse data file with Rsync over ssh.(There is another way to transfer file with Rsync which is rsync-daemon,but rsync-daemon is complex and not flexible.So i choose Rsync with ssh. )
The local client should install sshpass,which to support non interactive password authentication.
And solve the NullPointerException when node_free_password=true.
Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?

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

Code of Conduct

[X] I agree to follow this project's Code of Conduct

https://github.com/apache/incubator-seatunnel/issues/1513

good idea. CC @Hisoka-X

good job


Not available with Gradle anymore

Not available with Gradle anymore

Yes it is not available

I've updated the library to the latest gradle
Now one can use this library by implementing following
implementation 'com.github.karanchuri:PermissionManager:0.1.0'


cardHeight prop is not working in VERTICAL mode

Describe the bug
I am adding cardHeight property to the Chrono component having Vertical mode but nothing changes with the cards.
To Reproduce
Steps to reproduce the behavior:

Clone vertical basic sandbox example given on npm website (https://codesandbox.io/s/react-chrono-vertical-basic-0rm1o?file=/src/App.js)
Add "cardHeight" to Chrono component

Expected behavior
From what I understand, the cardHeight property makes all cards have a certain minimum height. For example if I set it 700, then all cards will have a minimum of 700 pixels in height. However, in my case, the cards have the minimum height of 200.
Screenshots
https://codesandbox.io/s/ug6h3
Desktop (please complete the following information):

OS: MacOS
Browser: Chrome
Version: 89.0.4389.82

@adityamudgil2505 this has been fixed with the latest release. do check out and let me know how it works for you

@prabhuignoto It's working fine now. Thanks for looking into this issue.

Not working in projects


Add libernon to Contributors list

Thanks guys! This seems really useful and a really good idea!

I'm quite elated about your pull request. I wanna evolve this project to addresses various problems faced by first-time contributors. I'd love to learn about your journey in open source community, the problems, pain points you had etc.
Could you explain how you felt when you went through the tutorial, made a pull request and learned that I merged it?
We’ve recently added Facebook share and tweet feature to our web app. Could you please go to https://roshanjossey.github.io/first-contributions/#social-share and share your first contribution to open source?
Also, check out projects with easy issues while you’re there.


reversed <%- %> and <%= %>

Escaped output with <%= %> (escape function configurable)
Unescaped raw output with <%- %>

but my test results is reversed
test code:

<%- ''%>

results:

<img/>

the write results should be:

All resources I found associate = with escaped output and - with raw unescaped output. Please see tj/ejs features, ejs.co docs and their implementation: Line 764 of ejs.js at GitHub.
In contrast, Lodash's implementation has things other way around, associating - with escaped output and = with raw output. Lodash might have taken a wrong step here. The _.templateSettings refer the default settings to follow Embedded Ruby and template literals of ES2015 but neither has a strong opinion on the matter. Embedded Ruby associates <%- with slurping and ES2015 uses String.raw prefix for unescaped template strings.
See also the default Lodash _.templateSettings. Maybe the property escape has something to do with this? Maybe the default setting could be overridden in ejs-loader?
@okonet For me this seems to be a Lodash issue. I will go and open an issue there.


GetVertices(...) does not work with indexes built on a single property

The method getVertices(String label, String[] iKey, Object[] iValue) does not work with indexes built on a single property, but it works with indexes built on multiple properties.
Here the thrown exception:
java.lang.ClassCastException: com.orientechnologies.orient.core.index.OCompositeKey cannot be cast to java.lang.String
'''import static org.junit.Assert.assertEquals;
import java.util.Iterator;
import org.junit.Test;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import com.tinkerpop.blueprints.Parameter;
import com.tinkerpop.blueprints.Vertex;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import com.tinkerpop.blueprints.impls.orient.OrientVertex;
import com.tinkerpop.blueprints.impls.orient.OrientVertexType;
/*
*

Copyright 2015 Orient Technologies LTD (info(at)orientechnologies.com)

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

For more information: http://www.orientechnologies.com

*/
/**

@author Gabriele Ponzi
@email<EMAIL_ADDRESS>

*/
public class GetVertices {
@Test
public void test() {
Iterator<Vertex> iterator = null;
OrientGraphNoTx graph = new OrientGraphNoTx("memory:/TestDB","admin","admin");
OrientVertexType personType = graph.createVertexType("Person");
personType.createProperty("person_id", OType.STRING);
personType.createProperty("name", OType.STRING);

// Adding 3 vertices to the orient graph

OrientVertex p1 = graph.addVertex("class:Person");
p1.setProperty("person_id", "01");
p1.setProperty("name", "Gabriel");

OrientVertex p2 = graph.addVertex("class:Person");
p2.setProperty("person_id", "02");
p2.setProperty("name", "Daniel");

OrientVertex p3 = graph.addVertex("class:Person");
p3.setProperty("person_id", "03");
p3.setProperty("name", "Emanuel");

/*  CASE 1
 *  GetVertices call without indexes, query on one key and one value
 */

// String key and value
String[] singleKey = {"person_id"};
String[] singleValue = {"01"};

iterator = graph.getVertices("Person", singleKey, singleValue).iterator();

int resultsAmount = 0;
while(iterator.hasNext()) {
  iterator.next();
  resultsAmount++;
}

assertEquals(resultsAmount,1);

iterator = graph.getVertices("Person", singleKey, singleValue).iterator();

Vertex firstVertex = iterator.next();
assertEquals(firstVertex.getProperty("person_id"),"01");
assertEquals(firstVertex.getProperty("name"),"Gabriel");

/*  CASE 2
 *  GetVertices call with index built on a single property, query on one key and one value
 */

// Defining an index (unique_hash_index) on a single property
String statement = "create index Person.pkey on Person (person_id) unique_hash_index";
OCommandSQL sqlCommand = new OCommandSQL(statement);
graph.getRawGraph().command(sqlCommand).execute();

// String key and value
singleValue[0] = "02";

iterator = graph.getVertices("Person", singleKey, singleValue).iterator();

resultsAmount = 0;
while(iterator.hasNext()) {
  iterator.next();
  resultsAmount++;
}

assertEquals(resultsAmount,1);

iterator = graph.getVertices("Person", singleKey, singleValue).iterator();

firstVertex = iterator.next();
assertEquals(firstVertex.getProperty("person_id"),"02");
assertEquals(firstVertex.getProperty("name"),"Daniel");

/*  CASE 3
 *  GetVertices call with index built on two properties (composite key), query on two key and two values in order to test "composite key behaviour"
 */

// Dropping precedent index and defining a new index (unique_hash_index) on two properties
graph.dropIndex("Person.pkey");
statement = "create index Person.pkey on Person (person_id,name) unique_hash_index";
sqlCommand = new OCommandSQL(statement);
graph.getRawGraph().command(sqlCommand).execute();

// String key and value
String[] keys = {"person_id","name"};
String[] values = {"03","Emanuel"};

iterator = graph.getVertices("Person", keys, values).iterator();

resultsAmount = 0;
while(iterator.hasNext()) {
  iterator.next();
  resultsAmount++;
}

assertEquals(resultsAmount,1);

iterator = graph.getVertices("Person", keys, values).iterator();

firstVertex = iterator.next();
assertEquals(firstVertex.getProperty("person_id"),"03");
assertEquals(firstVertex.getProperty("name"),"Emanuel");

}
}
'''

+1. I experience the same problem in my code with orientDB v2.0.8 where the arg is a long.

Hi, sorry for bothering. But might it be possible to shift it to v2.0.9 since one cannot circumvent this bug in a decent way. Disabling/deleting the index falls short since you:

would not only loose performance but
in my case would "allow" duplicate entries (due to the unique constraint). This is a absolute no go data integrity wise.
test suites would fail.

hi @fixundfertig123
yes is going to v2.0.9


Update first line in the colab demo

To avoid getting error messages when running the first cell of the Colab notebook, you should change the first code line to !pip install tensorflow==1.15.

Thanks! I updated the source code


Code release

Hello,
Great work. When will the code be released?

Up

Up

Please check the updated repo for the code.


DynComms [0/n]: fn package additions

NOTE: This change is part of a series implementing Dynamic Commitments.
Change Description
This adds some useful library functions that will allow us to capture patterns we often use throughout the codebase. None of the code in this PR has any direct bearing on Dynamic Commitments but it is generally useful infrastructure that will be assumed to be available in future PRs in the series.
Steps to Test
N/A
Pull Request Checklist
Testing

[x] Your PR passes all CI checks.
[x] Tests covering the positive and negative (error paths) are included.
[x] Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

[x] The change obeys the Code Documentation and Commenting guidelines, and lines wrap at 80.
[x] Commits follow the Ideal Git Commit Structure.
[x] Any new logging statements use an appropriate subsystem and logging level.
[x] Any new lncli commands have appropriate tags in the comments for the rpc in the proto file.
[x]  There is a change description in the release notes, or [skip ci] in the commit message for small changes.

📝 Please see our  Contribution Guidelines for further guidance.

I wonder where you get the inspiration for these library functions, these functions are almost suitable for a general golang library using generics ?

Years of writing Haskell as my native language. Yeah this would be better suited for a golang general lib but I have no desire to do ongoing maintenance of go libraries for the whole golang ecosystem. Further, @Roasbeef doesn't want to depend on external libraries for this kind of thing due to OSS maintainer risk (either malice or just disappearing), which is why we invented the fn package in the first place.
Generally speaking, the fn package is not Bitcoin/Lightning specific in any way. We only want to put stuff in here that is genuinely generic for all sorts or problem domains.

@proofofkeags, remember to re-request review from reviewers when ready

@proofofkeags, remember to re-request review from reviewers when ready

@yyforyongyu: review reminder
@proofofkeags, remember to re-request review from reviewers when ready

@yyforyongyu: review reminder
@proofofkeags, remember to re-request review from reviewers when ready

@proofofkeags, remember to re-request review from reviewers when ready

@yyforyongyu: review reminder
@proofofkeags, remember to re-request review from reviewers when ready

@yyforyongyu: review reminder
@proofofkeags, remember to re-request review from reviewers when ready

@yyforyongyu: review reminder
@proofofkeags, remember to re-request review from reviewers when ready


detect network change on Mac Catalina

Only do magic from @eshvatskyi on Windows.  Removing/Adding event handler causes
infinitive recursion on Catalina.  See #87

Codecov Report

Merging #89 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   90.52%   90.54%   +0.01%
==========================================
  Files          10       10
  Lines         517      518       +1
==========================================
+ Hits          468      469       +1
  Misses         49       49

Impacted Files
Coverage Δ

src/MulticastService.cs
91.57% <100%> (+0.04%)
:arrow_up:

Continue to review full report at Codecov.

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

@eshvatskyi are you happy with this?

@eshvatskyi are you happy with this?
I'm sorry, but I didn't get, is this an irony, Catalina just launched, and it looks, has more bugs than windows )), don't claim me ))


[BEAM-479] Name local Spark RunnableOnService profile more precisely

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[x] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[x] Make sure tests pass via mvn clean verify. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
[x] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[x] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

Settling on the name local-runnable-on-service-tests for all profiles with a local endpoint. That way, this profile plus the desired module will suffice to run against a local endpoint if possible.

R: @amitsela
Worked with @dhalperi to more directly set up and invoke the RunnableOnService tests as a postcommit. Trying to get build times down a bit and make all runners share similar configs.

Test failure is Travis timeout on Mac infrastructure, which is happening broadly. Not related to this PR.

What does a local endpoint mean ? How do other runners execute ? how are they different ? except for supporting different capabilities of the model ?

That's a really good question, worth nailing down. Intuitively it means "no cluster needs to be set up". I guess the important things would be:

No set up
No network needed (so a hermetic test that starts a real non-local cluster won't work)
No credentials

It applies not just to runners but also to tests. For example, KafkaIO can run an embedded Kafka, and that will work with local Flink & Spark. Whereas Dataflow doesn't have a local version since it is a hosted service.
Does this seem reasonable? If not, is there somewhere we can go with this idea?

BTW I think the Jenkins failure is a hardcoded port that is being allocated by two jobs running in parallel on the same box.

Generally makes sense, even more, most tests on runners will probably be local because of setup/teardown overhead and the cost of maintaining cluster/s for constant testing. Also, most functionality is OK to test this way, except for serialization maybe.
But having said that, doesn't it mean that Dataflow is the exception here ?
So unless I'm missing something, there should probably be a cluster-runnable-on-service-tests instead of (or in addition to) local-runnable-on-service-tests.
WDYT ?

Local testing is excellent for unit tests or "fast postcommits". But I think we want to make it easier and easier to test Beam on remote infra of all sorts -- this is our primary intended use case.
E.g., I'd like there to be a post-commit that runs on a permanent Flink cluster, a permanent Spark cluster, etc. These are the things we need to make sure work well!

I'm for local-runnable-on-service-tests and cluster-runnable-on-service-tests. They should probably share the same base re-configuration of the runnable-on-service-tests execution, setting up deps to scan and exclusions.
The cluster-runnable-on-service-tests run has the complication that it requires credentials that will depend on who is running them, so you'll likely have to provide many options at the commandline, thus the savings of setting up the --runner=XYZ is minimal. But I generally like the idea of these both setting up some useful defaults so the mvn user only has to provide the necessary bits.

+1 for local-* and cluster-*
One thing to consider - which cluster ? or to be accurate resource-manager. Spark can run it's own (Standalone Mode), use YARN or Mesos. According to the latest survey by Databricks Standalone is in the lead (48%), with YARN tailing it (40%) while Mesos not too popular.
I'd vote for Standalone to test the most popular use case while avoiding the additional complexity of maintaining YARN on this cluster.

I agree that we should test the most common use case. I don't have much more to say than that as far as how and where it might be provisioned in the future. Maybe it is a good discussion for the dev list?

LGTM. I'll publish in dev list tomorrow.


Support sub-groups

git-flow is a nice add-on to git, which uses sub-groups or chains of groups, for example, you can do something like git flow feature start newFeatureName or git flow release finish theReleaseName
I think having these sub groups or chains of groups together makes for a natural CLI, but does not seem to be possible as Cli assumes there is only top level groups -- Cli.withGroup produces a GroupBuilder which itself does not allow another group.

Hey all.  Is there any interest if we were to look into adding this feature?

@mhgrove @dblevins If you need this it is fully implemented in my fork though lacking any formal documentation right now


Update URL parsing to work in older browsers (e.g. IE 11)

Right now, we support all the browsers that the latest ember version supports.
This file outlines the versions that ember core auto-runs on browserstack.
Specifically, we use window.Url to parse the url and its params.  This api is not available on older browsers (Safari 9.1.2 from July 2016).
My question is,
How far back should we support?
My feeling is that,
We should support all browsers and browser versions that the latest ember supports.
If we support only what the latest ember supports then the use of the window.URL.searchParams api is totally legit... and this can be closed. We should probably add a note to the readme, something like "We support the browsers that the latest Ember supports"
If we DO want to support older browser that the latest ember does not technically support (but actually do work), We should use something like this:
https://github.com/defunctzombie/node-url
^ We might be able to find something smaller as we only need the param parsing.
^ Would be a near trivial import using https://github.com/ef4/ember-auto-import
^ We could also use that lib in fastboot if we wanted to add better fastboot support.
Here is a screenshot of that api failing on safari 9.1.2 (over 2 years old)

This update will be trivial and I need to do the work anyways as TheDyrt's users seem to have old computers.
Thoughts?

Hey @Duder-onomy. Thanks for the detailed report. My hunch is the same as yours - that we should only support the browsers that the latest version of ember supports.
I think it's dangerous to say that we support browsers that ember doesn't support because there could be non-obvious, awkward edge cases that may be hard to handle.
I would be against using node-url as a) it's another dependency, and we should try to limit dependencies, and b) it's not a very large package (only has 100 stars on github).
In the past we've used uri.js to handle URLs, so if we had to add a dependency back, I'd like to use uri.js over node-url as it has more stars and is more supported.
Overall, my first impression is that we should leave the code how it is now. How does this affect your work?

In saying this, I've just found that window.URL is not supported on IE 11 - so we should probably fix this.
Looking at node-url again, it does have quite a lot of downloads, so I'm more happy to use it now. I'd be wary of it potentially not working in the browser, so I would also like to know how it stacks up against https://github.com/github/url-polyfill.

After talking with my team over here, I think this is worth fixing.
Additionally, I would like to add this in there: https://github.com/imgix/ember-cli-imgix/issues/40
We will need a Url parsing mechanism during fastboot in order to pull that ^ off.
I guess the only question now is which lib should we use?
I like node-url only because I trust that author (a heavy hitter from the node community)
But honestly, all we need to do with this lib is params parsing...
Does https://github.com/imgix/imgix-core-js Have url parsing that we could easily expose?
How are people handling this in React land?

Agreed. This should be fixed.
node-url looks to be well supported, but url-polyfill comes from the Web Components team, who are also heavy hitters in the web space.
imgix-core-js doesn't have anything that can be exposed, and is also not supported in the browser. In React we use jsuri to handle query parameters.
Re #40: We are planning to implement responsiveness using srcset and sizes soon (#39), which will probably interfere with #40. We'd love your thoughts on using srcset etc over there if you have any.

Aight.
As I work on this, some browsers will need a polyfill for the basic implementation of window.URL, and some, like old safari, only need a polyfill for the searchParams portion of the spec.
This lib url-polyfill does not polyfill the searchParams portion. Only the basic window.URL api.
So, I can use something like this, which seems to polyfill the entire spec: https://github.com/lifaon74/url-polyfill
OR we can use a completely diff implementation like jsuri
My gut, and what Im gonna go with unless I head otherwise, is to use the polyfill as, eventually 🤞... we can gut rip out that polyfill.

Ok,
lol. Gonna scrap that polyfill and just switch to jsuri
We need this functionality: https://github.com/lifaon74/url-polyfill/issues/27

Do either of these polyfills work? https://github.com/WebReflection/url-search-params, https://github.com/jerrybendy/url-search-params-polyfill

Yeah, but then we will need to manually manage the synchronization of the searchParams and the top level search property.
In a working full implementation of window.URL the searchParams property, when modified, will reflect its modified values in the search property.  We will have to manage that if we polyfill them separately.
FWIW... Switching to jsuri was a breeze and is almost done... All tests pass.

Actually, I am slightly confused now after reading through the react implementation.
It seems as though the final URL is never passed to the imgix core lib, only parsed by jsuri then shoved into a src set.
Is imix-core even useful in this case?

The react implementation doesn't use imgix-core-js, but I'm not sure this is a 'feature' - it's just the state it's in right now.

Is there any advantage to using imgix-core?
I have everything ready to go, but I have to serialize, then deserialize params in order to pass everything to imgix-core-js correctly. We could clean up some logic if we dropped it.
Imgix-core-js will always prepend the host to image paths even if the path already has a host.
We should probably rip it out, or teach it how to accept a path with a host already on it.


Change README.

# Change README.
Include where the bot can be find on Telegram in the README and where the REST API could be found.

Added in the 'updates' branch. Only needs a compare & pull request :)


notNull fails on Empty Array

Hi,
I have the following attribute settings in a model:
attributes: {
...
roles: {// User Roles List
type: 'array',
defaultsTo: []
//      notNull: true // Can't Use Not Null on Array Argument
},
suspended: {
type: 'boolean',
defaultsTo: true,
notNull: true
}
...
}
I have a default set to an empty array (which works fine).
But when I add the notNull validation, I get the following error:
[Error (E_VALIDATION) 1 attribute is invalid] Invalid attributes sent to User:
• roles
• "notNull" validation rule failed for input: []
For the 'boolean' the combination works fine.
SAILS VERSION 0.11.4

Howdy @pjacferreira,
Would you mind setting up a repo that reproduces this in a new sails app real quick? I think that'd be the easiest way to see what's going on.
Something like:
sails new waterline-issue-1301
cd waterline-issue-1301

# Now make whichever are the simplest/quickest changes which reproduce the issue,
# and when you for sure have the issue isolated, run:
git init
hub create  # or use the GitHub UI to create the repo and `git remote add` it manually
git add .
git commit -am 'Reproduces https://github.com/balderdashy/waterline/issues/1301'
git push -u origin master
hub browse # or open the repo in your browser manually
# Then copy the URL of the new repo and paste it as a comment on this issue.
# We'll check it out, and since this way we'll be able to experience the problem
# ourselves, we should have no problem getting to the bottom of it.

Thanks!

As requested, here is the repo
https://github.com/pjacferreira/waterline-issue-1301


[trajoptlib] Use thiserror for error types

What is this waiting on or what still needs to be done?

Fixing conflicts, properly propogating the error from C++ -> Rust and API design decision. I'm gonna take another look at this in a bit to fix some of this stuff up


Subdomains of github.com are deprecated for GitHub Pages

Fixing broken hyperlinks since subdomains of github.com are deprecated for GitHub Pages.

Thanks! I'll get this in today.


Collect metrics in the gateway.

Pull Request type
Please check the type of change your PR introduces:

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] Documentation content changes
[ ] Other (please describe):

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this introduce a breaking change?

[ ] Yes
[X] No

Other information

This change is

I can set the logger in the server only if we want to collect metrics, that way, there is zero runtime cost if we don’t want to collect metrics.
currently, all the failed requests go to the same counter and not to the counter of the method, so we can’t know what method caused the failed requests.
before the first request, the counter of a method doesn’t exist.
do we want to change those points?


Fix typo

Yes, I am that petty. ;)

Lol thanks for proofreading that 👍

Lol thanks for proofreading that 👍


Webpackbin route invalid for Live Demo links

Just in case you weren't aware of this, the Live Demo links in the ReadMe and the website are throwing this error:

The reason you see this page is that the route is invalid. You have probably clicked an old Webpackbin link. Please notify the author about moving their BIN to the new version of Webpackbin. In the meantime you can continue to the old version.

Clicking the Continue To Bin button just results in the same error - apparently I can't continue to the old version after all! The links were working late last week so it's only recently broken.

We need to copy the code from the .herokuapp.com versions to the new https://www.webpackbin.com
As now bins can be attached to a GitHub account, would it be better for @mxstbr or @geelen to create it?
Reference: https://github.com/christianalfoni/webpack-bin/issues/226

Will do ASAP!

Fixed, thanks for notifying me!


Change describe_parameters to get_parameters_by_path

DescribeParameters API endpoint is more prone to rate-limiting, switching to GetParametersByPath. See comment in chamber:
https://github.com/segmentio/chamber/blob/84f2d5daa2262125d78732988880fdcb4048aa1c/store/ssmstore.go#L440

Thank you. Looks good.


Added support for IDs for automation

Exposed "accessible", "accessibilityLabel" and "testID" for RadioButtonInput and RadioButtonLabel at the following levels:

RadioForm (auto-appends indices for unique IDs)
RadioButton
RadioButtonInput
RadioButtonLabel

Thanks!


Add eventing to test builder.

Description
We missed this. It was added to the test builder we use for our internal tests, but not the public API that we ship. Quick fix.
Fixes #6681
Checklist

Is this feature complete?

[x] Yes. Ready to ship.
[ ] No. Follow-up changes expected.

Are you including unit tests for the changes and scenario tests if relevant?

[ ] Yes
[ ] No

Did you add public API?

[x] Yes

If yes, did you have an API Review for it?

[ ] Yes
[x] No

Did you add <remarks /> and <code /> elements on your triple slash comments?

[ ] Yes
[x] No (not required)

[ ] No

Does the change make any security assumptions or guarantees?

[ ] Yes

If yes, have you done a threat model and had a security review?

[ ] Yes
[ ] No

[x] No

Does the change require an update in our Aspire docs?

[ ] Yes

Is this introducing a breaking change?

[ ] Yes

Link to aspire-docs issue (please use this breaking-change template):

[ ] No

Link to aspire-docs issue (please use this doc-idea template):

[x] No

Microsoft Reviewers: Open in CodeFlow

@mitchdenny should we think about adding a test that verifies that members added to DistributedApplicationBuilder are exposed on the test builder? I imagine something that will fail whenever a new member is added that then requires either updating the test builder to expose it, or updating the test to explicitly confirm that we don't want to expose it.

Or we could look at making the test builder derive?

Would be a bigger (breaking?) change to change inheritance wouldn't it? Open to it, just wondering if there's something more pragmatic for the shorter term.

@mitchdenny should we think about adding a test that verifies that members added to DistributedApplicationBuilder are exposed on the test builder? I imagine something that will fail whenever a new member is added that then requires either updating the test builder to expose it, or updating the test to explicitly confirm that we don't want to expose it.

+1. Add a test with reflection over both. If the test builder is missing something from DistributedApplicationBuilder then throw an error unless in an allow list. New property on DistributedApplicationBuilder requires either adding it to test builder or adding it to allow list.

@mitchdenny are you planning to add a test as suggested, or log a follow-up issue?

I'll add a test.

/azp run

/azp run


setup.py seems to assume repo root

You cannot seem to run from another path e.g python /test/setup.py, it look for README.md, etc. locally rather than at the location of the .py file.

@patrick-stephens  The behaviour is correct - the layout of the repo follows the standard Python packageing structure.

Sorry if it wasn't clear, I assumed you could run the script from a relative path and it would pick up the correct directory. If you run it, then it assumes the local directory is the repo root rather than where the script is located.
The structure is correct but it makes an assumption about the current directory. If it grabbed the realpath or similar of the script file location it would work.


Default StateStore should work across config change

So I think the issue is that the default StateStore implementation is an in-memory state store (MemoryStateStore). This gets instantiated as part of the TreehouseAppFactory, which in the TestApp is instantiated within onCreate of the TestAppActivity. All this is to say that the state store is reinstantiated whenever there is a config change, which for an in-memory state store means that the data is wiped whenever there is a config change.
The Emoji Search sample app gets around this by creating a custom StateStore instance that writes to a file (i.e., FileStateStore). Maybe we want something similar? Though I feel like we'd probably want a better default StateStore implementation than one that doesn't work out of the box…
Originally posted by @veyndan in https://github.com/cashapp/redwood/issues/1518#issuecomment-1750942313

If we pass it through the non-config instance of activity then in memory would be sufficient for at least config changes, but not process death from things like memory pressure.

If I may share my opinion, I believe that the main issue lies in the way we initialize the MemoryStateStore, rather than the MemoryStateStore itself. Therefore, I suggest implementing an approach that relocates the TreehouseAppFactory, or at the very least, the MemoryStateStore, outside of any risky component. If I were using Redwood in an application, I would initialize the TreehouseAppFactory within the Application/ViewModel class and then expose the instance to the Activity with Dependency Injection or a similar technique.


Extend AeCanvas to support setting a FormSet as background

This pull request extends AeCanvas to support setting a FormSet as background.
The following example uses the new #setBackgroundWithFormSet:alpha: method. The icon is blurry on the first canvas, it should be sharp on the second canvas.
{
	{ ThemeIcons current iconNamed: #pharoBig.
		#setBackgroundWithForm:alpha: }.
	{ ThemeIcons current iconFormSetNamed: #pharoBig.
		#setBackgroundWithFormSet:alpha: }
} collect: [ :arguments |
		arguments bind: [ :icon :selector |
			| surfaceScale surface |
			surfaceScale := 2.
			(surface := AeCairoImageSurface extent: icon extent * surfaceScale)
				deviceScale: surfaceScale asPoint.
			(AeCanvas newFor: surface)
				pathFactory: [ :cairoContext | cairoContext rectangleTo: icon extent ];
				perform: selector with: icon with: 1.0;
				setBorderOff;
				drawFigure;
				yourself ] ]

I closed and reopened this because there was a segmentation fault in the first test run.


Resizing Window Hides Content

I was resizing my browser from full screen to half screen and noticed that some pages don't handle the resizing correctly. I tried resizing this page on Firefox (v69.0.1) and Chrome (v77.0.3865.90), and all the content disappeared.
Full-size page:

Smaller, resized page:

@gnunicorn lol

Semi fixed with https://github.com/substrate-developer-hub/substrate-developer-hub.github.io/pull/274

git bisect told me this was introduced in 1ae4e4b9c09ba229edec82b9725a9eecc7044964 "temp fix for small screen (#274)"


Decouple WebSocket implementation from DynamoDB

The websockets implementation needs better test coverage, error handling, documentation, etc.

So I finally got around to working out a better WebSocket implementation, and I'm thinking it is probably unnecessary to require DynamoDB to use it. All we really need is the connection ID of the client in APIGateway and then either Mangum itself could provide a configurable backend class, or leave it completely up to application to implement storage.

Closed by https://github.com/erm/mangum/pull/99


Cannot locate the nodes towr_user_interface, rviz_terrain_publisher, goal_pose_publisher and towr_ros_app

Hello!
When I run the (roslaunch towr_ros towr_ros.launch) command for the first time, only Rviz pops up. xterm doesn't open at all and it seems like ROS cannot locate the nodes (towr_user_interface, rviz_terrain_publisher, goal_pose_publisher and towr_ros_app). It shows the following error messages :
ERROR: cannot launch node of type [towr_ros/towr_user_interface]: can't locate node [towr_user_interface] in package [towr_ros]
ERROR: cannot launch node of type [towr_ros/rviz_terrain_publisher]: can't locate node [rviz_terrain_publisher] in package [towr_ros]
ERROR: cannot launch node of type [towr_ros/goal_pose_publisher]: can't locate node [goal_pose_publisher] in package [towr_ros]
ERROR: cannot launch node of type [towr_ros/towr_ros_app]: can't locate node [towr_ros_app] in package [towr_ros]
I have made all the .cc files executable using the chmod command as well. Any ideas on how I can solve this issue?

You don't have to make any .cc files executable. I suggest you install with
sudo apt-get install ros-<ros-distro>-towr_ros
then don't forget to source your bashrc in the same terminal and run
roslaunch towr_ros towr_ros.launch
Best of luck!

Oh right, it was a small issue! I ran "sudo apt-get install ros-kinetic-towr-ros" instead of "sudo apt-get install ros-kinetic-towr_ros". Thanks for the help, I'm a big fan of your work!


[CL] Spark wallet v0.3.0rc for BOLT12 offers in a GUI

With C-lightning installed offers are available from the CLI already: https://github.com/openoms/raspiblitz/blob/cln-FAQ/FAQ.cl.md#offers
Spark wallet gives a nice interface in it's latest release candidate: https://github.com/shesek/spark-wallet/releases/tag/v0.3.0rc

cli example to request a BOLT12 invoice for 21 sats:
lightning-cli fetchinvoice  lno1pgvkxun9v96x2epqwa5hg6pq2dcxzuntyptkzmrvv46pugq0clnzex2k5d9umw3snfyqnn8a0tw2ujutv3x2eqd5m3vdgw3y0y 21000

So we will include this into v1.7.1? Is the PR ready to merge?

It is an RC, but the only GUI implementing offers. I think it would be good to make it available. The PR is ready for final testing in the next raspiblitz rc.


Campaign rewards

Waiting on #337
Implements level rewards. Rewards can come in the form of currency, units (always level 1 and tier 1) and items (always level 1). Rewards are given automatically when a level is beaten.
Unit ranks will be customizable per reward but we don't have them yet (see: https://github.com/lambdaclass/mirra_backend/pull/329).
To test

Create user, get campaigns, get levels

{:ok, user} = Champions.Users.register("User")
[campaign | _] = Champions.Campaigns.get_campaigns
[level1, level2, level3 | _] = campaign.levels |> Enum.sort_by(& &1.level_number)

Check out your gold

GameBackend.Users.Currencies.get_amount_of_currency(user.id, GameBackend.Users.Currencies.get_currency_by_name!("Gold").id)

Beat level 1 (gives only currency)

Champions.Battle.fight_level(user.id, level1.id)

Check out your gold again (should have grown)

GameBackend.Users.Currencies.get_amount_of_currency(user.id, GameBackend.Users.Currencies.get_currency_by_name!("Gold").id)

Check your items

GameBackend.Users.get_user(user.id) |> elem(1) |> Map.get(:items) |> Enum.count()

Fight level 2 (gives an item)

Champions.Battle.fight_level(user.id, level2.id)

Check your items again. Should have grown.

GameBackend.Users.get_user(user.id) |> elem(1) |> Map.get(:items) |> Enum.count()

Same for units and level 3

Champions.Battle.fight_level(user.id, level3.id)

GameBackend.Users.get_user(user.id) |> elem(1) |> Map.get(:units) |> Enum.count()

The function get_campaign_progress has missing some level preloads causing the rewards to fail preload: [level: [:campaign, :currency_rewards, :item_rewards, :unit_rewards]] this are the preloads necessary

The unit rewards are not working as expected, i got the next error when fighting the third level:
 unknown field `:unit_level` in schema GameBackend.Units.Unit given to insert_all. Note virtual fields and associations are not supported


DBZ-2220 Fix test failure - SqlServerConnectorIT#verifyOffsets

https://issues.redhat.com/browse/DBZ-2220

@Naros Great catch, I see clearly now where the problem lies. But instead of delaying snapshot would not it be better either to execute the pre-snapshot inserts in a single transaction or instead of waiting fro max lsn wait for the insert of record with id == 10 to be present in change table by qurying it directly? I think the former should be just enough.

@jpechane I tried wrapping the pre-inserts in a transaction but that still wasn't stable; I still hit a race condition where the snapshot began prematurely.  Ideally I think we should wait until we can guarantee that the max lsn is what we expect from all the pre-snapshot inserts; however I'm not clear how to do that.  Do we have an example of this where I can would know that's occurred before I spin up the connector?

I reworked the solution to use Awaitility in conjunction with testing the capture tables to verify that the pre-snapshot inserts had been replicated by SQL Server prior to spinning up the connector.  This should solve the issue without any future timing concerns outside of the obvious where SQL Server fails to propagate within 30 seconds.

@Naros Very nice, thanks!


response.parsed is not a hash

in client.rb, response.parsed is not a hash.

It's from weibo api. If it's from github api, response.parsed is a hash.

🆙

@lufeihaidao Did you get any solution?

@lufeihaidao read this https://github.com/mkdynamic/omniauth-facebook/issues/204.
Add token_params: { parse: :json } to you provider or update omniauth-facebook to v4.0.0

Having the same problem getting back something like:
[15] pry(#<OAuth2::Client>)> response.parsed
=> {"{\"access_token\":\"xxx\",\"token_type\":\"bearer\"}"=>
  nil}

Upgrading to omniauth-facebook v4.0.0 like @joaovitoras suggested worked out for us, thx for sharing that :)

To anyone who's using OAuth2::Client directly (w/o omniauth), the fix looks more like this:
client.auth_code.get_token(params[:code], parse: :json, redirect_uri: "...")


xgboost is not learning.

Even if you search for an error, nothing is found.
The version is 1.4.1.
Is it a bug?

I installed xgboost with pip, but the pass comes out as conda.

Moved libxgboost from pip path to conda.

Maybe cleaning up the environment can help.


python extension issue

when i try to set the interpreter via the Command Palette I get -
"Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)"
I can execute the python code in the terminal and the python extension looks like it's installed but I can't get it to work. I've tried installing older versions of python after finding some others with the same issue but this didn't resolve the issue either.
Anyone else with this issue or with a workaround?

I the same problem. Did you find a solution?

nope - I'm pretty sure it's an inconsistency between the python version on colab vs what colabcode supports. I was hoping that these would be upgraded automatically and the issue would disappear!


Possible to specify different thresholds?

It doesn't seem possible currently since threshold is set on the function and there's no instantiation happening. If I try to create another "instance" by requiring again and assigning to a different var of course that doesn't work either since it's the same cached function.
Wanted to confirm that this is the case, and if so whether it'd be addressed in the 1.0 API?
I gave IntersectionObserver a shot which supports this since it's an object, but ran into some inconsistent failures in Chrome.. I will say that the API of in-view is far easier to work with in practice than IntersectionObserver was, since it doesn't have much of a notion of exits.

@pushred You're correct, that's not possible at the moment. But you're in luck, the 1.0 API will be moving all settings to individual registries! I'm hoping to have a release candidate for v1 in the next few weeks.

Sweet! Sounds good, thanks


Support leaving a column from the export

Story at https://grips.semantic-web.at/x/sBZsB . From all kinds (RDF, CSV, annotations,...).

Hi, @josef-janousek , I have discovered this forgotten feature. Feel free to implement it when you are bored with the tests.

Related: https://github.com/odalic/odalic-ui/issues/70 was moved to 5th iter. @brodecva, move also this?

Related: odalic/odalic-ui#70 was moved to 5th iter. @brodecva, move also this?

OK. @josef-janousek Ignore this until the 5th iteration.


Dispatching Store Events From Services With Ducks Redux Approach

We are using the Ducks Redux approach in our codebase and would like to know your opinion about a certain situation. From our API service, we get a response (common for calls), that we need to update the store with.
The question is, since the API service is not really a React Component, is it okay to import the store in the service file and then dispatch an update from there? Or, would you suggest an alternate approach?

This is a usage question, and as such should be asked on Stack Overflow rather than the issues list.
Per the FAQ, the general advice is to avoid directly referencing the store, and rely on basic dependency injection wherever possible.  This is usually done via middleware.  See http://redux.js.org/docs/FAQ.html#store-setup-multiple-stores .


improve plot range (get_good_range)

On 8/23/22 10:47 AM, Yu Xiaojiang wrote:
Dear Manuel
I study a flat-field spectrometer, when CCD located at far from zero, the display not correct,  please try with the attached workspace, and correct display on the CCD ('flat-field.png') also attached.
I correct it with a slight change to get_good_range function in shadow package:
C:\python38\Lib\site-packages\Shadow\ShadowLibExtensions.py
code attached in file 'get_good_range.txt'
Best regards
Xiaojiang

#C:\python38\Lib\site-packages\Shadow\ShadowLibExtensions.py， L660
def get_good_range(self,icol, nolost=0):
    """

    :param icol: the column number (SHADOW convention, starting from 1)
    :param nolost: lost rays flag (0=all, 1=good, 2=losses)
    :return: [rmin,rmax] the selected range
    """
    col = self.getshonecol(icol,nolost=nolost)
    if col.size == 0:
      return [-1,1]
    rmin0 = min(col)
    rmax0 = max(col)
    if rmin0>0.0:
        rmin = rmin0*0.95
    else:
        rmin = rmin0*1.05
    if rmax0<0.0:
        rmax = rmax0*0.95
    else:
        rmax = rmax0*1.05
    if rmin0==rmax0 and rmin0 !=0.0:
        rmin = rmin0*0.95
        rmax = rmax0*1.05
    if rmin0==0.0:
        rmin = -1.0
        rmax =  1.0
    if (rmax - rmin)/1.25 > (rmax0-rmin0) and rmin0!=rmax0:  #YXJ
        rmin = 0.5*(rmax0+rmin0) -  0.55*(rmax0-rmin0)
        rmax = 0.5*(rmax0+rmin0) +  0.55*(rmax0-rmin0)
    return [rmin,rmax]

flat-field-spectometer.zip

Done in shadow3 22.8.25 shadowOui 1.5.202


IllegalComponentStateException

I've been occasionally seeing the following message in the "Output - Application" window of the SDK:
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
It never happens during startup, only after I've been working for awhile. Since I don't watch the "Output - Application" window, I never notice it right away, either. I've no idea how to trigger it.
Here's the complete output, in case it's helpful:
Running on jMonkeyEngine 3.2-stable
 * Branch: HEAD
 * Git Hash: 95d33e6
 * Build Date: 2018-01-13
LWJGL 2.9.3 context running on thread jME3 Main
 * Graphics Adapter: nvd3dumx,nvwgf2umx,nvwgf2umx
 * Driver Version: <IP_ADDRESS>73
 * Scaling Factor: 1
OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: GeForce GT 545/PCIe/SSE2
 * OpenGL Version: 4.6.0 NVIDIA 388.73
 * GLSL Version: 4.60 NVIDIA
 * Profile: Compatibility
Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Pausing audio device not supported.
Audio effect extension version: 1.0
Audio max auxiliary sends: 4
Returning hash code of content
Reading welcome page content from web failed!
https://wiki.jmonkeyengine.org/doku.php/sdk:welcome:3_1?do=export_xhtmlbody
Checking page id 0 vs stored id 0
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
	at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:2062)
	at java.awt.Component.getLocationOnScreen(Component.java:2036)
	at javax.swing.text.JTextComponent$InputMethodRequestsHandler.getTextLocation(JTextComponent.java:4643)
	at sun.awt.im.InputMethodContext.getTextLocation(InputMethodContext.java:278)
	at sun.awt.windows.WInputMethod$1.run(WInputMethod.java:588)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

It seems to happen the first time I use the debugger after starting the SDK. Unsure how reproducible it is.

Since I switched to v3.2.1-stable-sdk3, I haven't seen this exception, so perhaps it's already fixed.

I'm convinced it's fixed in v3.2.1-stable-sdk3.


Add PyTorch Lightning Trainer for VQGAN

Closes #13
Closes #14
Closes #15
Closes #18
This PR implements PyTorch Lightning Trainer for VQGAN. Tensorboard is used for logging. More details in the above mentioned issues.

@ArjunKrishna3367 @Waleedprw22

Couple of questions:
What is the purpose of process_pretrained_vqgan.py? It seems to just be loading the checkpoint and then saving it again.
What do the accelerator and strategy params do in the VQGAN training?

Couple of questions: What is the purpose of process_pretrained_vqgan.py? It seems to just be loading the checkpoint and then saving it again. What do the accelerator and strategy params do in the VQGAN training?

The pre-trained VQGAN checkpoint uses old PyTorch Lightning version. So, python -m lightning.pytorch.utilities.upgrade_checkpoint vqgan.ckpt is used to upgrade PyTorch Lightning module version.
Checkpoint also has callbacks that we need to modify, so process_pretrained_vqgan.py handles that. Also, for some reason, Lightning trainer is not able to resume training from the last epoch (maybe missing loops state_dict), so process_pretrained_vqgan.py is resetting that too.

What do the accelerator and strategy params do in the VQGAN training?

accelerator and strategy are PyTorch Lightning parameters. accelerator is the device to use for training (e.g. cpu, gpu, tpu). strategy handles parallel processing such multi-gpu / multi-node training / multi-threaded / multi-process (e.g. ddp). You can read more here https://lightning.ai/docs/pytorch/latest/extensions/strategy.html

We should probably mention that it is very easy for these large checkpoint files to get corrupted and so if you run into a pickling error, may want to delete and re-upload. It is best to use these to smoothly and quickly download these files:
gsutil cp gs://columbia-cv/LPIPS/ckpts/vgg.pth ./pretrained
gsutil cp gs://columbia-cv/VQGAN/ckpts/vqgan.ckpt ./pretrained
gsutil cp gs://columbia-cv/VisualNews/visual_news_mini.tar.gz ./data

We should probably mention that it is very easy for these large checkpoint files to get corrupted and so if you run into a pickling error, may want to delete and re-upload. It is best to use these to smoothly and quickly download these files:
...

This comment has links to our cloud storage bucket, so I'm going to delete it. We shouldn't post links to public buckets here. Also, we are not planning to keep these buckets forever ($$$) so we shouldn't mention them but we can add a note about pickling error/corrupted files.


Update Anderson Torres e-mail info

Just updating my own mail info.

This isn't a huge modification, then I will just merge it after Borg ends its work.


CTRL + Space doesn't work in Yosemite 10.10

It's a pity, but LT doesn't work with OSX 10.10.
What should I do to use CTRL + Space in LT on my Mac?

That's odd. I don't recall having this problem back when I was using Yosemite. Perhaps it's bound to something else?

@cldwalker @rundis Are either of you on OS X 10.10?

It's fantastic! Yes, of course. It's bound to Spotlight Search by default.

See this Stack Overflow question for the same issue affecting Eclipse:

Insert code template in eclipse on mac os x (ctrl-space not working)

Great! But it's not user-friendly. System shortcuts should be major. Are you seriously think that LT main functional is more major than system?
It's not appropriate!

according to these pages https://support.apple.com/kb/PH18799?locale=en_US and https://support.apple.com/kb/PH14213?locale=en_US cmd+space is the default shortcut for spotlight search. So if that information (from apple) is correct, ctrl+space is perfectly okay. I haven't heard anyone else complain about this before now either.
You can also customize the shortcut to pretty much whatever you prefer. I think that's user-friendly enough ?
You also have a corresponding issue: https://github.com/LightTable/LightTable/issues/1875#issuecomment-145129278
I think you tone could be more civil. I'm sure you are aware that Light Table is open source and there is no entitlement in using open source. People spend their spare time in making a great tool free for everyone to use.  It would be appropriate to keep that in mind.


Configurable mock TypeChecker for unit testing

Suggestion

🔍 Search Terms
typescript compiler api create minimal type checker
typescript how to create a mock typechecker
typescript mocking typechecker
✅ Viability Checklist

My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
We would appreciate a configurable mock TypeChecker constructor for unit testing.
import * as ts from 'typescript'

const mockSymbolToString = (symbol) => 'mockString'

// TypeChecker uses methods provided in configuration, or defaults if none provided
const mockTypeChecker: ts.TypeChecker = ts.createMockTypeChecker({
    symbolToString: mockSymboToString
})

mockTypeChecker.symbolToString(...) // calls "mockSymbolToString"
mockTypeChecker.typeToString(...) // calls the default

💻 Use Cases
Our codebase has a bunch of utility functions that process types/symbols using the type checker in custom ways:
// a custom utility function we wrote
const isTypeSupported: (typeNode: TypeNode, checker: TypeChecker): boolean => {
    const type = checker.getTypeFromTypeNode(typeNode)
    return type?.isClassOrInterface() || type?.isLiteral() || type?.isUnion()
}

test(('recognizes union type') => {
    const mockTypeChecker = ts.createMockTypeChecker({
        getTypeFromTypeNode: (...) => createUnionType(...) // assume valid "createUnionType" exists
    })
    const canWeSupport = isTypeSupported(constructUnionNode(...), mockTypeChecker) // assume valid "constructUnionNode" exists
    expect(canWeSupport).toBeTrue()
})

We currently have a huge custom createMockTypeChecker.
function createMockTypeChecker(config): TypeChecker => ({
    ... // we made defaults for everything in this interface https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L4178
})

It looks like there's only one createTypeChecker() on line 308 https://raw.githubusercontent.com/microsoft/TypeScript/main/src/compiler/checker.ts. It requires a TypeCheckerHost, which is marked internal https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L4166

We don't have the resources to create or maintain such a thing, even as a community effort. I'm not sure what this would do differently from a concrete type checker initialized with a mocked-out program.

@RyanCavanaugh Thanks for the response! If mocking-out a program involves calling ts.createProgram(...) for each test suite, this will be too slow for lots of test suites. Is there an alternative?

In theory the thing you get back from createProgram is immutable enough (🙃?) that you can share it across instances. It really depends what you're doing.


pkg/cli: no semblance of globally shared flags

Logger options are shared across all sub-commands, yet is manually repeated, and error-prone.

RIP Kura (2018 - 2018).


Adding text detection to catch important frames

On some video files there may be important text written on the screen that would be cut off. Think of a question or an equation. Maybe we can throw in OCR to keep these frame intact.

OCR on this scale is not only going to be non-trivial, but also faces the problem of the fact that with a, say, 10 minute video at 30fps there are going to be 18,000 frames that would each need scanned. This would make what is already a rather slow process an even slower one.


Export assembly drawing

Hi
Is it possible to export the generated assembly figures to png, pdf or svg?
Either from the generated html page or as a commandline option.
Regards

Are you looking for image with or without highlights of component groups? If with highlights, then separate images for all of them?
Have you looked at plotting in pcbnew, it can produce svg, or pdf of any layer. It's not exactly the same drawing as what this plugin generates but it might fit your needs.

I've tried pcbnew.
However, I'm missing a way to show the PTH without cluttering the drawing with traces.
Comparison:
InteractiveHtmlBom:

PCBnew:

I see, so you want copper items but not tracks/zones.
I can offer 2 workarounds:

In pcbnew select all, then rightclick -> select... -> filter selection... and select only tracks and zones. Delete them. Plot to svg including appropriate layers. After plotting undo the deletion.
In InteractiveHtmlBom switch to single layer view (F or B buttons) and make the drawing as large as possible by dragging the delimiter bar. Take a screenshot using OS utilities (Win+Shift+S works on windows 10, I think cmd+shift+4 on macos).

It is not trivial to add download functionality in ibom itself. Currently the board is rendered on 4 separate canvases, I would have to rerender them on one combined canvas and then somehow trigger a download or "save as" action. I will look into this further and see if it's possible on file:/// url.

This seems to work at least in chrome:
https://stackoverflow.com/a/30393357
I still have to test this in other browsers but it seems technically doable.
Not sure about UI for this...

Thanks for the workarounds. I used option 2 for this.
However, rendering directly as svg or pdf would be nice.
How about right click -> save as? That would be sufficient UI for me.

Right click on image is already mapped to reset view.

How about just adding a button?

That's doable but I can only generate raster image (png, not svg or pdf).

As long as the resolution can be adjusted, then this is fine.

You can export images up to 16000x16000 now.


Able to include an item in the final grade if such item is not visible to students

A gap that existed between GBNG (and Gradebook) was to include an item in the final grade but not have it visible to students. We've had a request for that feature to be re-implemented.
https://confluence.sakaiproject.org/display/SG2X/Moving+from+Gradebook2+to+GradebookNG
It seems like based on the discussion on
https://jira.sakaiproject.org/browse/SAK-10796
It originally briefly worked like this and there was some use case for it, but this was changed to work the opposite. I feel like in GBNG it's more clear which columns aren't visible to the student, and the only change this would really involve are all of the checks around the "Add gradebook item" page preventing these options from both simultaneously being checked.
Though I do believe if it WAS implemented, it should be made clear on the student view that the course grade included items that were not visible to them.
I marked this as for discussion as I'd like to see what anyone else thought about this or if the design was just made to follow Gradebook Classic.

One issue would be that a student would be able to calculate their own final grade and figure out there is a discrepancy and either query the instructor, or figure out what the item was if there was only one. Is this the sort of thing we want to be hidden completely? If implemented I would suggest that a note be added to the student view stating there are additional items that contribute to course grade but are not being shown.


Performance benchmarks for mitigations on various use cases

Add a suite of benchmarks that compares the performance of the mitigations present in this project to each other and the plain object baseline. This could add additional information, on top of the test results, to determine the appropriate mitigation for a given situation.
In my experience benchmark is the best Node.js tool for this purpose.

Partially added in ff5cec255a130e90ec4db0dd741601a6ad67856b

Further expanded in f36cf02b808475ad91980f565f52d990c9eeebf5

Finished with 16ccde392f80559b1e4c51b86a521ef149698e07


remove (empty) server configuration UI

We have a server-configuration-user-interface directly under user-interfaces. No source is contained, but we do have a module defined in the pom. It gets built into a no-op jar as part of the build process.
Since we've had no code here ever I would suggest we entirely remove this component as it just adds clutter and potentially confusion

README says: The server Configuration User Interface provides the administration user
interface for an open metadata server.
If I remember right, it was designed to be a UI tool for rest configurations that we currently do with postman.
On the other hand, it can be a view on the UI, accessible if the user has proper  role.
@mandy-chessell what do you think?

A change in directory will break the egeria container build as referenced in /Users/jonesn/src/egeria/open-metadata-resources/open-metadata-deployment/docker/egeria
I intend to change the build to be more resiliant (by using our packaged distro) but until then, if a PR is created I suggest we do not merge until the associated change has been made & tested in the Dockerfile
There are also assemblies in open-metadata-distribution/open-metadata-assemblies/src/main/assemblies . These should include the UI, but do not. My intent was to fix as part of the work mentioned above.
But the change sounds sensible

this has been done as part of ui refactoring


Define local extractors

Can I define extractors locally in my project? For instance I use some services from https://github.com/lopsided98/nix-ros-overlay/ and have some other services defined locally in my flake that I would like to detect.

Of course, the extractors are just a regular NixOS module that are included on your host. All it does is to define some entries in topology.self.services. Anything you put in there will be shown automatically.
So anywhere in your relevant nixos configurations you can just do something like:
topology.self.services.mycustomservice = mkIf config.services.mycustomservice.enable {
  name = "My Custom Service";
  icon = ./mycustomservice.svg; # any SVG (recommended) / PNG
  # Extra stuff to show
  details.listen = "${config.services.mycustomservice.address}:${toString config.services.mycustomservice.port}";
};

Relevant options: https://oddlama.github.io/nix-topology/topology-options.html#nodesnameservices

Thank you. I'm struggling a little with this:
  topology-diagrams =
    let t = import inputs.nix-topology {
      pkgs = local.legacyPackages;
      modules = [
        ({config, ...} : { topology.self.services.what = { name = "HI"; info = "INFO"; }; })
        { nixosConfigurations = mapAttrs (n: v: nixosWithModules v) hosts; }
      ];
    };
    in t.config.output;

$ nix build .#myplatform/topology-diagrams

ends in:
 … while evaluating the attribute 'config.output'
         at /nix/store/dk2rpyb6ndvfbf19bkb2plcz5y3k8i5v-source/lib/modules.nix:322:9:
          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `topology.topology.self' does not exist. Definition values:
       - In `<unknown-file>':
           {
             services = {
               what = {
                 info = "INFO";
                 name = "HI";
           ...

This -> topology.self.services.what = { name = "HI"; info = "INFO"; }; is supposed to go into your nixos configuration, not the topology config


Add Log.warn_once

:+1: Was just asking for this over on another ticket :)
Only question is that right now this limits to once per call. Would it maybe be better to do it once per distinct message?

@coderanger I thought about that. The specific case I'm using it for now is really once per caller, and I think the others I would use it on might be that way.  But I can imagine cases that aren't. Got an idea of how we could name the methods to make the distinction clear?
One possibility
warn_once() - warns once per caller.
warn_once_per_unique() - warns once per unique warning text.
If those don't sound terrible, I won't feel bad checking this one in, and adding that in a separate PR.

No, we should pick one and go with it for API cleanliness. "once per message" seems like the superset case since you can always make a message be the same in all cases to only show it once ever. That seems like less of a footgun, it forces things to be clear that, for example, with the freeze warning you would see it once ever, instead of once per LWRP or whatnot.

Sure. In my case though, I want something that will only ever report the first one ever. The rest will show up in debug, so people can get them if they want; everyone else has just a little less noise.

And I can't make the messages the same because I need to show which property of which resource (in this case) is being declared with a non-frozen array default.

That seems like unexpected behavior for most people. There is nothing special about the first one specifically, whereas suppressing actual duplicates is a clearer semantic.

I'm OK with making the method you are suggesting, but then I still need the method that does what I'm trying to do :)

Maybe as a way to combine them, have a :once_key kwarg that is what is used for the once-ness tracking. Can default to the message string itself but for the freeze warning it could be set to any static string to get a "once overall" semantic.

Actually, it might work best if we had a dedup keyword arg that defaulted to true for Chef::Log.warn. It seems like every single warning I've looked at, that's what I really wanted. Then warn_once would do what it does in this patch, and everybody gets the thing they want.

Ehh, I agree that would be better but it also seems like a hard thing to document that the warn level happens to be special in that way. Making it a different method makes the different-ness more understandable.

We also need a Chef::Config setting to unset this and un-dedup all the warns for those of us who think the existing behavior is correct =)

@lamont-granquist Either way it gets implemented, you would see the duplicates if you turned up to :debug. Can't tell if you are joking but a config option wouldn't be appropriate for this.

Not joking.  I don't want to look at debug logs, and want to see all the duplicated warns and get the existing behavior.

Then don't use warn_once for those?

No, I want to turn all the warn_once calls that jkeiser writes into warn calls when I run chef-client on my servers.  That way if there's 1,000 of them kicked out in a chef-client run I don't get only the first one and either miss it or think its no big deal, and i don't have to go sifting through debug logs to see that there's really 1,000 of them.

And if we do this we probably need a count of warns (and/or count of suppressed warns) added to the end of the chef-client run.

My point is that if it is something where seeing it more than once is important, don't use warn_once. If you are saying you think people will ignore warnings unless there is an avalanche of them, then we need to re-educate users about what a warning means.

Any WARN line in Chef's output should be a big deal. We've just been terrible about output cleanliness and trained users to ignore warnings as non-actionable.

And my point is that as a user, I want to not suppress any warns.  It isn't about when I'm developing and writing the warns.  And yes, that's about treating the warns seriously, I don't want them suppressed, and I tend to see this feature as going the wrong direction in terms of treating them seriously.  If you suppress all-but-one then it seems like less of a deal to the end user and the output seems cleaner, when its not, so it allows them to continue inaction.
But, i'm okay with adding this feature and even adding it by default, but I simply want a way to turn it off.

If we think users don't want warnings de-duplicated then we shouldn't add this feature.

So people seem to want it.  And I can see the argument about it, even though I disagree.  Other tools like rspec have this feature.  They also have the ability, however, to turn off the deduplication of warnings.  And while I don't get the argument in favor of deduplication, I really don't understand the argument about making it configurable.  It seems an obvious switch to add.

Because we have a metric ass-load of niche configuration options, so many that expecting a user to be able to easily discover this new one would be tricky (would have to make the end-of-run output specifically mention it?) and even with that options bloat is a problem. I think we need a more concrete story for the option than "I disagree".

Assuming we add this and the default is to de-dup, who is the user than wants to change that, how do they figure out they want to change it, and then how do they learn what action to take? And how do we do all that without making life harder for the (presumably or we shouldn't add the feature) majority case that doesn't want duplicate warnings.

My preference is to collect them all, then report at the end of the run:
You have issue X. The reason for it is Y and the fix is Z.

this happened N times in these specific places:
- A
- B
- C

That said, when I'm actively fixing a problem, I prefer setting config to turn warnings into errors and then just running the code until it stops failing, and we already have that.

@danielsdeleo That sounds like a much more constructive user story :+1:

Closing…


32 - style swin gan

Addressing #32

CUDA memory > Hi Migual, does the CUDA out of memory error occurred during training or during inferencing? If it's during training, I can implement gradient accumulation to see if it will solve this issue.
checkpoint > the checkpoint is not uploaded. Do you want it to be integrated in the package?


Add content security policy

This commit adds a content security policy header using govuk_app_config.

@rubenarakelyan This PR is coming up as old in our channel, is it still needed?

Closing for now since this is blocked on work to remove the Hogan framework which is causing the tests to fail.


How to bind the websocket connection to a specific local port as a client.

Version of Beast
1.76
Desc
the Original Problem is:
I'm trying to emulate multiple websocket clients that work on the different machine, which means they have different IP. And the server takes the ip as the client identifier.(this is what they designed and I can't change it).
I need to emulate this work scene, I have to create multiple websockets connection at one computer(cause I only have one). And these websocket must satisfy the requirement --- have different IP. I have no idea on how to solve it;
the Derived Problem is:
After some searching on google, I find a way to do it. It seems that I can use iptables  with nat to help me do the job;
sudo iptables -t nat -A POSTROUTING -d 10.30.2.xxx -p tcp --sport 6666 -j SNAT --to-source 10.30.1.xxx
using it I can redirect the specific port to another usable ip, which make a mapping. So the Original Problem becomes how to bind the websocket connection to a specific local port so that I can use iptables to mapping it to another ip.
I find at StackOverflow, suggesting me  perform the action bind before connection.
basically what I've done was
    beast::error_code err;
    boost::asio::ip::tcp::socket sock_;
    std::unique_ptr<websocket::stream<beast::tcp_stream>> ws_;

    boost::asio::ip::tcp::endpoint local_ep(boost::asio::ip::address::from_string("<IP_ADDRESS>"), 7788);
    sock_.open(boost::asio::ip::tcp::v4(), err);
    if(err) { fmt::print("{}", err.message()); }
    sock_.bind(local_ep, err);
    if(err) { fmt::print("{}", err.message()); }

    ws_ = std::make_unique<websocket::stream<beast::tcp_stream>> (std::move(sock_));
    ws_->binary(true);

   beast::get_lowest_layer(*ws_).async_connect ...
   // ws_->async_handshake
   // ... omit

But after done these, I still got random port, seems bind not working. But I've try on python as raw socket, it is workable by iptables.
What I've set:

What I've got:

What should I suppose to do to get the correct, expected result on boost asio. To avoid mistakes that may cause the XY problem, I post the original problem as well.
Could you show me a workable demo or something to help me achieving it? I'd really appreciate it for your working!

Your code looks correct. I think you are printing the wrong thing. bind configures the local endpoint, not the remote. In your code above, try printing the local endpoint of the socket after you bind it:
    sock_.bind(local_ep, err);
    if(err) { fmt::print("{}", err.message()); }
    fmt::print( "local endpoint: {}", sock_.local_endpoint() );

The log I printed was from the server side.
Once a connection comes in,  I print both the local_endpoint and the remote endpoint at my the server after accepted. In this case, the remote host should be the client's socket local_endpoint, am I right?
I wonder is it the correct to perform bind operation before the websocket client call async_connect if I want to specify local endpoint to connect the remote server?
The  bind configures the local endpoint  in my client ,  its port number still changed after bind, need I set REUSEADDR or REUSEPORT or something else?

If you're on Linux, you can add new IP addresses to your loopback interface as shown here: https://askubuntu.com/a/444128
then for each client, bind its socket to ("<IP_ADDRESS>", "0"), ("<IP_ADDRESS>","0") etc before connecting to the server.
On the server side, the accepted socket's remote_endpoint will then identify which hostname is associated with the client's socket.

Ah... I see. In your code you have:
beast::get_lowest_layer(*ws_).async_connect ...

The devil is in the details. What are you passing to async_connect? If you are passing an endpoint, then the bind will be preserved and it should work, because it goes through socket::async_connect:
https://github.com/boostorg/beast/blob/76043dec2cf67a2ba33b32bdcc129f5f0027b8be/include/boost/beast/core/impl/basic_stream.hpp#L473
However, if you are passing an iterator or a query returned from a name resolution, then it will go through an overload of boost::asio::async_connect which can connect to multiple addresses in sequence and in this case the socket will be closed each time, losing the binding:
https://github.com/boostorg/beast/blob/76043dec2cf67a2ba33b32bdcc129f5f0027b8be/include/boost/beast/core/impl/basic_stream.hpp#L547
From https://www.boost.org/doc/libs/1_80_0/doc/html/boost_asio/reference/async_connect/overload6.html

The devil is in the details. What are you passing to async_connect?

Ok I got it! I passed the name solution from the query returned so it hit the second overload, and I saw that sock_->close() in the source.
After specific the param as a concrete endpoint by myself, it works fine already. thanks!
By the way, Could you recommend some articals, blogs or videos or somethings else to help me understand the architecture or familiar with the design concept of boost net part(asio and beast)? I've been stucked with these stream layers and the code jumped between multiple overload. I only find some cppcons and old blogs, but both are quite roughly.

Could you recommend some articals, blogs or videos or somethings else to help me understand the architecture or familiar with the design concept of boost net part(asio and beast)?

Sadly no. Almost everything that I know, I learned through painstaking trial and error. And studying Asio source code, and the examples that come with it.

https://www.youtube.com/watch?v=D-lTwGJRx0o
https://www.youtube.com/watch?v=wxXIbaJBZlE
https://www.youtube.com/watch?v=icgnqFM-aY4

Awesome! I'll taste it as soon, thanks very much!


Unhandled exception freezing the build

See original issue on GitLab
In GitLab by [Gitlab user @bochecha] on Nov 4, 2018, 19:20
Summary
We encountered an error in the Freedesktop Sdk CI.
After the traceback, the build got stuck in that state for a long time, until we manually killed it.
Steps to reproduce
This is the first time it ever happens to us, we have no idea how to reproduce it.
What is the current bug behavior?
Invalid text printed to stdout, a Python exception leading to a second Python exception, and a build stuck seemingly forever.
What is the expected correct behavior?
The build should have completed. (and given how far along it was, it most likely would have succeeded)
Relevant logs and/or screenshots
$ bst --colors -o target_arch x86_64 build all.bst
[… snip …]
x����H������H���P�^��UD����[00:00:37][65fa531c][build:desktop-platform-image.bst    ] BUG     Build

    An unhandled exception occured:

    Traceback (most recent call last):
      File "/root/.local/lib/python3.6/site-packages/buildstream/_fuse/mount.py", line 148, in mounted
        yield
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_mount.py", line 84, in mounted
        yield
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_mount.py", line 142, in mounted
        yield
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_sandboxbwrap.py", line 212, in run
        self.try_remove_device(device_path)
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_sandboxbwrap.py", line 390, in try_remove_device
        os.unlink(device_path)
    OSError: [Errno 107] Transport endpoint is not connected: '/builds/freedesktop-sdk/freedesktop-sdk/cache/buildstream/build/desktop-platform-image-v278qds4/scratch/_/mount/dev/full'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/root/.local/lib/python3.6/site-packages/buildstream/_scheduler/jobs/job.py", line 415, in _child_action
        result = self.child_process()
      File "/root/.local/lib/python3.6/site-packages/buildstream/_scheduler/jobs/elementjob.py", line 94, in child_process
        return self._action_cb(self._element)
      File "/root/.local/lib/python3.6/site-packages/buildstream/_scheduler/queues/buildqueue.py", line 35, in process
        return element._assemble()
      File "/root/.local/lib/python3.6/site-packages/buildstream/element.py", line 1498, in _assemble
        collect = self.assemble(sandbox)
      File "/root/.local/lib/python3.6/site-packages/buildstream/plugins/elements/compose.py", line 125, in assemble
        dep.integrate(sandbox)
      File "/root/.local/lib/python3.6/site-packages/buildstream/element.py", line 794, in integrate
        exitcode = sandbox.run(['sh', '-e', '-c', cmd], 0, env=environment, cwd='/')
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_sandboxbwrap.py", line 247, in run
        pass
      File "/usr/lib64/python3.6/contextlib.py", line 380, in __exit__
        raise exc_details[1]
      File "/usr/lib64/python3.6/contextlib.py", line 365, in __exit__
        if cb(*exc_details):
      File "/usr/lib64/python3.6/contextlib.py", line 284, in _exit_wrapper
        return cm_exit(cm, *exc_details)
      File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_mount.py", line 142, in mounted
        yield
      File "/usr/lib64/python3.6/contextlib.py", line 380, in __exit__
        raise exc_details[1]
      File "/usr/lib64/python3.6/contextlib.py", line 365, in __exit__
        if cb(*exc_details):
      File "/usr/lib64/python3.6/contextlib.py", line 284, in _exit_wrapper
        return cm_exit(cm, *exc_details)
      File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/root/.local/lib/python3.6/site-packages/buildstream/sandbox/_mount.py", line 84, in mounted
        yield
      File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
        self.gen.throw(type, value, traceback)
      File "/root/.local/lib/python3.6/site-packages/buildstream/_fuse/mount.py", line 150, in mounted
        self.unmount()
      File "/root/.local/lib/python3.6/site-packages/buildstream/_fuse/mount.py", line 128, in unmount
        .format(type(self).__name__, self.__process.exitcode))
    buildstream._fuse.mount.FuseMountError: SafeHardlinks reported exit code -11 when unmounting

See the full build log at https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/116255830
Possible fixes
No idea.

BuildStream version affected: 1.2.3

In GitLab by [Gitlab user @aevri] on Mar 21, 2019, 11:08
Seems like this is a duplicate of https://gitlab.com/BuildStream/buildstream/issues/161, Would you agree [Gitlab user @tristanvb]?

In GitLab by [Gitlab user @tristanvb] on Nov 5, 2020, 07:10
[Gitlab user @aevri] sorry I missed this, yes indeed it is the same issue.

In GitLab by [Gitlab user @tristanvb] on Nov 5, 2020, 07:10
marked this issue as a duplicate of #161

In GitLab by [Gitlab user @tristanvb] on Nov 5, 2020, 07:10
marked this issue as related to #161


Ability to set CosmosClientOptions - helpful with local Docker Emulator usage

Is your feature request related to a problem? Please describe.
When attempting to use the repository in a containerised application the following error occurs:
"System.InvalidOperationException: Cannot create Collection Information for Drivers in database drivers with lease leases in database drivers : The SSL connection could not be established, see inner exception.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception."
The lack of configurability is preventing me from using this really useful repository as part of our microservice solution
Describe the solution you'd like
Looking at this link it seems we can override certificate config, so the ability pass these options through (or the repo's own version of) would be a suggestion?
https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=ssl-netstd21#disable-ssl-validation
CosmosClientOptions cosmosClientOptions = new CosmosClientOptions()
{
    HttpClientFactory = () =>
    {
        HttpMessageHandler httpMessageHandler = new HttpClientHandler()
        {
            ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
        };

        return new HttpClient(httpMessageHandler);
    },
    ConnectionMode = ConnectionMode.Gateway
};

CosmosClient client = new CosmosClient(endpoint, authKey, cosmosClientOptions);

Additional context
Unless there is currently a way of achieving local, containerised development already within the project I'm unaware of, I think solving this problem would open  up the repository to another level of software.

Hi @totalitydevelopment - this is probably something that could be added. If you have any available cycles, we'd love your contributions. Please feel free to create a PR to add this functionality, and reference this issue in the PR. I've mark this issue as up-for-grabs. Thanks again.

Thanks for the response @IEvangelist. I think I've found it.
In Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions:
public static IServiceCollection AddCosmosRepository(
            this IServiceCollection services,
            Action<RepositoryOptions> setupAction = default,
            Action<CosmosClientOptions> additionSetupAction = default)

I will give this a run out now and let you know if it isn't resolving the requirement (and look into a PR).
Apologies for wasting your time.

No worries whatsoever, if you couldn't find it - others may have not been able to either. This is great, we should probably add to the README.md. Thank you

Hey, @IEvangelist @totalitydevelopment Yes, that extension method should do the trick, happy to add more configuration options if you find you need it 👍  I agree with @IEvangelist we need to work on the README.md to reflect this sort of stuff.

@totalitydevelopment really cool to hear you are considering using this for your microservice project, If you wouldn't mind, what is your domain? I am currently using this for warehousing and it's working a treat 👍

@mumby0168 we're using a load of new technologies within the team for a greenfield project.
Our first run at a microservice architecture using K8, Docker, Azure Functions and the like. Also a first run with Cosmos and we found ourselves writing a lot of repetitive code.
I watched part of the Cosmos Conf and saw @IEvangelist video so dived straight onto it as it saves sooo much repetition in our cosmos related data layer.
Great work guys.

@mumby0168 we're using a load of new technologies within the team for a greenfield project.
Our first run at a microservice architecture using K8, Docker, Azure Functions and the like. Also a first run with Cosmos and we found ourselves writing a lot of repetitive code.
I watched part of the Cosmos Conf and saw @IEvangelist video so dived straight onto it as it saves sooo much repetition in our cosmos related data layer.
Great work guys.

@totalitydevelopment we were in a very similar position this has been great for us 👍

@mumby0168 we're using a load of new technologies within the team for a greenfield project.
Our first run at a microservice architecture using K8, Docker, Azure Functions and the like. Also a first run with Cosmos and we found ourselves writing a lot of repetitive code.
I watched part of the Cosmos Conf and saw @IEvangelist video so dived straight onto it as it saves sooo much repetition in our cosmos related data layer.
Great work guys.

@totalitydevelopment we were in a very similar position this has been great for us 👍 Hope all goes well

Likewise, good luck with the project.

Thanks, @totalitydevelopment did the above options solve the issues you were having?

Thanks, @totalitydevelopment did the above options solve the issues you were having?

I believe so @mumby0168 but am still having other issues just wanted to be sure before closing. Will let you know one way or the other but definately looking promising.

@mumby0168 this is what I ended up with after being able to override the cosmos client options as discussed.
s.AddCosmosRepository(options =>
          {
              ... options setup
          },
          cosmosClientOptions => //todo this absolutely only needs to occur in dev mode!!!
          {
              cosmosClientOptions.HttpClientFactory = () =>
                  {
                      HttpMessageHandler httpMessageHandler = new HttpClientHandler()
                      {
                          ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
                      };
                      return new HttpClient(httpMessageHandler);
                  };

              cosmosClientOptions.ConnectionMode = ConnectionMode.Gateway;
          }

Closing this off as my initial requirement is already open to use.

Hi all, I am trying to have a  dotnet app communicate to my cosmosdb both running on docker containers. It seems like there is still a disconnect where my dotnet app is trying to establish a connection to localhost (<IP_ADDRESS>) then the ip address.
here is roughly where i based my docker compose off of.
https://stackoverflow.com/questions/75543145/how-to-access-cosmosdb-docker-container-from-another-container


Problem with zoomAtPoint

I've attached an test example of zoomAtPoint that's not working for me.   I'm not a regular JavaScript/SVG user so I'm learning how to do things.   I'm probably doing something wrong with viewbox coordinates, but I don't know what that is.
Note that, in the example, the "2nd Sample text" element's y coordinate is outside the svg box.
test_zoomAtPoint.zip
All help or feedback appreciated.
Ben Slade
Kensington MD

Can you please upload your example somewhere online? You can start with this example and edit it.

Also you may be better asking this on stackoverflow as these tracker is used for development and bugs topics.

Re: Can you please upload your example somewhere online? You can start with this example and edit it.
Done.  Take a look at http://jsfiddle.net/167usffr/196 . As I understand it, clicking on the "Zoom" button should zoom to point 10,10 which should be the upper left corner of the svg rectangle/square .   But it doesn't do that.
Re: better asking this on stackoverflow
Well, it sure seems like it's not working properly, which is why I'm here.   But next time I'll go to stackoverflow first.


Implements pagination with page numbers

As requested by @caiquecastro on #11.
Also, included two more options: previous_button_icon and next_button_icon.
When using the pagination without page_numbers prop, the [previous|next]_button_text will have priority over [previous|next]_button_icon. When page_numbers is true, the icons have priority.
But in any case, the user still can override icon or text by passing a value on options.
The default icons are glyphicon-chevron-left and glyphicon-chevron-right.
I wrote some additional tests, but to be honest, until today I didn't have any experience with any kind of automatized tests, so if they are poorly written or if there are need for some more tests, please tell me!

Great job @israelss
Though, I think that the page_number property should be a key within config. Why did you choose this way?
previous_button_icon 👍

I think that it's simpler and easier to use it that way, but on a second thought I agree that it should be included within config and passed through options, specially because I plan to improve it, and include a max_buttons option, to include an ellipsis button when given too many pages, showing only (max_buttons - 3) + ellipsis button + the two last buttons, aside previous and next buttons.
E.g., with that options:
options: {
  page_numbers: true,
  max_buttons: 7
}

And with 13 pages in total, the result will be something like that (yes, i took that example from Foundation 6 pagination):

I will change it to be passed through options and fix a small bug that I just found out :sweat_smile:
The max_buttons feature will be implemented later, probably next week.

Ok, so ellipsis buttons are now available! :smiley:
A new option was created, max_buttons, and it defaults to 7, i.e., when using page_numbers: true the default maximum number of page buttons will be 7, but using the max_buttons one can define any number to it (minimum recommended 5, minimum enforced 1). When passing a number lower than 1, the default value will be applied.
Another new option is ellipses, which defaults to true, and can be used to indicate if the paginator will use ellipsis buttons when the total of pages is greater than the max_buttons option.
What are your thoughts on these changes, @hootlex?

When will this be merged? I think it would be nice. Btw, is this support Vue 2?

@nmfzone it works fine with Vue 2 :+1:

One more addition, the page_button_text option. One can pass a string and it will be attached before the number of the page.

Awesome work @israelss
I will try to review and merge it today.
When it is done, do you plan on updating the documentation?
If you don't, it's okay. I just want to know. :)

@israelss

I am working on the plugin and I see that some times it generates 2 ellipses buttons.
What is the reason for this?
The page button prefix is cool!
Don't make any changes on this pr since I've already merged it and upated in a local branch.

@israelss I think I'm done. Check page-numbers branch and feel free to open a pr there if you want to make any changes.

@israelss could I have an answer on 1?

Sorry, I was off the net the last two weeks.
Answering:

When it is done, do you plan on updating the documentation?

I can work on the docs. But I can only start it on next week, is that ok?

I am working on the plugin and I see that some times it generates 2 ellipses buttons. What is the reason for this?

Is that random/unexpected? When it is happening? :confused:

The page button prefix is cool!

Thanks! :smiley:

Check page-numbers branch and feel free to open a pr there if you want to make any changes.

I'll take a closer look tomorrow :+1:

Hey @israelss, thanks for the quick update.
Regarding the ellipses, I dont think it is a bug since you are displaying them intentionally.
My question is, why? I've never seen a paginator with two ellipses.

Is there any update for this?

Hi. just wondering if this will be implemented? Thanks a lot.