Implemented "Tags" and sorting of results.

As discussed in #23.

FYI. VSCode decided it wanted to reformat the data file when I was modifying it. My apologies.

No, that's a fine review.
My goal with the approach was to make it simple to follow, stick to idiomatic JS style and native functions, and allowing the approach to sort each chunk asynchronously if needed in the future. I admit I may have over-engineered it a bit given that last point.
That said, thank you for making me realize I can simplify this a bit. Rather than using our own compare function within the sort, we can actually just use String.prototype.localeCompare. I also realized I can eliminate the applySort function entirely using map. I will change this around a bit.

Ok, take a look at that. A couple notes:

There is now only one function for the sort within in the saga, the aptly named sortResults.
I kept with the buckets approach since the native sort method in JS is a destructive sort. Splitting the tags into sorted buckets is just simpler to manage rather than dealing with a more complicated comparator.
The final step is using a flatMap, sort, and localeCompare. Looks much cleaner and localeCompare ignores accents by default so more reliable as well.

No worries, I appreciate the reviews regardless of your experience with the language. It's always helpful and you always have good comments.
FWIW, there are libraries (such as Ramda) that give us some better tools with which to sort, combine comparators, and other things that we could bring into the project, but they can add a fair bit of extra JavaScript that needs to be downloaded and parsed before the site loads, and I don't think we've reached the point where the value outweighs the cost quite yet.

Sure, there are libraries ... for ... everything. One of my main difficulties when it comes to getting a grip on JavaScript is that there is no standard or best practice. I mean, for nothing. Not at all. A quick websearch reveals things like https://github.com/stoeffel/awesome-fp-js , and there are literally hundreds of resources for the overly specific topic of functional programming in JS. They all have their pros and cons, and I cannot imagine someone claiming to judge which of them is "better" than another, and how many of them only consist of a GitHub repo with the last of 3 commits having been done 5 years ago.
(This may sound like a rant, but I think there are some parallels to the glTF projects list in that regard - and on the linked page, "Ramda" is the first one in the list, so there even is a parallel to this specific PR ;-))

On a more technical note:

I think that https://github.com/KhronosGroup/glTF-Project-Explorer/issues/23 can be closed now (I'll just do this - when there is demand for refinement or things like the ideas of ~"Using number of GitHub stars for sorting", it can be reopened or brought up as another issue)
I considered adding information about the tags in the list of supported properties in the README. But since the tags are currently only used internally, and should only be added by maintainers, I think it should (intentionally) not be mentioned there.


[BUG/COMPAT] Conflict with Enchancement

Enchancement is a mod that revamps enchantments:
https://www.curseforge.com/minecraft/mc-mods/enchancement
https://github.com/MoriyaShiine/enchancement
Enchancement adds an enchantment called "Slide", which allows you to slide (which makes you go crawl) and have an increased crawl speed. However, with this mod installed, it seems that enchantment doesn't work.
Current bugged behaviour: Using the Slide enchantment doesn't make you crawl, and instead makes you sneak after crawling (sliding) for a brief second. Crawling also doesn't have any speed boost when using the crawl keybind or by getting put into a crawl position.
I already discussed this with MoriyaShiine, who announced that the compatibility issue needs to be resolved in this mod as he can't do it in Enchancement.

Two years passed, phew..
Can't reproduce, at least in MC 1.21.x; won't fix for previous versions (lazy).
https://github.com/user-attachments/assets/6c6ab16a-369c-4111-85c6-24d8ebc71434


move radio button to headless architecture

Hi @brandontrabon I need a review.

Thank you @brandontrabon. I will take my time to work on it this week.


Add Sensu logo to SimpleIcons

It would be great for us to have badges that users could click to take them to the asset page and download the asset. Something like:

Or

^ Could be embedded in every asset page. What's lacking is the Sensu logo. In order to get this pulled into Shields, there's a bit of yak shaving that has to happen with the logo.
Here's what needs to happen: https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#adding-or-updating-an-icon
Ideally, the link to the badge/asset download page could be automated as part of the build/release process, but that may be another thing to tackle.
Badge/icons sources
https://shields.io
https://simpleicons.org/

Logo's been added to simpleicons. Working on making the badge once Shields pulls it in.


SafariDriver stops working on reaching a certain page in Mac OS X version 10.9.3 and Safari 7.0.3

Our selenium grid is setup on GridExtras. All our testcases run properly on the MAC setup on Gridextras. But there is a certain client URL which loads through the safari driver and after that nothing happens, the driver basically stops and finally the MAC node releases the browser due to in browser time out. The application under test is developed on DOJO framework.

@sohammukherjee  Which version of Selenium Grid Extras? I know there is a bug with Selenium 2.46.0 (released on June 4th) that had a fix commited June 9th. So hopefully the next version of selenium works with Safari. I will test this out after a new selenium release.

Yes it works for me. Thanks.


remove spaces and lang tags from key values

Key values must be spelled with ultimate care because... well, they are key.
This is similar to https://github.com/Sveino/Inst4CIM-KG/issues/6 but worse.
Extraneous spaces in key values are NOK because:

People will use these values in queries
In some cases SPARQL updates will upgrade strings to things, i.e. use them in URLs

Bad examples that come from https://github.com/Sveino/Inst4CIM-KG/issues/10, https://github.com/Sveino/Inst4CIM-KG/issues/38:
cim:UnitSymbol.VA a owl:NamedIndividual, owl:Thing ;
  rdfs:label "VA "@en ;
  eq:isenum "True" ;

cim:UnitMultiplier.M a owl:NamedIndividual, owl:Thing ;
  rdfs:label "M "@en ;

cim:Temperature.multiplier
  sc:isFixed "True ";
  dy:isFixed "True".

"VA" and "M" are SI unit and multiplier. SI is international, so these codes cannot have lang tags
The last one is worst: some profiles map isFixed to a value with space, others without a space

On the spaces. It will be good to know in which RDFS you find this. I checked in UML and I see that there are no spaces. It could be a bug in RDFS export
if this is only in the 501 Ed2 Beta - I expect this is a bug in CimSyntaxGen prototype that was done 4 years ago
Also as a background. It looks like we have an agreement now to exchange in basic units i.e. no M but in form 1e6

@griddigit-ci

this is https://cim.ucaiug.io/ns#UnitSymbol.VA. It is defined in IEC61970-600-2_CGMES_3_0_0_RDFS_501Ed2CD_DL and 7 more profiles
See https://github.com/Sveino/Inst4CIM-KG/issues/38 about "M"

We checked, this only happens in Ed2 not in 2020.

the "en" lang tag is not appropriate for code values.
Eg "VA" and "M" are SI unit and multiplier respectively.
SI is the international system of units, so these codes cannot have lang tags.
This query finds 842 enumerations whose label is marked @en:
PREFIX cims: <http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#>
select * {
  ?x ?p ?y; cims:stereotype "enum"
  filter(lang(?y)="en")
} order by ?x

Examination shows that the following consist entirely of codes, so we'll remove the lang tag:
cim:Currency cim:IfdBaseKind cim:PhaseCode cim:StaticLoadModelKind cim:UnitMultiplier cim:UnitSymbol cim:WindingConnection

fix14-langTagInCodes-47.ru. Asking @Sveino and @griddigit-ci to approve (re the last comment above).

https://github.com/Sveino/Inst4CIM-KG/issues/93 asks to remove lang tag from labels (and add to comments), which is a stronger version of this.


fix: walletconnect on Optimism

Description
Recent changes, adding l1GasLimit and ``l1GasPricekeys as intersection types in theOptimismChainAdapter.ts`, broke WalletConnect for Optimism.
This PR adds a check to ensure that we are only looking up by valid keys when accessing gasPrice.
Pull Request Type

[x] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)
N/A
Risk
Small.
Testing
We should now be able to use Optimism with WalletConnect again.
Go to https://react-app.walletconnect.com/, connect to the SS Native wallet, and ensure Optimism requests work as expected.
Engineering
☝
Operations
☝
Screenshots (if applicable)
N/A

Current dependencies on/for this PR:

develop

PR #4530

PR #4531   👈

This comment was auto-generated by Graphite.


Open wrong file on the browser

Opened a different file and clicked "Go live" but see a different file on the browser. Navigated locally on my machine, deleted that file even in my Trash box, and close vs code, reopened, clicked "Go live" still the deleted file is running.

/needsMoreInfo
Are you using https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer extension for "Go live"? If yes - you should report this problem in extension's repo.


Running the plugin in parallel fails

When running the Jenkins CodeBuild plugin (24337ae) on Jenkins (version 2.32.3) in parallel the plugin will fail with:
[AWS CodeBuild Plugin] Uploading source to S3.
[AWS CodeBuild Plugin] channel is already closed

To reproduce you need to have a CodeBuild project and need two Jenkins jobs running in parallel which checkout from git (different branches) and use the plugin with "jenkins" as source.

I'm having trouble reproducing this. Are you using a Jenkins Pipeline to run these jobs in parallel?

I see the problem now. As a workaround, I would suggest setting the number of executors per node to one or unchecking the "Execute concurrent builds if necessary" box in your project configuration. We're working on a fix for this.

https://github.com/awslabs/aws-codebuild-jenkins-plugin/commit/63aeb32364775d470fb1c6cde8ea5e5980c401b3
Thank you for bringing this to our attention!


multi-choice of files in the web interface

currently, the GUI allows choosing only one file every time.
If you can pick a large set of files at once and then convert them and download them together - that would be great.
thank a lot.

Especially for many files drag and drop support would also be helpful.
Conversion of many files would still only return a single download, so for example a zip file with the converted files could be returned.
But maybe a Web API would even be better for handling lots of files.

For batch transformations I would suggest to use the command line tools, e.g. something like
for filename in *.alto; do
   docker run --rm -it -v "$PWD":/data ubma/ocr-fileformat ocr-transform alto2.0 hocr "$filename"
done

Maybe we could allow multiple files directly as an argument for the CLI scripts.
However, I am skeptical that for larger transformation tasks the Web GUI is suitable or that a Web API is the direction we should go to.

BTW there is already some kind of Web API (but not documented), e.g. https://digi.bib.uni-mannheim.de/ocr-fileformat/ocr-fileformat.php?do=transform&from=alto2.0&to=hocr&url=https://rawgit.com/kba/ocr-fileformat-samples/master/samples/alto/2.0/wetzel_reisebegleiter_1901_0021.alto .


OBJC compile error:  " ld: library not found for -lBoringSSL "

What version of gRPC and what language are you using?
gRPC  1.4.2
What operating system (Linux, Windows, …) and version?
Mac OS Sierra 10.12.3
What runtime / compiler are you using (e.g. python version or version of gcc)
Xcode  Version 8.3.3
What did you do?
I download the Objc example successfully,  Install gRPC plugins and libraries successfully, install pods successfully. When I open the app project with Xcode and run the app in an iOS simulator. There's a compile error : " ld: library not found for -lBoringSSL ".  I don't know how to solve it. I am very anxious because of it
Error log:
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/BoringSSL'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/HelloWorld'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/Protobuf'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/gRPC'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/gRPC-Core'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/gRPC-ProtoRPC'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/gRPC-RxLibrary'
ld: warning: directory not found for option '-L/Users/didi/Library/Developer/Xcode/DerivedData/HelloWorld-dypfccwepcxilddenmanmcguycmb/Build/Products/Debug-iphonesimulator/nanopb'
ld: library not found for -lBoringSSL
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is this still an issue?


Add sub resources list to parent resources

Sub resources, especially those which do not have their own ARNs (e.g. inline policies), are currently quite difficult to discover as they require manually assembling the custom ARN to pull them out (or querying all subresources of that type and figuring out which ones belong to the resource you're interested in).
Populating an attribute into storage which lists the subresources' URNs will be easily maintainable and make resource discovery much easier.

Fixed in #106


Addon repository not working

Hi, currently trying to get burst installed through the repository (had to manually push the actual addon), but without any luck. It then tells me to install it through the repository, but when I press the Element Repository, it says "Could not connect to repository". Any ideas what I can do? I'm happy to send the logs but I need to know where to find them.

Please post the full kodi.log
http://kodi.wiki/view/Log_file/Easy

Thanks, here it is: https://pastebin.com/4XW06uJN

try reboot 2 or 3 times works four mi

Don't see any messages from the plugin.
Try opening this url on you Kodi device - http://elementum.surge.sh/packages/elgatito/plugin.video.elementum/addon.xml , maybe it's blocked or something like that.
This link should work after all - http://<IP_ADDRESS>:65220/repository/elgatito/plugin.video.elementum/addons.xml.md5

Okay, that path url is definitely working. Nothing is blocked on my network as far as I'm aware, so all should work. I will see if I can clear the whole thing and reinstall it

This works fine now. Issue #23 is likely solved too, but I'm testing it now. Will close it if it's okay.


Consider renaming basic data structures

DonutDataset - currently represents one item in graph - not ideal to call this ...set
DonutData - currently contains list of DonutDatasets and graph parameters - not ideal call this data because it's both raw data and configuration / parameters
DonutConfig - seems ok

Do we want to rename these data structures in the both versions of the library? (I think that only apply for DonutDataset)

DonutDataset -> DonutSection

DonutData -> DonutModel


Image build

This change is

Codecov Report

Merging #149 into master will decrease coverage by 4.07%.
The diff coverage is 2.4%.

@@             Coverage Diff              @@
##             master     #149      +/-   ##
============================================
- Coverage     25.21%   21.13%   -4.08%
- Complexity      203      204       +1
============================================
  Files            45       55      +10
  Lines          1868     2266     +398
  Branches        169      201      +32
============================================
+ Hits            471      479       +8
- Misses         1342     1732     +390
  Partials         55       55

Impacted Files
Coverage Δ
Complexity Δ

...ostyasha/yad/connector/DockerCloudConnectorId.java
8% <ø> (ø)
0 <0> (ø)
:arrow_down:

...github/kostyasha/yad/DockerSimpleBuildWrapper.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...ha/yad/connector/CredentialsYADockerConnector.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

.../github/kostyasha/yad/other/VariableSSLConfig.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...thub/kostyasha/yad/steps/DockerBuildImageStep.java
0% <0%> (ø)
0 <0> (?)

...github/kostyasha/yad/commons/DockerAuthConfig.java
0% <0%> (ø)
0 <0> (?)

...ithub/kostyasha/yad/commons/DockerAuthConfigs.java
0% <0%> (ø)
0 <0> (?)

...ha/yad/steps/DockerBuildImageStepFileCallable.java
0% <0%> (ø)
0 <0> (?)

...thub/kostyasha/yad/steps/DockerImageComboStep.java
0% <0%> (ø)
0 <0> (?)

.../java/com/github/kostyasha/yad/utils/LogUtils.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

... and 18 more

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 d569c55...58d4bf0. Read the comment docs.


[OpenCL] Refactor cl_program generation

I have encountered a few pathological bugs in the opencl compiler provided on the snapdragon android platform (e.g. opencl compiler hung for 5+ hours in call to clBuildProgram, and non-deterministic emission of cl_a6x_cmdbuf_mgr_submit_ibs). I've isolated them into a minimal reproducible example, and find that they occur only when all kernels are created from a single cl_program. If instead a cl_program is created for each kernel, these issues are avoided.
This PR proposes the addition of a kernel primitive delimiter to be added to the OpenCL code generation, and for the OpenCL module runtime to utilize this delimiter to build and cache separate cl_programs for each generated kernel source.

Thanks @csullivan This is merged


[SPARK-13023][PROJECT INFRA][BRANCH-1.6] Fix handling of root module in modules_to_test()

This is a 1.6 branch backport of SPARK-13023 based on @JoshRosen's https://github.com/apache/spark/commit/41f0c85f9be264103c066935e743f59caf0fe268.
There's a minor bug in how we handle the root module in the modules_to_test() function in dev/run-tests.py: since root now depends on build (since every test needs to run on any build test), we now need to check for the presence of root in modules_to_test instead of changed_modules.

LGTM pending Jenkins.

Test build #57172 has started for PR 12743 at commit 237fd74.

Test build #57172 has finished for PR 12743 at commit 237fd74.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57172/
Test PASSed.

Merged build finished. Test PASSed.

Thanks. Merging to branch 1.6.


[PDI-17956] fixed fields toggle between Edit/Add for "Decrypt files w…

…ith PGP" and "Encrypt files with PGP"

correct indices for Edit listener logic
added UserID and Action Field for Encrypt PGP
added Passphrase for Decrypt PGP

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

License header violations

:heavy_exclamation_mark: Copyright year is not the current year on ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java. Found 2017. Was expecting 2019

:heavy_exclamation_mark: Copyright year is not the current year on ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java. Found 2017. Was expecting 2019

:heavy_exclamation_mark: Couldn't find acceptable copyright on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable license on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable copyright on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable license on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

License header violations

:heavy_exclamation_mark: Copyright year is not the current year on ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java. Found 2017. Was expecting 2019

:heavy_exclamation_mark: Copyright year is not the current year on ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java. Found 2017. Was expecting 2019

:heavy_exclamation_mark: Couldn't find acceptable copyright on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable license on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable copyright on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

:heavy_exclamation_mark: Couldn't find acceptable license on ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

Unit Test Coverage
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

:warning: Coverage Changes (click to expand)
org.pentaho.di.trans.steps.gpload.GPLoadMeta

Branch Change: -0.9% :small_red_triangle_down:
Complexity Change: -0.8% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UIEERepositoryUser

Branch Change: -8.3% :small_red_triangle_down:
Complexity Change: -6.7% :small_red_triangle_down:
Instruction Change: -0.9% :small_red_triangle_down:
Line Change: -3.1% :small_red_triangle_down:

org.pentaho.di.ui.repository.pur.repositoryexplorer.model.UISecurityRole

Branch Change: -1.8% :small_red_triangle_down:
Complexity Change: -1.5% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:
Line Change: -0.5% :small_red_triangle_down:

org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsertMeta

Instruction Change: -0.1% :small_red_triangle_down:

@pentaho/r2d2 please review

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -Dsurefire.runOrder=alphabetical -Daudit -amd clean install

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'ui' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialog.java
  ui/src/main/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialog.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpdecryptfiles/JobEntryPGPDecryptFilesDialogTest.java
  ui/src/test/java/org/pentaho/di/ui/job/entries/pgpencryptfiles/JobEntryPGPEncryptFilesDialogTest.java

Unit Test Coverage
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

:warning: Coverage Changes (click to expand)
org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsertMeta

Instruction Change: -0.1% :small_red_triangle_down:


Add a /holo hide command to hide it.

I like being able to hide the holograms when needed. then thered be a /holo enable command

Workaround is to set visibilityDistance to 0

alr thanks but thatd be nice to add that in the future

We'll keep this up since It's super easy to add, basically just a command alias, I don't see why not :)


"User specified autocast device_type must be 'cuda' or 'cpu'" on M1 Mac

We're trying to convert our guide which currently on HN right now (!) to use your fork but running into trouble.
We're installing with plain pip rather than Conda using these requirements.
However we're getting this error:
ben@MacBook-Pro ~/p/tmp/stable-diffusion [lstein]
± % python scripts/dream.py --full_precision                                                                                !10211
* Initializing, be patient...

>> Loading model from models/ldm/stable-diffusion-v1/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using slower but more accurate full-precision math (--full_precision)
>> Setting Sampler to k_lms
>> model loaded in 5.78s

* Initialization done! Awaiting your command (-h for help, 'q' to quit)
dream> a red juicy apple floating in outer space, like a planet
User specified autocast device_type must be 'cuda' or 'cpu'
Are you sure your system has an adequate NVIDIA GPU?
>> Usage stats:
>>   0 image(s) generated in 0.00s
>>   Max VRAM used for this generation: 0.00G
Outputs:

More context: https://news.ycombinator.com/item?id=32680293
Any ideas on how to fix @lstein et al?

I was able to get it to run with this PR, but the resulting image is black: https://github.com/lstein/stable-diffusion/blob/main/README-Mac-MPS.md#my-images-come-out-black.

This works for me on top of current main 1b3c7acce3a9c8294a10011033e80295e9fd2ec7:
$ git diff
diff --git a/scripts/dream.py b/scripts/dream.py
index 2e3f070..bdb4efd 100755
--- a/scripts/dream.py
+++ b/scripts/dream.py
@@ -54,12 +54,14 @@ def main():
         height=height,
         sampler_name=opt.sampler_name,
         weights=weights,
+        precision="full" if opt.full_precision else "autocast",
         full_precision=opt.full_precision,
         config=config,
         grid  = opt.grid,
         # this is solely for recreating the prompt
         latent_diffusion_weights=opt.laion400m,
         embedding_path=opt.embedding_path,
     )

     # make sure the output directory exists

the error is gone after that change, but the generated image is black on an M1 Max

This works for me on top of current main 1b3c7ac:
$ git diff
diff --git a/scripts/dream.py b/scripts/dream.py
index 2e3f070..bdb4efd 100755
--- a/scripts/dream.py
+++ b/scripts/dream.py
@@ -54,12 +54,14 @@ def main():
         height=height,
         sampler_name=opt.sampler_name,
         weights=weights,
+        precision="full" if opt.full_precision else "autocast",
         full_precision=opt.full_precision,
         config=config,
         grid  = opt.grid,
         # this is solely for recreating the prompt
         latent_diffusion_weights=opt.laion400m,
         embedding_path=opt.embedding_path,
     )

     # make sure the output directory exists

Unfortunately this didn't seem to work for me. Added that line to dream.py as shown (unless I'm missing something obvious it's been a long day lol)

Mine wasn't working either, even with the above change, but it turns out I'd misread the README and I needed the --full_precision flag:
python scripts/dream.py --full_precision
(This also works with the --web flag for a nicer UI.)

This worked for me! It did complain about not using the GPU but I heard my laptop fans for the first time and got a black image. Trying -A pmls to see something from the dreams...

I have applyed the PR #268. ==> gh pr checkout 268
-Addim            is OK
-Ak_dpm_2_a got BLACK-IMAGE
-Ak_dpm_2     is OK
-Ak_euler_a     got BLACK-IMAGE
-Ak_euler         is OK
-Ak_heun         got BLACK-IMAGE
-Ak_lms            fot BLACK-IMAGE
-Aplms              is OK

I first applied the code change https://github.com/lstein/stable-diffusion/issues/293#issuecomment-1234805716
Then pulled from main, now all images are black.
Removed the code change (Appears it's no longer necessary) and tried each with the following results:

Model
Result

KHEUN
Black

KHEULER_A
...

KHEULER
...

KDPM_2A
...

KDPM_2
...

KLMS
...

PLMS
...

DDIM
...

(Still running, brb)

I added this PR that also fixes this issue, it's a bit more verbose than @mabrowning 's elegant solution but makes sure that autocast is not set regardless of what precision is passed in

After 3ee82d8a3b8e528beabd2eecf7f89e4c5adea41d I no longer see this particular error and my patch isn't needed.

This worked for me! It did complain about not using the GPU but I heard my laptop fans for the first time and got a black image. Trying -A pmls to see something from the dreams...

Perfect! I did the same, thank you.

Which PR is best to merge?
Are some samplers working and others not? If so, need to detect and
issue a warning if tried.

On Fri, Sep 2, 2022 at 8:43 AM Mark Browning @.***>
wrote:

After 3ee82d8
https://github.com/lstein/stable-diffusion/commit/3ee82d8a3b8e528beabd2eecf7f89e4c5adea41d
I no longer see this particular error and my patch isn't needed.
—
Reply to this email directly, view it on GitHub
https://github.com/lstein/stable-diffusion/issues/293#issuecomment-1235458619,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA3EVL3D2IZ5JWRFF4AJZLV4HY7BANCNFSM6AAAAAAQCUPS5E
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Written on my cell phone. Anything that seems odd is the fault of
auto-correct.


[AutoRelease] t2-monitor-2023-02-13-73159(can only be merged by SDK owner)

https://github.com/Azure/sdk-release-request/issues/3764
Live test success
https://dev.azure.com/azure-sdk/internal/_build?definitionId=1014
BuildTargetingString
azure-mgmt-monitor
Skip.CreateApiReview
true

issue link:https://github.com/Azure/sdk-release-request/issues/3764


Feature request: Fix missing fields with default

When the struct defined in the rust code changes, but the existing ron file is at the old version, it's no longer readable at all.
I'm trying to use ron for saving keybinds and other settings for a game, but in the current state new versions of the config are not compatible with old ones at all.
What I imagine is a method called from_reader_fixed() which deserializes a .ron file, removes unnecessary options and inserts a default for missing options.

You can already use Serde to achieve that. Just put a #[serde(default)] on the field, and it will use the default value when it's missing.
As for old ones, it will simply ignore them.
If you need more complex handling, you can also just create a compatibility struct / ron::Value to get additional information.

What about fields with the same name but a different type? Will serde reset them to the default as well?

No, in that case it would fail.

@timokoesters I guess this issue can be closed.
Btw, for converting types during (de)serialization I wrote some macros:
/// serializes a type as a different repr type that it can be converted Into and From
#[macro_export]
macro_rules! serde_as {
	($m:ident, $t:ty, $r:ty) => {
		pub mod $m {
			use super::*;
			use serde::{Deserialize, Deserializer, Serialize, Serializer};

			pub fn serialize<S: Serializer>(x: &$t, serializer: S) -> Result<S::Ok, S::Error> {
				let y: $r = (*x).into();
				y.serialize(serializer)
			}

			pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<$t, D::Error> {
				let y: $r = Deserialize::deserialize(deserializer)?;
				Ok(y.into())
			}
		}
	};
}

/// serializes a type as a different repr type using the given conversion functions
#[macro_export]
macro_rules! serde_conv {
	($m:ident, $t:ty, $ser:expr, $de:expr) => {
		pub mod $m {
			use super::*;
			use serde::{Deserialize, Deserializer, Serialize, Serializer};

			pub fn serialize<S: Serializer>(x: &$t, serializer: S) -> Result<S::Ok, S::Error> {
				let y = $ser(*x);
				y.serialize(serializer)
			}

			pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<$t, D::Error> {
				let y = Deserialize::deserialize(deserializer)?;
				Ok($de(y))
			}
		}
	};
}

Example of using serde_conv.
Example of using serde_as:
serde_as!(serde_col, RGB<f32>, (f32, f32, f32));
pub struct Col(#[serde(with = "serde_col")] pub RGB<f32>);

When your rust types change and you want to load data from before, you need to write a migration to upgrade the data to the next version (and from that one to the next, until you arrive at the latest). The easiest way to do this would be to include version int field as first field in your top-level struct, and a ron Value to deserialize the rest into, then run the migrations like this:
struct Doc {
	version: u32,
	data: Value,
}
type CurrentFileFormat = FileFormat17; // == whatever the latest version is. Migrations use the structs of earlier versions. You need to keep all of them in your code
// ..
let Doc { version, data } = ron::de::from_reader(..)?;
for migration in migrations[version..] {
	data = migration.migrate(data); // takes a ron Value, deserializes it into FileFormatN and returns a ron Value in the next version (FileFormat(N+1))
}
let data = data.into_rust::<CurrentFileFormat>()?;

Then you have a clean & linear file format upgrader, e.g. like Visual Studio project file upgrader.

Perhaps this migration method is worth mentioning in the README or a FAQ?


please support a better status code page by default

From @John0King on Sunday, July 16, 2017 8:19:33 PM
Current default status code page is too simple, No one should use that in production environment.
please make the default status code page more useful
Copied from original issue: aspnet/Diagnostics#395

Thanks for contacting us, @John0King. We have no plans to change the default status code page at the moment. But you can customize the status code pages however you like.


Modbus slave "Write Single Register" function returns invalid PDU

Hello once again, @graham22!
Similar to #4. A Non spec-compliant PDU is returned for the "Write Single Register" call when using the "Modbus Slave" tool.
Section 6.6 "06 (0x06) Write Single Register" of the Modbus Application Protocol document states the following:

The normal response is an echo of the request, returned after the register contents have been
written.

Writing a value 0xAAAA to address 0x0000 using the "Write Single Register" Modbus function, the Modbus Slave tool sends me the following response (copied from the Communication log): TX: 00 01 00 00 00 06 01 06 00 00 00 01
Manually decoding it leads to the following:
Transaction ID: 0x0001
Protocol ID: 0x0000
Length: 0x0006
Unit ID: 0x01

Function Code: 0x06
Register Address: 0x0000
Register Value: 0x0001

The Register Value field is not equal to the written value (0xAAAA).
Going through the code, the bug seems to be in this file in the ServerEncode method. Instead of the written register value being pushed into the message, the message header is (using the PushRequestHeader function). This deviates from the specification.

here is an update to that function, try replacing the attached
ModbusLib.dll in C:\Program Files (x86)\SkyeTracker\ModbusSlave
    /// <summary>
    /// Append the typical header for a request command (master-side)
    /// </summary>
    /// <param name="command"></param>
    /// <param name="body"></param>
    internal static void PushRequestHeader(
        ModbusCommand command,
        ByteArrayWriter body)
    {
        body.WriteUInt16BE((ushort)command.Offset);
        if (command.FunctionCode == 05 || command.FunctionCode == 06)
        {
            body.WriteInt16BE((short)command.Data[0]);
        }
        else
        {
            body.WriteInt16BE((short)command.Count);
        }
    }

Graham.
On Tue, Dec 5, 2017 at 8:38 AM, Thomas van Lingen<EMAIL_ADDRESS>wrote:

Hello once again, @graham22 https://github.com/graham22!
Similar to #4 https://github.com/graham22/ModbusTool/issues/4. A Non
spec-compliant PDU is returned for the "Write Single Register" call when
using the "Modbus Slave" tool.
Section 6.6 "06 (0x06) Write Single Register" of the Modbus Application
Protocol document states the following:
The normal response is an echo of the request, returned after the register
contents have been
written.
Writing a value 0xAAAA to address 0x0000 using the "Write Single
Register" Modbus function, the Modbus Slave tool sends me the following
message (copied from the Communication log): TX: 00 01 00 00 00 06 01 06
00 00 00 01
Manually decoding it leads to the following:
Transaction ID: 0x0001
Protocol ID: 0x0000
Length: 0x0006
Unit ID: 0x01
Function Code: 0x06
Register Address: 0x0000
Register Value: 0x0001
The Register Value field is not equal to the written value (0xAAAA).
Going through the code, the bug seems to be in this
https://github.com/graham22/ModbusTool/blob/master/ModbusLib/Protocols/Modbus/Codecs/ModbusCodecWriteSingleRegister.cs#L61
file in the ServerEncode method. Instead of the written register value
being pushed into the message, the message header is (using the
PushRequestHeader function). This deviates from the specification.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/graham22/ModbusTool/issues/5, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFGATTLfgEFK3W6j79QjmkkJ7CuwfynNks5s9UdXgaJpZM4Q2TUt
.

--
Graham A. Ross
(613) 769-1331

Can you confirm that it now works?
On Wed, Dec 6, 2017 at 10:37 AM, Thomas van Lingen<EMAIL_ADDRESS>
wrote:

Hi @graham22 https://github.com/graham22, Thanks for the reply!
Do you think we could make this into a change into the repository? That
way, other people who may run into the same problem will have the bug fixed
for them as well.
If you don't have the time, I could try to make a pull-request for this
myself (although I am not very knowledgable when it comes to C#).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/graham22/ModbusTool/issues/5#issuecomment-349676684,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFGATdndJUjaZGMnQ0K7SEH4jJFa5ohgks5s9rS3gaJpZM4Q2TUt
.

--
Graham A. Ross
(613) 769-1331

Hi @graham22,
I've tested your new commit and it has fixed the problem for this issue.
However, #4 was not fixed by this (since this writes back the decoded value from a ModbusCommand, which had a different representation than 0x0000 or 0xFF00 due to the way it was decoded).
I have submitted a pull request for this #6, this should fix #4 as well.
As always, thanks for taking the time to respond!


Automated cherry pick of #5008: hostman: fix hostinfo init interrupted by ovn chassis setup

Cherry pick of #5008 on release/3.1.
#5008: hostman: fix hostinfo init interrupted by ovn chassis setup

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/3.1@4322981). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             release/3.1   #5009   +/-   ##
=============================================
  Coverage               ?   6.76%
=============================================
  Files                  ?     544
  Lines                  ?   95124
  Branches               ?       0
=============================================
  Hits                   ?    6431
  Misses                 ?   88154
  Partials               ?     539

Flag
Coverage Δ

#aFlag
6.76% <ø> (?)

Impacted Files
Coverage Δ

pkg/hostman/hostinfo/hostinfo.go
0% <ø> (ø)

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 4322981...ad73aa5. Read the comment docs.

/lgtm
/approve


Cancelling request in beforeSend doesn't work.

I've checked the form in beforeSend. But the request wasn't canceled though I returned false in beforeSend.
$appButton.api({
                action: 'update app',
                method: 'POST',
                beforeSend: function (setting)
                    if (!$appForm.form('is valid')) {
                        return false;
                    } else {
                        setting.data = $appForm.form('get values');
                        return setting;
                    }
                }
            });

I noticed that at semantic.js:19136
return (runSettings !== undefined)
              ? $.extend(true, {}, runSettings)
              : $.extend(true, {}, settings)
            ;

the return value became an empty object instead of false.
then at semantic.js:18606
// check if before send cancelled request
          if(requestSettings === false) {
            module.cancelled = true;
            module.error(error.beforeSend);
            return;
          }
          else {
            module.cancelled = false;
          }

requestSettings (now {}) doesn't equal to false, so the cancelling doesn't work.

Have you tried against the next branch, your fix might lie in there

It's already been fixed in the next branch. Thank you.


Fix devices check for raw_multi_journal

Fix the logic for the mandatory devices check so that it applies to
raw_multi_journal and journal_collocation scenarios.

https://github.com/ceph/ceph-ansible/issues/375
Happy to change the "when" format for all, but it only seems to not work on the "or" statement.

Should be fixed better now so there is one check when using raw_multi_journal and one when using journal_collocation.

Thanks @andymcc


fix: properties with embedded anyOf being dropped

Based off of https://github.com/cdklabs/awscdk-service-spec/pull/1269, which did not actually do anything for anyOf.

Draft PR because a test is failing

Superseeded by #1370


Specify mops as a prerequisite/dependency

I tried following the steps in how to reproduce performance report and got the following error:
canister-profiling/heartbeat $ make -e MOC_VERSION=0.10.0

set -e; cd motoko; envsubst < mops.template.toml > mops.toml; mops install; dfx canister create --all; dfx ledger fabricate-cycles --t 100 --canister $(dfx identity get-wallet); dfx build; rm mops.toml;         echo "Optimize with ic-wasm"; for f in .dfx/local/canisters//*/*.wasm; do ic-wasm -o $f $f shrink --optimize O3 --keep-name-section; done; cd ..
/bin/sh: 1: mops: not found
make: *** [Makefile:7: motoko] Error 127

It seems I need to install mops before I can proceed.
npm i -g ic-mops

It would be good to document this, or maybe even create a package.json with this as a dependency so you can just npm install and have install mops locally. I generally prefer to install dependencies without the -g flag, even for CLI tools.

I think there are also deps on ic-wasm, and ic-repl if not others. This issue is likely more than just the mops dependency, but that there are many prerequisites that need to be installed before being able to run the performance report and they should all be specified and directions given for their installation.


Package management

Sorry, I am creating this one big pull request. I can delete the last commit and make individual PRs. Let me know if you want that. I think changes are not much and this should be reviewable. Let me know either way

@aditya-navana I have made changes to Gradle dependency files


Remove duplicate variable declaration

Hey, just noticed that "Project" has already been declared on line 36

Thanks!


Cannot specify redis db index

I can only seem to connect to redis db 0.
I would like to connect to the redis db at index 15 at this uri redis://localhost:6379/15.
is this possible? if I was to open a PR to make this happen, where would changes need to be made?

first make sure your redis db numbers is over 1
if not open redis config file to modify it
then use cilent:select method to change to any db you want just like in redis command console


Add tags in sending logs

The PR adds support to add tags in sending logs. I think this feature is useful to add a request id tag for searching, for example.

@grongor I've fixed!

@grongor thnx for review )


Link in footer contains old Bot location

Here's the file that needs changing. https://github.com/EddieJaoudeCommunity/EddieBot/blob/develop/src/config.ts
It is pointing to the old location of the EddieBot.

Sorry @mikeysan , I thought you forgot, so I raised one too #82
Closing due to duplicate


fix default for nusers in update_cta

The update_cta function updates the statistics we use in our global call to action (cta). We have defaults for development, where the database can be empty. This runs in a thread and was causing logspam and actually a test failure on forthcoming commits for #3788.
Fixes #3771.

@mattbk @rohitpaulk @rorepo @yifeiwu Up for a review and merge? :-)

Awww, crunch! I accidentally merged this under #3788. :-/

Sorry!


Enable validator injection by default #1

Problem:
See https://github.com/dropwizard/dropwizard/issues/2484
Solution:
This PR changes constructor in Environment to accept ValidatorBundle instead of Validator and register validator injection by default.
Result:

Validator Injection enabled by default.
InjectValidatorBundle removed
Closes https://github.com/dropwizard/dropwizard/issues/2484, https://github.com/dropwizard/dropwizard/pull/2522

Closing in favor of
https://github.com/dropwizard/dropwizard/pull/2522


Mention OpenGL/Vulkan as install depedencies

Thanks for the suggestion. I haven't added this yet for a couple of reasons.
Many dependencies differ based on the platform you are targetting. For instance, on macOS you need Metal while on Windows you can use DirectX 12. There is also a bunch of additional dependencies needed for Linux like fontconfig, X11, and more. Also, we do not use OpenGL for rendering yet, so it shouldn't be necessary.
Because of this, I think a proper solution would be an additional INSTALLATION.md document with an exhaustive list and then link to it from the README. However, the library is currently in an experimental stage and is meant to be used by advanced users. I believe this works as an entry barrier of sorts.
I would like to wait before we commit to maintaining a dependency list.

I can remove the install instructions and simply warn about OpenGL/Vulkan/Metal/DirectX

I think that is already mentioned in the features section.

True, I missed it and wasted 2 days on a non-issue, thanks for pointing that out :+1:

Sorry to hear that. We have a Zulip server where any questions and feedback are welcome. Of course, opening an issue is also an option (don't worry about duplicates!).


Oasis - Prepare for charge station input

Subtask of #231
Input
Electricity charge stations, expect input in JSON format follow OSM's tag definition about node and charging_station, example:
{
   "id": 12345,
   "lat": 51.5173639,
   "lon": -0.140043,
   "amenity": "charging_station",
   "operator": "NOFT",
   "fee": "yes",
   "capacity":4,
}

Later could implement more input connector: pbf, csv, etc.

Flow
Telenav's Database(postGIS) -> csv -> adjust column name -> convert csv to json -> decoding json

Subtask of #231
Input
For charge station data, or POI data, they usually recorded in database. First step would be dump this database into csv format, each line represent information for a single charge station.
csv record sample:
[{"id":12345,"vendor_code":"NOFT","vendor_poi_id":"NOFT-10_NREL99930@-@NOCO-37145190@-@NOCO-996595530","lat":0.0,"lon":0.0,"nav_lat":0.0,"nav_lon":0.0,"dis_lat":0.0,"dis_lon":0.0,"map_link_id":12345,"side_of_street":"+","country":"USA","space_id":"USA_CA","airport_code":"NULL","is_national":false,"is_state_importance":false,"is_city_importance":false,"fax":"NULL","phone":8054662325,"encoded_phone":"Prefix=1,CountryCode=1,AreaCode=805,LocalNumber=4662325,RawData=8054662325,Preferred=1,E164=+18054662325,PhoneType=phone","email":"NULL","web_url":"NULL","category_id_gather":"xxx``xxx``xxx","chain_gather":"1364@-@@-@",,"hilbert":2.32E+11,"amenity":"charging_station"},]

Processing flow
Telenav's Database(postGIS)
       -> csv
               -> adjust column name
                       -> convert csv to json
                                 -> decoding json

More details could go to here: #237 (comment)
Target format
Electricity charge stations, expect input in JSON format follow OSM's tag definition about node and charging_station, example:
{
   "id": 12345,
   "lat": 51.5173639,
   "lon": -0.140043,
   "amenity": "charging_station",
   "operator": "NOFT",
   "fee": "yes",
   "capacity":4,
}

Later could implement more input connector: pbf, csv, etc.
We want to make this json format as protocol for following processing
A sample JSON record could be found here

The original format is not csv. It's json actually (after remove head [ and tail ]). It should be able to parse by json library directly. The sample json you metiond is a json with line endings for better human readable, some json libraries support it. But without line endings is more common json.

Subtask of #231
Input
For charge station data, or POI data, they usually recorded in database. First step would be dump this database into csv format, each line represent information for a single charge station.
csv record sample:
[{"id":12345,"vendor_code":"NOFT","vendor_poi_id":"NOFT-10_NREL99930@-@NOCO-37145190@-@NOCO-996595530","lat":0.0,"lon":0.0,"nav_lat":0.0,"nav_lon":0.0,"dis_lat":0.0,"dis_lon":0.0,"map_link_id":12345,"side_of_street":"+","country":"USA","space_id":"USA_CA","airport_code":"NULL","is_national":false,"is_state_importance":false,"is_city_importance":false,"fax":"NULL","phone":8054662325,"encoded_phone":"Prefix=1,CountryCode=1,AreaCode=805,LocalNumber=4662325,RawData=8054662325,Preferred=1,E164=+18054662325,PhoneType=phone","email":"NULL","web_url":"NULL","category_id_gather":"xxx``xxx``xxx","chain_gather":"1364@-@@-@",,"hilbert":2.32E+11,"amenity":"charging_station"},]

Processing flow
Telenav's Database(postGIS)
       -> csv
               -> adjust column name
                       -> convert csv to json
                                 -> decoding json

More details could go to here: #237 (comment)
Target format
Electricity charge stations, expect input in JSON format follow OSM's tag definition about node and charging_station, example:
{
   "id": 12345,
   "lat": 51.5173639,
   "lon": -0.140043,
   "amenity": "charging_station",
   "operator": "NOFT",
   "fee": "yes",
   "capacity":4,
}

Later could implement more input connector: pbf, csv, etc.
We want to make this json format as protocol for following processing
A sample JSON record could be found here

The original format is not csv. It's json actually (it's a json array with head [ and tail ]). It should be able to parse by json library directly. The sample json you metiond is a json with line endings for better human readable, some json libraries support it. But without line endings is more common json.

My bad, I put a converted json record there :(
Update the first comment.

It is also possible to directly dump sql query result to json format.

Aha! Now it makes sense. But I still think the csv-to-json is not a good name since the convertion is not generic but for specified domain. How about rename it to something like poi-preprocess or poi-unify? Or maybe poi-converter that possible to support converting between csv,json,pbf, etc.


Functional tests

Description

Fixtures were moved to external file as they are same for all current tests.
Tests for DB error codes were moved to external file as they are separate class of tests.
Not significant PEP 8 and code style changes.

Pull Request Test Coverage Report for Build 182246291

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.245%

Totals

Change from base Build 182234924:
0.0%

Covered Lines:
3488

Relevant Lines:
4241

💛  - Coveralls


Fix typos in governance demo

Corrected some typos is .rs and .sol files.

Thanks for submitting a pull request!


capture packets from array of interfaces

Is there a way to capture from multiple interfaces since iface param is string?
https://github.com/sdaubert/packetgen/blob/master/lib/packetgen/capture.rb#L30

Hi @bobfly, thank you for your interest about Packetgen.
There is no way to capture packets from multiple selected interfaces, as the underlying library (PcapRUB) does not handle it. Nevertheless, a string any passed as interface argument enables capturing on all interfaces on Linux since kernel 2.2.


Request to lift strong version requirement on unicorn dependency

Speakeasy currently depends on Unicorn 1.0.2 via this line in ./requirements.txt:
unicorn==1.0.2

In practice, I have used Speakeasy without issue using more recent Unicorn versions, 2.0.1 for example does work just fine in my experience. I noticed the dependency conflict only when I tried to package both unicorn and speakeasy together for a project of mine.
I was hoping that the version pin here is a little conservative and I wanted to ask whether it would be possible to make a Speakeasy release that does not have such a strict requirement. To be explicit, I have used Speakeasy successfully with unicorn version 2.0.1.post1 installed.
If the dependency requirement could be adjusted to include that version, speakeasy could be installed side by side with angr, for example.

Hey @jhhcs, there's been a thread in #235 about this change. Would you take a peek there and leave any insight/experience you have?
As the defacto maintainer (yet not author or frequent user), I'm hesitant to make a change that might sometimes break someone's tool. Yet, at this point, Unicorn 2 is the standard version, so maybe its reasonable to get more eyes on the problem. Perhaps we could release a new major version of Speakeasy with the relaxed requirements, and existing user can pin to speakeasy=1 if necessary?

Oh, thanks, I hadn't seen that PR. I will have a look and try to help out as best I can. You can close this as a duplicate if you want, or keep it open if you prefer to have an issue tracking it as well.

As noted in the PR, some amateur debugging and bug chasing has led me to the conclusion that Speakeasy can't be switched over to Unicorn v2 at the moment without making some (likely critical) adjustments to the Speakeasy code. I'd still prefer if that would happen at some point so it becomes compatible with Unicorn v2, but since that was not the point of this issue, I will close it out with the above conclusion. Cheers!


Processing with default SDK does not work

Default SDK processing does not work. We also need to remember what the default SDK is.
@petertrr may be you remember, what is it for?

How exactly does it not work?
The default SDK is actually a system without any particular SDK for tools that don't need a runtime, e.g. compiled C++ tools. We simply map it to Ubuntu:latest.

Ah, may be we should rename it to "NO SDK"

It fallbacks to Java:
20:02:34.177 [boundedElastic-6] ERROR c.s.s.o.controller.AgentsController - Unable to create containers for executionId=1, will mark it as ERROR com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"manifest unknown"}

How exactly does it not work? The default SDK is actually a system without any particular SDK for tools that don't need a runtime, e.g. compiled C++ tools. We simply map it to Ubuntu:latest.

It tries to run ghcr.io/saveourtool/save-base:ubuntu-latest which doesn't exist here https://github.com/saveourtool/save-cloud/pkgs/container/save-base/versions?filters[version_type]=tagged
Logs:
12:05:53.420 [boundedElastic-5] INFO c.s.s.o.service.DockerService - For execution.id=39 using base image [ghcr.io/saveourtool/save-base:ubuntu-latest]
12:05:53.420 [boundedElastic-6] DEBUG o.s.w.s.a.HttpWebHandlerAdapter - [cff06856-25] Completed 202 ACCEPTED
12:05:54.593 [docker-java-stream-542118296] ERROR c.g.d.a.async.ResultCallbackTemplate - Error during callback com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"manifest unknown"}

	at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
	at java.base/java.lang.Thread.run(Thread.java:833)

12:05:54.593 [boundedElastic-7] ERROR c.s.s.o.controller.AgentsController - Unable to create containers for executionId=39, will mark it as ERROR com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"manifest unknown"}

	at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
	at java.base/java.lang.Thread.run(Thread.java:833)


Anyone can run the COMA algorithm code?

Anyone can run the coma algorithm normaly?I have this erros like this:
The error is like this:
'Process Process-3:
Traceback (most recent call last):
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/a/COMA/pymarl/src/runners/parallel_runner.py", line 221, in env_worker
reward, terminated, env_info = env.step(actions)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 373, in step
agent_action = self.get_agent_action(a_id, action)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 439, in get_agent_action
"Agent {} cannot perform action {}".format(a_id, action)
AssertionError: Agent 0 cannot perform action 0
'
Can you help me to solve this?Thanks!

I also get this error. It seems to happen rarely (e.g., not until timestep 2 million) but nevertheless it is consistent when I do a training.
Here is the command I am running
python3 src/main.py --config=coma_smac --env-config=sc2 with env_args.map_name=2s3z

@esquires
I read your command but got error
$ python3 src/main.py --config=coma_smac --env-config=sc2 with env_args.map_name=2s3z                                                                  [21:33:28]
src/main.py:69: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config_dict = yaml.load(f)
src/main.py:48: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config_dict = yaml.load(f)
[INFO 21:34:17] root Saving to FileStorageObserver in results/sacred.
[DEBUG 21:34:18] pymarl Using capture mode "fd"
[INFO 21:34:18] pymarl Running command 'my_main'
[INFO 21:34:18] pymarl Started run with ID "5"
[DEBUG 21:34:18] pymarl Starting Heartbeat
[DEBUG 21:34:18] my_main Started
[DEBUG 21:34:18] pymarl Stopping Heartbeat
[ERROR 21:34:18] pymarl Failed after 0:00:00!
Traceback (most recent calls WITHOUT Sacred internals):
  File "src/main.py", line 31, in my_main
    env_args['seed'] = _config["seed"]
sacred.utils.SacredError: The configuration is read-only in a captured function!

What is wrong with the code? To be honest I really hate Sacred. It makes running the code complex and hard to control.

@GoingMyWay For the sacred problem are you using the version of sacred in the Dockerfile?
For running Coma, I will take a closer look and add any changes to #13

@tabzraz  I did not use Docker.

Anyone can run the coma algorithm normaly?I have this erros like this:
The error is like this:
'Process Process-3:
Traceback (most recent call last):
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/a/COMA/pymarl/src/runners/parallel_runner.py", line 221, in env_worker
reward, terminated, env_info = env.step(actions)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 373, in step
agent_action = self.get_agent_action(a_id, action)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 439, in get_agent_action
"Agent {} cannot perform action {}".format(a_id, action)
AssertionError: Agent 0 cannot perform action 0
'
Can you help me to solve this?Thanks!

Anyone can run the coma algorithm normaly?I have this erros like this:
The error is like this:
'Process Process-3:
Traceback (most recent call last):
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/a/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/a/COMA/pymarl/src/runners/parallel_runner.py", line 221, in env_worker
reward, terminated, env_info = env.step(actions)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 373, in step
agent_action = self.get_agent_action(a_id, action)
File "/home/a/anaconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 439, in get_agent_action
"Agent {} cannot perform action {}".format(a_id, action)
AssertionError: Agent 0 cannot perform action 0
'
Can you help me to solve this?Thanks!

I also get this error. It seems to happen rarely (e.g., not until timestep 2 million) but nevertheless it is consistent when I do a training.
Here is the command I am running
python3 src/main.py --config=coma_smac --env-config=sc2 with env_args.map_name=2s3z

I met the same prpblem, have you solved it？

@BCWang93 Have you solved this problem, I met the same error.


CustomParams

I see the current code look like this:
https://github.com/raitonoberu/ytsearch/blob/70e7bfef1d1b1310c29709982cddde4f0e2ff6b8/search.go#L49-L53
I found out the search params are Protobuf encoded:
package main

import (
   "encoding/base64"
   "fmt"
   p "google.golang.org/protobuf/testing/protopack"
)

func encode(key p.Number, val int) string {
   m := p.Message{
      p.Tag{2, p.BytesType}, p.LengthPrefix{
         p.Tag{key, p.VarintType}, p.Varint(val),
      },
   }
   b := m.Marshal()
   return "&sp=" + base64.StdEncoding.EncodeToString(b)
}

func main() {
   s := encode(2, 2) // Channel
   fmt.Println(s == "&sp=EgIQAg==")
   s = encode(3, 1) // Under 4 minutes
   fmt.Println(s == "&sp=EgIYAQ==")
}

just wanted to mention it in case you were interested.

This is very valuable information. I spent a lot of time trying to understand how these parameters are combined, and you did it.

If youre interested, I think I have the full list of decoded params here:
https://github.com/89z/mech/blob/c6583a6a/research/2021-08-24/param.go

Closing this in favor of my own package:
https://github.com/89z/mech/blob/v1.37.1/youtube/proto.go


Cannot control screen brightness

I Cannot control screen brightness on Core2. Neither ***M5.Lcd.setBrightness(255); or ***M5.Axp.ScreenBreath(10); have any affect. The boot screen reports ***axp: lcd backlight voltage was set to 2.80v. I cannot change this by putting ***M5.lcd backlight (2900); in the sketch set-up...or editing the AXP192 .cpp.
Please help!
Terry from Canada

Hello @teastainGit
I use M5.Axp.SetLcdVoltage() on my M5Core2 successfully. Not sure, why it doesn't work for you.
When you lookup function SetLcdVoltage you'll see that it takes values between 2500 and 3300.
void AXP192::SetLcdVoltage(uint16_t voltage)
{
    if (voltage >= 2500 && voltage <= 3300)
    {
        SetDCVoltage(2, voltage);
    }
}

You can do that in setup() after calling M5.begin() - no need to modify AXP192.cpp.
M5.begin();
M5.Axp.SetLcdVoltage(2700);

BTW: the comment axp: lcd backlight voltage was set to 2.80v is static. So even if you change the code to M5.Axp.SetLcdVoltage(2900) you'd get the same comment.
    SetLcdVoltage(2800);
    Serial.printf("axp: lcd backlight voltage was set to 2.80v\n");

Thanks
Felix

Yes, thank you Felix, I’ll try that!
Rather disappointed that the boot message is static…defeats the purpose?
Again, cheers!
Cheers !
Terry Stainton
Yoga Teacher
(519) 729-1047  (Call or text)
@.*** @.***>

On Apr 14, 2021, at 3:53 PM, felmue @.***> wrote:
Hello @teastainGit https://github.com/teastainGit
I use M5.Axp.SetLcdVoltage() on my M5Core2 successfully. Not sure, why it doesn't work for you.
When you lookup function SetLcdVoltage you'll see that it takes values between 2500 and 3300.
void AXP192::SetLcdVoltage(uint16_t voltage)
{
if (voltage >= 2500 && voltage <= 3300)
{
SetDCVoltage(2, voltage);
}
}
You can do that in setup() after calling M5.begin() - no need to modify AXP192.cpp.
M5.begin();
M5.Axp.SetLcdVoltage(2700);
BTW: the comment axp: lcd backlight voltage was set to 2.80v is static. So even if you change the code to M5.Axp.SetLcdVoltage(2900) you'd get the same comment.
SetLcdVoltage(2800);
Serial.printf("axp: lcd backlight voltage was set to 2.80v\n");

Thanks
Felix
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/m5stack/M5Core2/issues/39#issuecomment-819790570, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCNKOAYBQAS34PJRXE2VY3TIXXEZANCNFSM422AKEMQ.

THAT DOES THE TRICK!!!!
Cheers !
Terry Stainton
Yoga Teacher
(519) 729-1047  (Call or text)
@.*** @.***>

On Apr 14, 2021, at 3:53 PM, felmue @.***> wrote:
Hello @teastainGit https://github.com/teastainGit
I use M5.Axp.SetLcdVoltage() on my M5Core2 successfully. Not sure, why it doesn't work for you.
When you lookup function SetLcdVoltage you'll see that it takes values between 2500 and 3300.
void AXP192::SetLcdVoltage(uint16_t voltage)
{
if (voltage >= 2500 && voltage <= 3300)
{
SetDCVoltage(2, voltage);
}
}
You can do that in setup() after calling M5.begin() - no need to modify AXP192.cpp.
M5.begin();
M5.Axp.SetLcdVoltage(2700);
BTW: the comment axp: lcd backlight voltage was set to 2.80v is static. So even if you change the code to M5.Axp.SetLcdVoltage(2900) you'd get the same comment.
SetLcdVoltage(2800);
Serial.printf("axp: lcd backlight voltage was set to 2.80v\n");

Thanks
Felix
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/m5stack/M5Core2/issues/39#issuecomment-819790570, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCNKOAYBQAS34PJRXE2VY3TIXXEZANCNFSM422AKEMQ.

Using M5.Axp.SetLcdVoltage() is a correct choice


Fix logging template issues

Some variables weren't available in the context.
Some variables weren't made available in a loop causing a {% url %} lookup to fail.

@miltontony ready for review

👍


[DIR-205] workflow overview page

Preview
Layout Notes
Fine-tuned the layout of the metrics / traffic distribution graphics to take as much space as 10 rows of results in the instances table (so there will be empty space with fewer instances):

Added a "Services" tab because it would be too complicated to navigate to service-revisions and revision-details (with pod logs) within the overview tab. When on the services tab, without additional query params, it lists all wf-services, additional queryparams are added to view revisions of one wf-service and details (with pod logs) of one revision.
I re-used the service components (and updated them to handle both use cases). This is how they now look in the worfklow-services context. Their layout and behavior for namespace services shouldn't have changed (but it is worth double checking during review!)

Notable changes to existing code

I re-used the components and api methods originally created for namespace-services. In general, two things were necessary to adapt them to work with workflow-services:

In the api methods, I passed in the workflow path and the service version property as optional parameters. When both exist (they are both needed), a different URL specific for workflow-services is used in the request. This applies both to streaming and non-streaming endpoints.
I couldn't re-use the existing services pages in full (for example, the header layout etc. are different in the workflow context), so I extracted some of their code to smaller re-usable components that can be imported regardless of context.

Follow up issues

e2e tests: DIR-845
tremor.so is used on the workflow overview page now. We should re-evaluate what framework to use for data visualization. Tremor turned out to be quite limited in terms of (a) customizing the colors used in the charts and (b) it seems it relies a bit too much on being used inside of tremor's own parent  components instead of our own for the purpose of calculating the sizes of the SVGs. Probably b can be solved (I was able to make it work but didn't have enough time to investigate more deeply), but I think (a) is a big enough problem to consider altermatives. I think flowbite is worth a closer look. -> DIR-846
DIR-847: Tweaks to the layout and navigation to consider for the future.

As discussed I will review this after the launch.


Sign copyright NOTICE in License files

Copyright Notices were left at Apache 2.0 default. Not sure if this was intentional since it appears in many places.

@FHomewood We have looked at how this footer was implemented in the Apache repository. It shouldn't be changed, for example, you could look at https://github.com/apache/ant/blob/master/LICENSE.

Might just be my misunderstanding, I was under the impression these needed to be replaced in order to show attribution.


Support dynamic queries

Does it make sense to support dynamic queries ? (Dynamic where and orderBy clauses).
Due to some requirements we have within our team, we need select statements with dynamic filters (a set of unknown numbers of where conditions, or lets say a set of optional where conditions which could be added to the query based on generated function's arguments) and also dynamic columns to order.
I know sqlc only supports static queries, however we still prefer to use sqlc with some extra work to provide dynamic stuff.
I am wondering if you have any plan to support dynamic queries or you are open to have this feature in your repo (I'd like to contribute and can create the PR in next few days I guess). BTW I think if we provide the feature, lots of more people can leverage sqlc.

I would use named parameters and CASE WHEN instead to make the queries dynamic.

Hi @mehdijoe, I requested for the same in slack but it's not supported as of now. I was thinking even if this got supported there is another mess of switch case statements for right sqlc method to call based on the dynamics parameters passed.

@mehdijoe Can you provide a concrete example of your needs? I'm surprised that the dynamic filters are unknown. Having a concrete example would also make it easier to discuss the best solution. @dharmjit, it sounds like you have the same issue? Could you provide your use case?

Thanks for ur response @kyleconroy

I'm surprised that the dynamic filters are unknown.

Actually unknown numbers of conditions ..., OK, here is my use case:
create table t1
(
    field1    varchar(100),
    field2    varchar(100),
);

I need to select on t1, which the filters are determined from UI, so I need any combination of filters, it means I should support following 9 queries on my back-end:
select * from t1
select * from t1 where field1 = $1
select * from t1 where field1 like $1
select * from t1 where field2 = $1
select * from t1 where field2 like $1
select * from t1 where field1 = $1 and field2 = $2
select * from t1 where field1 like $1 and field2 = $2
select * from t1 where field1 = $1 and field2 like $2
select * from t1 where field1 like $1 and field2 like $2

Users can also sort on any column(s) they wish (ASC/DESC), it means for each query listed above I need to append following Order By clauses:
order by field1 ASC
order by field1 DESC
order by field2 ASC
order by field2 DESC
order by field1, field2 ASC
order by field2, field1 ASC
order by field1, field2 DESC
order by field2, field1 DESC

Thanks for ur response @kyleconroy

I'm surprised that the dynamic filters are unknown.

Actually unknown numbers of conditions ..., OK, here is my use case:
create table t1
(
    field_fk uuid,
    field1    varchar(100),
    field2    varchar(100),
);

I need to select on t1, which the filters are determined from UI, so I need any combination of filters, it means I should support following 9 queries on my back-end:
select * from t1 where field_fk =$1
select * from t1 where field_fk =$1 AND field1 = $2
select * from t1 where field_fk =$1 AND field1 like $2
select * from t1 where field_fk =$1 AND field2 = $2
select * from t1 where field_fk =$1 AND field2 like $2
select * from t1 where field_fk =$1 AND field1 = $2 and field2 = $3
select * from t1 where field_fk =$1 AND field1 like $2 and field2 = $3
select * from t1 where field_fk =$1 AND field1 = $2 and field2 like $3
select * from t1 where field_fk =$1 AND field1 like $2 and field2 like $3

Users can also sort on any column they wish (ASC/DESC), it means for each query listed above I need to append following Order By clauses:
order by field1 ASC
order by field1 DESC
order by field2 ASC
order by field2 DESC

Which is 9*4 = 36 different possible queries for a table with 2 fields.
For where clause filters we can leverage CASE WHEN and sqlc named parameters, but I am not sure about CASE WHEN performance using for making a select statement dynamic.
I wish I could use sqlc with such an input query (this is kind of my proposal for the feature):
-- name: GetT1 :many
SELECT t1 Where field_fk =@field-fk_param::text
--optional field1_eq: AND field1=@field1_eq_value::text
--optional field1_like: AND field1 like @field1_like_value::text
--optional field2_eq: AND field2=@field1_eq_value::text
--optional field2_like: AND field2 like @field1_like_value::text
--optional order_field1_ASC: ORDER BY field1 ASC
--optional order_field1_DESC: ORDER BY field1 DESC
--optional order_field2_ASC: ORDER BY field2 ASC
--optional order_field2_DESC: ORDER BY field2 DESC
--optional_group: order_field1_ASC, order_field1_DESC, order_field2_ASC, order_field2_DESC

A select statement with a number of optional lines, if there is any optional line in the input query the whole query should use named parameters, each optional line would start with optional  word followed by a Boolean named parameter (indicating if the line is going to be added to the query) and a ':' followed by the like we wish to add to the query if boolean named parameter is true.
And optional_group indicate that only one of following optional lines could be enabled
(about the optional_group I think I am over complicating, it's king of thinking aloud :) )
Also while compiling the query, sqlc needs to un-comment the optional lines

@kyleconroy Thank you a lot for the explanation and your time amigo !
Actually we tried providing dynamic queries using CASE WHERE as a POC but the benchmarks showed considerable impact on query performance and we decided not to use CASE WHERE in our product queries, and that's why I thought maybe we can propose such a feature in sqlc.
Do you have any comment on that ?

Some input to the discussion:
This form of static query with dynamic filtering is generally regarded as one of the worst performance anti-pattern for RDBMS. The reason for that is the caching of the execution plan where in this case the query planner can't optimize the query and has to prepare for the worst case (all filters are unused) and will decide for a seq_scan in all cases (no indexes will be used).
With respect to GO in case parameters are passed to the query it will be prepared, executed and deallocated. In the case of postgres the execution plan for prepared statements will only start to be cached after 5 executions (as far as i know of).
What this would mean in the case of the combination of postgres and Go the impact should not be to big in case where no prepared queries (with Go prepare) are used, but there is always the risk that a suboptimal execution plan will be executed.

Hi @kyleconroy , your comment with sql using dynamic filter kind of solve the issue but sometimes its gets messy to prepare/provide these many arguments to generated method. Do we see this being supported in some other way in sqlc evolution.

the impact should not be to big in case where no prepared queries (with Go prepare) are used, but there is always the risk that a suboptimal execution plan will be executed.

@arddor Thanks for the great write up about why this pattern can result in sub-optimal query plans.

Do you see this being supported in some other way in sqlc evolution

I think there are a few ways we could better support this pattern in sqlc. Right now I'm leaning toward generating multiple queries for a single input query, and then choosing which query to execute based on one of the arguments. Here's what this could look like in practice
-- name: FilterFoo :many
SELECT * FROM foo
WHERE fk = @fk
ORDER BY
  CASE WHEN sqlc.switch('sort', 'bar_asc') THEN bar END asc,
  CASE WHEN sqlc.switch('sort', 'bar_desc') THEN bar END desc,
  CASE WHEN sqlc.switch('sort', 'baz_asc') THEN baz END asc,
  CASE WHEN sqlc.switch('sort', 'baz_desc') THEN baz END desc;

package db

import (
	"context"
	"database/sql"
	"log"

	"github.com/google/uuid"
)

type Sort string

const (
    SortBarAsc  Sort = "bar_asc"
    SortBarDesc  Sort = "bar_desc"
    SortBazAsc  Sort = "baz_asc"
    SortBazDesc  Sort = "baz_desc"
)

type FilterFooParams struct {
    Fk    uuid.UUID
    Sort SortEnum
}

While I think this could work, it's a significant amount of work. Right now I'm focusing my time working on better type checking and inference, and adding SQLite and MySQL support. I don't see this being a priority any time soon. Sorry.


path variable & js variable

can provide sth like @{/path/page.html} in thymeleaf to make the servlet root auto resolved?
also how to pass object into javascript variables? thanks.

Pebble doesn't provide anything out-of-the-box to auto resolve the context path of your web app. I suggest adding a global variable containing the context path and referencing it like so:
click here

Also, whether you're generating HTML, CSS, JS, or any other textual output, Pebble can be used in exactly the same way. Generating javascript might look like this:

The only thing I would do different is making sure that your variables are being escaped properly for the given context.


Config Error

I was trying to run 'run_continuous.py' to test the code but I got some errors with the config files.
MCTSContinous.yaml misses a field "model"
RMSProp.yaml misses a field "params"
Both are required arguments and I can not figure out how to solve the problem.

Hi Alex, what version of hydra are you using? I think sticking exactly to hydra-core==1.0.6 should fix your problem. Any higher version had some breaking changes.

That was exactly the problem, I had the last version of hydra-core my bad. Thank you


A bug for currying

I have encounter a weird bug (or a feature?)
let function (str : String) = str;

let function2 (str : String) = str;

function function2 "abc"

One possible fix is to add brackets surrounding function2 "abc". Our compiler will complain about type mismatch. Because function expects a String but function2 is String -> String.
It seems that F2J does not supports currying, because the following piece of code does not work too.
(function function2) "abc"

That doesn't make sense.

I think there are 2 different issues here: currying and type-inference. For currying it seems like there is a buig in the compiler. For type-inference that's a feature enhancement. We should be able to fix the first issue quickly. The second issue is much more challenging (although we certainly agree that it is a very desirable feature).
Can you split the issues into 2: a bug for currying; and a feature request?

I think currying is a false issue. The problem with the first example is that it doesn't type check. Function application associates to the left. To make it type check, add parentheses. This works:
let function (str : String) = str;
let function2 (str : String) = str;
function (function2 "abc")

Ah, yes. George is right.

@zhiyuanshi I agree with the association. But what I mean in the example is the currying bug. But I don't know whether it is a type check bug or currying bug, so I put them together.

@zhiyuanshi I agree with the fix (which I have already mention). But I think the following code should work too
let function (str : String) = str;
let function2 (str : String) = str;
(function function2) "abc"

According to LEFT association, function function2 "abc" is equivalent to (function function2) "abc". That exactly what I mean.

@brunocdsoliveira Ok, I will split it to another issue.

@zonyitoo No I don't think so. function expects a String but function2 has type String -> String.

function function2 "abc"
is indeed equal to
(function function2) "abc"
and both of these are not well-typed. Try your example in Haskell (for example) and you'll see that Haskell behaves in the same way. The only correct thing is:
function (function2 "abc")

Generally speaking, before reporting a bug, it is a good idea to try out the code in another functional language, to make sure it is indeed a bug (and not a misunderstanding).

Ok. I see...


Update crontab

fixed:
Usage: excludarr radarr [OPTIONS] COMMAND [ARGS]...
Try 'excludarr radarr --help' for help.
Error: No such option: -a

Hi! Thanks for taking your time to create a PR. I totally missed this one :)


Val

@fharms you are welcome to take a look I forgot to click the review request button.

@davsclaus great work..... when I finally get home you have solve all the problems :-)

No you will have fun with the simple validator to get it on the other languages, and also start using the getIndex from the result to better point to where the problem is
However I cannot get an unit test with highlight to mark the warning. It only seems to work for errors. If you turn on warn you get all those compiler errors.

yeah it's the issue we have with SDK classes are not resolved when it do it's inspection.

Ah just found another way. Will do a PR in a short where you can see how I found my warnings.


Updated README to correct spelling, and also for formatting purposes.

Hi there,
I have updated the README to include the correction of spelling, grammar, and I also added extra formatting to commands, in order to make them easier to read.
Hope this helps!
Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

[ ] I acknowledge that all my contributions will be made under the project's license.

Thank you for your contribution @silvia-odwyer!


Qingwei/debug

Coverage decreased (-0.4%) to 36.544% when pulling 14200f650ed916fc1f64ec3810832e91c222bc05 on qingweibinary:qingwei/debug into 6276fd4a33b500d0507ed08e5d42156ef53d92e3 on binary-com:master.

Coverage decreased (-0.4%) to 36.544% when pulling 14200f650ed916fc1f64ec3810832e91c222bc05 on qingweibinary:qingwei/debug into 6276fd4a33b500d0507ed08e5d42156ef53d92e3 on binary-com:master.


Generated Code incompatible with DocumentFormat.OpenXml 3.0.1

As you might know, DocumentFormat.OpenXml version 3 introduced some breaking changes, that make the generated code here not compile at all.
Some hints are here: https://learn.microsoft.com/en-us/office/open-xml/migration/migrate-v2-to-v3
First, there is one compile error of the library that needs to be fixed, for a call to Close(). (In the Docx2source gui, https://github.com/rmboggs/DocxToSource/blob/36399ce7b84cb141fb62e4baf393afd0c3c73901/src/DocxToSource/MainWindowModel.cs#L424). It just needs to be removed, like mentioned here: https://learn.microsoft.com/en-us/office/open-xml/migration/migrate-v2-to-v3#openxmlpackageclose-has-been-removed
One of the changes is that the EnumValues are now structs, and don't contain the enum's values that can be found to match the serialized name to the Enum's value. https://learn.microsoft.com/en-us/office/open-xml/migration/migrate-v2-to-v3#enumvaluetenum-now-contains-structs
That's tricky a bit, since the generated code for the TitleOfParts of a doc's properties can't create the correct line for setting the BaseType of a member of VectorBaseValues.
Before (using DocumentFormat.OpenXml <3.0.0, like 2.20.0), whereas a code like this would be generated:
TitlesOfParts titlesOfParts = new TitlesOfParts();

vtVTVector = new VT.VTVector();
vtVTVector.Size = 3u;
vtVTVector.BaseType = VT.VectorBaseValues.Lpstr;

Now with DocumentFormat.OpenXml 3.0.0 or 3.0.1 would generate:
TitlesOfParts titlesOfParts = new TitlesOfParts();

vtVTVector = new VT.VTVector();
vtVTVector.Size = 3u;
vtVTVector.BaseType = VT.VectorBaseValues.VectorBaseValues { };

Which obviously doesn't compile. The line of code where this takes place is
https://github.com/Docx2Src/Serialize.OpenXml.CodeGen/blob/476fcfb780381d62800719acc1b28af6672ebe67/src/Serialize.OpenXml.CodeGen/OpenXmlElementExtensions.cs#L620-L633
The pi.GetValue(val) is already incorrect, and .ToString() shows the same thing as in the debugger.
One way to have a working code, but might rely on how it is implemented currently, is to do something like this:
TitlesOfParts titlesOfParts = new TitlesOfParts();

vtVTVector = new VT.VTVector();
vtVTVector.Size = 3u;
vtVTVector.BaseType = new VT.VectorBaseValues("lpstr");

It is how the file works for now, like for VectorBaseValues in https://github.com/dotnet/Open-XML-SDK/pull/1397/files#diff-879432ee46de6485849364258bf13c6b750d84856f64ecb306f7a9935a274fd9R2166-R2211
On their main branch, it is: https://github.com/dotnet/Open-XML-SDK/blob/b217b4aeba3ecf2a2d61d3534ee05ce109c2b5dc/generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/schemas_openxmlformats_org_officeDocument_2006_docPropsVTypes.g.cs#L2163-L2308
https://github.com/dotnet/Open-XML-SDK/pull/1397/files#diff-8b1abd087cee27e8443e20c915de880a9a5aff67e7df9f096bad5bebb14290d0L100
So we see that there's no mapping from the (xml) serialized value to the clean, beautiful enum value. The the serialized string is the one that is able to be retrieved when we have an instance of VectorBaseValues.Lpstr created. So, if you'd want to keep the real enum values, you could try with reflection or something like that to filter out what the available enum names that can be used, create an instance of each, retrieve their serialized string values, and reverse that lookup to he able to get the correct name. A bit like the file that was deleted here (src/DocumentFormat.OpenXml.Framework/SimpleTypes/EnumInfoLookup.cs):
https://github.com/dotnet/Open-XML-SDK/pull/1397/files#diff-8b1abd087cee27e8443e20c915de880a9a5aff67e7df9f096bad5bebb14290d0
For now, I quickly patched it for me with using strings since I didn't understand how to use the Correct CodeDom calls:
                        statement = new CodeAssignStatement(
                            new CodePropertyReferenceExpression(
                                new CodeVariableReferenceExpression(elementName),
                                cp.Name
                            ),
                            new CodeObjectCreateExpression(
                                simpleName,
                                new CodePrimitiveExpression(val.ToString())
                            )
                        );

Ideally, you could create a new object with the properties directly created in the same braces, like the old Productivity Tool 2.5 made:
          Ap.HeadingPairs headingPairs1 = new Ap.HeadingPairs();

           Vt.VTVector vTVector1 = new Vt.VTVector(){ BaseType = Vt.VectorBaseValues.Variant, Size = (UInt32Value)2U };

Second issue is with the use of the static CreateOpenXmlUnknownElement. Like mentionned for version 2.20.0 docs here, it was already deprecated: https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.openxmlunknownelement.createopenxmlunknownelement?view=openxml-2.20.0
The CreateUnknownElement method needs to be called on a part container instead. Since it needs to know what container to call it from, I didn't know CodeDom enough to find the right solution.
The method to use is here: https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.openxmlunknownelementextensions.createunknownelement?view=openxml-3.0.1
An example of another existing issue on GitHub with an example of the change in context: https://github.com/radzenhq/radzen-blazor-studio/issues/102#issuecomment-1524801655
Also, there is a slight mismatch of the Docx2source repo, where this one has upgraded the packages, but the other didn't, so it wasn't possible to compile directly since one repo required v5.0.0 of packages, but the other one required v8.0.0 and thhis repo is referenced as a project reference instead of packagereference, that would be published through nuget.  That other repo worked well with .net 8, if the following was changed in two lines, since it complained that the type couldn't be asigned to (something with a throw inside the type's name).
https://github.com/rmboggs/DocxToSource/blob/36399ce7b84cb141fb62e4baf393afd0c3c73901/src/DocxToSource/Controls/OpenXmlPartTreeViewItem.cs#L59-L64
Just using the dotnet 6 ArgumentNullException.ThrowIfNull(p), it works well. Also, you might be interested in the other ones added in dotnet 8/C# 12, and the performance difference : https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/#exceptions A couple checks can be easily replaced throughout the code base, and switching to the breaking v3 version of the SDK is maybe appropriate to use dotnet 8 all the way.

@echoix do you have a branch or repository with these fixes applied?

I'll take a look (not right away). It's been a while, but maybe it was just fixing the outputted code. I ended up working with the full openxml sdk, learning how to build a document by parts and all.

If I have something it isn't pushed yet it seems.


Add action to install pants and manage gha caches

This is partially based on the GHA workflow in the example-python workflow.
You can see how to use the action on this PR.
https://github.com/pantsbuild/example-python/pull/106
I tested in my fork, using a copy of this action in https://github.com/st2sandbox/init-pants-action so you can see a successful run with this action here:
https://github.com/cognifloyd/example-python/runs/8296177323?check_suite_focus=true#step:3:1
Check out both steps:

Run st2sandbox/init-pants-action@main
Post Run st2sandbox/init-pants-action@main

K. Test run off action with updates is here:
https://github.com/cognifloyd/example-python/actions/runs/3041374266/jobs/4898421069

FYI, here's my first successful test run using this newly-merged action:
https://github.com/cognifloyd/example-python/actions/runs/3049859845/jobs/4916355899


Updates

Not sure how actively this is maintained, but I found the API to be nice to use so I forked it and used in one of my projects and I was wondering maybe some of the stuff might be useful upstream.

Thank you, looks good! I haven't been super active maintaining these bindings but I'm happy to merge fixes or bindings to more libusb APIs.


Kafka bind address

@juju-solutions/bigdata
This is one of three pull requests for setting up the ability to bind kafka to an interface/ip address. I've run bundletester with the following permutations of 'bind_addr' in config.yaml:

Keeping the default value of null doesn't break anything, which is expected.
Passing in a value of <IP_ADDRESS> doesn't break anything, which is expected.
Passing in an address that doesn't match the address of the kafka server (e.g., <IP_ADDRESS>) does break things.

My juju fu is not strong enough to setup a second interface on a machine and bind to that, but the above three tests do seem to indicate that the code does what I think that it does.
As part of this work, I also fixed up the kafka tests. It should be easy to get them to run, even if you aren't paying attention to anything other than having the right branch of layer-apache-bigtop-base checked out locally. (The branch is 'kafka-bind-address', incidentally)

The PR for bringing the kafka charm is still not merged:
https://github.com/apache/bigtop/pull/127
Can we target the juju-solutions:kafka branch instead of :master here?  This way, bigtop will have these changes when they eventually merge the :kakfa branch upstream.

@kwmonroe Whoops. It was my intent to merge to the kafka branch ... just forgot to do it when I made the PR. Will fix it if github lets me (or will just create a new PR).


Analyze the DFD for Scenario 3

Examine each automatically identified threat
Document mitigation strategies for the relevant threats
Pay special attention to elements that interact across threat boundaries
Generate a full HTML report using TMT
Host the HTML reports in your project github repo and link from your markdown submission.

Talbot made his changes on the morning of 11/13/2022. Closing on his behalf.


Extract refactor can produce unnecessary_parenthesis trigger

Repro:
class A {
  void a() {
    (1 + 2);
  }
}

Now select (1 + 2) and the option to Extract Method.
Output:
class A {
  void a() {
    b();
  }

  void b() => (1 + 2);   // <-- unnecessary_parenthesis
}

It's true that there are unnecessary parentheses in the extracted method, but there were unnecessary parentheses in the code before it was extracted. The fact that it wasn't reported is a bug in the lint (I opened https://github.com/dart-lang/linter/issues/5112 to report it).
IMO, the extract method refactoring should not change the code being extracted. If there are diagnostics being reported against it, they should remain and users can fix the diagnostics separately.

I agree, but when it is a simple expression it could use the unparenthesized version. Say:
void foo() => (bar() + baz()) ? 0 : 1;

Even with https://github.com/dart-lang/linter/issues/4996 merged, there would be no lint on (bar() + baz()) but it would trigger on the extracted code.
Sorry for the bad first example. This one is more similar to the actual code I found the behaviour.

Understood. And I'm not saying that the refactor can't introduce a lint violation. I just think it's better if the refactoring doesn't try to fix the code. But clearly not everyone agrees with me 😄 , and that's fine.


polyline rides

Hello,
I catch strange behavior with polyline
I use sample code from https://leafletjs.com/examples/quick-start/example.html and change coordinates to my own code is here https://gist.github.com/tenkoff/65d61070f762fa3cd1bb2f07f7f76ede
I got this in leaflet

and this in google maps

See https://stackoverflow.com/q/40532496/4768502


Reimplement code_modern_states() by exploiting the countrycode package

Develop the code_modern_states() function further. Nifty addition for modern states, leveraging the {countrycode} package.

Maybe we should try and pare back these dependencies though? The codes in manystates overlap but are not necessarily the same as countrycode.

I'm going to close this on the basis of 4 Feb comment. If reopened, need more information about necessity and use cases.