Easy way to detect/get/list overloads

Hello folks!
I was wondering if there's an easy way to detect/list functions'/methods' overloads? At the README is listed "overloads of a constructors and methods supported," but I couldn't find a real example or snippet to guide me on that matter (though that shouldn't be hard to do it manually, that's why I bolded "an easy way" at the beginning).
Thanks in advance and great library!

type.getConstructors() returns list with constructor or its overloads.
type.getMethods() returns list of methods with their overloads. Each overload is treated the same as method itself. Overload represents callable method. You can detect overloaded methods by grouping methods by name.
StackBlitz demo.
export class SomeClass {
  constructor();
  constructor(a?: boolean);
  constructor(b?: string);
  constructor(a: boolean, b?: string);
  constructor(aOrB?: boolean | string, b?: string) {}

  someMethod(a?: boolean);
  someMethod(b?: string);
  someMethod(aOrB?: boolean | string) {}

  someOtherMethod() {}
}

While writing the demo I figured out that method overloads does not work and we don't even have the unit test for that.
I've prepared the fix, I'll publish that in the evening.
This is the output from that demo running with fixed version:
Constructors:
┌─────────┬───────────────┬──────────────┐
│ (index) │       0       │      1       │
├─────────┼───────────────┼──────────────┤
│    0    │               │              │
│    1    │ 'a?: Boolean' │              │
│    2    │ 'b?: String'  │              │
│    3    │ 'a: Boolean'  │ 'b?: String' │
└─────────┴───────────────┴──────────────┘
Methods:
┌─────────┬───────────────────┬───────────────────┐
│ (index) │         0         │         1         │
├─────────┼───────────────────┼───────────────────┤
│    0    │   'someMethod'    │ [ 'a?: Boolean' ] │
│    1    │   'someMethod'    │ [ 'b?: String' ]  │
│    2    │   'someMethod'    │   [ 'aOrB?: ' ]   │
│    3    │ 'someOtherMethod' │        []         │
└─────────┴───────────────────┴───────────────────┘

Got it.
Thanks, @Hookyns!
Looking forward to your fix :)

@carloszimm
Implemented in<EMAIL_ADDRESS>and<EMAIL_ADDRESS>

@Hookyns
I tested and it's working as expected (following your output posted above). I just have some questions.
1 - While the output for the "someMethod" listed the definitions as well as the implementation, the output for the constructor only included the definitions of it. Is that the expected output?
2 - The last output of "someMethod" didn't show the (union) type for the parameter. Is that the expected output? If so, should I invoke a different method for union types for example?

yeah, thats wrong. Implementation shoud not be visible. Ctors are ok, methods are not.
I just simply ouput type name. That union is Container type, it does not have name. There is Type.isUnion() and Type.getTypes(). The getTypes returns array of unioned types, you have to handle it.

Gotcha (:

yeah, thats wrong. Implementation shoud not be visible. Ctors are ok, methods are not.

@Hookyns before closing this issue, should the above point still be flagged as a bug or it was a matter of modifying the code (solution) to detect those specific cases (methods)?

Still a bug for me until I fix that issue with listed implementation signature which. I think I'll be able to fix it today.

Important to note that it's an overload matter. If there wasn't overload, the output of the implementation signature would be ok :)

Sure 🙂

Hello again @Hookyns
So, I'm facing trouble when it comes to reflect on functions + overloads. To be more specific, I'm trying to reflect on functions exported by a library, and many of them have overloads. Your above examples reflect on classes which is more straight forward but the functions (signatures + implementation) I'm working on are all exported separately using ES module (all located at the same file). I followed the code available in #48 but it only prints the first signature (overload) of the function and I have no idea how to modify it adequately to handle that case. For instance, supposing I'm trying to reflecting on the following function (filter) of the RxJS library (one of my fav libs); I can only get the first signature listed in that file using the code of #48. Any ideas on how to properly handle this case or it is something still to be implemented/enhanced in the tst-reflect lib? I thought about trying to gather those signatures in some way/object to then get the overloads' infos but I have no clue how to proceed.
Thanks!

it only prints the first signature (overload) of the function

I have to change the Type.function: FunctionInfo to something like Type.getSignatures(): ReadonlyArray<FunctionInfo>.
FYI @avin-kavish

I just published<EMAIL_ADDRESS>and<EMAIL_ADDRESS>with fixed method overloads and added function overloads.

@all-contributors please add @carloszimm for ideas and bug report


try to raise file descriptors limit in local start scripts

Scope & Purpose
Try to raise file descriptors limit in local start scripts.
The start scripts in scripts/ (used for development, not production) now try to raise the file descriptors limit to 128K.
That is not guaranteed to work, so they also add the startup parameter --server.descriptors-minimum 0 to also allow the startup even when only few file descriptors can be used.

[x] :hankey: Bugfix (requires CHANGELOG entry)
[ ] :pizza: New feature (requires CHANGELOG entry, feature documentation and release notes)
[ ] :fire: Performance improvement
[ ] :hammer: Refactoring/simplification
[x] :book: CHANGELOG entry made

Backports:

[x] No backports required

Testing & Verification

[x] This change is a trivial rework / code cleanup without any test coverage.
[x] The behavior in this PR was manually tested

Link to Jenkins PR run:
http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/13962/

Thanks for confirming. Merging now...


7zip errors out when trying to extract symbolic links.

7-Zip errors when trying to extract symbolic links because in Windows they must be created as admin:
...
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\semver
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\mustache
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\nf
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\which
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\sparkline
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\nopt
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\mkdirp
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\esvalidate
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\esparse
ERROR: Can not create symbolic link : Access is denied. : lib\node_modules\.bin\cdl
ERROR: Can not create symbolic link : Access is denied. : lib\npm\node_modules\.bin\which
ERROR: Can not create symbolic link : Access is denied. : lib\npm\node_modules\.bin\semver
ERROR: Can not create symbolic link : Access is denied. : lib\npm\node_modules\.bin\rimraf
ERROR: Can not create symbolic link : Access is denied. : lib\npm\node_modules\.bin\opener
...

I don't know if you will have a fix for this, but if you have an idea of a pre_install step to run sudo or something, I can work with that.

I've never seen this before. What's the file that you're extracting?

I was trying to update the Heroku script, so that the installer was not necessary.  Either of the Windows files in this manifest (https://cli-assets.heroku.com/branches/stable/manifest.json) should cause the problem because they are built on Ubuntu. NPM on Ubuntu creates sym-links instead of shims like it does on Windows. To my knowledge, 7-zip tries to extract the relative symbolic links with mklink, which, as you know, needs admin privileges to run.

You can append a URL fragment to the URL, which allows you to specify the filename to be downloaded. You can use this to change the filename to *.7z, which will cause 7zip to extract the installer, if it supports the compression format of the .exe, which in this case it does.
This will allow you to bypass the installer.
e.g.
{
   ...
   "architecture": {
        "32bit": {
            "url": "https://cli-assets.heroku.com/branches/stable/heroku-windows-386.exe#/dl.7z"
        },
        "64bit": {
            "url": "https://cli-assets.heroku.com/branches/stable/heroku-windows-amd64.exe#/dl.7z"
        }
    }
    ...
}

That works for this installer, but the problem still stands, and could come up later. I don;t know of a good fix for it though, so you can close the issue if you want.

Okay thanks. I'll close this for now, but we can come back to it if it comes up again.
I don't really want to force an elevation to administrator permissions during a Scoop install in order to handle symbolic links, because it's one of the selling points for Scoop that you shouldn't need to do that.
I'm hoping that most people creating distributions for Windows won't use symbolic links, because they don't really work well (yet).


Display management.v3 clusters in dashboard, without provisioning cluster

Is your feature request related to a problem? Please describe.

Import of a cluster can be performed using management.v3 cluster resource. The cluster is successfully imported, however it is not displayed in UI.
Manually accessing cluster explore via https://${rancher-url}/dashboard/c/${mgmt-cluster}/explorer shows the dashboard, as expected.
Describe the solution you'd like

View and explore management clusters without provisioning clusters.
Describe alternatives you've considered

Extend /dashboard/c/_/manager/management.cattle.io.cluster with similar information to home page, including explore option.
Additional context

Fixing this issue can help resolving https://github.com/rancher/turtles/issues/622, since disabling creation of provisioningv1 cluster prevents installation of the fleet agent on the imported cluster, allowing for more granular configuration options, and alternative installation paths, such as http://github.com/rancher-sandbox/cluster-api-addon-provider-fleet
Otherwise the cluster explore functionality is fully functional (with exceptions of the native fleet installation), user can request kubeconfig, install apps or view the resources.
This issue came from investigation, following the discussion in https://suse.slack.com/archives/C04UQMP0FPB/p1723563705780859


add discord

Describe the feature
I want to add discord in the footer section  please help me with my first contribution @ pr
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

"Hi @mentor or @PA, I noticed that the GitHub Actions bot assigned this issue to me. Can I proceed with the work, or do I need additional confirmation from a PA or mentor?"


[Enhancement] KCL release and artifacts for FreeBSD

Bug Report
1. Minimal reproduce step (Required)
Run $ go install kcl-lang.io/cli/cmd/kcl@latest on FreeBSD. Works for me in Ubuntu 23.
2. What did you expect to see? (Required)
3. What did you see instead (Required)
$ go install kcl-lang.io/cli/cmd/kcl@latest
...
# kcl-lang.io/lib
go/pkg/mod/kcl-lang.io/lib@v0.7.8/install.go:63:41: undefined: kclvmCliBin
go/pkg/mod/kcl-lang.io/lib@v0.7.8/install.go:68:8: undefined: installLib

4. What is your KCL components version? (Required)
Using '@latest' as of Feb 4, 2024.
OS: FreeBSD 14

Hello @yonas. KCL currently does not have a FreeBSD distribution package? Are you willing to contribute it?

Hello @yonas. KCL currently does not have a FreeBSD distribution package? Are you willing to contribute it?

@Peefy Yes, if we can get it to compile. Any idea what might be causing this?

@yonas This is because KCL lacks dynamic library files for FreeBSD, so there is no conditional compilation for configuring the kcl-lang/lib library. Currently, only Windows, Linux, and macos are available. See here: https://github.com/kcl-lang/lib

I see KCL has been completely rewritten in Rust! :+1:  I'm getting this error now:
   Compiling prost-wkt v0.4.1 (/memfs/kcl/kclvm/third-party/prost-wkt)
error: failed to run custom build command for `prost-wkt-types v0.4.1 (/memfs/kcl/kclvm/third-party/prost-wkt/wkt-types)`

Caused by:
  process didn't exit successfully: `/memfs/kcl/kclvm/target/release/build/prost-wkt-types-4463054462d69585/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at third-party/prost-wkt/wkt-types/build.rs:19:52:
  called `Result::unwrap()` on an `Err` value: Error { os: "freebsd", arch: "x86_64" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
gmake: *** [Makefile:26: build] Error 101

We need a way to detect the location of protoc on FreeBSD. Changing these lines resolved the issue:
--- a/kclvm/api/build.rs
+++ b/kclvm/api/build.rs
@@ -8,7 +8,7 @@ fn main() {
     if env::var("PROTOC").is_err() {
         env::set_var(
             "PROTOC",
-            protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+            "/usr/local/bin/protoc"
         );
     }

diff --git a/kclvm/third-party/prost-wkt/wkt-types/build.rs b/kclvm/third-party/prost-wkt/wkt-types/build.rs
index 620c759..f7850d8 100644
--- a/kclvm/third-party/prost-wkt/wkt-types/build.rs
+++ b/kclvm/third-party/prost-wkt/wkt-types/build.rs
@@ -16,7 +16,7 @@ fn main() {
     if env::var("PROTOC").is_err() {
         env::set_var(
             "PROTOC",
-            protoc_bin_vendored::protoc_bin_path().unwrap().as_os_str(),
+            "/usr/local/bin/protoc"
         );
     }
     let dir = PathBuf::from(env::var("OUT_DIR").unwrap());


Abstracted side bars and rewrite the composter + bits shop + skymart value + visitor trade value + pet alert in kotlin

Requires https://github.com/PartlySaneStudios/partly-sane-skies-public-data/pull/101

Following have been rewritten with the new abstraction and support weird gui sizes:

Pet Alert Menu

Bits shop

Skymart Value

Visitor Trade Value

Composter

Fixed the buy price and sell price of an item using the same data

Fixed

Fixed

This good?


fix windows gnu build

I tried to use this library on windows inside msys2, following BUILDING.md and got bunch of erros.
Fixed all of them and planning to improve the instructions as well.
Checked in msys2 and it works with the examples of this repo.
https://github.com/tazz4843/whisper-rs/issues/87
https://github.com/tazz4843/whisper-rs/issues/65
Steps to build:

Download msys2 from https://www.msys2.org/ and install
Install prerequisites from ucrt64 terminal

pacman --needed -S $MINGW_PACKAGE_PREFIX-{toolchain,make,cmake,rust,clang} git

Clone

git clone -b fix/msys2-build --recursive https://github.com/thewh1teagle/whisper-rs.git
cd whisper-rs

Build

cargo build

Try it

wget -q --show-progress \
    https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin -O ggml-base.en.bin
cd examples/full_usage
cargo run 2830-3980-0043.wav ../../ggml-base.en.bin

Thanks :)


Enhance Grunt document

Requires 'junit' in section 'XLT Framework for Grunt or Gulp based Execution'

it seems that 'junit' is included in 'xlt-4.6.1\lib' but not yet copy to running Grunt
Error message
D:\Demandware\Tools\xceptance>grunt
Running "all" task

Running "javaversion" task
Vers= 1.8.0_66

Running "checkPrerequisites" task

Running "compile" task

Running "runall:undefined" (runall) task
java  -Dlog4j.configuration="file:config/js-log4j.properties" -cp "..\xlt-4.6.1\
lib\*:classes:config" org.junit.runner.JUnitCore tests.account.TAccount_CreateAc
count
Error: Could not find or load main class org.junit.runner.JUnitCore
Warning: Command failed: java  -Dlog4j.configuration="file:config/js-log4j.properties" -cp "..\xlt-4.6.1\lib\*:classes:config" org.junit.runner.JUnitCore tests.account.TAccount_CreateAccount
Error: Could not find or load main class org.junit.runner.JUnitCore
 Use --force to continue.

Aborted due to warnings.

Found out that Windows uses semi-colon ";" instead of ":" for classpath's separator http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html

Hi Dustin,
Thank you for pointing out the fix for this one. I will see that I include it within my next update.
Unfortunately this one can't be fixed with just setting an option.
Thanks,
Marcel

Fixed with pull request #88.


journal: replace Result to an either stream

Signed-off-by: tison<EMAIL_ADDRESS>This is a follow-up to #119 and thus ref #117 .

@tisonkun thanks for exploring. But maybe we should keep the current way, considering the extra complexity and inefficiency (doing a match in every next).

@huachaohuang fine.
Closed as invalid.


Extract raw Bson from query

Codecov Report

Merging #77 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master      #77      +/-   ##
============================================
- Coverage     74.37%   74.29%   -0.08%
  Complexity      655      655
============================================
  Files            85       85
  Lines          1955     1957       +2
  Branches        196      196
============================================
  Hits           1454     1454
- Misses          360      362       +2
  Partials        141      141

Impacted Files
Coverage Δ
Complexity Δ

src/main/java/org/smof/collection/ParentQuery.java
84.61% <0%> (-7.06%)
4 <0> (ø)

...n/java/org/smof/collection/AbstractChildQuery.java
87.5% <0%> (-12.5%)
3 <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 767fc16...6e28c52. Read the comment docs.


When debug false, even 500 no longer produce any trace

Bug description
A meaningless and informationless 500 error is written to the logs, but with no details, forcing to redeploy with the full debug mode on, which is a PITA.

Do you have an example?

Do you have an example?


Issuing credits to Zoë

Issue 50000 credits to @zhitzig.

 Follow up
On Sunday, 10-Mar-24 20:58:08 UTC by Gov4Git dev
Issued 50000 credits to member @zhitzig.


graphql-middleware with custom directives, breaks directives

Hi There,
Prior to using graphql-middleware when initializing our apollo server I was simply passing our schema and typeDefs directly to the apollo server upon instantiation.
// instantiate apollo server
this._gServer = new ApolloServer({
      typeDefs: GraphqlTypeDefs.getTypeDefs(),
      resolvers: GraphqlResolvers.getMap(),
      schemaDirectives: {
        directive1: Directive1,
        ...
      }
     ...
    });

However I am using the makeExecutableSchema and applyMiddleware functions as prescribed, and while the middleware itself is being executed as expected, our custom schema directives are no longer being executed. The code I'm using to initialize the server is as follows:
// make an executable schema
const schema: GraphQLSchema = makeExecutableSchema({
      typeDefs: GraphqlTypeDefs.getTypeDefs(),
      resolvers: GraphqlResolvers.getMap()
    });

// apply middlewares to the schema
const schemaWithMiddleware: GraphQLSchemaWithFragmentReplacements =
      applyMiddleware(schema, GraphqlPrePostApiEndpointMiddleware.execute);

// instantiate apollo server
this._gServer = new ApolloServer({
      schema: schemaWithMiddleware, // not working with directives
      schemaDirectives: {
        directive1: Directive1,
        ...
      }
     ...
    });

Can advise how I might get directives working with graphql-middleware?

I just realized, after poking around, that applyMiddleware also takes schemaDirectives as an option, and passing them there fixed my issues. Apologies.


[Main] Add support for RSA key in Jenkinsfile

Issue:  N/A

Problem

Our Jenkins environment is not properly SSH'ing into nodes that need a RSA key. With a PEM key, it works fine. It seems that it is because we are not defining it in our Jenkinsfile. This is needed to work for release testing.
Solution

Added support for RSA keys in the relevant Jenkinsfile.
Testing

Automated Testing

Freeform jobs will be given to reviewers.

Closing at this time.


Fixed a few typo's in the "Install with transformer" section of the README.md

@allcontributors please add @falcon030 for documentarion.

Fixes #3518
@allcontributors please add @falcon030 for docs


Share your work with Mattermost community?

Hi @kaakaa,
Saw your work on "matterpoll" and we'd love to help share it with the Mattermost community. Would you be open to sharing more about your project? https://www.mattermost.org/share-your-mattermost-projects/
We could include the integration as part of our April release announce, timed with the emoji picker and reactions beta release in April.
Wonderful work!

Wow, it's good to hear!
I'll send the form about matterpoll-emoji soon.
Thank you @jasonblais 😄

matterpoll-emoji have been introduced in Mattermost 3.8 Release Blog.
Thanks jason!!


Investigate Uninstaller Options

Stop the daemon
Remove app
Optionally clear ~/.ipfs

oh whoops sorry just made https://github.com/ipfs/electron-app/issues/49

We need both a "Delete Node" and "Uninstall IPFS" (which implies "Delete Node").

[ ] maybe accessible from Settings, once that exists)
[ ] asks user to confirm, saying something like "This will delete all IPFS data (1.3 GB)"
[ ] stops the node
[ ] deletes the data
[ ] "Uninstall IPFS" shuts down application and removes itself completely

@hacdias does merging https://github.com/ipfs-shipyard/station/pull/514 make all this cleaning to happen?

Yup, since the installer will also produce an uninstaller.

@hacdias cool! We should not close this until we can have a uninstaller that can completely clean up after Station, like removing the repository after asking for confirmation from the user.

Sure!

Hi all,
how do I reverse the "ipfs init" command (on Mac's terminal)? I want to get a new hash.

@hubbs129 do you mean a new peer ID?

Hi @hacdias, thanks for getting back to me.
Basically the answer is yes. I have now found where my IPFS folder is on my mac (I'm a n00b) and all I need now a new peer ID, because I accidentally deleted the one I have created.
regards,
H.

@hubbs129 if you don't mind losing the files on your IPFS repository, just close IPFS Desktop, delete ~/.ipfs, and restart IPFS Desktop.

OK I have found my Peer ID thanks to this command "ipfs id" :)
Thanks !

@hacdias
I have another question if you don't mind. I have a peer ID who's contents I want to check out, how do I do this?


Added StockTickerGrid example

@markbrocato could you look on this example please? It's fully working but I am using this.refs a lot and I am pretty sure there is a better solution. What do you think?

I made new PR because I removed my forked repo (lots of confusion in my end): https://github.com/sencha/extjs-reactor/pull/134


Add support for unaligned/intrinsic to Deflate with RLE

There is no AVX support because it was equal or slower to no intrinsics/unaligned-reads during my testing.

Actually, I fixed some bugs and I am not seeing any performance benefit.

Rebased

DEVELOP
 Tool: ../zlib-ng/build-develop/Release/minigzip.exe Levels: 0-0
 Runs: 70         Trim worst: 40

 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 0    100.008%      0.221/0.244/0.255/0.010        0.222/0.256/0.269/0.010      211,973,953
 R     60.465%      3.097/3.715/4.071/0.282        1.151/1.227/1.252/0.024      128,159,347

 avg1  80.236%                        1.979                          0.742
 avg2 160.472%                        3.959                          1.484
 tot                                118.766                         44.508      340,133,300

PR
 Tool: ../zlib-ng/build-rle/Release/minigzip.exe Levels: 0-0
 Runs: 70         Trim worst: 40

 Level   Comp   Comptime min/avg/max/stddev  Decomptime min/avg/max/stddev  Compressed size
 0    100.008%      0.240/0.255/0.268/0.009        0.244/0.262/0.272/0.008      211,973,953
 R     60.465%      2.934/3.326/3.571/0.169        1.157/1.215/1.249/0.025      128,159,347

 avg1  80.236%                        1.791                          0.738
 avg2 160.472%                        3.581                          1.477
 tot                                107.441                         44.299      340,133,300

Compression speed improvement 9.53%.

2022-03-17T19:14:09-07:00
Running C:\Users\nathan\Source\zlib-ng\build-rle\test\benchmarks\Release\benchmark_zlib.exe
Run on (8 X 2995 MHz CPU s)
CPU Caches:
  L1 Data 48 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 1280 KiB (x4)
  L3 Unified 12288 KiB (x1)
--------------------------------------------------------------------------
Benchmark                                Time             CPU   Iterations
--------------------------------------------------------------------------
compare256_rle/c/1                    2.31 ns         2.02 ns    448000000
compare256_rle/c/8                    2.04 ns         1.96 ns    263529412
compare256_rle/c/64                   12.9 ns         12.3 ns     56000000
compare256_rle/c/256                  70.9 ns         69.8 ns      8960000
compare256_rle/unaligned_16/1         1.55 ns         1.53 ns    448000000
compare256_rle/unaligned_16/8         2.01 ns         1.99 ns    344615385
compare256_rle/unaligned_16/64        7.09 ns         6.98 ns     89600000
compare256_rle/unaligned_16/256       32.1 ns         31.5 ns     21333333
compare256_rle/unaligned_32/1         2.08 ns         2.09 ns    344615385
compare256_rle/unaligned_32/8         2.81 ns         2.83 ns    248888889
compare256_rle/unaligned_32/64        8.52 ns         8.58 ns     74666667
compare256_rle/unaligned_32/256       37.2 ns         37.7 ns     18666667
compare256_rle/unaligned_64/1         1.74 ns         1.72 ns    373333333
compare256_rle/unaligned_64/8         2.21 ns         2.20 ns    320000000
compare256_rle/unaligned_64/64        6.11 ns         6.00 ns    112000000
compare256_rle/unaligned_64/256       23.1 ns         23.4 ns     32000000

After 1 year as a draft this is now ready for review. 🤣

Rebased.

I just had a renewed look at this, and considering the earlier unaligned debate, would it perhaps be better if we removed the unaligned_16 variant of this but kept the 32 and 64 variants?
That means the _c version becomes the fallback more often, but I would think the amount of systems that don't support the required builtins is already quite low, and thus there might be even less incentive to have the 16bit version.
There is also a comment referring to strend where strend is removed in deflate_rle.c.
If there is a rebase, should perhaps the first and the last commits be squashed together? At least from my quick look it looks like only new code is moved by the last commit, so it becomes a bit of unnecessary churn. Having the test in a separate commit is great though 👍

I just had a renewed look at this, and considering the earlier unaligned debate, would it perhaps be better if we removed the unaligned_16 variant of this but kept the 32 and 64 variants?

I think there is still some value because of the wide variety of systems that are being compiled against. It matches with compare256_unaligned_16. It shouldn't add too many bytes to code size either. However, if you want me to remove it I can.

If there is a rebase, should perhaps the first and the last commits be squashed together?

Fixed.

Tested as-is, and it does not trigger any Coverity warnings.

i9900K, cores locked to 3200Mhz, deep idle-states disabled, cpuset used to isolate cores from rest of system and functions aligned to 64b cachelines.

Instead of doing the byte shifts I've thought about doing two memory loads.

Rebased

Instead of doing the byte shifts I've thought about doing two memory loads.

I tried this and it is much slower.

I'm gtg on this.


Update all Articles Pages with related articles to include 'Related Articles' eyebrow

Update all Articles Pages with related articles to include 'Related Articles' eyebrow as part of content
Eyebrow present : https://www.merative.com/blog/is-real-world-data-the-real-deal
Missing Eyebrow example : https://www.merative.com/blog/price-transparency-aeob

All of the cards have the eyebrow overlay in the blogs.
@keith-kaplan and @kunwarsaluja this is ready for re-review.

@keith-kaplan let me know if I can close this ticket.


Provide error messages while passing static embeddings to lightning pipelines

All flair pipelines were removed, so this is no longer valid


In forest minimise can we run initial run parellel

we are trying to optimize using forest minimize. we have set n_initial_points to 5 and initial_point_generator to "random", for n_initial_points of iteration random values are generated and ran one after another.
Is there any way to run these as parallel?
we have tried "n_jobs" it doesn't have any effect

n_jobs controls the number of jobs for fit and predict of the surrogate model and is not related to parallel evaluation of the objective function.
If you can evaluate the objective in parallel you could create the initial points manually, evaluate them in parallel and then use the x0 and y0 args to pass the results to the *_minimize functions.
Alternatively one can use the Optimizer class directly instead of the `_minimize functions as shown in the parallel optimization example.


nixos/gnome3: get keyboard layout(s) from xkb

Motivation for this change
GNOME3 defaults to a US keyboard layout, with the user being able to configure this in the Settings dialog. Deleting the default value for keyboard layout makes it instead use the xkb default layout (source), which the NixOS manual says to set in configuration.nix (and is presumably where every other desktop environment / window manager gets their choice of keyboard layout from 😒)
GNOME's Wayland compositor still uses xkb, so this change doesn't depend on Xorg
I tried this change on my own system and found that GNOME had preserved the previous default setting for all of my users. I think this is probably ideal - current users see no change (some may not have set layout in configuration.nix, but only in gnome-control-center), whereas for new users the keyboard layout setting in configuration.nix works out-of-the-box (but gnome-control-center can still be used to change keyboard layout if desired)
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

I am pretty sure GNOME 3 defaulting to US layout was a bug caused by missing xkb configuration file which was fixed in https://github.com/NixOS/nixpkgs/pull/32203.
The schemas already use [] as the default value, so overriding the option will definitely have no effect.

Thanks, that does make a lot of sense. Oops.


Sidebar three-level menu?

Is it possible to create sidebar three-level menu?

Unexpected behavior when clicking on second level


cannot use "google.golang.org/cloud/bigquery".BatchPriority (type string)

When build my cod
job, err := client.Copy(e.ctx, dest, query, bigquery.WriteTruncate, bigquery.BatchPriority)
error.
./app.go:57: cannot use "google.golang.org/cloud/bigquery".BatchPriority (type string) as type "google.golang.org/cloud/bigquery".Option in argument to client.Copy:
string does not implement "google.golang.org/cloud/bigquery".Option (missing "google.golang.org/cloud/bigquery".implementsOption method)
only bigquery.WriteTruncate works fine

Try bigquery.JobPriority(bigquery.BatchPriority)
So the full line would be
 job, err := client.Copy(e.ctx, dest, query, bigquery.WriteTruncate, bigquery.JobPriority(bigquery.BatchPriority))

wow perfect work propertly.  thanks


Lets Encrypt SSL

Hello,
is there a Guide to install SSL Let´s Encrypt Certicate?
I install Sesdashboard over AWS.
Thank you
Dany

Hello!
Unfortunately, there is no Let´s Encrypt SSL install guide for SesDashboard. But you could use third party guides for common nginx with docker installation. I found this one: https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71 I didn't try it myself, but it looks fine to me.
In the future I'm planning to improve installation and add ssl support, but there is no estimation time for that.
Thanks.

I think it's easier with Caddy. Here's an example: https://github.com/samyogdhital/listmonk-caddy-reverse-proxy - you just add some lines to the docker-compose.yml and then edit the simple caddy file.

@jgimenez Based on that config, you have no external/global version of nginx running right? I'm installing this on an nginx vhost so I get Error starting userland proxy: listen tcp4 <IP_ADDRESS>:443: bind: address already in use when I use your config. So I changed the ports like this:
    webserver:
      restart: unless-stopped
      image: nginx:alpine
      container_name: sesdashboard-webserver
      working_dir: /application
      volumes:
          - .:/application
          - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
      ports:
       - "82:80"

    traefik:
      image: traefik:2.9
      restart: unless-stopped
      ports:
        - "8443:443"
      command:
        - "--providers.docker=true"
        - "--providers.docker.exposedbydefault=false"
        - "--entrypoints.websecure.address=:443"

Along with a basic proxy pass to port 82 in the vhost nginx config:
server {
	    listen              443 ssl;
		server_name			sesdashboard.example.com;

  location / {
        proxy_pass  http://<IP_ADDRESS>:82;
     proxy_set_header   Host            $http_host;
     proxy_set_header   X-Real-IP       $remote_addr;
     proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }

}

server {
    listen              80;
	server_name			sesdashboard.example.com;
	  location / {
return 301 https://$host$request_uri;
	  }
}

Does that seem correct?
It's resulting in a "file not found" error https://github.com/Nikeev/sesdashboard/issues/68#issuecomment-2024271944.
If I change "82:80" to just "80" or "82", like you have it, I get a 502 error instead. I've tried disabling my firewall to no avail.
Changing --entrypoints.websecure.address=:443 to 8443 makes no difference.

Looking at this caddy setup for comparison https://github.com/samyogdhital/listmonk-caddy-reverse-proxy/blob/main/docker-compose.yml, they map it to app:9000 https://github.com/samyogdhital/listmonk-caddy-reverse-proxy/blob/main/caddy/Caddyfile. Would the equivalent of that be webserver:82?
docker ps
CONTAINER ID   IMAGE                              COMMAND                  CREATED        STATUS       PORTS                                             NAMES
498da6b21b59   traefik:2.9                        "/entrypoint.sh --pr…"   3 hours ago    Up 3 hours   80/tcp, <IP_ADDRESS>:8443->443/tcp, :::8443->443/tcp   sesdashboard-traefik-1
8adc9120c3dd   nginx:alpine                       "/docker-entrypoint.…"   3 hours ago    Up 3 hours   <IP_ADDRESS>:82->80/tcp, :::82->80/tcp                 sesdashboard-webserver
f22e95623bc8   sesdashboard-php-fpm               "/usr/sbin/php-fpm8.…"   29 hours ago   Up 3 hours   9000/tcp                                          sesdashboard-php-fpm
1afbe03b4a3b   mysql:8.0                          "docker-entrypoint.s…"   29 hours ago   Up 3 hours   3306/tcp, 33060/tcp                               sesdashboard-mysql

I'm doubtful that matters though.


Update the Social Share OpenGraph Image with দাবির stats

[x] Added new TRPC procedure for fetching petition OG image details
[x] Completed the Opengraph Image Template
[x] Add a custom layout so that it doesn't show the Navigation bar
[x] Optimized the page so that there's as little JS as possible for the image preview page

Ok, I am trying that now.


WIP add support for the kintex high performance banks

Signed-off-by: Hans Baier<EMAIL_ADDRESS>

@mkurc-ant @kgugala @mithro I cannot reproduce the failure for kintex7 locally.
Would you please send me the file /root/prjxray/prjxray/fuzzers/058-pip-hclk/logs_xc7k70tfbg676-2/stdout.2022-11-09T06-17-04.992001.log so that I can figure out what went wrong there.

@kgugala @mkurc-ant Any ideas why the kintex job was aborted?

I am guessing 6h timeout?

@pgielda Unfortunately it seems that kintex7 really needs that much time. I tried reducing the ROI, but then 025-bram-config fails complaining it has not enough BRAM instances in the ROI. What should I do now?

FYI @tmichalak

@hansfbaier the default timeout for a job, before GitHub cancels it, is 360 minutes, which is exactly what seems to happen here.
You can change that using timeout-minutes per job or step - in your case using that in the run tests step should solve the problem.

hmm, looks like the timeout setting was ignored?

Looks to me that the timeout-minutes was added to the 'Build' step while the step that times out is the run test step. @hansfbaier

@kgugala @tmichalak Yes I added it to the wrong step. Thanks!

@tmichalak Now I have it on 'Run Tests' but unfortunately it did not work.

Looks like we have reached a hard limit on GitHub here

To have a job running more than 6 hours, we would need to have a self hosted agent, see
https://stackoverflow.com/questions/68187987/github-actions-job-timeout

@hansfbaier the CI here is run in custom runners

timeout seems to be working. Kintex job is now running for 7h

@kgugala Great! Moving the timeout configuration into the parent element did the trick!

@kgugala It looks like some of the other series tests are flickering. Race condition?

there might be some instabilities - in general fuzzers, by nature, random so sometimes we hit a case where the flow fails unexpectedly

Ah, the 037-iob18-pips fuzzer does not terminate, the todo's do not vanish:
RIOI.IOI_ODELAY0_CLKIN.IOI_OCLK_0
RIOI.IOI_ODELAY1_CLKIN.IOI_OCLK_1
RIOI.RIOI_O0.RIOI_ODELAY0_DATAOUT
RIOI.RIOI_O0.RIOI_OLOGIC0_OQ
RIOI.RIOI_O1.RIOI_ODELAY1_DATAOUT
RIOI.RIOI_O1.RIOI_OLOGIC1_OQ

These are the unsolved TODOs so far

Great! All the fuzzers ran successfully now, only checkdb still reports collisions. Got to figure those out.

My newly commited conditional in a Makefile might fail for non kintex. Will look into it tomorrow. Will be a trivial fix. Kintex is redy for review nevertheless.

Another Makefile needs the same adjustment. Also, fuzzers/036-iob18-ologic/bits.dbf I have just copy and pasted. Should this be empty by default? Is the fileformat documented somewhere?

@hansfbaier the .dbf is for zero groups filtering and it can be empty by default. You can find a short documentation for this format here

@hansfbaier CI is indeed green. Just had a two small comments. Other than that LGTM.

@tmichalak Thank you, will tidy up tomorrow!

@tmichalak I applied your review notes and rebased to master. Concerning the .dbf files I removed/adjusted the parts which are obviously not applicaple, but kept the rest of the bits, because in the fuzzer results it looks like the same frame range is used and thus I suspect by default that the changes are valid, especially as some of the io logic fuzzers gave identical results to the high range bank fuzzers so that I actually deleted them and just copied their bits over.

@tmichalak It is green again. Except Artix, but that seems to be that flickering timeout int the fuzzer
2022-11-23T22:21:04.8795880Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: + '[' -f /root/prjxray/prjxray/fuzzers/065b-gtp-common-pips/build_xc7a200tffg1156-1/todo/timeout ']'
2022-11-23T22:21:04.8796540Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: + echo 'ERROR: timeout'
2022-11-23T22:21:04.8797097Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: + exit 1
2022-11-23T22:21:04.8797705Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: make[2]: *** [../pip_loop.mk:68: run] Error 1
2022-11-23T22:21:04.8798403Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m:
2022-11-23T22:21:04.8799154Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: --------------------------------------------------------------------------
2022-11-23T22:21:04.8799847Z 22:21:04 | 2022-11-23T22:21:04 - xc7a200tffg1156-1/065b-gtp-common-pips      - 1h56m: !Failed! @ 2022-11-23T22:21:04.581598 with exit code: 2

@hansfbaier nice work. Thanks a lot !


update ci.yml for go 1.14

Codecov Report

Merging #29 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master    #29   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          12     12
  Lines        1632   1632
=====================================
  Hits         1632   1632

Flag
Coverage Δ

#unittests
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


fixed title misalignment

Issues Identification
Closes: #801
Description
Summary
centers the alignment of title term of service
Details
i commented out the unnecessary margin and added few css properties to enhance.
Types of Changes
Please check the boxes that apply

[ ] Bugfix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (Documentation content changed)
[ ] Other (please describe):

Checklist
Please check the boxes that apply

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] My changes do not break the current system and pass all existing test cases
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes

Screenshots
If applicable, please attach screenshots of the changes made to the user interface.

Additional Information
Please provide any other information that is relevant to this pull request.

accept this PR under hacktoberfest-accepted and gssoc-ext, thank you


Feature/49 variable replacement

Q
A

Branch
master

Bug fix?
no

New feature?
yes

BC breaks?
no

Deprecations?
yes

Tests pass?
yes

Fixed issues
chameleon-system/chameleon-system#49

License
MIT

Branch is based on #48, so please review this first.

Could you resolve the conflict? After this is done the PR is ready to be merged

Done


Adding regional and optimization modules

Codecov Report
Attention: 122 lines in your changes are missing coverage. Please review.

Comparison is base (cade158) 39.45% compared to head (660b252) 43.29%.

Files
Patch %
Lines

src/invert4geom/optimization.py
49.69%
83 Missing :warning:

src/invert4geom/regional.py
75.00%
17 Missing :warning:

src/invert4geom/synthetic.py
0.00%
16 Missing :warning:

src/invert4geom/utils.py
72.72%
6 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   39.45%   43.29%   +3.83%
==========================================
  Files           6        8       +2
  Lines         811     1081     +270
==========================================
+ Hits          320      468     +148
- Misses        491      613     +122

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


renovatebot(deps): update dependency org.springmodules:spring-modules-cache to v0.8a

This PR contains the following updates:

Package
Update
Change

org.springmodules:spring-modules-cache (source)
patch
0.8 -> 0.8a

Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Renovate Ignore Notification
As this PR has been closed unmerged, Renovate will now ignore this update (0.8a). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the ignoreDeps array of your renovate config.
If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.


feat:  Adding support for bumping 'nano' level version. Also adding t…

…ests demonstrating bumping from 0.0.0.  Addresses #172

Credit goes to @EtaCassiopeia for these changes against an internal private fork - this PR represents porting those changes back to this public version.

Thanks @EtaCassiopeia !


Add Spec tests for courses

Added spec tests to check that each course actually compiles. It is also fully integrated with Travis which I would definitely recommend we use. (You guys will need to actually enable the repo from the travis side)

This is actually a bigger PR than I was expecting. I'm going to delay this one until after PuppetConf so it can get reviewed the way it deserves. Thanks for starting this!

@binford2k Can we get this one looked at now that PuppetConf is over?

@dylanratcliffe will do very soon. You might also be interested in the beginnings of some real student testing too. https://github.com/puppetlabs/courseware-virtual/tree/master/fundamentals/_files/tests

@dylanratcliffe sorry this has sat for so long, we'll fix it and merge

I think that we've duplicated all of this now.  Sorry we didn't do this sooner @dylanratcliffe


text/template: optimize Clone+Funcs+Execute sequence

In #31107 it came up that maybe most of the requested new functionality would be doable outside the package if it were possible to install new functions on a per-execution basis. One option is to add a new Execute that takes a second FuncMap, but I think we should consider not adding new API and instead make Clone+Funcs+Execute run faster.
It might be that all that's needed is making Clone make the actual template backing data copy-on-write. Then Clone is cheap. Then Funcs would copy only the map, or maybe even start a second map, also cheap. And Execute would be unchanged.
This issue is to think about whether this is possible to do without visible semantic changes, and if so, to do it.
/cc @bep @robpike @empijei

Thanks for opening this. It would indeed address my need to seamlessly provide a per-execution nonce on the framework side.
Both adding other functions and cloning would work.

I assume you still would need to synchronize the clone? What is the runtime cost compared to doing it the proper way=

What is the cost

This could be a lazy copy so potentially very little. It would just mark the template as being in use by more than one user and thus turning on a copy-on-write flag. I am similarly worried about this but Russ said this could be done with very little overhead.

doing it the proper way

Are you considering as an alternative to add a FuncMap to the Execute call? I would personally prefer it too but it would require an API change.
If your concern is about performance, would you be ok with expressing this semantic as Clone+Funcs+Execute (which has the perk of not changing the API) if it had a similar runtime cost?

@rsc I am still trying to wrap my head around this.
How could this be acceptably efficient to clone the templates every time we need to render them?
Most of our servers require to render the same template tens of times with different data and different nonces at the same time.
Can you please share a bit of technical details on what you had in mind to implement this so I can maybe start taking a look?

One option is to add a new Execute that takes a second FuncMap, but I think we should consider not adding new API and instead make Clone+Funcs+Execute run faster.

I think I have to disagree here. The number of changes required to make Clone+Funcs+Execute faster will be immense.
Here's a simple patch that does Execute FuncMaps:
Patch
diff --git a/src/html/template/template.go b/src/html/template/template.go
index 69312d36fd..07568c7d83 100644
--- a/src/html/template/template.go
+++ b/src/html/template/template.go
@@ -124,6 +124,20 @@ func (t *Template) Execute(wr io.Writer, data interface{}) error {
 	return t.text.Execute(wr, data)
 }

+// ExecuteFuncMap applies a parsed template to the specified data object,
+// FuncMap overlay and writes the output to wr.
+// If an error occurs executing the template or writing its output,
+// execution stops, but partial results may already have been written to
+// the output writer.
+// A template may be executed safely in parallel, although if parallel
+// executions share a Writer the output may be interleaved.
+func (t *Template) ExecuteFuncMap(wr io.Writer, data any, funcs FuncMap) error {
+	if err := t.escape(); err != nil {
+		return err
+	}
+	return t.text.ExecuteFuncMap(wr, data, funcs)
+}
+
 // ExecuteTemplate applies the template associated with t that has the given
 // name to the specified data object and writes the output to wr.
 // If an error occurs executing the template or writing its output,
@@ -139,6 +153,21 @@ func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{})
 	return tmpl.text.Execute(wr, data)
 }

+// ExecuteTemplate applies the template associated with t that has the given
+// name to the specified data object and FuncMap overlay writing the output to wr.
+// If an error occurs executing the template or writing its output,
+// execution stops, but partial results may already have been written to
+// the output writer.
+// A template may be executed safely in parallel, although if parallel
+// executions share a Writer the output may be interleaved.
+func (t *Template) ExecuteTemplateFuncMap(wr io.Writer, name string, data any, funcs FuncMap) error {
+	tmpl, err := t.lookupAndEscapeTemplate(name)
+	if err != nil {
+		return err
+	}
+	return tmpl.text.ExecuteFuncMap(wr, data, funcs)
+}
+
 // lookupAndEscapeTemplate guarantees that the template with the given name
 // is escaped, or returns an error if it cannot be. It returns the named
 // template.
@@ -368,6 +397,7 @@ func (t *Template) Lookup(name string) *Template {
 // Must is a helper that wraps a call to a function returning (*Template, error)
 // and panics if the error is non-nil. It is intended for use in variable initializations
 // such as
+//
 //	var t = template.Must(template.New("name").Parse("html"))
 func Must(t *Template, err error) *Template {
 	if err != nil {
diff --git a/src/text/template/exec.go b/src/text/template/exec.go
index c42cbb2ad3..9bdf30bf20 100644
--- a/src/text/template/exec.go
+++ b/src/text/template/exec.go
@@ -37,6 +37,7 @@ type state struct {
 	node  parse.Node // current node, for errors
 	vars  []variable // push-down stack of variable values.
 	depth int        // the height of the stack of executing templates.
+	funcs map[string]reflect.Value
 }

 // variable holds the dynamic value of a variable such as $, $x etc.
@@ -187,6 +188,21 @@ func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{})
 	return tmpl.Execute(wr, data)
 }

+// ExecuteTemplateFuncMap applies the template associated with t that has the given name
+// to the specified data object and writes the output to wr.
+// If an error occurs executing the template or writing its output,
+// execution stops, but partial results may already have been written to
+// the output writer.
+// A template may be executed safely in parallel, although if parallel
+// executions share a Writer the output may be interleaved.
+func (t *Template) ExecuteTemplateFuncMap(wr io.Writer, name string, data interface{}, funcs FuncMap) error {
+	tmpl := t.Lookup(name)
+	if tmpl == nil {
+		return fmt.Errorf("template: no template %q associated with template %q", name, t.name)
+	}
+	return tmpl.ExecuteFuncMap(wr, data, funcs)
+}
+
 // Execute applies a parsed template to the specified data object,
 // and writes the output to wr.
 // If an error occurs executing the template or writing its output,
@@ -198,10 +214,24 @@ func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{})
 // If data is a reflect.Value, the template applies to the concrete
 // value that the reflect.Value holds, as in fmt.Print.
 func (t *Template) Execute(wr io.Writer, data interface{}) error {
-	return t.execute(wr, data)
+	return t.execute(wr, data, nil)
 }

-func (t *Template) execute(wr io.Writer, data interface{}) (err error) {
+// ExecuteFuncMap applies a parsed template to the specified data object,
+// FuncMap overlay and writes the output to wr.
+// If an error occurs executing the template or writing its output,
+// execution stops, but partial results may already have been written to
+// the output writer.
+// A template may be executed safely in parallel, although if parallel
+// executions share a Writer the output may be interleaved.
+//
+// If data is a reflect.Value, the template applies to the concrete
+// value that the reflect.Value holds, as in fmt.Print.
+func (t *Template) ExecuteFuncMap(wr io.Writer, data interface{}, funcs FuncMap) error {
+	return t.execute(wr, data, funcs)
+}
+
+func (t *Template) execute(wr io.Writer, data interface{}, funcs FuncMap) (err error) {
 	defer errRecover(&err)
 	value, ok := data.(reflect.Value)
 	if !ok {
@@ -212,6 +242,7 @@ func (t *Template) execute(wr io.Writer, data interface{}) (err error) {
 		wr:   wr,
 		vars: []variable{{"$", value}},
 	}
+	addValueFuncs(state.funcs, funcs)
 	if t.Tree == nil || t.Root == nil {
 		state.errorf("%q is an incomplete or empty template", t.Name())
 	}
@@ -436,6 +467,7 @@ func (s *state) walkTemplate(dot reflect.Value, t *parse.TemplateNode) {
 	newState.tmpl = tmpl
 	// No dynamic scoping: template invocations inherit no variables.
 	newState.vars = []variable{{"$", dot}}
+	newState.funcs = s.funcs
 	newState.walk(dot, tmpl.Root)
 }

@@ -594,9 +626,14 @@ func (s *state) evalFieldChain(dot, receiver reflect.Value, node parse.Node, ide
 func (s *state) evalFunction(dot reflect.Value, node *parse.IdentifierNode, cmd parse.Node, args []parse.Node, final reflect.Value) reflect.Value {
 	s.at(node)
 	name := node.Ident
-	function, isBuiltin, ok := findFunction(name, s.tmpl)
-	if !ok {
-		s.errorf("%q is not a defined function", name)
+	isBuiltin := false
+	function := s.funcs[name]
+	if !function.IsValid() {
+		ok := false
+		function, isBuiltin, ok = findFunction(name, s.tmpl)
+		if !ok {
+			s.errorf("%q is not a defined function", name)
+		}
 	}
 	return s.evalCall(dot, function, isBuiltin, cmd, name, args, final)
 }

As you can see this very small API change make s for a very clean way of providing execution FuncMap overlays.

I think the PR  text/template: add ExecuteFuncMap and ExecuteTemplateFuncMap #54432   is really helpful, and good enough.
How to push the proposal & progress?  Thank you very much.

Right, I was suggestion an optimized Clone, not the current Clone. There is no need to make the copy of everything eagerly. It can all be done lazily. That said, it is undeniably less work to add ExecuteFuncs instead, and it's more convenient for callers too, so I've changed my mind to do that. Closing this.


c2d plugin should reference current page when deferring a write

several methods fail after calling pdf.newPage().  Add a utility function to cd2 and call it from needed functions.

Fixed in 13fbfddc191670ae0f54e56ee34eee987387f3ec


[Plugin] Google Maps position problem on iOS

Trying to configure Google Maps widget where I have pin with some infoWindow opening when clicking on it.
All good if I have the location zoomed somehow. But in case, I don't have any zoom on the map, it causes some map position issues.
For instance, when I place the marker more at the top and click on it, the map jumps down and grey area shows at the top. Like said, only happens when not zoomed and on iOS (Android works good).
I took the code from official example and modified it just for the markers.

Any ideas?

Hi @frasza
Does it persist with the last google_maps_flutter and the last flutter version (stable or master)?

Hi @frasza
if you're still experiencing this problem, please create a new issue and provide the information
required in the template.
Thank you


refactoring the plotting system

some first working bits and pieces for slightly restructured plotting code.
main aspects:

separate all parts that are not backend (like matplotlib) dependent but more general. This includes quite a lot of the current logic in the autoplot elements.
should end up such that adding other plotting backends should be fairly easy.

Some notes for orientation:

there's no more mpl.py file but rather a submodule
included a simple way for customizing matplotlib appearance.
added a new class 'AutoFigureMaker' whose job is only to track the elements of the figure and arrange them into subplots depending on user settings.
2d plots are not yet working, but it should be enough to get an idea of where it's going.

@jenshnielsen
this is still very rough, but i thought i'll open a PR already to give you chance to look since you also wanted to make changes to the matplotlib parts.
some tests are working fine, which hopefully should be enough to get an idea, see:
/test/gui/mpl_autoplot.py
/test/apps/autoplot_app.py
(2D plots i need to plug back in -- i stopped today when the main parts seemed to fit together)
would be great to hear any thoughts!

i should also add that the recent changes for high-dpi scaling aren't yet re-implemented here. but shouldn't be too hard to get that merged back in.

Thanks for the feedback, both of you! I'll probably have some time this weekend to ponder some of the deeper suggestions and see if i can refine the concept a bit (especially the role of the PlotType, style, etc.).

@jenshnielsen @astafan8  -- with a slight delay caused by a winter full of grant writing :|
I think i addressed most of the stuff you had brought up before, i think it's a bit cleaner now.
(and fully functional, as far as I've tested).

@wpfff
It seems this refactoring lacks the option we implemented a while back to have complex options (Real, Real/Imag, Mag/Phase) in the plot window.
So, it only has a button callded Mag/Phase, which by default is disabled (default is plotting Real/Imag) and enabling plots Mag/Phase.
I tried to implement these options, but I faced a few problems. I am creating a PR in this branch with my modification and expalin what the problems are.

@FarBo do you mean it's missing an option to just plot Real? Because the choice between Real/Imag and Mag/Phase is implemented. (I tried to streamline the number of buttons a bit, like using toggle buttons when it comes to effectively binary choices)

@FarBo you could checkout the file tests/apps/autoplot_app.py for some examples i played with.

@wpfff

do you mean it's missing

Yes, if we want to have real plot, then we need to have 3 buttons, if not, the current implementation works.
Also, in my implementation before this refactoring, the real/imag plot was plotting real and imag parts separately in two subplots, which I think it is more cleaner.
I am trying to push my changes in a PR in your forked repo, then we can discuss there easily.

@FarBo I see - plotting real and imaginary separately is honestly something i hadn't thought about -- for none of my own needs i would see this as desirable, but i see how that could be useful to others :)
to summarize: we should then maybe have an option to only plot real, and an option to separate real/imag into different subpanels?

hm, i can't figure out how to give you access to my fork... i'll try to figure that out today.

@wpfff
I agree with the summary.
I did most of things regarding having real, so I can create a PR, then we can discuss there.
I don't know on top of my head to how to give access. But, please let me know if you made it possible :)

i can't figure out how to do this generally.... i invited you as a collaborator to my fork, maybe that will work?

it worked. i created the pr there

@FarBo i adopted your suggestions, it all seems to work fine.
I'll leave making the UI prettier (with icons for each options) for a later PR.

@wpfff
Thanks for further work on that. That's correct and seems it is working :). There is an extremely tiny thing that I just want to report and it is not like a bug or issue in my opinion: For colormap plots, Re/Im and split Re/Im are the same and should be the same of course (In a very ideal world, one of them could be disabled. But the amount of work to have this little thing does not worth it)
Regardless of this complex topic, I noticed a few things that I would like to mention here (I highlighted the differences between before and after refactoring that might worth to notice and improve):
Pic1(copy metadata is missing, plot title is on top of plot and plot icons look very small):
https://microsoft-my.sharepoint.com/:i:/p/a-fbonabi/Ef0aHJvCXu1HiIu1GwHgiZ4BfgmcxECSL8aTe_GDvn-CMA?e=xlUseN
Pic2 (the legend is in the middle of plot for this specific case):
https://microsoft-my.sharepoint.com/:i:/p/a-fbonabi/EeAIZkILEpNDsjrWWkHdg_8BHhPF-Dh-8yC8xjKxcG4DJg?e=GA5TNp

@wpfff
Regarding the mentioned points above:
I think Metadata export added in this PR by @astafan8:
https://github.com/toolsforexperiments/plottr/pull/173
Scaling is also handled in this PR by @Akshita07:
https://github.com/toolsforexperiments/plottr/pull/156

@FarBo i don't have access to the screenshots. can you embed somewhere else than sharepoint?

@wpfff
Sorry, I chose my work onedrive to share :)
This should work:
https://1drv.ms/u/s!AkKmOu47nt6ygrI-hkeJZ-1ZzjU6Kw?e=6vX4Ob

ah, yes -- i think i missed a couple of things that were implemented while i worked on this. i'll try to fix that today.

I've reimplemented those two pieces.
One comment about copying the meta info: I really like that feature, but think it'd be better if it copied all metadata rather than just the qcodes specific fields (that's what i've done now).
For instance, I'll be using the tool without the qcodes dataset mostly, so my meta data will have different keys (but i would still like to have a button that supports that).
I think it makes more sense to copy everything regardless of where the meta data comes from.
If you really only want to copy the qcodes entries, we could think of a way to filter (maybe through a config file or a variable that gets set when then autoplot app is created).

One comment about copying the meta info: I really like that feature, but think it'd be better if it copied all metadata rather than just the qcodes specific fields (that's what i've done now).

this is a great suggestion! let's indeed copy all metadata. however,

the thing in the original implementation was to strip the qcodes_ prefix for the keys, otherwise the resulting keys in the metadata will have this annoying (?) prefix. one way would be to remove that prefix from the place where these keys are created (upon reading of qcodes dataset), another way would be to keep the logic that strips the prefix from the keys. or, we say it's a non-issue.
another thing is - are the values of the "meta info" guaranteed to just be small strings and numbers? or can they also be numpy arrays or something huge? if so, then filtering the keys to copy is actually useful.

1. the thing in the original implementation was to strip the qcodes_ prefix for the keys, otherwise the resulting keys in the metadata will have this annoying (?) prefix. one way would be to remove that prefix from the place where these keys are created (upon reading of qcodes dataset), another way would be to keep the logic that strips the prefix from the keys. or, we say it's a non-issue.

Good point, i thought about that, but i think it boils down to a matter of taste. My thinking is that there can be multiple 'sources' of metadata (a student i'm working with is working on a fitting module, for example), and the prefix would actually help group entries by meaning. I'm tempted to vote non-issue for now.

2. another thing is - are the values of the "meta info" guaranteed to just be small strings and numbers? or can they also be numpy arrays or something huge? if so, then filtering the keys to copy is actually useful.

Good catch. I could imagine to either only allow 'simple' data types, or to return the string representation and truncate after N characters (maybe 200 or so).

@wpfff
I see copy metadata is added.
Still the plottype buttons are very small compared to the latest release:
https://1drv.ms/u/s!AkKmOu47nt6ygrI_W8T8SJUw_AHZFQ?e=ArafkO

Still the plottype buttons are very small compared to the latest release:
https://1drv.ms/u/s!AkKmOu47nt6ygrI_W8T8SJUw_AHZFQ?e=ArafkO

@FarBo : true -- matter of preference I guess. Along with one of my recent commits I made them the same size as the ones in the other toolbar to be consistent which i thought looked better (they are dpi-scaled, though).
I'm open to changing that back, though, if you disagree.

@wpfff
true -- matter of preference I guess. Along with one of my recent commits I made them the same size as the ones in the other toolbar to be consistent which i thought looked better (they are dpi-scaled, though). I'm open to changing that back, though, if you disagree.
The buttons on the right looks natural to me and as far as I remember, small sizes (left) are not preferred by some of users.
I think it would be nice to have the bigger like the right plot.

@wpfff
Thanks for the updates. I didn't go through the code structure and only tested the functionality. These final commits solved all my raised concerns. :)

Thanks, @FarBo! I'm still waiting for comments from @astafan8 (for this PR i think it'd be important that there's some consensus on structure, and he wanted to have a look)

@astafan8 - just to poke you :) are you still planning on giving comments on this?
If not, i'd like to merge soon. It's quite well-behaved now and i'm working on an additional backend that follows this structure.
There will probably still be some refactoring once i have another backend going (mainly regarding what should be part of the matplotlib specific part and what is more general) but the overall structure works well i think.

just to poke you :) are you still planning on giving comments on this?

thanks @wpfff ! I will do this week

@wpfff ETA today :)

Thanks, @astafan8 -- i'll adopt your suggestions today.
I'll probably also include the importlib suggestion. Much better solution -- i just hadn't looked properly :)


Timeout functionality

Closing in favor of this effort: https://github.com/cybergis/cybergis-compute-core/pull/108


Change bot command structure

Changed the bot command structure from requiring the / prefix to requiring @rm to be the prefix. This brings it in line with GitHub's dependabot.
Changed from:
/help

to
@rm help

I could also do @rmb to be a little more specific. I think typing the entire repo-mountie would be a bit over-the-top.


typos

Fixes some typos.

Also we are adding your exporter to our ansible installation of fluntd.

Great, thanks for that @paulfantom


Blake Stone AoG doesn't load

First of all, I love ArkOS! Thank you!!!
On my uptodate rg503 I installed Blake Stone AoG through the uptodate Portmaster and it doesn't run. I see the ArkOS splash screen and then a black screen for 1 second and then the splash screen again. And it drops me back out. I didn't copy over any data, it's supposed to use the shareware files.
The other six ports that I tried worked fine.

Hello,
Thank you for the kind words.  For PortMaster port issues, you'll need to report the issue to the PortMaster group here: https://github.com/PortsMaster/PortMaster-New/issues
Take care.


MIGRATED: iOS WebView doesn't support hash url change. The onNavigationStateChange listener will not be called when url hash changes. (#20447)

Migrated from https://github.com/facebook/react-native/issues/20447.
@ll929 says:

Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.3
CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 109.62 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 9.11.1 - ~/.nvm/versions/node/v9.11.1/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v9.11.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
Android SDK:
Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.1, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3
API Levels: 23, 24, 25, 26, 27
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
Expected Behavior
When url hash change, the webivew onNavigationStateChange listener will be invoked, and the canGoBack properties is true
Actual Behavior
When url hash changes, the webivew onNavigationStateChange hasn't been invoked

Should it change?
It should definitely be consistent between Android and iOS, but should it change when the URL hash changes?
The URL hash typically refers to some portion of the document; clicking an anchor link will fast forward through the document to that portion.
But is the behavior really any different from scrolling? Scrolling also moves the viewport to a different portion of the document.
I think if you look at most Router implementations, currently, they will actually change the URL (not just the hash) when any significant change in the UI occurs.
Then again I could imagine multi-step forms which use the hash to indicate at which portion of the form a user resides; should we support that?
Does onNavigationStateChange trigger any other functionality? Such as calling injectedJavascript?

I think it would be useful to give more info to the users? I have use cases where I want to monitor when the url changes and I have to use postMessage inside react-router to notify react-native of the change (to update navigation title for example)

I think there are a lot of single-page applications (via hashes) that change, I think it's useful to be able to listen for hash changes.

@xupengkun my use case, exactly

so have u fixed this hash url change state guys?

Not yet, feel free to send a PR

I has the same requirement too, I have a WebView which is a single-page application. And onNavigationStateChange only work in android, iOS has not reaction. So in the iOS device , the user browse the web page and click the left-top button, it will close the whole webview not that page.
if onNavigationStateChange work , i can be control the webview close or back to last page.
This is my problem, thanks.

Its very important for web apps please add this feature 😭
Please.

Here is a solution that seems to work for me on iOS:
Inject JS onto the page that sets the initial url and then continuously checks the current url against the initial one. If the user has navigated to a new page, the url will be different. When that happens you can send a postMessage back to your React Native code to handle the change and then set the current url to be checked again.
Example:
// initial url on page load
let initialUrl = window.location.href;

// check for changes in url
let checkUrlChange = () => {
  //get current url
  const currentUrl = window.location.href;
  //if it has changed send a postmessage to rn and set the new url as the initial to check against
  if(currentUrl !== initialUrl){
    window.ReactNativeWebView.postMessage('{ \"locationUpdated\": \"' + currentUrl + '\" }');
    initialUrl = currentUrl;
  }
}

//check for changes every 2 seconds
setInterval(checkUrlChange, 2000)

As an injectable template string, this would look like:
let injectedJs = `
let initialUrl = window.location.href;
let checkUrlChange = () => {
  const currentUrl = window.location.href;
  if(currentUrl !== initialUrl){
    window.ReactNativeWebView.postMessage('{ \"locationUpdated\": \"' + currentUrl + '\" }');
    initialUrl = currentUrl;
  }
}
setInterval(checkUrlChange, 2000);`

Now, in your onMessage function you can listen for this object being sent back and then handle it however you need to.
onWebMessage = e => {
  const data = e.nativeEvent.data;
  if (data && data.includes('locationUpdated')) {
    let newLoc = JSON.parse(data);
    let theUrl = newLoc.locationUpdated;
    //handle the new URL or change anything needed on URL change
  }
}

Some notes:

I am passing back a stringified JSON object because I listen for several different changes. You can just as easily pass back a string and not have to parse it.
This method can be used to check for things other than just a URL change. For example, you could set the height of the page to a variable and check for a change in that - in case something was dynamically added due to interactions on the page, but didn't cause a URL change.

I was able to get this working pretty cleanly by monkey patching the history api which injectedJavaScript.
      <Webview
        ...
        injectedJavaScript={`
          (function() {
            function wrap(fn) {
              return function wrapper() {
                var res = fn.apply(this, arguments);
                window.ReactNativeWebView.postMessage('navigationStateChange');
                return res;
              }
            }

            history.pushState = wrap(history.pushState);
            history.replaceState = wrap(history.replaceState);
            window.addEventListener('popstate', function() {
              window.ReactNativeWebView.postMessage('navigationStateChange');
            });
          })();

          true;
        `}
        onMessage={({ nativeEvent: state }) => {
          if (state.data === 'navigationStateChange') {
            // Navigation state updated, can check state.canGoBack, etc.
          }
        }}
     />

@janicduplessis Am I missing something? It doesn't look like you can check state.canGoBack

@adamrainsby state is ({ nativeEvent: state }). Are you on iOS, I did not test this on Android yet so it might be why.

Interesting @janicduplessis! We might want to add this to the docs

I added it to the docs ^^

@janicduplessis workaround works perfectly on iOS, but unfortunately not on Android, where the nativeEvent only has the "data" property like stated in the docs. It only has all the other event properties on iOS.

This issue seems to also occur whenever pushState is used to navigate, not just when the anchor changes.

Waiting for a fix on android =\ Our website is made in Vue (SPA)
it uses pushState to navigate but there's no state property on Android.

Is the workaround also needed on Android? I haven't tested it yet.

@Titozzz
state.canGoBack == undefined

I actually submitted a pull request, #641, to fix this in the WebView itself. The pull request doesn't interfere with the onMessage mechanism, since I was able to hook the event in at a lower level.
I closed the pull request because it didn't look like it would work, but perhaps the window.addEventListener('popstate', ...) bit is the ticket I need to success.
I am dedicated to getting a proper in-tree solution to this problem. I am also willing to consider other API's as well. It seems like people would also like access to the state JSON from window.history.pushState, besides fixing the original issue?

@janicduplessis it works in iOS, but not works in Android... need help please :(

If the issue is still here, please keep in mind that we need community support and help to fix it!

Silly bot, there has been an open pull request on this issue for months! So, yes, the community is trying to help fix issues, but the maintainers don't seem interested in accepting help.

@swansontec  it is really sad :(

Here is a solution for grabbing the current URL that works on iOS and Android. It's an adaptation of the code from @janicduplessis above. Again, focused on passing back current URL only, not the other bits normally received in onNavigationStateChange.
<Webview
  injectedJavaScript={`
    (function() {
      function wrap(fn) {
        return function wrapper() {
          var res = fn.apply(this, arguments);
          window.ReactNativeWebView.postMessage(window.location.href);
          return res;
        }
      }
      history.pushState = wrap(history.pushState);
      history.replaceState = wrap(history.replaceState);
      window.addEventListener('popstate', function() {
        window.ReactNativeWebView.postMessage(window.location.href);
      });
    })();
    true;
  `}
  onMessage={event => {
    console.log(event.nativeEvent.data)
  }}
/>

As the docs for onMessage say, whatever string you pass into postMessage becomes available via onMessage at whateveryoucallthereturnedobject.nativeEvent.data

@timraybould I just tried what you have suggested, but seems to only detect the first time the navigation page changes, but not for times after that. Any suggestions?

@timraybould this works perfectly for me on Android!
Thank you! :clap:

Very perfect. And we can post window.history.length.
window.postMessage(JSON.stringify({type:'navigationStateChange',params:{hisLen: history.length}}));

Webview onMessage
let canGoBack = false;
......
canGoBack = event.nativeEvent.data.params.hisLen !== 1;