feat: migrate to v2 type annotation

This PR was generated using Autosynth. :rainbow:
Commits in this repo since last synth:
987f62cf3d35076ce18c52f61a1c96d466a3541a chore: release 2.3.2 (#616)
d04bfafd2cfd7338100dbe27c79f66c54cca5464 build: add GitHub actions config for unit tests
8c1ad4fcc941800693da32c6f5877b66d26344b4 chore(deps): update dependency linkinator to v2
fa851441b20aabd281d154db7ee31296cc5e25f5 test: modernize mocha config (#610)
7e744761f2fdb80d083b8b901a15dadf0178f714 chore: skip img.shields.io in docs test
b036ab760ddf7da03043b66ab76d801be01e9c31 chore(deps): update dependency @types/mocha to v7
Log from Synthtool
synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py.
On branch autosynth
nothing to commit, working tree clean
HEAD detached at FETCH_HEAD
nothing to commit, working tree clean
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for google/bigtable/artman_bigtable.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/bigtable-v2.
synthtool > Running generator for google/bigtable/admin/artman_bigtableadmin.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/js/bigtable-admin-v2.
synthtool > Replaced '../../package.json' in src/v2/bigtable_client.js.
synthtool > Replaced '../../package.json' in src/v2/bigtable_instance_admin_client.js.
synthtool > Replaced '../../package.json' in src/v2/bigtable_table_admin_client.js.
.eslintignore
.eslintrc.yml
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/support_request.md
.github/PULL_REQUEST_TEMPLATE.md
.github/release-please.yml
.github/workflows/ci.yaml
.jsdoc.js
.kokoro/common.cfg
.kokoro/continuous/node10/common.cfg
.kokoro/continuous/node10/docs.cfg
.kokoro/continuous/node10/lint.cfg
.kokoro/continuous/node10/samples-test.cfg
.kokoro/continuous/node10/system-test.cfg
.kokoro/continuous/node10/test.cfg
.kokoro/continuous/node12/common.cfg
.kokoro/continuous/node12/test.cfg
.kokoro/continuous/node8/common.cfg
.kokoro/continuous/node8/test.cfg
.kokoro/docs.sh
.kokoro/lint.sh
.kokoro/presubmit/node10/common.cfg
.kokoro/presubmit/node10/docs.cfg
.kokoro/presubmit/node10/lint.cfg
.kokoro/presubmit/node10/samples-test.cfg
.kokoro/presubmit/node10/system-test.cfg
.kokoro/presubmit/node10/test.cfg
.kokoro/presubmit/node12/common.cfg
.kokoro/presubmit/node12/test.cfg
.kokoro/presubmit/node8/common.cfg
.kokoro/presubmit/node8/test.cfg
.kokoro/presubmit/windows/common.cfg
.kokoro/presubmit/windows/test.cfg
.kokoro/publish.sh
.kokoro/release/docs.cfg
.kokoro/release/docs.sh
.kokoro/release/publish.cfg
.kokoro/samples-test.sh
.kokoro/system-test.sh
.kokoro/test.bat
.kokoro/test.sh
.kokoro/trampoline.sh
.nycrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
codecov.yaml
renovate.json
samples/README.md
npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

><EMAIL_ADDRESS>postinstall /tmpfs/src/git/autosynth/working_repo/node_modules/protobufjs
> node scripts/postinstall

><EMAIL_ADDRESS>prepare /tmpfs/src/git/autosynth/working_repo
> npm run compile

npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

><EMAIL_ADDRESS>compile /tmpfs/src/git/autosynth/working_repo
> tsc -p . && cp -r src/v2 build/src/ && cp -r proto* build/ && cp test/*.js build/test

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 651 packages from 1211 contributors and audited 1638 packages in 19.571s
found 0 vulnerabilities

npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

><EMAIL_ADDRESS>fix /tmpfs/src/git/autosynth/working_repo
> gts fix && npm run lintfix

npm WARN npm npm does not support Node.js v12.15.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11.
npm WARN npm You can find the latest version at https://nodejs.org/

><EMAIL_ADDRESS>lintfix /tmpfs/src/git/autosynth/working_repo
> eslint --fix '**/*.js'

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/app-profile.js
   18:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   41:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   59:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   77:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   96:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  115:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/cluster.js
   18:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   38:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   56:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   74:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   93:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  112:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/family.js
   18:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   37:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   55:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   74:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   93:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  118:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/instance.js
   18:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   63:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   91:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  115:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  157:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  174:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  192:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  209:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  226:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  252:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  270:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  287:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  304:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  330:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  351:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/row.js
   17:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   37:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   79:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
   98:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  126:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  146:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  193:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  230:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  251:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  287:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/document-snippets/table.js
   15:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  300:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  318:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require
  345:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/filterSnippets.js
  40:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/hello-world/index.js
  14:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/instances.js
  18:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/quickstart.js
  27:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/readSnippets.js
  29:30  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/tableadmin.js
  16:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/app-profile.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/cluster.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/family.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/filters.js
  18:26  error  "snap-shot-it" is not found            node/no-missing-require
  19:26  error  "chai" is not found                    node/no-missing-require
  22:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/instance.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/instances.test.js
  17:26  error  "chai" is not found                    node/no-missing-require
  21:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/reads.js
  18:26  error  "snap-shot-it" is not found            node/no-missing-require
  21:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/row.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/table.js
  19:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/test/write.js
  17:26  error  "chai" is not found                    node/no-missing-require
  20:26  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/writeBatch.js
  28:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/writeConditionally.js
  28:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/writeIncrement.js
  28:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

/tmpfs/src/git/autosynth/working_repo/samples/writeSimple.js
  24:28  error  "@google-cloud/bigtable" is not found  node/no-missing-require

✖ 72 problems (72 errors, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>lintfix: `eslint --fix '**/*.js'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>lintfix script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!  Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>fix script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-02-14T12_13_31_543Z-debug.log
installing<EMAIL_ADDRESS>installing<EMAIL_ADDRESS>installing<EMAIL_ADDRESS>installing<EMAIL_ADDRESS>installing<EMAIL_ADDRESS>synthtool > Wrote metadata to synth.metadata.

@alexander-fenster @xiaozhenliu-gg5 this looked like it was updating to v2 type annotations, do we have plans to move bigtable to the micro generator soon?

Hi @bcoe yes, I think we may start to convert it next week, bigtable is one of the 5 APIs that are left for conversion, others are in progress or converted, thanks for the patience!


Desired functionalities in CWA vs data/privacy protection

Question to the community!

The CWA is limited in certain functionalities, due to limitations related to data/privacy concerns and protection. These limits are established amongst others in the law,  in the technical implementation of the ENF, and the policy of Google/Apple.

However, in this community, in the AppStores and other media, regularly proposed enhancements would affect the area of data/privacy protection.

Question: Which are the most desired or mentioned functionalities/enhancements (but seem currently impossible to be implemented due to privacy concerns and/or technical limitations of the ENF and/or Apple/Google policy.)?
Thank you very much for your help to shed some light on this and let's improve/modify the following list

More information on risk encounter

exact time of risk encounter
exact location of risk encounter

UX/UI contact diary

Access GPS to enter a location
Access to the phone's contacts to enter a person

@Ein-Tim @ndegendogo  @MikeMcC399 and community ?

IMHO most desired:

#5 (or something similar which confirms the user that the app works) - informative logging results
#206 (related: #100, #208, #266) - time/location of risk encounters

Yes, I think @Ein-Tim already mentioned the most pressing and desired.

#5 / #19 / #243 - some way to confirm that everything is setup and working correctly, especially with regard to the BLE beacons. We have seen that some settings (esp. on some Android configurations) can be tricky. But also imagine, my phone fell to the ground and the screen broke - how can I verify that the BLE unit is not also broken?
#206 and similar (more information / details on risk encounters).
then there were some ideas to address "superspreader events" and "clusters", like #355 / #279 / #262 / #240 / #213
and if you are in discussion with Apple & Google, you could also mention #12 (support for Apple Watch)

And, maybe off-topic here, but maybe you can also bring up #109 - "One phone can be used to manage all tests of a family". This feature was very much missed last summer (and I am sure, latest next holiday season this discussion will come up again). It will need some kind of concept for a "local user account management".


Handle nil values from the tsm1 cursor correctly

Send nil values from the tsm1 cursor at the end of the cursor. After the
cursor reached tsm1, the nextAt() call would always return the default
value rather than a nil value.
Descending also didn't work correctly because the seeking functionality
for tsm1 iterators would always act like they were ascending instead of
descending when choosing which value to select. This resulted in very
strange output from the emitter since it couldn't figure out if it was
ascending or descending.
Fixes #6206.

:+1:


Update Doc string for SnowflakeOperatorAsync

Added Doc string for the SnowflakeOperatorAsync to get to know the use of this operator compared with snowflake sql API operator, best practices to be followed while using this operator and where can this SnowflakeOperatorAsync can be used
closes: #557

@phanikumv  @rajaths010494 @pankajastro @pankajkoti, can you review this PR

@phanikumv @rajaths010494 @pankajastro @pankajkoti, can you review this PR

Can you please post the screenshot like how it is looking you can run make docs?

LGTM , once Screenshot is added we can close.

@rajaths010494 @pankajastro Added screenshot

@rajaths010494 @pankajastro Added screenshot

I can't see the below text in the screenshot but it is in the doc string. I was curious to see how it looks otherwise changes look good to me

for the query status based on the query id from different connection.
.. see also::
https://docs.snowflake.com/en/user-guide/python-connector-example.html#label-python-connector-querying-data-asynchronous.

@rajaths010494 @pankajastro Added screenshot

I can't see the below text in the screenshot but it is in the doc string. I was curious to see how it looks otherwise changes look good to me

for the query status based on the query id from different connection.
.. see also::
https://docs.snowflake.com/en/user-guide/python-connector-example.html#label-python-connector-querying-data-asynchronous.

See also link is not visible in Docs, its not showing up in any of the operators/sensors

@rajaths010494 @pankajastro Added screenshot

I can't see the below text in the screenshot but it is in the doc string. I was curious to see how it looks otherwise changes look good to me

for the query status based on the query id from different connection.
.. see also::
https://docs.snowflake.com/en/user-guide/python-connector-example.html#label-python-connector-querying-data-asynchronous.

See also link is not visible in Docs, its not showing up in any of the operators/sensors

then this is a bug in our documentation please create a ticket to track it. But I was able to do it in #464

Created Ticket

@phanikumv Addressed your PR review changes

@phanikumv Addressed your review comments, can you please review it again

@phanikumv Need your approval


improving testing on marionette/backbone

WIP, but the info is there.
the table looks like that

Should we close this PR?


try to fix prompt token count

according to openai's notebook
the response token count is accurate

Thanks @zhujunsan 🙏
Going to close this in favor of #548
Sorry I haven't had much time to respond to PRs lately.


in js-sha512/tests, .html file how to execution?

please... I want see .html file...

run npm install and make sure node_modules exists. You can open index.html and requirejs.html in browser directly, but you have to run http server for worker.html.


Cannot find an answer to issues

Dear Team, I am trying to use OR-Tools with C# to optimize routes.
But faced with several issues with no idea how to solve it:

How to limit length of the route? Cumulative distance in the route
How to put constrain to limit number of locations served in the route? for example to max 3 nodes
is it possible to serve one node with several trucks? for example: we have a demand in node 30. max capacity of trucks - 20. currently if I am putting this demand in node with 30 - the program goes to the loop without any result.

Routing.AddDimension(demandCallback, 0, 20, true, "capacity");
var distances = new RandomManhattan();
routing.SetCost(distances);
var searchParameters =RoutingModel.DefaultSearchParameters();
searchParameters.FirstSolutionStrategy = FirstSolutionStrategy.Types.Value.PathCheapestArc;
var solution = routing.SolveWithParameters(searchParameters);

In theory it should be served by two trucks but I don't know how to do it.
Will appreciate your help
Thanks, Sasha

Wish I could provide code examples but I haven't used the C# wrapper and I don't remember the implementation details quite well. I hope I can help at least a bit.

You need to set a constraint on the Max value of the distanceDimension CumulVar for every vehicle.
You need to create another "demand" demansion that adds 1 to your vehicle's CumulVar everytime it visits another node. Then you constraint on such CumulVar like in (1)
I'm not sure, haven't done it myself.

Kind Regards and Good luck

Hi,
for 3 it is currently not possible, the solver can only visit one time each node. However, the tricks is to split the node in two for example...

@alanbato thanks a lot for feedback. theoretically really cool approaches. I am trying to realize it but every time cannot understand how to build this structure, because I am very new to ortools... Do you have any implementation in different languages? it is not important to have it in C# . will really appreciate your help

@Mizux split to several nodes... very cool approach. thanks a lot!

Alright, I'll tell you how I'd do it with the Python wrapper.
For (1) You'll need to have a dimension called Distance that keeps track of the total distance of the trip in a CumulVar.
For that you can look at the AddDimension() function.
Then, you get the dimension in a variable and constraint it so the CumulVar at any node cannot be bigger than your limit my_limit, like this:
dist_dimension = routing.GetDimensionOrDie("Distance")
for customer in customers:
    dist_dimension.CumulVar(customer.index).SetMax(my_limit)

This restrains the domain of the distance CumulVar on that node. You could also do it the constraint way like this:
dist_dimension = routing.GetDimensionOrDie("Distance")
for customer in customers:
    solver.Add(dist_dimension.CumulVar(customer.index) <= my_limit)

I don't know for sure which approach is best for you, but the first one leaves you with a "harder" constraint than the second approach.
While doing research trying to answer this question, I just came up with using AddDimensionWithVehicleCapacity to solve the same problem with less code, you wouldn't need to use SetMax() or a constraint, as it is done automatically by using the vehicle_capacities list as the limit value for each vehicle.
The same can be done for (2). The only difference is the node_evaluator callback function which you use. For (1), given a and b it should return the distances between nodes a and b. For (2), you can always return 1 because you are counting the nodes visited.
These are the approaches I came up with and I don't know if the authors have better ways of doing either of them :)
Best of luck!


Upgrade to Storm 1.2 metrics methods

Storm 1.1 and lower offered a method on TopologyContext called registerMetrics() (see https://github.com/apache/storm/blob/1.1.x-branch/storm-core/src/jvm/org/apache/storm/task/TopologyContext.java).  In Storm 1.2 these methods were deprecated and registerTimer(), registerHistogram(), registerMeter(), registerCounter() and registerGauge() were added (see https://github.com/apache/storm/blob/v1.2.2/storm-core/src/jvm/org/apache/storm/task/TopologyContext.java#L396-L418).  Within this library we represent several metric types via the MetricsRecorder interface, specifically countBy(), assignValue() and recordTimer() along with a set of helpers for each. Our current metrics methods map to three of these, but we have gaps for meters (measures mean throughput and one-, five-, and fifteen-minute exponentially-weighted moving average throughputs) and histograms (calculates the distribution of a value).
In the short term (0.10) we can swap StormRecorder (the implementation of MetricsRecorder that leverages TopologyContext to call registerMetrics() to use these new methods. This does then impose a hard requirement on Storm 1.2 because the new metrics methods did not exist before that release.  Currently 0.10 requires 1.2, but it should function fine with older version - this would not be the case with a metrics change. Longer term do we need to consider exposing the other two metrics methods?  As it stands today we don't have a use case currently, but we do pass the MetricsRecorder instance downstream to many classes that can be overridden through third party extension.

This is resolved with #119.


mount: .find sometimes doesn't find dom elements that exists

Let me preface this by saying I don't know how to reproduce the issue.
After upgrading to React 15, some of our tests were failing nondeterministically in our CI environment.
This was the component that was mounted. (component name and props edited for brevity)
import { mount } from 'enzyme';
import ComponentBeingTested from '..';

const component = mount(<ComponentBeingTested {...props} />);
console.log(component.debug());
// output is the same when test passed or failed
//    <hoc1 {...props} >
//      <hoc2 {...props} >
//        <hoc3 {...props} >
//          <button onClick={[Function]} style={{...}} disabled={true}>
//            Test Child
//          </button>
//        </hoc3>
//      </hoc2>
//    </hoc1>

expect(component.find('button').prop('disabled')).toEqual(true);
// sometimes fails with: This method is only meant to be run on single node. 0 found instead.

I looked at how '.find' was implemented and wrote a method to traverse the tree in a similar manner to and print out what types were encountered.
https://gist.github.com/prayogoa/89f6b66fbb794613618d95a7214edb3a
calling this function with the component wrapper yields the following output when the spec succeeds:
import {traverse} from './traverse';
traverse(component);
/*
internalInstance(internalInstance(inst).getPublicInstance())._currentElement.type.name = '_class2'
internalInstance(internalInstance(inst)._renderedComponent.getPublicInstance())._currentElement.type.name = ''
internalInstance(internalInstance(inst)._reactInternalInstance._renderedComponent._renderedComponent.getPublicInstance())._currentElement.type.name = '_class'
internalInstance(internalInstance(inst)._renderedComponent._renderedComponent._renderedComponent.getPublicInstance())._currentElement.type = 'button'
*/

when the spec fails:
traverse(component);
/*
internalInstance(internalInstance(inst).getPublicInstance())._currentElement.type.name = '_class2'
internalInstance(internalInstance(inst)._renderedComponent.getPublicInstance())._currentElement.type.name = ''
internalInstance(internalInstance(inst)._renderedComponent._renderedComponent.getPublicInstance())._currentElement.type.name = '_class'
internalInstance(inst)._renderedComponent._renderedComponent._renderedComponent.getPublicInstance().type = 'submit'
*/

The last line is interesting, for some reason the type of button is perceived to be submit when the spec failed. It also traversed the tree differently.
I then dumped the component into a text file and diffed them.
  component.flatMap(({ node }) => {
    require('fs')
    .appendFileSync(
      `./component.json`,
      require('util').inspect(node, { depth: 15 }),
      { encoding: 'utf8' }
    );
  });

component_fail.txt
component_pass.txt
I found this in the diff:
...
- _hostNode: HTMLButtonElement { '__reactInternalInstance$dfz94e4gxn8qia4i': [Circular] },
+ _hostNode: HTMLButtonElement { '__reactInternalInstance$bcytf4ap0isbgldi': undefined },
...

In the failing case, .__reactInternalInstance$... points to undefined, so the it looks at the type property of _hostNode, which is
document.createElement('button').type
-> "submit"

This seems like a bug, but with my limited knowledge of the inner workings of enzyme and react I don't know if it's a bug in enzyme (it should never look at the type property of a dom element), or in react itself (__reactInternalInstance&... should never be undefined in this case?).  I hope by posting this here someone can guide me to the appropriate place to file this issue.

I believe I'm also being bit by this bug. Tests failing non-deterministically, but usually on a particular test suite in a repo of >6k tests. Thanks for the work you've done so far here, I'll try to take it further.
My tests are usually failing with error message:

Method “props” is only meant to be run on a single node. 0 found instead.

I forked enzyme to inject some debuggers into the ReactWrapper.single method which is the source of this error, and got the following results on a test failure:
const root = mount(...);
console.log('DEBUG: root', root);
     component:
       { setChildProps:
          { [Function: bound setChildProps]
            __reactBoundContext: [Circular],
            __reactBoundMethod: [Function: setChildProps],
            __reactBoundArguments: null,
            bind: [Function] },
         setChildContext:
          { [Function: bound setChildContext]
            __reactBoundContext: [Circular],
            __reactBoundMethod: [Function: setChildContext],
            __reactBoundArguments: null,
            bind: [Function] },
         getInstance:
          { [Function: bound getInstance]
            __reactBoundContext: [Circular],
            __reactBoundMethod: [Function: getInstance],
            __reactBoundArguments: null,
            bind: [Function] },
         getWrappedComponent:
          { [Function: bound getWrappedComponent]
            __reactBoundContext: [Circular],
            __reactBoundMethod: [Function: getWrappedComponent],
            __reactBoundArguments: null,
            bind: [Function] },
         props: { Component: 'table', props: [Object], context: null },
         context: {},
         refs: {},
         updater:
          { isMounted: [Function],
            enqueueCallback: [Function],
            enqueueCallbackInternal: [Function],
            enqueueForceUpdate: [Function],
            enqueueReplaceState: [Function],
            enqueueSetState: [Function],
            enqueueElementInternal: [Function],
            validateCallback: [Function] },
         state: { mount: true, props: [Object], context: null },
         _reactInternalInstance:
          { _currentElement: [Object],
            _rootNodeID: 0,
            _compositeType: 0,
            _instance: [Circular],
            _hostParent: null,
            _hostContainerInfo: [Object],
            _updateBatchNumber: null,
            _pendingElement: null,
            _pendingStateQueue: null,
            _pendingReplaceState: false,
            _pendingForceUpdate: false,
            _renderedNodeType: 0,
            _renderedComponent: [Object],
            _context: {},
            _mountOrder: 15,
            _topLevelWrapper: [Object],
            _pendingCallbacks: null,
            _calledComponentWillUnmount: false,
            _warnedAboutRefsInRender: false,
            _mountIndex: 0,
            _mountImage: null,
            _debugID: 25 } },
      root: [Circular],
      node: HTMLTableElement { '__reactInternalInstance$6jeh4la8lmsll3di': undefined },
      nodes: [ HTMLTableElement { '__reactInternalInstance$6jeh4la8lmsll3di': undefined } ],
      length: 1,
      options: {},
      complexSelector:
       ComplexSelector {
         buildPredicate: [Function: buildInstPredicate],
         findWhereUnwrapped: [Function: findWhereUnwrapped],
         childrenOfNode: [Function: childrenOfInst] } }

Environment

node: 4.8.3
react: 15.4.2
jest: 20.0.3
enzyme: 2.8.0

@prayogoa have you found any solution to this issue in the months since you've opened it?

@ryanwilsonperkin we have found that splitting our test suites into batches and restarting jest every batch made this issue go away. It's not ideal but we didn't have any more time to spend on this.

@prayogoa thanks! We've run into a similar issue where we've spent too much time trying (and failing) to properly replicate the issue. We've marked the 3 problematic tests as skipped for now, and hope to find a more permanent solution soon.

Hey! I believe we're also running into this issue, has there been any update on this?

@rwholey-eb I'm afraid not, after a fair bit of debugging I was unable to trace down the issue to a root cause.

Echoing what @rwholey-eb said, we've been running into this issue at Eventbrite trying everything we could think of to fix the issue. I was seeing the intermittent failures happening locally in our Docker environment too. And the failures happened more frequently as we added more tests. The problem definitely seemed to be with Enzyme.
And that proved to be the case because everything got fixed after upgrading to Enzyme 3! We followed the installation instructions for React 15 to add the appropriate adapter (we had to use enzyme-adapter-react-15.4 since we're still on 15.4.2). We did have to fix a few tests as a result of some breaking changes in Enzyme 3, but the migration guide explains what to look out for and what to fix.
Hope that helps!

@benmvp thanks for chiming in! We're running Enzyme 2.8.0 right now, but I'll put in a PR to update to 3 (we're also on React 15.4.2) and un-skip the tests we've had issues with. I'll report back if we run into any of the same errors again.
If anyone's reading this thread that knows what might have changed between 2.8 and 3.0 that might have fixed this issue, I'd love to know! This one's been one of those crazy bugs that are hard to pin down. I bet it's going to be something silly I wrote in the test 😅

@ryanwilsonperkin one thing is that we replaced the entire selector engine between enzyme 2 and 3.
@benmvp thanks for clarifying! You may also be interested in https://twitter.com/ljharb/status/931953598308679680 :-D
I think that based on the claim that it's fixed in v3; and because this bug is unlikely to get figured out or fixed in v2, I'm going to close this.
If anyone discovers issues in v3, or a different issue in v2, please file new issues - v2 backports are still possible, but I highly recommend upgrading to v3 ASAP.

Ah so I can use enzyme-adapter-react-helper instead of the specific enzyme-adapter-react-15.4? It'll figure it out for me? Nice! And thanks! 😄


The command '/bin/sh -c apt-get update && apt-get install -y python build-essential' returned a non-zero code: 100

The command '/bin/sh -c apt-get update && apt-get install -y python build-essential' returned a non-zero code: 100

I don't quite understand your question. Can you give me a more detailed description?
It looks a bit like a system error report.

We found that when the network is bad, it will appear when you install addon.
Reinstall or try using a network agent.
If you have any more questions, please create a new issue


[DRAFT] Virtual Gamepad for mobile devices

The button sprites are all made by me.
TODOs:

[x] Better Dpad collider shape
[x] Fix multitouch
[ ] Draw outside game bounds (on top of border)
[ ] Better button positioning

will it support customization like adding/modifying/removing virtual buttons? Dark Place probably gonna feature some additional buttons.
This Deltarune port for Android actually did a pretty good job with the virtual joystick: https://angelapuzzle.wixsite.com/dt-port


[BUG]:

What version of drizzle-orm are you using?
0.30.7
What version of drizzle-kit are you using?
0.20.14
Describe the Bug
If a query I am trying to modify with a dynamic query (....$dynamic()) contains any placeholders, I'm getting an error that says No value for placeholder.... provided.
Is this a limitation of Drizzle, or am I thinking  the wrong way about this?
Interestingly, the query seems to still work despite throwing an error.
Simple example to illustrate:
function withPagination<T extends PgSelect>(
  qb: T,
  page: number = 1,
  pageSize: number = 10,
) {
  return qb.limit(pageSize).offset((page - 1) * pageSize);
}

const query = db.select().from(users).where(eq(users.id, sql.placeholder("myPlaceholder"))

const dynamicQuery = query.$dynamic()

withPagination(dynamicQuery, 2, 20) // Error: No value for placeholder "myPlaceholder" was provided

Error: No value for placeholder "myPlaceholder" was provided
    at eval (webpack-internal:///(rsc)/./node_modules/drizzle-orm/sql/sql.js:358:15)
    at Array.map (<anonymous>)
    at fillPlaceholders (webpack-internal:///(rsc)/./node_modules/drizzle-orm/sql/sql.js:355:17)
    at eval (webpack-internal:///(rsc)/./node_modules/drizzle-orm/postgres-js/session.js:34:83)
    at Object.startActiveSpan (webpack-internal:///(rsc)/./node_modules/drizzle-orm/tracing.js:14:14)
    at PostgresJsPreparedQuery.execute (webpack-internal:///(rsc)/./node_modules/drizzle-orm/postgres-js/session.js:33:60)
    at eval (webpack-internal:///(rsc)/./node_modules/drizzle-orm/pg-core/query-builders/select.js:713:30)
    at Object.startActiveSpan (webpack-internal:///(rsc)/./node_modules/drizzle-orm/tracing.js:14:14)
    at PgSelectBase.execute (webpack-internal:///(rsc)/./node_modules/drizzle-orm/pg-core/query-builders/select.js:712:60)
    at PgSelectBase.then (webpack-internal:///(rsc)/./node_modules/drizzle-orm/query-promise.js:26:17)
    at process.processTicksAndRejections..

Expected behavior
I should only be required to provide placeholder values when I actually execute the query, not when I'm still "building" it.
Environment & setup
Next.js, Supabase

was fixed in<EMAIL_ADDRESS>


Time drift during MIDI playback

For context: I am writing https://github.com/mdwn/mtrack, and I am playing a MIDI track into a MIDI to DMX translator against a click track.
As I was testing playback, I noticed that the lights were slowly getting behind the beat of the click. After doing some digging, I believe the issue lies here: https://github.com/insomnimus/nodi/blob/main/src/player.rs#L45. The sleep is accurate, however, I think the writing of the events out using midir is adding in a slight latency per tick, which cumulatively becomes noticeable.
I was able to fix within my repo with this PR: https://github.com/mdwn/mtrack/pull/32. However, I suspect a better solution could be integrated directly into nodi. I'd be happy to submit a PR, but wanted to check with you first.

Just to be specific:
/// AccurateTimer is a timer for the nodi player that allows a more accurate clock. It uses the last
/// known instant to properly calculate the next intended sleep duration.
struct AccurateTimer<T: Timer> {
    timer: T,
    last_instant: Option<Instant>,
}

impl<T: Timer> AccurateTimer<T> {
    fn new(timer: T) -> AccurateTimer<T> {
        AccurateTimer {
            timer,
            last_instant: None,
        }
    }
}

impl<T: Timer> Timer for AccurateTimer<T> {
    fn sleep_duration(&mut self, n_ticks: u32) -> std::time::Duration {
        let mut duration = self.timer.sleep_duration(n_ticks);

        // Modify the sleep duration if the last duration is populated, as we
        // know about when the next tick should be.
        match self.last_instant {
            Some(last_instant) => {
                self.last_instant = Some(last_instant.add(duration));

                // Subtract the duration unless it would be an overflow. If so, use the original duration.
                duration = match duration.checked_sub(Instant::now().duration_since(last_instant)) {
                    Some(duration) => duration,
                    None => duration,
                };
            }
            None => self.last_instant = Some(time::Instant::now()),
        };

        duration
    }

    fn change_tempo(&mut self, tempo: u32) {
        self.timer.change_tempo(tempo);
    }
}

Just to clarify, when I'm doing here is calculating what the next tick should "objectively" be and only sleep that amount, even if the tick length is technically longer.


[GLUTEN-7090][VL] fix: Number of sorting keys must be greater than zero

What changes were proposed in this pull request?
This PR aims to fix number of sorting keys must be greater than zero.
(Fixes: #7090)
How was this patch tested?
Add new unit tests

cc @weiting-chen @PHILO-HE could you please review this PR? thanks 😄

@zhztheplayer @JkSelf Thanks for your review :-)


Feature/coverage

Added pytest-cov to backend service to get Coverage report
Updated README to include docker-compose command to get cov report.
Fixed typo's and auto-formatted README
Backend Dockerfile rewritten to multi-stage build to create a ~250MB image instead of ~1.22GB

Amazing! Thanks.


VQA: Attending - Event

[x] intro card copy specs across all sizes: 24/32
[ ] card padding: same on all four sides
[x] intro copy padding: 2x that of normal card padding
[ ] need consistent subheads (sandbox, code labs, etc) across all sizes: 24px
[ ] need consistent body copy across all sizes: 16/24
[x] subheads: bottom margin: 8px
[x] fullscreen map: 96% bg opacity
[x] fullscreen map: regular web content shouldn’t be scrollable

@paulfarning @jeffposnick

@ebidel or @paulfarning : The project has paper dialogs inside on pages and still manages to have expected behavior with iron overlay. If you have some spare time, could you please comment on how the io2016 project got around the paper dialog and iron overlay issue? https://github.com/PolymerElements/paper-dialog/issues/7

Not sure what the overlay issues are but we're not using paper-header-panel, but the app-layout elements instead (https://elements.polymer-project.org/elements/app-layout). Not sure if that's the issue though, but generally, those newer elements try to do less magic.
We also only show the dialog once the page is setup, has layout, etc. That could be some of the overlay issues if you try to show the overlay too soon.


ng update @angular/cli does not update @angular/cli package

With the global @angular/cli package installed and up to date (7.0.3 in this case), running the ng update command in a project that has @angular/cli v7.0.3 installed,  shows that an updated local @angular/cli package is available. Running the command ng update @angular/cli does NOT install the latest version of the package:
ng update @angular/cli
Your global Angular CLI version (7.0.3) is greater than your local
version (7.0.2). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
            Found a modern configuration file. Nothing to be done.
UPDATE package.json (1442 bytes)
UPDATE src/polyfills.ts (3198 bytes)
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 24904 packages in 15.872s
found 0 vulnerabilities

ng6test git:(master) ✗ ng update
Your global Angular CLI version (7.0.3) is greater than your local
version (7.0.2). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       7.0.2 -> 7.0.3           ng update @angular/cli

    There might be additional packages that are outdated.
    Or run ng update --all to try to update all at the same time.

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

Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [X] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions
Platform: Any (windows, MacOS, Linux)
node --version
v11.0.0
npm --version
6.4.1
ng --version

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

Angular CLI: 7.0.3
Node: 11.0.0
OS: linux x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.10.3
@angular-devkit/core         7.0.3
@angular-devkit/schematics   7.0.3
@schematics/angular          7.0.3
@schematics/update           0.10.3
rxjs                         6.3.3
typescript                   3.1.3

Repro steps
ng update @angular/cli
Your global Angular CLI version (7.0.3) is greater than your local
version (7.0.2). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
            Found a modern configuration file. Nothing to be done.
UPDATE package.json (1442 bytes)
UPDATE src/polyfills.ts (3198 bytes)
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 24904 packages in 15.872s
found 0 vulnerabilities

ng6test git:(master) ✗ ng update
Your global Angular CLI version (7.0.3) is greater than your local
version (7.0.2). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       7.0.2 -> 7.0.3           ng update @angular/cli

    There might be additional packages that are outdated.
    Or run ng update --all to try to update all at the same time.

The log given by the failure
No error, but the package is not updated.
Desired functionality
The ng update command should function and install the latest @angular/cli

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.


use glove failed

Thanks for your codes, its helpful!
but some error happend when i run the Train command，error like this:
The CKPT saved here: data/
spatial encoder layer num: 1 / temporal decoder layer num: 3
mode : predcls
save_path : data/
model_path : None
data_path : /home/abc/NewDisk/origin_datasets/ActionGenome/dataset/ag/
datasize : large
ckpt : None
optimizer : adamw
lr : 1e-05
nepoch : 10
enc_layer : 1
dec_layer : 3
bce_loss : False
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 7584 videos and 177330 valid frames
144 videos are invalid (no person), remove them
49 videos are invalid (only one frame), remove them
21643 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 1750 videos and 56923 valid frames
41 videos are invalid (no person), remove them
19 videos are invalid (only one frame), remove them
8636 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

loading word vectors from data/glove.6B.200d.pt
loading word vectors from /home/abc/NewDisk/model_zoo/STTran/glove.6B.200d.pt
__background__ -> __background__
fail on __background__

The program is stuck at this point, so i wonder why?
Thanks!

By default, the print frequency is 1000 iterations. It seems the program is running.

Thanks for your codes, its helpful! but some error happend when i run the Train command，error like this:
The CKPT saved here: data/
spatial encoder layer num: 1 / temporal decoder layer num: 3
mode : predcls
save_path : data/
model_path : None
data_path : /home/abc/NewDisk/origin_datasets/ActionGenome/dataset/ag/
datasize : large
ckpt : None
optimizer : adamw
lr : 1e-05
nepoch : 10
enc_layer : 1
dec_layer : 3
bce_loss : False
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 7584 videos and 177330 valid frames
144 videos are invalid (no person), remove them
49 videos are invalid (only one frame), remove them
21643 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 1750 videos and 56923 valid frames
41 videos are invalid (no person), remove them
19 videos are invalid (only one frame), remove them
8636 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

loading word vectors from data/glove.6B.200d.pt
loading word vectors from /home/abc/NewDisk/model_zoo/STTran/glove.6B.200d.pt
__background__ -> __background__
fail on __background__

The program is stuck at this point, so i wonder why? Thanks!

Have you fixed it?

@leonodelee I have same problem, have you solved it?

请问解决了么？


Load Library Match data in background

@nickshulman This change is to fix the issue you mentioned in an email last week (freezing due to blib queries happening on the UI thread). Brendan mentioned that we should also not populate the toolbar comboboxes until the user clicks/focuses them but I wanted to get your thoughts on this change first.
For some reason a lot of the indentation was weird in GraphSpectrum.cs so I fixed those too.

I wonder whether you should get rid of the "Timer" in UpdateManager. Now that you are querying for spectra on a background thread, is there anything that is happening on the foreground thread which is so time consuming you need to wait before doing it?

That's a good point. I'll try removing the timer and see how it goes.

I wonder whether you should get rid of the "Timer" in UpdateManager. Now that you are querying for spectra on a background thread, is there anything that is happening on the foreground thread which is so time consuming you need to wait before doing it?

@nickshulman I think the timer is still useful. Drawing the graph is slow enough to be noticeable (the original reason for the timer was selecting the combobox and holding the down arrow, so that it cycles through spectra very quickly).

@nickshulman I updated the PR based on your suggestion to use the known cached retention times, rather than doing anything on a background thread. The spectra only get loaded when needed.
I'm not sure what's wrong with the code inspection check.

scrapping this in favor of #2367


Export node cpu metrics in whole cores

Fixes problem of inconsistent unit for cpu metrics.
"kubernetes.io/node/cpu/allocatable_cores" and "kubernetes.io/node/cpu/total_cores" should be expressed in cores like"kubernetes.io/container/cpu/request_cores"
When new SD node metrics where separated from container ones. They where not divided in same way as previously
cc @loburm @kawych

/lgtm

/lgtm

/ok-to-test


Repository management

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?
Today the traefik organization on github contains both commercial projects of traefk labs, and open source projects sponsored and owned by traefik labs.
In a recent effort to secure and harmonize traefik labs repository management, traefik labs made a couple of changes that induced some rights loss for very few maintainers of open source repositories.
I’m creating this issue to clearly discuss our goals and track needed actions:

Traefik Labs wants every maintainer to have every permission needed to fully embrace their role
At the same time, for security reasons, Traefik Labs wants to limit the number of people able to delete/transfer ownership of repositories to a couple of people.

To achieve this, we might need to split organizations between open source and commercial products. Traefik (this organization) being dedicated to open source projects with current maintainers (and more in the future) and another one for commercial products.
This is of course not the only solution, but one of them.

This discussion should be done inside the Traefik maintainer discord not in a public area.

I like things to be as transparent as possible, so I created this issue.
This might be interesting for contributors and potential maintainers to know what is happening.
I'll revert to needs-triage, and I propose we discuss it as documented during the triage process, with other maintainers.
If we make a decision, we'll update with the action plan.

you are confusing transparent and public.

An issue is not a good place for discussion and triage is not the place to discuss this kind of topic. Triage is for the triage of issues, and an issue is not an invitation to a meeting.

Flagging my comment as off-topic, because you don't agree with, is clearly not a good idea.

@ldez I really don't see why this discussion shouldn't be made public.
There is nothing to hide here.
Traefik is an open source project, with an open gouvernance.
Permissions management on the repo should definitely be a public topic.

I agree with the proposal, splitting concerns looks to be a good approach to ease the management of each side and fulfill security concerns.

Thank you @geraldcroes for your proposal.
I close this issue that is opened for more than one year.


Fix not using musicbrainz artist alias in some cases.

A missing alias does not actually indicate that there is no alias.
Track artist information can override recording artist information,
but when it does, it does not contain the artist aliases. So we need
to check the artist itself for it to be sure.
An example for this behavior is http://musicbrainz.org/ws/2/release/1058cc07-d4c0-4db2-8841-31f2daa0589a?inc=artists+media+recordings+release-groups+labels+artist-credits+aliases
In the XML output you can see that track 15 has an artist credit different from the associated recording. While the artist is the same as for the other tracks on the album, the artist information lacks the alias list.

I've taken another look at this and in the process found an earlier issue (#199) that was reported, also detailing exactly this issue.
Code wise I looked at a top-level cache implementation to see how much it improves performance and what's the memory penalty. Memory wise it doesn't seem to be as much of a problem as I originally expected, but performance wise the cache alone is still not nearly enough. I'll try some more things to make this perform better

I think I brought it down to an acceptable performance. These are the stats for my library:
Tracks: 7102
Total time: 2.6 weeks
Approximate total size: 33.6 GB
Artists: 1735
Albums: 437
Album artists: 205

Calling mbsync -p on the entire library with master, timing it yields
real    8m34.550s
user    0m35.836s
sys     0m2.145s

whereas with this change it yields
real    21m23.104s
user    0m35.225s
sys     0m2.182s

I made the unit tests pass, but they probably need more adjustments to properly test everything. What do you think about this now?

Thanks for continuing to look into this unfortunate mess. A few outstanding concerns:

It's still somewhat worrisome that lookups are 2.6x slower on average. This could have a noticeable impact on the importer UI, which is already not exactly a speed demon. Are there any circumstances where we can be sure that we don't need to do these extra requests? For example, if the user doesn't have language preferences configured?
Global, mutable cache structures can cause nightmares for testing (and debugging down the road). Is there any way we can architect this so we don't have to keep module-global data indefinitely? Perhaps only keep the cache around for the scope of a single release?

It's still somewhat worrisome that lookups are 2.6x slower on average. This could have a noticeable >impact on the importer UI, which is already not exactly a speed demon. Are there any circumstances >where we can be sure that we don't need to do these extra requests? For example, if the user doesn't >have language preferences configured?

Yes, this is still something we can do, but it's not really a performance improvement. It just disables the alias lookup completely. I'm afraid, for people that want the alias lookup, this might be as good as it gets. I looked for additional hints we could use from the webservice output, but unfortunately all locale information is only linked to aliases. I thought maybe we could only do the alias lookup if the artist name locale differs from the configured locale, but alas, that won't work :(

Global, mutable cache structures can cause nightmares for testing (and debugging down the road). >Is there any way we can architect this so we don't have to keep module-global data indefinitely? >Perhaps only keep the cache around for the scope of a single release?

I understand the troubles of a global cache. There's maybe some things we can do there, like encapsulating it in a class or some such. However reducing the scope to a single release would severely impact performance. In my code I also store nil values in the cache in order to prevent repeated tries to lookup aliases for artists that do not have any. Dropping that should give us a rough hint at what release level performance would look like and it increased from 21 minutes to 82 minutes.

I thought maybe we could only do the alias lookup if the artist name locale differs from the configured locale, but alas, that won't work :(

Dang, everything about this situation is its own little tragedy! Thank you for looking into that possibility.

Dropping that should give us a rough hint at what release level performance would look like and it increased from 21 minutes to 82 minutes.

:cry:
Okay, given all this, I propose the following three unfortunate steps:

Let's put the whole thing behind a configuration option, off by default. It is tragic that we won't be getting accurate alias information from MB by default, but on balance, I think this is the best compromise for most people.
Let's explore encapsulating the cache state in something non-global. We don't have to stick with it if this seems too messy, but it would be great to avoid creating this potential source of sadness.
Let's continue trying to talk to the MB people (on IRC?) about whether this should be fixed on their end. Even an indication of whether we should do the secondary fetch would be helpful.

Webservice v2 is "stable", and I think it's unlikely to get an update for this. You can try asking @ianmcorvidae of course, but I think it's better to open an issue so Ian et al knows this is something that should be doable when ws/3 rolls around sometime in the (non-near) future - if it's not already on the list.

For reference, @pprkut reported it upstream with MB at http://tickets.musicbrainz.org/browse/MBS-7914

I think we can store that cache on the Click ctx object, and just don't do any caching if we're not inside a Click context. https://github.com/mitsuhiko/click/issues/292 tracks this object becoming globally accessible, I am already using a PoC in another CLI tool of mine.

The idea was that the core of beets doesn't really depend on click's ctx, since absence of an ctx just means no caching.
On 11 May 2015 23:08:11 CEST, Adrian Sampson<EMAIL_ADDRESS>wrote:

Yes, keeping this on a globally accessible context object would be a
good idea (see the discussion in #1415). As a minor detail, though, I'd
prefer to reinvent the wheel a little bit and use a beets-specific
context object so that the "core" of beets does not depend on Click.
So, yes: as per #1415, I'd love to steal more or less your
doubleclick design for a Flask-like context object and bake it into
beets.

Reply to this email directly or view it on GitHub:
https://github.com/sampsyo/beets/pull/988#issuecomment-101047374

There hasn't been any activity on this PR in almost a year and I'm still running into this issue. I applied the patch to master and it resolved my issues with the track artist credit not including aliases.
光田康典 - Chrono Trigger: Original Sound Version - Chrono Trigger
  artist: 光田康典 -> Yasunori Mitsuda

Release: https://musicbrainz.org/release/c71d6600-0b24-46d3-85df-7546ad82883f
In addition, the bug filed on MB hasn't seen any activity in 2 years - http://tickets.musicbrainz.org/browse/MBS-7914
I also found this bug that appears to be similar but didn't fix it for this case either.
Is there any way I can help move this patch along?

Yes, thanks for volunteering!
There's a task list a few comments back. Mostly, we need to put the whole thing behind a configuration option, because it makes all lookups slower, and we need to refactor the cache to avoid using global state.
As far as solving this on MB's end, it doesn't look like that's going anywhere. :cry:

I tried to bring this up when MB was collecting tasks for Google Code-In, but I don't think that got anywhere. Couldn't hurt to just poke them again I guess

See https://github.com/metabrainz/musicbrainz-server/pull/252

That was fast! Thank you very much! :)

Very nice!

The MB fix has been released. I've run a couple tests now and as far as I can see behavior is as expected without this change.
Closing because we no longer need it :)

Woohoo! Fantastic news! :tada:


Update User Guide

Emphasised that the edit command cannot be used on tasks.
Standardised student ID fields to all be known as "student ID"
Updated header for the archive command
Added/removed full stops whenever necessary.
Replaced outdated UI image.
Added banner.
Added glossary.
Fixed documentation bug. Closes #246

Codecov Report

Merging #258 (6b9496d) into master (f7b2dfb) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #258   +/-   ##
=========================================
  Coverage     70.41%   70.41%
  Complexity      727      727
=========================================
  Files           105      105
  Lines          2434     2434
  Branches        325      325
=========================================
  Hits           1714     1714
  Misses          596      596
  Partials        124      124

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 f7b2dfb...6b9496d. Read the comment docs.

LGTM


feat(frontend): 调整集群管理列表为宽窄表交互 #27

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.daryl seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


v3 MutuallyExclusive flags are not included in help text

Checklist

[x] Are you running the latest v3 release? The list of releases is here.
[x] Did you check the manual for your release? The v3 manual is here.
[x] Did you perform a search about this feature? Here's the GitHub guide about searching.

Hi hi! I recognize v3 is alpha software, so my question is more "is this implemented yet or am I doing it wrong?" Assuming it just hasn't been worked on yet, if someone can point me to where I might start investigating I'll see about a PR :)
package main

import (
    "context"
    "os"

    "github.com/urfave/cli/v3"
)

func main() {
    cmd := &cli.Command{
        Name: "test",
        Flags: []cli.Flag{
            &cli.StringFlag{
                Name:  "s",
                Usage: "this works",
            },
        },
        MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{{
            Flags: [][]cli.Flag{
                {
                    &cli.BoolFlag{
                        Name:  "b",
                        Usage: "no display :(",
                    },
                },
            },
        },
        },
    }

    cmd.Run(context.Background(), os.Args)
}

% test -h
NAME:
   test - A new cli application

USAGE:
   test [global options] [command [command options]] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   -s value    this works
   --help, -h  show help (default: false)

The same holds true for subcommands as well.

@joshfrench This feature hasnt been implemented yet. You are welcome to submit a PR. The changes would be primarily in the template.go file which has the template to render help text.

Just getting around to this...
The basic case is straightforward, but once you account for flag categories I can see at least two approaches. The first doesn't discriminate between mutex and regular flags:
cmd := &cli.Command{
        Name: "test",
        MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{{
            Flags: [][]cli.Flag{
                {
                    &cli.BoolFlag{
                        Name:  "b1",
                        Category: "one",
                    },
                },
                {
                    &cli.BoolFlag{
                        Name:  "b1",
                        Category: "two",
                    },
                },
            },
        },
        },
    }

GLOBAL OPTIONS:
   one

   --b1

  two

  --b2

This is flexible but doesn't quite track with my mental model of how mutex flags are meant to be used. The second approach would treat each mutex group as its own implicit category:
cmd := &cli.Command{
        Name: "test",
        Flags: []cli.Flag{
            Name: "s1",
            Category: "one",
        },
        MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{{
            Flags: [][]cli.Flag{
                {
                    &cli.BoolFlag{
                        Name:  "b1",
                    },
                },
                {
                    &cli.BoolFlag{
                        Name:  "b1",
                    },
                },
            },
        },
        },
    }

GLOBAL OPTIONS:
   one

   --21

  ???

  --b1, --b2

This approach is more prescriptive, but is closer to how I would expect things to work. Additionally:

It suggests each flag group might benefit from a Name field.
It does not address what happens if a mutex flag also sets a category, or if/how a user would be prevented from doing so.

Thoughts before I dive into category handling?

@joshfrench Yes option 1 would be good to provide maximum flexibility. But also we can have a check that all the mutex flags should be in the same category. It doesnt make sense to have these flag groups across multiple categories.

@dearchap Is there a better place for that check than the MutuallyExclusiveFlags.check method? That seems aimed at catching user error, not cli developer error.

Alternatively, rather than treating it as an error we could just coerce all the flags in a group to the first (or last?) category discovered.

Yes I think the latter approach of adding a Category field to the group is better.

PR updated! I did add a SetCategory() method to allow mutex groups to propagate their category downward to the flags within the group, which is triggering a docs warning -- I'll wait for a review before doing anything else. Thanks!


An alternative List.filter implementation

This alternative implementation tries to reuse the tail of the list. It does this first by filtering without copying whilst the predicate returns true. If a false is found, the section that has been scanned is then copied and it falls back to a more traditional building or result list, with the exception that it keeps track of the final set of true values in order to paste these to the end of the resultant list, thereby reusing some of the original list, and freeing up the temporary tail for garbage collection.
This gist shows the performance test. This Google doc shows results.
Test info:
Host Process Environment Information:
BenchmarkDotNet.Core=v<IP_ADDRESS>
OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Core(TM) i7 CPU 930 2.80GHz, ProcessorCount=8
Frequency=2767279 ticks, Resolution=361.3658 ns, Timer=TSC

The implementation performs worst when all items except the last are true. It performs best when all items are true, and performs better the longer the number of true items at the end of the list are. But performs for the most part pretty well across the test suite.
I don't think it is a slam dunk that this will be accepted. I think it should be for consideration given it's performance characteristics because it is not an across the board improvement. It was original envisaged to be a memory saving enhancement, rather than a performance enhancement, but it appears to have, for the most part, favourable performance characteristics
NOTE: I have attached this to the most recent 'master' branch, but I can't build from there as I appear not to have access to the nuget repository for VisualCppTools? (I had tested it on at a previous point, so I think I'm OK; unless I failed in my copying and pasting... it's possible...)

I think this is a semi reasonable idea, but of limited applicability.

I'm not quite sure I understand the performance doc, but I see figures like median going from 137 (units of time?) to 23, which, if true, is a pretty darn good performance improvement for filtering. And being one of those programmers that sometimes has to rewrite code imperatively just for performance gain, I would welcome any improvement here.
If the implementation performs (much) better in a large number of cases and slightly worse in some corner cases, I think it is worth considering using it. I'd like to see it applied to List.choose as well, but I don't know if the same algorithm can be applied there.

@abelbraaksma as I understand it, it seems to be an optimization in those cases:

consecutive last N items having predicate return true -> just return the tail of the list from the first matching
several ranges and consecutive last N items having predicate return true -> clone the previous ranges and stitch the matching end tail

Those sound clever but I'm not confident (based on my understanding) that the optimization would be triggered much in real scenarios.
Maybe it is worth printing the number of misses and number of hits for that optimization while compiling a large codebase or simply running a program.

@smoothdeveloper
It is, and I agree with your conclusion :-)

Thanks for the explanation, @smoothdeveloper, it makes more sense now. Though improvements in this area are welcome, if both your analysis is correct I agree it doesn't make sense if it only helps edge cases, as opposed to helping the general case.


Update README.md

Thank you @caiton1 for helping me and and I have submitted the PR #50 please check this one.


Homan's sign

Recommend adding to eponyms for Dix of dvt.

I believe this is already in the eponyms database (since 1998)


Will default async fn be supported?

Hi, me again. Now the trait with default async functions will not be support, say:
use async_trait::async_trait;
use futures::executor::block_on;
pub struct Something<'a> {
    name: &'a str,
}

#[async_trait]
pub trait Abstract<'a> {
    async fn hello(thing: Something<'a>) -> String;
    async fn hello_twice(thing1: Something<'a>, thing2: Something<'a>) -> String {
        let str1 = Self::hello(thing1).await;
        let str2 = Self::hello(thing2).await;
        str1 + str2.as_ref()
    }
}

pub struct Real();
#[async_trait]
impl <'a> Abstract<'a> for Real {
    async fn hello(thing: Something<'a>) -> String {
        String::from(thing.name)
    }
}

fn main() {
    let thing1 = Something{ name: "hello" };
    let thing2 = Something {name: "world"};
    let name = block_on(Real::hello_twice(thing1, thing2));
    println!("name: {}", name);
}

Will get error:
error[E0412]: cannot find type `AsyncTrait` in this scope
 --> src\main.rs:7:1
  |
7 | #[async_trait]
  | ^^^^^^^^^^^^^^ not found in this scope

Thanks! Should be fixed in 0.1.13.


Make RazorLanguageVersion.Experimental round-trippable

When serializing RazorLanguageVersion we serialize the ToString() output of it. However, when reading it back-in via deserialization that the RazorLanguageVersion.Parse doesn't understand the version (1337.1337).

Closing this. If this is important, please reopen and put in appropriate milestone, @NTaylorMullen

It's important for LiveShare and VSCode scenarios.


brackets duplicate line issue

sometimes when i use (ctr+d) to duplicate line it just shift the line to the right (like i pressed tap).
how to solve this

Hi @ToBeM12,
can you give us a repeatable small sample? Does this occur without any extensions (Debug -> Launch Without Extensions)?

I close this issue since there wasn't an answer.


3 or more nested ProviderScopes change the behavior of an autodisposable family provider

Describe the bug
When there are 3 or more nested ProviderScopes, an auto-disposal family provider exhibits different (and wrong) rebuild behavior compared with 1 or 2 nested ProviderScopes.
To Reproduce
Execute this widget inside 3 nested ProviderScopes and use a debugger/ProviderObserver
class MyApp extends HookConsumerWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final family = useState<String>('a');

    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              TextField(onSubmitted: (text) => family.value = text),
              Text(ref.watch(myFamilyProvider(family.value))),
            ],
          ),
        ),
      ),
    );
  }
}

@riverpod
String myFamily(Ref ref, String frozen) {
  return '$frozen family';
}

Alternatively, clone this repo and execute this test: https://github.com/victorcatn/riverpod_issue/blob/main/test/bug_test.dart
The test basically uses a TextField to change the parameter of a family provider but the version with 3 nested ProviderScopes makes different events, I tried to debug it and saw a weird behavior, It seems to get cached results despite having disposed the providers before, and also tries to dispose already disposed providers by recreating them and disposing them immediately.
Expected behavior
riverpod should behave the same no matter the number of nested ProviderScopes

Sounds like a duplicate of #1943 (over 4 months ago) which has a possible fix #2341 (we haven't tried this yet). Our workaround has been to control the lifetime of our providers using keepAlive (which is a major pain).

Thanks @rich-j
This is indeed a duplicate, and the PR #2341 fixes it for me

Thanks @rich-j
This is indeed a duplicate, and the PR #2341 fixes it for me


Add **kwargs to SocketManager

Adds **kwargs to SocketManager constructor.
These are simply passed to socketio.AsyncServer, as it supports a number of options not supported by SocketManager.
This would also remove the need for issue #10 and its associated PR #29.

Thank you for your contributions 🙏🏻


feat: server-side sorting for files

Sorting for the table on the homepage is now calculated server-side so it will sort through all files instead of just the ones visible on that page.
https://user-images.githubusercontent.com/14848722/230739044-51e76619-223a-44b9-82d9-bd17e6047bfc.mp4
the same can be implemented easily for the files page, but im not sure where to put the selection for that.

the same can be implemented easily for the files page, but im not sure where to put the selection for that.

It's fine for now, there's plans to move the table to the files page anyway.


Ground Truth Detector - rejecting observations at same location

When the detector gets an observation from the ground truth information of AI2Thor, this line checks if the detection has happened at the exact same location and says don't count it as a detection because it happened more than once at the avg_loc
https://github.com/zkytony/cos-pomdp/blob/8b5bf36d028a0191d7c96ed757f62f4e2a77716d/cospomdp_apps/thor/detector.py#L152
What is the reason for this? would AI2Thor ground truth ideally not return the same location everytime for the object, so why would rejecting it be useful?
(It seems to be occurring in some scenes but not others, not sure why)

max_repeated_detections is a tunable parameter. The intent here is to avoid re-considering evidence (i.e. detection of correlated objects) after they have been used. Intuitively, suppose you're looking for a remote control and believe it's nearby a pillow, but there are multiple pillows in the scene. If you detected a pillow, but didn't find the remote control nearby, you'd like to "forget" about that pillow. Of course due to randomness in search, we don't discard an evidence the first time we use it but discard it after using it max_repeated_detections  number of times.

Got it. It makes sense that it is being done only for correlated objects and not the target objects. Thank you.


JSON file with MCParticle tree cannot be opened

This is not the highest priority, but we have encountered an issue with opening some json files, e.g. the following one (which contains a rather large MCParticle tree from a calorimeter shower). I don't think the size of the file is a problem, but I suspect that potentially a slightly newer version of podio or EDM4hep could be one?
test_mc_shower.edm4hep.json
What we get is the following error:

If you know where the error is coming from, I can also try to have a look myself to see if I can fix this.

So it turns out that the file only has Event 1, so when selecting an event, it automatically chooses 0, but it doesn't exist 😄. However, in that case we could improve the event input, and automatically select the first event it finds.

Ah right, I thought I had tried to go to 1 in the selection with the same issue, but it does indeed seem to work if I select the event number. Can the file be partially read to populate a dropdown menu to select the event?
Another issue that I observed with this JSON file is that at least chrome really struggles to display it (goes up to 3GB of RAM for me and I still don't see a graph :sweat_smile:). Might just be that this file with approx. 18k MCParticles is too big to be displayed. I wouldn't too much emphasis on the performance part yet, but at least we would have an input file to use for performance testing and developments.


TessPDFRenderer writes wrong PDF format

Environment

Tesseract Version: 4.1.1
Platform: (Docker Container) Linux f31a8bcb5cbc 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux

Current Behavior:
(Reproduction of problem with docker below).
ProcessPages() writes data to PDF file but PDF can't be opened and is invalid.
int PdfOutput(char* input, char* output) {
    tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
    if (api->Init("/usr/share/tesseract-ocr/4.00/tessdata", "deu", tesseract::OEM_DEFAULT)) {
        fprintf(stderr, "Could not initialize tesseract.\n");
        return 1;
    }

    PIX *sourceImg100 = pixRead(input);
    if (!sourceImg100) {
      fprintf(stderr, "Leptonica can't process input file: %s\n", input);
      return 2;
    }
    api->SetImage(sourceImg100);
    api->SetInputName(input);
    api->SetOutputName(output);

    tesseract::TessPDFRenderer *renderer = new tesseract::TessPDFRenderer(
              output, "/usr/share/tesseract-ocr/4.00/tessdata", false);

    if (!renderer->happy()) {
         printf("Error, could not create PDF output file: %s\n",
                strerror(errno));
         delete renderer;
         return 3;
    }

    bool succeed = api->ProcessPages(input, nullptr, 0, renderer);
    if (!succeed) {
      fprintf(stderr, "Error during processing.\n");
      return 4;
    }
    api->End();
    pixDestroy(&sourceImg100);
    return 0;
}

the functions returns 0 and prints no errors.
Used image:

The created PDF:
testjpg.pdf
Using tesseract cli, the created PDF is correct:
outfile.pdf
I've noticed some differences in the PDFs, especially at the end of the file, looking like there is a footer or something like that missing (left cli, right my function):

Reproducing
git clone git@github.com:dnnspaul/gosseract.git
git checkout tesseract/bug/3652

docker build -t tessbug .
docker run -it -v $PWD/tmp:/tmp tessbug go run main.go

The corrupt PDF is in the subdirectory tmp "testjpg.pdf".
Expected Behavior:
The written PDF file is valid and openable.

https://github.com/tesseract-ocr/tesseract/blob/6360e60877425747c207f296852b9c1d9298159f/src/tesseract.cpp#L552

Try to examine what missing in your implementation compared to what Tesseract does:
https://github.com/tesseract-ocr/tesseract/blob/6360e60877425747c207f296852b9c1d9298159f/src/tesseract.cpp

If you still can't figure out how to do what you want to do, try your luck in our forum.


Default request interval time defined in the backendHttpSettingsCollection is 20 seconds not 30

Default request interval time defined in the backendHttpSettingsCollection is 20 seconds not 30

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 66c070b6-1c47-4c7f-b928-317a8c8b452f
Version Independent ID: 903191b7-6a01-1381-bf34-7353c2a8ece6
Content: Troubleshoot Azure Application Gateway Bad Gateway (502) errors
Content Source: articles/application-gateway/application-gateway-troubleshooting-502.md
Service: application-gateway
GitHub Login: @amitsriva
Microsoft Alias: amsriva

@judyanndixon , Thanks for your feedback. We are looking into this query and will update you as soon as possible.

@judyanndixon , Could you please let us know the source where it has been listed as 20 seconds. Thank you.

https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-troubleshooting-502#request-time-out
When a user request is received, Application Gateway applies the configured rules to the request and routes it to a back-end pool instance. It waits for a configurable interval of time for a response from the back-end instance. By default, this interval is 30 seconds . If Application Gateway does not receive a response from back-end application in this interval, user request would see a 502 error.
In the current portal when I added a new http setting the request timeout defaults to 20 seconds.
Judy
From: "SubhashVasarapu-MSFT"<EMAIL_ADDRESS>To: "MicrosoftDocs/azure-docs"<EMAIL_ADDRESS>Cc: "judydixon"<EMAIL_ADDRESS>"Mention"<EMAIL_ADDRESS>Sent: Friday, March 22, 2019 11:28:37 AM
Subject: Re: [MicrosoftDocs/azure-docs] Default request interval time defined in the backendHttpSettingsCollection is 20 seconds not 30 (#27797)
[ https://github.com/judyanndixon | @judyanndixon ] , Could you please let us know the source where it has been listed as 20 seconds. Thank you.
—
You are receiving this because you were mentioned.
Reply to this email directly, [ https://github.com/MicrosoftDocs/azure-docs/issues/27797#issuecomment-475664964 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ADn5u1HxcEvFiy-YJjy4uVpKyl9qXgmpks5vZPalgaJpZM4cDm1H | mute the thread ] .

article updated
#please-close


try to setup coveralls

Changes Unknown when pulling 26b24aa4c0d5c1fbb930ced5299e33265cb6967c on kirillDanshin:coveralls-1 into ** on t0pep0:master**.

done. it works.


Fail to install mise v2024.6.2

Describe the bug
Mise v2024.6.2 can't be installed via mise self-update.
To Reproduce
Run mise self-update
mise self-update
Checking target-arch... mise-v2024.6.2-macos-arm64.tar.gz
Checking current version... v2024.6.1
Checking latest released version... v2024.6.2
New release found! v2024.6.1 --> v2024.6.2
New release is compatible
mise ReleaseError: No asset found for target: `mise-v2024.6.2-macos-arm64.tar.gz`
mise Run with --verbose or MISE_VERBOSE=1 for more information

Expected behavior
Mise can be updated.
Additional context
There is no binaries in GitHub release https://github.com/jdx/mise/releases/tag/v2024.6.2 for some reason:

I think this is likely an issue with CI failing to compile and upload the relevant assets to the release.
If I could make a recommendation:
Assuming that mise self-update uses the /releases/latest API to discover new releases, a good operational change might be to cut new releases as pre-releases and only set them to the latest, non-pre-release if assets are uploaded successfully.

Looks like it's fixed for v2024.6.2! Thank you maintainer that fixed it!

Confirm, fixed, thanks!


Event description markdown renderer

Basic Information
Give user's the ability to style the event description. Use https://github.com/remarkjs/react-markdown or another library if you prefer. Don't worry about replacing the text field with a WYSIWYG editor, keep it simple.
Other Information
[Are there any additional information that we should know about?]

I believe this issue requires issue 57 to be done first?


Move functions in services to services_rules

@calmacx could you fix the merge conflicts please and then I'm happy for you to squash & merge.


xSQLServerAlwaysOnAvailabilityGroupReplica: Added EndpointPort and EndpointUrl as read-only properties to the schema

Pull Request (PR) description
Added EndpointPort and EndpointUrl as read-only properties to the schema.
This Pull Request (PR) fixes the following issues:
Fixes: #477
Task list:

[X] Change details added to Unreleased section of CHANGELOG.md?
[X] Added/updated documentation, comment-based help and descriptions in .schema.mof files where appropriate?
[ ] Examples appropriately updated?
[ ] New/changed code adheres to Style Guidelines?
[ ] Unit and (optional) Integration tests created/updated where possible?

This change is

Codecov Report

Merging #803 into dev will not change coverage.
The diff coverage is n/a.

@@         Coverage Diff         @@
##            dev   #803   +/-   ##
===================================
  Coverage    96%    96%
===================================
  Files        30     30
  Lines      3256   3256
===================================
  Hits       3139   3139
  Misses      117    117

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


[FLINK-14247][runtime] Use NoResourceAvailableException to wrap TimeoutException on slot allocation timeout

What is the purpose of the change
This PR is to use NoResourceAvailableException to wrap TimeoutException on slot allocation timeout. This makes the error easier to understand for users.
Brief change log

Use NoResourceAvailableException to wrap TimeoutException on slot allocation timeout before triggering error handling
other hotfix changes see each commit

Verifying this change

Added unit tests

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Merging as soon as build is green.


kanidm: init at 1.1.0-alpha.7

Description of changes
This packages the current alpha release of kanidm, including the work-in-progress web UI (which was the only bit of packaging that had to deviate from standard buildRustPackage stuff).
You can learn more about kanidm here: https://github.com/kanidm/kanidm#kanidm
This adds just the package (which includes the kanidm cli, notably, a useful tool for interacting with hosted kanidm servers).
In a future PR, I plan to also add a NixOS module for running the kanidm server.
There's additional packaging work that could be done, notably nixos pam, nsswitch, and ssh key integration options, but I also think those can be done in a future PR.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] Tested, as applicable:
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
Yes, verified the kanidm server ran (with the upstream './examples/insecure_server.toml' config), and verified the web UI worked correctly.
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Oh, oops, I totally missed that https://github.com/NixOS/nixpkgs/pull/143134 already exists.
Closing in favor of that one, it's better.


sort: Make -z give null terminated output (to be like GNU coreutils)

I think I brought this up in IRC some time ago but nothing ever happened.

Sending to the mailing list instead.


split_at for OuterIter

This PR implements split_at for OuterIter (see #81). It's still a work in progress as there is one API point I'm not sure about. The current implementation panics if the split index is out of bounds, but there is an alternative: the returned left iterator could be the same as the original iterator, and the right iterator would immediately return None.
Also the method needs documentation but it'll wait until the precedent point is decided.

OuterIterMut also needs split_at (and it's the primary one since it can not be implemented by the user, just like split_at_mut for a slice).

Panic seems fine. Our role model is slice's split_at, split_at_mut
API wise we can use self receiver and name split_at for both I think. Consistency is the best? Then we don't need to copy the dimensions twice (not sure if the compiler can improve the situation and optimize it out).

Indeed the API feels nicer when taking self by value. So it's implemented for OuterIterMuttoo now.

Nice. I guess OuterIter already has a Clone impl. If not, we'll add it later.

There was no Clone impl on OuterIter, so I've just added one.

I've added special handling to prevent UB when index == len. I'll check it again tomorrow, and I'll probably use a macro to factor out the implementation (nearly forgot to fix the UB in the mutable case...).

It looks all good to me.

I've just factored both implementations using a macro. If it's ok for you I think I'm done :)

Thanks!
I'll change a final thing, just style. I think I prefer life = self.life for some reason, just to copy the old "value" along.

I had never thought of the life = self.life style, I like that too, it makes it more explicit what the resulting lifetime will be.


1Mhz oscillator added - findings

Hi Rob,
Thanks for all the great libraries for Arduino!
I tried the AD9833 (breakout boeard) and it works great.
I also changed the crystal oscillator from 25Mhz to 1Mhz (really easy with a heatgun on the breakout board).
That also works great!
I used the Low level API functions and perfect results.
I think there is a misstake in the documentation:
it says: void writeFrequencyRegister(uint8_t channel, uint32_t freq) channel = 0 or 1, freq = 0 .. 134217728
But I think 134217728 is only half of the possibilities. The datasheet says 2^28, so 268435456.
I'm using the AD9833 for audio, so I cannot hear if it is correct.
But when I changed to the 1Mhz crystal and applied the fMCLK/2^28 × FREQREG function, my tuner said 440 spot on at writeFrequencyRegister(0, 118112)
Greetings,
Bas

Thanks for all the great libraries for Arduino!

You're welcome

changed the crystal oscillator from 25Mhz to 1Mhz (really easy with a heatgun on the breakout board).

Is that a desoldering heat gun or a paint stripper alike?
Normally one uses something like cupper desolderstrips e,g, https://www.tinytronics.nl/shop/nl/gereedschap-en-montage/solderen/verbruiksartikelen/desoldeerlint/desoldeerlint-1mm-1.5m

I think there is a misstake in the documentation:
it says: void writeFrequencyRegister(uint8_t channel, uint32_t freq) channel = 0 or 1, freq = 0 .. 134217728
But I think 134217728 is only half of the possibilities. The datasheet says 2^28, so 268435456.

The code does use the 268435456.0 so indeed a documentation
  uint32_t fr = round(_freq[channel] * (268435456.0 / 25000000.0));

  writeFrequencyRegister(channel, fr);

But when I changed to the 1Mhz crystal and applied the fMCLK/2^28 × FREQREG function, my tuner said 440 spot on at writeFrequencyRegister(0, 118112)

Sounds like a perfect A.
What happens if you use the high level setFrequency(440);?
Does it give the expected 440 Hz? I assume it will be factor 25 lower?  17 Hz
Maybe test setFrequency(440 * 25); resulting in 440 Hz (A).

Anyway, the library should have a means to adjust the frequency of the crystal oscillator.
That would allow you to use the

bool setCrystalFrequency(uint32_t crystal = 25000000)
uint32_t getCrystalFrequency()

Will create a new version today.

I used a desoldering heat gun. Because the crystal has it's connections on the back of the package.
I used 400 degrees / 80 windspeed and circeld around. It came of really easy.
Then I cleaned the pads with the solder wick (your link). I added some flux on the solder wick, so the wick sucks in the solder (tin) really easy. Then slowly move away from the pad and they will be clean.
The crystal is a 7050 / 1Mhz
Then I used type 4 solder paste and reheated and perfect!
If you don't have a heatgun, I can send you some modded breakout boards ;-)

What happens if you use the high level setFrequency(440);?
Does it give the expected 440 Hz? I assume it will be factor 25 lower? 17 Hz
Maybe test setFrequency(440 * 25); resulting in 440 Hz (A).
--> That works as expected

Anyway, the library should have a means to adjust the frequency of the crystal oscillator.
That would allow you to use the
bool setCrystalFrequency(uint32_t crystal = 25000000)
uint32_t getCrystalFrequency()
-->  That would be even easier!

@bastenhoor
Created a develop branch with the two function named above. Build is running so there might be some minor tweaking needed.
What I measured is that the performance of setFrequency() dropped from 44 us to 76 us on my UNO.
That is almost twice as slow, don't know if this is a showstopper for you or other users.
Would still allow to change the frequency 10.000++ times per second, so I expect (hope) it will be OK.
Alternative is to define a const float crystal factor = 2^28 / crystalfrequency
That means modifying the lib and only have a compile time adjustment once.
I prefer to keep the runtime adjustments as it would also allow e.g. temperature compensation of the oscillator.
For now it is an experimental feature and I have to see if it results in problems.
Note to myself: There is also the alternative to create a derived class with the adjustable crystal functions as extra.

@bastenhoor
If you have time can you verify the develop branch? (I have not tested with hardware yet).

(thank for your feedback about the soldering gun et al.).

Build succeeded, created a PR of the develop branch.


boxcutter release v2.0.16 does not have parallel tools installed

The current boxcutter release (v2.0.16) on atlas does not appear to have parallel tools installed:
==> centos72: Machine booted and ready!
==> centos72: Checking for Parallels Tools installed on the VM...
==> centos72: Parallels Tools were not detected on this VM! They are required
==> centos72: for shared folders, time sync and more. If shared folders are not
==> centos72: working on this machine, please install Parallels Tools within the
==> centos72: virtual machine and reload your VM.

run into the same error while building a fresh box with command /bin/box build centos72 parallels following message has been loged while building:
==> parallels-iso: Connected to SSH!
==> parallels-iso: Uploading Parallels version info (12.0.2)
==> parallels-iso: Uploading Parallels Tools for 'lin' to path: 'prl-tools-lin.iso'
==> parallels-iso: Provisioning with shell script: script/fix-slow-dns.sh

(...)
 parallels-iso: ==> Installing Parallels tools
 parallels-iso: mount: /dev/loop0 is write-protected, mounting read-only
 parallels-iso: /mnt/install: line 102: syntax error near unexpected token `>'
 parallels-iso: /mnt/install: line 102: `		exec 3>&1 4>&2 &> >(tee -a "$LOG")'

any hint where to look?

see PR: Parallels12 bash #57
this solves my issue, thanks!

Parallels tools are now in the images on Atlas