Change header guard to use #pragma once

There are some decisions from the coding style guide.

https://google.github.io/styleguide/cppguide.html#The__define_Guard
https://google.github.io/styleguide/cppguide.html#Nonstandard_Extensions
http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf8-use-include-guards-for-all-header-files

To summarise, prefer header guards than #pragma once. The former is supported by the standard and is more portable.

Are we following Google coding style now?
On Sat, Sep 14, 2024, 13:55 Ivana @.***> wrote:

There are some decisions from the coding style guide.

https://google.github.io/styleguide/cppguide.html#The__define_Guard

https://google.github.io/styleguide/cppguide.html#Nonstandard_Extensions
http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf8-use-include-guards-for-all-header-files
To summarise, prefer header guards than #pragma once. The former is
supported by the standard and is more portable.
—
Reply to this email directly, view it on GitHub
https://github.com/Cytnx-dev/Cytnx/issues/470#issuecomment-2351084231,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCX3SOZISHJ3FRHZMJYZM3ZWR2BXAVCNFSM6AAAAABOGJ4JROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGA4DIMRTGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

If so I would like to have a pre-commit tool in place for this
On Sat, Sep 14, 2024, 15:51 Kai-Hsin Wu @.***> wrote:

Are we following Google coding style now?
On Sat, Sep 14, 2024, 13:55 Ivana @.***> wrote:

There are some decisions from the coding style guide.

https://google.github.io/styleguide/cppguide.html#The__define_Guard

https://google.github.io/styleguide/cppguide.html#Nonstandard_Extensions
http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf8-use-include-guards-for-all-header-files
To summarise, prefer header guards than #pragma once. The former is
supported by the standard and is more portable.
—
Reply to this email directly, view it on GitHub
https://github.com/Cytnx-dev/Cytnx/issues/470#issuecomment-2351084231,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCX3SOZISHJ3FRHZMJYZM3ZWR2BXAVCNFSM6AAAAABOGJ4JROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGA4DIMRTGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Are we following Google coding style now?

It seems that, yes.
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.clang-format#L1
We also have pre-commit settings
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.pre-commit-config.yaml
CC @jeffry1829

Does it actually settled up on action? I thought its there. And it was fine
before tho, so I am confused
On Sun, Sep 15, 2024, 01:22 Ivana @.***> wrote:

Are we following Google coding style now?
It seems that, yes.
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.clang-format#L1
We also have pre-commit settings
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.pre-commit-config.yaml
CC @jeffry1829 https://github.com/jeffry1829
—
Reply to this email directly, view it on GitHub
https://github.com/Cytnx-dev/Cytnx/issues/470#issuecomment-2351379982,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCX3SJI4B7TI7XURG3HDBDZWUKRXAVCNFSM6AAAAABOGJ4JROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGM3TSOJYGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

If it's optional requirements for format I'd say we don't worry about it
and follow as much as std. Google style is good but it has too much
historical burdens
On Sun, Sep 15, 2024, 01:28 Kai-Hsin Wu @.***> wrote:

Does it actually settled up on action? I thought its there. And it was
fine before tho, so I am confused
On Sun, Sep 15, 2024, 01:22 Ivana @.***> wrote:

Are we following Google coding style now?
It seems that, yes.
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.clang-format#L1
We also have pre-commit settings
https://github.com/Cytnx-dev/Cytnx/blob/f43dcbd960b955611cddcbc036cc07e113dbbb8b/.pre-commit-config.yaml
CC @jeffry1829 https://github.com/jeffry1829
—
Reply to this email directly, view it on GitHub
https://github.com/Cytnx-dev/Cytnx/issues/470#issuecomment-2351379982,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCX3SJI4B7TI7XURG3HDBDZWUKRXAVCNFSM6AAAAABOGJ4JROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGM3TSOJYGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

Client-side git hooks do not sync between git clients. Every client has to install the hook on their own. Here is a section of the document shared by @hunghaoti

Use the pre-commit tool to check the coding style:
(1). If you have not installed the pre-commit tool, you can install it by the command:
conda install pre-commit

(2). Then you can run the following command to fix the coding style:
pre-commit run --all-files

You can run twice to make sure all of them are passed.

Yes I know. We set up this. My point is if there is no issue with clang
formatter then I don't think we should care about the format even it stated
in Google style. In general as long as there is a guard there (which we
setup in action) beyond that norm I don't want to put focus on making style
happy. We should focus on other more important issues
On Sun, Sep 15, 2024, 01:50 Ivana @.***> wrote:

Client-side git hooks do not sync between git clients. Every client has to
install the hook on their own. Here is a section of the document written by
@hunghaoti https://github.com/hunghaoti

Use the pre-commit tool to check the coding style:
(1). If you have not installed the pre-commit tool, you can install it
by the command:
conda install pre-commit
(2). Then you can run the following command to fix the coding style:
pre-commit run --all-files
You can run twice to make sure all of them are passed.
—
Reply to this email directly, view it on GitHub
https://github.com/Cytnx-dev/Cytnx/issues/470#issuecomment-2351389967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFCX3SNTNNHQRWCRYAOW7P3ZWUNZDAVCNFSM6AAAAABOGJ4JROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJRGM4DSOJWG4
.
You are receiving this because you authored the thread.Message ID:
@.***>


[Security] Provider UI: CVE-2020-28469

Signed-off-by: leecalcote<EMAIL_ADDRESS>Description
CVE-2020-28469
high severity
Vulnerable versions: < 5.1.2
Patched version: 5.1.2
This affects the package glob-parent before 5.1.2. The enclosure regex used to check for strings ending in enclosure containing path separator.
Signed commits

[x] Yes, I signed my commits.

Codecov Report

Merging #3604 (367582a) into master (225e213) will decrease coverage by 8.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3604      +/-   ##
==========================================
- Coverage   18.53%   10.23%   -8.30%
==========================================
  Files          38       38
  Lines        3308     3301       -7
==========================================
- Hits          613      338     -275
- Misses       2538     2894     +356
+ Partials      157       69      -88

Flag
Coverage Δ

gointegrationtests
?

unittests
10.23% <ø> (+0.02%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

mesheryctl/internal/cli/root/system/status.go
0.00% <0.00%> (-62.13%)
:arrow_down:

mesheryctl/internal/cli/root/system/start.go
1.20% <0.00%> (-52.40%)
:arrow_down:

mesheryctl/internal/cli/root/system/stop.go
0.90% <0.00%> (-39.10%)
:arrow_down:

mesheryctl/internal/cli/root/system/check.go
1.48% <0.00%> (-22.22%)
:arrow_down:

mesheryctl/pkg/utils/helpers.go
0.00% <0.00%> (ø)

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 225e213...367582a. Read the comment docs.


thread 'main' panicked at 'TranslationUnit::parse', ../src/libcore/option.rs:715

not sure if related to #249
rustc 1.15.0-nightly (daf8c1dfc 2016-12-05)
libbindgen = "0.1.2"
clang 3.9.0-3
Arch Linux 64-bit
wrapper.h
#include <opencv2/core/core.hpp>

build.rs
extern crate libbindgen;

use std::env;
use std::path::PathBuf;

fn main() {
    println!("cargo:rustc-link-lib=opencv_core");

    let bindings = libbindgen::Builder::default()
        .clang_arg("-x=c++")
        .header("wrapper.hpp")
        .generate()
        .expect("Unable to generate bindings");

    let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
    bindings.write_to_file(out_path.join("bindings.rs"))
        .expect("Couldn't write bindings!");
}

$ cargo build
Compiling opencv v0.1.0 (file:///home/bbigras/dev/rust/rs-opencv)
error: failed to run custom build command for opencv v0.1.0 (file:///home/bbigras/dev/rust/rs-opencv)
process didn't exit successfully: /home/bbigras/dev/rust/rs-opencv/target/debug/build/opencv-bf020cc2abd762ca/build-script-build (exit code: 101)
--- stdout
cargo:rustc-link-lib=opencv_core

--- stderr
thread 'main' panicked at 'TranslationUnit::parse', ../src/libcore/option.rs:715
note: Run with RUST_BACKTRACE=1 for a backtrace.

@brunoqc thanks for the bug report!
Would you mind running again with RUST_LOG=libbindgen and RUST_BACKTRACE=1 set? and attaching the output here?

$ RUST_LOG=libbindgen RUST_BACKTRACE=1 cargo build
   Compiling opencv v0.1.0 (file:///home/bbigras/dev/rust/rs-opencv)
error: failed to run custom build command for `opencv v0.1.0 (file:///home/bbigras/dev/rust/rs-opencv)`
process didn't exit successfully: `/home/bbigras/dev/rust/rs-opencv/target/debug/build/opencv-bf020cc2abd762ca/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=opencv_core

--- stderr
thread 'main' panicked at 'TranslationUnit::parse', ../src/libcore/option.rs:715
stack backtrace:
   1:     0x5641cc2cd1ba - std::sys::imp::backtrace::tracing::imp::write::hbea47d9dd19b523c
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x5641cc2d1a9f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:247
   3:     0x5641cc2d169e - std::panicking::default_hook::h88ffbc5922643264
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:263
   4:     0x5641cc2d1ee7 - std::panicking::rust_panic_with_hook::hc790e47d4ecc86cd
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:451
   5:     0x5641cc2d1d74 - std::panicking::begin_panic::hc066339e2fdc17d1
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:413
   6:     0x5641cc2d1c99 - std::panicking::begin_panic_fmt::h5912b2d2df332044
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:397
   7:     0x5641cc2d1c27 - rust_begin_unwind
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:373
   8:     0x5641cc30ee3d - core::panicking::panic_fmt::h561c5ee168a3d2cb
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/panicking.rs:69
   9:     0x5641cc30eead - core::option::expect_failed::h6be288f6c3caa41a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/option.rs:715
  10:     0x5641cbd11eb0 - <core::option::Option<T>>::expect::hf442c9df50d2b840
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/option.rs:293
  11:     0x5641cbe2e538 - libbindgen::ir::context::BindgenContext::new::h0d0e42f902f4e166
                        at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/libbindgen-0.1.2/src/ir/context.rs:134
  12:     0x5641cbe5034c - libbindgen::Bindings::generate::hc9788d9682ec912c
                        at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/libbindgen-0.1.2/src/lib.rs:535
  13:     0x5641cbe4f5f5 - libbindgen::Builder::generate::h0a2dd1c7707752ae
                        at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/libbindgen-0.1.2/src/lib.rs:350
  14:     0x5641cbcd50a3 - build_script_build::main::h95698c9937afe21a
                        at /home/bbigras/dev/rust/rs-opencv/build.rs:9
  15:     0x5641cc2da99a - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libpanic_unwind/lib.rs:97
  16:     0x5641cc2d272a - std::rt::lang_start::h5d71a3afaaa4b2ff
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:332
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:351
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/rt.rs:57
  17:     0x5641cbcd5292 - main
  18:     0x7f98dc9bc290 - __libc_start_main
  19:     0x5641cbcb7db9 - _start
  20:                0x0 - <unknown>

That happens when the file doesn't exist. Arguably we should be able to provide a better error here. Presumably the file is called wrapper.h and you're invoking bindgen with wrapper.hpp, or viceversa?

Sorry, my wrapper is called wrapper.hpp. I copy pasted the name from the other bug report.

I don't have the parse problem if I remove the clang_arg().

Oh, what happens if you do: .clang_arg("-x").clang_arg("c++")? Shouldn't be needed if the wrapper is already an hpp file, but I think that -x=c++ is an invalid argument for clang.

I don't have the problem with .clang_arg("-x").clang_arg("c++"). Thanks.


Avoid double quotes based on changes for issue #317. Fixes issue #321

Tested with chef-client 12.4.1 on CentOS 6.6 and Windows 2012r2 nodes

:+1: other than the comment @juliandunn made

Fixed and merged in 3eaaa02e1b9a934a39f70791670fa84ec7a50b26


[Event Request] OnBeforeLookupShortcutDimCode in Standard Service Line table

Hello, please add this event to the Standard Service Line table:
    [IntegrationEvent(false, false)]
    local procedure OnBeforeLookupShortcutDimCode(var StandardServiceLine: Record "Standard Service Line"; xStandardServiceLine: Record "Standard Service Line"; FieldNumber: Integer; var ShortcutDimCode: Code[20]; var IsHandled: Boolean)
    begin
    end;

and raise it in the LookupShortcutDimCode procedure:
    procedure LookupShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeLookupShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode, IsHandled);
        if IsHandled then
            exit;

        DimMgt.LookupDimValueCode(FieldNumber, ShortcutDimCode);
        DimMgt.ValidateShortcutDimValues(FieldNumber, ShortcutDimCode, "Dimension Set ID");
    end;

Thanks!

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Wrong permissions + Timing issue in NewOutput/NewInput

Hi @brian-armstrong,
I'm start testing your work on Beaglebone Black, I'm getting the following error: failed to open gpio 60 direction file for writing. I've changed last parameter in all occurences of os.OpenFile in sys.fs to 0666 (r/w for everyone) and everything works. I'm using it as a non-root user but my account belongs to gpio group.
Andrea Cioni

1 second feels like a while to need to sleep in a library like this. I think it's sort of exposing the limitations of this approach. Ideally we could get notified by the kernel that the file has been exported, but I don't know of a good way of doing that without bringing in inotify, which might be fairly heavyweight for this.
I think the next best solution would be to poll this file fairly aggressively, maybe every 5ms or so. I would feel more comfortable watching it for up to a second if we could spend less time watching it, on average.
Also, are you sure the file mode is causing an issue? It seems weird that the file would export as a different user than the user exporting it. At any rate, I think 0660 would be more appropriate here than 0666.


[Presto] Fix casting of varchar to integral types by trimming unicode and control characters

Presto ignores whitespace (both unicode and ascii) along with control chars when trimming a varchar to cast to integer. However Velox which uses folly underneath doesnt do this. This PR brings velox to use similar behavior.
For e.g the following works in Presto but fails in Prestissimo:
select cast((from_utf8(from_hex('2002')) || x || (from_utf8(from_hex('0F')))) as integer) from (values '123') t(x);

Note : Currently behavior with bad utf encoded strings is undefined.


meson: Always build with Diet

Hi!
This makes the Meson build-system automatically fetch the latest Git copy of Diet in case no Diet is found on the system already. This resolves issue #1898
Please do not merge this until https://github.com/rejectedsoftware/diet-ng/pull/39 is merged and I have adjusted the Git URL in this patch to point to upstream Diet instead of my forked copy!

Okay, the URL is updated now, so this is merge-ready :-)
For some more information: This patch uses Meson's Wrap system to have Meson pull in a missing dependency automatically, in case it is missing on the system. The location of the 3rd-party project that is embedded is defined in a wrapfile, in this particular case lib/subprojects/diet.wrap.
I've set up the file to always pull the latest Git master copy for Diet. If you want a specific tag, or download a tarball instead of checking out the code from Git, you can set these things in the Wrapfile. In any case, the file will always point to a specific version of a dependency and has to be updated in order to switch to a newer version, that's why I just had it follow the master branch for simplicity.
More information about this can be found in Meson's documentation: http://mesonbuild.com/Wrap-dependency-system-manual.html


Conditional breakpoint icon

We need a nice icon to distinguish conditional breakpoints from regular ones. Some ideas:

Use a different color, for instance gold (chrome debugger does something similar)
Add a small question mark to the corner of the current breakpoint.svg

In both cases we would need one for light theme and one for dark theme
@stevencl suggestions welcome

At the moment I am using an orange icon to get user feedback

Here are the icons.
conditional breakpoint icons.zip

Thanks for the icons!
Andre and me have some feedback:

The '+' is confusing, for us it represents adding something new when clicking on it
Some characters which better represent a conditional breakpoint: = ? !
The conditional breakpoint looks exactly like the swiss flag
I would also check what VS is doing
No need for the disabled conditional breakpoint icon, in that case we will just show the disabled icon. Too many icons cause confusion imho

Actually this is the VS icon for conditional breakpoints. For example:

Like you, we also thought that the + might suggest that something new is being added so we checked with the VS team first to see what feedback they had. We asked the VS debugger UX team about any positive or negative feedback they have had about this icon and apparently they have had no feedback one way or another about it in all of the studies they have done.
A quick look here too doesn't bring up anything about the icon: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015?query=conditional breakpoint icon
We considered ? and ! but didn't go with those as we thought that those might suggest that there is something wrong with the breakpoint.
In the absence of any significant negative customer feedback, we felt that the best option was to be consistent with VS. Hence the suggestion to use the VS icon.

Lots of vs icons did not get negative customer feedback but we are still not using them, like the step next, step in... So I would not take that as an argument.
What about the equality character =
What about just using a different colour like the current orange?
The first and thirds point from my previous post are my biggest concerns and are the reason I do not think this issue should be closed.
@weinand @egamma opinions welcome

Actually the step into and step out icons are now consistent. When we designed the VS Code icons we worked with the VS team to introduce these icons into VS too as it was felt that they were significantly better than the existing VS icons.
It was in this spirit that we talked to the VS team last week to see if there was an opportunity to improve the conditional breakpoint icon in both VS and VS Code. But we weren't in a position to be able to do so because there has been zero feedback about the current icon and, in my opinion, the options we are considering are not significantly better such that a change in VS would be justified.
Like you, we have some reservations about the + sign too but we are constrained a bit by what we can do. For example, a badge in the corner of the icon won't work because the icon is too small for the badge to be clearly visible. We feel that the orange colour is too similar to the red for a regular breakpoint.
Consistency with VS works both ways and works in our favour. We can encourage changes in VS based on what we do and we can adopt some of the best practices that VS has figured out over time. That does not mean that we will become an IDE. But when appropriate, consistency between the tools can work well for each tool. So hence the decision to adopt a consistent icon.

However, having said all that, I will check with the VS debugger UX team one more time to see what scope they have for changing. I'll see what they think about the Swiss flag thing.

Thanks for explaining the thought process, Steven.
@isidorn: I completely agree with you that this "+" icon is not an ideal icon for conditional breakpoints.  Going with Visual Studio's precedent was not a decision we made lightly.  I tried to convince the VS team that the "+" icon was confusing and that the diamond logo (pictured below and indicated by the green star above it) would be the more ideal solution, since it represents a decision or condition on flow diagrams (a great metaphor).  Unfortunately and unbeknownst to me, a very similar icon was being used already for tracepoints.  So using our top pick would not work, as it would be confusing difference between both products that usually are visually similar.

Your point that it looks much like the Swiss flag is also completely understandable.  I think we should continue to have a dialogue with VS and perhaps do some studies that involve users deciding which icon is more intuitive against a control of the existing icon in VS.  If we could prove a significant improvement, I think we could get VS to change it, as there was no visual design validation that users like the "+" except that no one has complained about it, according to Karl Melder, one of their researchers.

Good points, thanks Brad, Steven.
Let me know once you hear back from the VS people and then I can update our breakpoint from orange to whatever we decide here.

On the other side, if we chose to go with red then we should choose a different color for our breakpoints widget which is currently orange. If I put that to red then it feels weird to me and all seems like an error box so suggestions are welcome.
But as noted last sprint I also dislike red breakpoints since they feel as errors and would much rather go with blue since they seems to solve this issue and the swiss flag problem.

Good point, Brad and I will work on this.

@isidorn I agree that red doesn't look right here.  I'll take a look.


The reason of 'tensor b' transpose when implementing FP8 in the matmul benchmark of the tutorial?

Hello,
I'm creating an issue because I can't understand why b.T is applied in this line. In the case of the benchmark, M == N, so there's no error, but when actually performing calculations with this function, it seems more accurate not to apply the transpose. If there is any reason, please let me know.
Best regards,
Heejo

The FP8 wgmma instruction expects the a argument to be in row-major and the b argument to be column-major. So the kernel ends up being more efficient if we transpose the input tensor into column-major order outside of the matmul kernel.


Tracking issue for MailChimping the easy button.

Finally getting to this after a long week:

[x]  Configure import
[x]  Configure new MC tag
[x]  Configure new MC buttons (traffic-light colors)
[x]  Attempt a dummy-update through MC
[x]  Attempt a dummy-removal through MC
[x]  Rewrite MC copy
[x]  Load test batch
[x]  Schedule test batch for deployment

It's working like a boss. So good. Thank you @awong-dev !


OJO data sample

Description
Find which job adverts are duplicates, then create a deduplicated sample of the data.
This has been outputted here s3://prinz-green-jobs/outputs/data/ojo_application/deduplicated_sample/ojo_sample.csv .
Fixes #16
Instructions for Reviewer
To first find which job adverts in the OJO database are duplicates run:
dap_prinz_green_jobs/pipeline/ojo_application/ojo_sample/deduplication.py

this creates a csv with deduplicated job adverts ids in a certain time window. The default is a 7 day window; so this means if two adverts with the same text and location turn up within a week of each other, then only one will remain in the outputted data.
Sampling
To sample the deduplicated dataset run:
python dap_prinz_green_jobs/pipeline/ojo_application/ojo_sample/sample_ojo.py

this will create a sample of the deduplicated OJO dataset and output all the OJO tables filtered by this sample. All outputs will go to the s3://prinz-green-jobs/outputs/data/ojo_application/deduplicated_sample/ S3 folder. The main file of interest is s3://prinz-green-jobs/outputs/data/ojo_application/deduplicated_sample/ojo_sample.csv which contains the job advert descriptions, the location, date, and the job title.
Checklist:

[ ] I have refactored my code out from notebooks/
[ ] I have checked the code runs
[ ] I have tested the code
[ ] I have run pre-commit and addressed any issues not automatically fixed
[ ] I have merged any new changes from dev
[ ] I have documented the code

[ ] Major functions have docstrings
[ ] Appropriate information has been added to READMEs

[ ] I have explained this PR above
[ ] I have requested a code review

thanks @india-kerle !


Fixed detection of bcrypt prefixes

The original code only detected the prefix "$2y$", but "$2a$" and "$2b$" are also valid.
See https://en.wikipedia.org/wiki/Bcrypt.

any reason not to try and upstream this fix?

I will once you guys +1 this change (at least that's what Andrei suggested
I do).
On Tue, May 3, 2016 at 9:43 AM, Brian Fallik<EMAIL_ADDRESS>wrote:

any reason not to try and upstream this fix?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/abbot/go-http-auth/pull/34#issuecomment-216531177

--
Joel Melby
clypd | Chief Technology Officer
+1-617-800-7731
<EMAIL_ADDRESS>http://www.clypd.com
Connect with us: Twitter https://twitter.com/clypd | LinkedIn
https://www.linkedin.com/company/clypd-inc- | Facebook
https://www.facebook.com/clypd

I don't really understand what's going on with this PR. First, oddly. I received the PR emails to my personal account. And second, when I brows to the clyphub fork I don't see the PR:
https://github.com/clyphub/go-http-auth/pulls
I can't investigate further at the moment but something is odd here.

@abbot I needed to make this change for a project of ours - the bcrypt implementation we primarily use generates $2a$ prefixes. We've forked your repo for now, but it would be great if you could take a look at this... Thanks.


Refactor placement selection in cluster creation

@haom-pinterest @sbaogang

Create cluster CMP mode

Create cluster Advanced mode

Edit configuration basic mode

Edit configuration advanced mode

Nice. Also, have come up with  a better name about default for placement or we just let users choose since placement is already simple? I am fine with latter choice as well.

@haom-pinterest The current decision is just showing our concrete default selection in the select box. The first two screenshots are actually what users will see if they don't set any placements

Just a minor concern is that we need to shuffle concrete default selection otherwise, one of Zone gets less utilized. I guess it is not a big issue.

LGTM!

Underlying, it picks the subnet with the max capacity in an AZ every time. We should get a rough balance result


[BugFix] #204 for project name

If you enter space several times for renaming the project name, it doesn't represent &nbsp properly.
Signed-off-by: Minsung Jin<EMAIL_ADDRESS>

common/src/webida/plugins/workspace/plugin.js

Line 182, 192
var treeNode = declare(Tree._TreeNode, {
Constructor Function (Class) name should be a Pascal Case.
The first letter must be upper case.
treeNode --> TreeNode


Marked Consumer Process Funcs as Override

Should make sure that generation of derived class functions declarations can never drift from base class versions leading to base class stubs being silently called.

CI gfxreconstruct build queued with queue ID 89351.

CI gfxreconstruct build # 3552 running.

CI gfxreconstruct build queued with queue ID 89383.

CI gfxreconstruct build # 3553 running.

CI gfxreconstruct build # 3552 passed.

The force-push was to remove changes to the ASCII DX12 consumer since that is going away and avoid conflicts with my main convert PR. This can now go in before or after that. I believe it is ready now.

CI gfxreconstruct build # 3559 running.

CI gfxreconstruct build # 3559 passed.


Newsletter email address placeholder text incorrect in footer

Expected behavior:
email address text for newsletter to be shown
Actual behavior:
shows "igniter.local::default.label_newsletter_email" in placeholder
Reproduce steps:
default install, just look at the footer
Version:
latest
Additional Information:
just needs language file editing...
'label_newsletter_email' => 'Enter email address',

Fixed.


unable to flash esp32 wrover chip (IDFGH-11633)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
Executing action: flash
Serial port COM3
Connecting.......................
COM3 failed to connect: Failed to connect to Espressif device: Wrong boot mode detected (0xb)! The chip needs to be in download mode.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
No serial ports found. Connect a device, or use '-p PORT' option to set a specific port.
I am unable to understand what is meaning of "Wrong boot mode detected (0xb)!"
can anyone explain what is the issue
this is the python code part from where i am getting this error.

Ok thanks for guidence


Make sure categories set to draft:false

Multiple categories were weirdly set to draft (attribute draft = true).
Could be caused by wrong client-side API calls or also server-side seeding. Regardless, ideally the model should ensure that categories are always stored as draft = false

Caused by client-side issue, when creating categories via EntityNew modal, see https://github.com/impactoss/impactoss-client/issues/405

Better actually allow draft categories


Better support for DateTime

Is your feature request related to a problem? Please describe.
Currently it is very verbose to query for a specific datetime and the method names are kind of unusual.
For example if you want to query for a datetime after a certain date,
a greaterThan Method is used, as can be seen in this example.
filter().dateGreaterThan(DateTime.now()).findAll();

Describe the solution you'd like
I think it would be better to have similar method names to dart´s datetime class.
For example, the above code would change to:
filter().dateAfter(DateTime.now()).findAll();

It could have the advantage to be more aware of what type of data is queried, as well as being easier to understand for beginners.
It would also be great if Isar could support more query conditions for datetimes, for example it is currently not easy to query for just a date.
Instead of using something like
filter().dateOnDate(DateTime(2020, 7, 9)).findAllSync();

or
filter().dateDay(DateTime(2020, 7, 9)).findAllSync();

this much more verbose looking query needs to be used.
filter().dateBetween(DateTime(2020, 7, 9), DateTime(2020, 7, 9, 23, 59)).findAllSync();

This also applies to not just days, but also all other time units, like months, hours, minutes, etc....
Describe alternatives you've considered
While strictly speaking all needed query conditions for datetime exist,
they seem to be more verbose and deviating for the dart method names, which can be confusing, then they need to.
Version

Platform: iOS, Android, Mac, Windows, Linux, Web
Flutter version: 2.10.0
Isar version: 2.1.0

Thanks for this request! I completely agree with .dateBefore() and .dateAfter(). I'll add those with the next version of Isar.
Not so sure about the other proposed methods. Somehow they don't feel in line with the rest of the query API 🤔 I'll need to think about it...

I thought about this and I think it's better to keep the API simple and consistent. The requested feature can be achieved easily with custom extension methods so I'm going to close this for now :)


Local persistence is not configured

Hi, I'm using legend state on React Native (expo), I get Error: Local persistence is not configured when trying to use persistence:
import { observable } from '@legendapp/state';
import { configureObservablePersistence, persistObservable, } from '@legendapp/state/persist'
import { ObservablePersistAsyncStorage } from '@legendapp/state/persist-plugins/async-storage'
import AsyncStorage from '@react-native-async-storage/async-storage';

export const state$ = observable('en-US');
persistObservable(state$, {
  local:'language',
})

configureObservablePersistence({
  pluginLocal: ObservablePersistAsyncStorage,
  localOptions: {
      asyncStorage: {
          AsyncStorage
      }
  }
})

Any solutions?

It looks like you're configuring after calling persistObservable. Just switch the order and call persistObservable after configuring :)

No way, I didn't try this XD. Anyway, it works now. Thanks!


C-g behaves like RET

Launch Emacs like this:
TEMP="$(mktemp -d | tee /dev/stderr)"

cat >"$TEMP/.emacs" <<EOF
(setq custom-file "/dev/null")

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))

(package-install 'ctrlf)
EOF

HOME="$TEMP" emacs

Then in the Emacs splash screen:

M-x ctrlf-mode;

C-s emacs;

C-s a few more times;

C-g.

Now the point is left next to the last instance of the match instead of being reset to the original position.
(Possibly related to #6.)

Yeah, I can confirm this happens exactly as you describe it. I'll look into why that could be occurring when I have some time.

For me, just adding the remap of abort-minibuffers to ctrlf-cancel in ctrlf-minibuffer-mode-map fixed this problem!

Should be addressed by https://github.com/radian-software/ctrlf/pull/114.


Version 1.0 release

Checklist:

[x] Remove pixel size constraints
[x] Replaced dataAttributes prop with ...rest (to support all HTMLAttributes)
[x] Review and pull in changes from open PRs:

[x] #228
[x] #224

[x] Audit open issues
[x] Remove any unnecessary async initialization logic necessitated by pixel constraints
[ ] Figure out initial mount regression in 17b6e11d-4500-4173-b23d-61dfd141fed1

I think this library's feature set is stable enough in my mind for a 1.0 release. It might be controversial but I have decided to cut pixel-based constraints from that release as they added too much complexity to the initialization and validation logic.

It's possible but it's not a priority for me.

Are there any userland workarounds to be able to enforce minimum or maximum size in pixels?

From the README on this PR:
Can panel sizes be specified in pixels?
No. Pixel-based constraints added significant complexity to the initialization and validation logic and so I've decided not to support them. You may be able to implement a version of this yourself following a pattern like this but it is not officially supported by this library.


Select widget deselects on clicking again

The select widget works weird on prod as well, selecting the widget and then clicking on it sometimes deselects the widget in previous and this version of react, this is because of the combination of our keyboard navigation on the property pane that we kick off when a widget is selected vs the select widgets own keyboard navigation support. This is a hunch based on how the widget behaves but needs more investigation coz its a third party widget.
Originally posted by @marks0351 in https://github.com/appsmithorg/appsmith/issues/16257#issuecomment-1236882805

@Tooluloope can you check what is happening here, I believe this is happening in the edit mode.
@marks0351 can provide more context here

https://www.loom.com/share/d478188c87124f02b769b806c0c546af
@Tooluloope

https://www.loom.com/share/b7938d17a978448685a2c27f6b9cf991

Here are my observations:

SelectWidget makes use of Blueprint Select

When we open the dropdown, we can scroll the canvas
When we open the dropdown, the focus sometimes shifts from input to property pane's first property. This happens due to a change I've done while working on making the property pane keyboard accessible. This is something that is found to be fixed in another PR that I'm working on currently.

TreeSelect, MultiSelect, MultiSelectTree makes use of rc-select & rc-tree-select components

When we open the dropdown, we are unable to scroll the canvas unless we close the dropdown
Sometimes, when we open the dropdown the property pane is not getting opened

The problem with SelectWidget is something that is related to the property pane.
@Tooluloope have you got some time to investigate on what's happening with TreeSelect, MultiSelect and MultiSelectTree?
I think it's something to do with rc-select
cc: @somangshu @marks0351

When we open the dropdown, we are unable to scroll the canvas unless we close the dropdown
This seems like an appropriate behaviour according to me, compared to the dropdown scrolling with the page.

Sometimes, when we open the dropdown the property pane is not getting opened
We will have to check this internally, Let us know if you have more info on this @aswathkk

Tested and verified the fix for the entire select widget family on this PR.


recreate graph-explorer extension in dedicated repo

after removing the graph-explorer we should

[ ] introduce an owncloud/graph-explorer repo
[ ] import the deleted code from https://github.com/owncloud/ocis/pull/4733
[ ] add a deployment scenario/documentation that shows how to include it, maybe only for certain users (the proxy can do that already)

it would serve as an example for a more interesting service than ocis_hello

it would serve as an example for a more interesting service than ocis_hello

I don't think the graph-explorer is a tool that one would want it production. I see it more as a tool for developers.
If we want to showcase the "extension system" then we could implement something simple like a very simple pastebin/gist clone.

bye bye graph-explorer!


bot.createConversation is not available for facebook ?

Hi,
Thanks for the latest updates. I have a doubt.
Is bot.createConversation functionality is available for facebook bot also ? I tried using it, i was getting 500 as response no error message :( . So, when i checked https://github.com/howdyai/botkit/blob/master/lib/Facebook.js I could not find create conversation method, i copy pasted the code which was there in https://github.com/howdyai/botkit/blob/master/lib/Slackbot_worker.js#L297, then it started working.
Is it missed intentionally ? i.e. specific for slack bots only ?

@seahen Thanks for PR.

Merged into Botkit as of 0.4.1
https://github.com/howdyai/botkit/blob/master/changelog.md


HHH-10058 Parameterized test runner compatible with CustomRunner

https://hibernate.atlassian.net/browse/HHH-10058
This PR does not contain any 'tests' for this runner (I'll use this for HHH-10030), as I haven't found a way how to write test checking that certain test has ran. Though, the idea is that when you have test annotated with @RunWith(CustomParameterized.class), it's the same as annotating that with @RunWith(CustomRunner.class) since the parameterized runner creates child runners that inherit from CustomRunner.
Plus, it has the features of Parameterized runner, so you can write tests like
@RunWith(CustomParameterized.class)
public class TestClass {
   @Parameterized.Parameter(0) public int x;
   @Parameterized.Parameter(1) public int y;

   @Parameterized.Parameters
   public static List<Object[]> parameters() {
      return Arrays.asList(new Object[] { 1, 2 }, new Object[] { 3, 4 });
   }

   @Test
   public void test() { ... }
}

and the test method will be executed once on a test class instance with x = 1 and y = 2 and second time with x = 3 and y = 4.

Applied upstream.  And again thanks Radim! :)


Global chat for all servers

Connect all Bulletproof servers through one global chat system. I'm not sure how I'd make this bandwidth-friendly though.

Using IRC functions could solve it I guess, however, I wonder how you would prevent everyone from using it :V

Why would I do that?

@KHKKhalid to keep it bandwidth friendly ? :V

https://github.com/KHKKhalid/SAMPMatchFinder


[Bug]: Addition of sort options in order page

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
Currently the orders page sort button not working
Expected behavior
I wanted to add a proper dropdown to select options for sorting
Add ScreenShots

On which device are you experiencing this bug?
Windows
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

Is there an existing issue for this?

[x]  I have searched the existing issues

Describe the bug
Currently the orders page sort button not working
Expected behavior
I wanted to add a proper dropdown to select options for sorting
Add ScreenShots

On which device are you experiencing this bug?
Windows
Record

[x]  I have read the Contributing Guidelines
[x]  I'm a GSSOC'24 contributor
[x]  I have starred the repository

Hello @Sourabh782, Go for it
All the Best

In above screen shot page of Bokk4U the heading orders are not arranged properly. Can you assign me this issue

In above screen shot page of Bokk4U the heading orders are not arranged properly. Can you assign me this issue

Hey @Shalinis19137, create a new issue under issues tab to get a issue assigned and also it's aligned properly


Handling push in main service worker vs. a background worker

This is something I need to investigate. The current implementation on my repo uses a background worker and passes push to the app when it's in the foreground, but that's not a good experience for app devs because the background worker doesn't have access to anything fancy (like keys for matrix).

W3C:

A service worker registration of an identical scope url when one already exists in the user agent causes the existing service worker registration to be replaced.

MDN:

The scope parameter is optional, and can be used to specify the subset of your content that you want the service worker to control. In this case, we have specified '/sw-test/', which means all content under the app's origin. If you leave it out, it will default to this value anyway, but we specified it here for illustration purposes.
Each time a page within your scope is loaded, the service worker is installed against that page and operates on it. Bear in mind therefore that you need to be careful with global variables in the service worker script: each page doesn't get its own unique worker.

Practically speaking, we can't make flutter apps run from different URLs, therefore, adding our own service worker (in the same scope) could mess with the default flutter one. Let's find a way to get this working without adding a service worker.
That also prevents us from running into initialization problems with other variables/dependencies the app uses.

FlutterFire, Firebase's Flutter library says the following:
https://firebase.flutter.dev/docs/messaging/usage#background-messages

Unfortunately we haven't yet been able to establish a proper way of communicating with the Service Worker and Flutter applications. Right now, all web background code must be executed in the JavaScript Service Worker file.

window.addEventListener('load', function () {

// ADD THIS LINE
navigator.serviceWorker.register('/firebase-messaging-sw.js');

// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;

// ...
});

So, the Flutter app isn't running in a worker. It's running on the main thread, attached to the DOM. that's why there's no reasonable way to make things better than running push stuff in JS.

I don't know any open source Flutter apps that do webpush, much less apps that are also e2ee.
But the following JS implementations exist:
Hydrogen (matrix client): https://github.com/vector-im/hydrogen-web/blob/13428bd03c7ec3821352ab13eb631fb0bbe23e94/src/platform/web/sw.js#L265-L316
mastodon-web: https://github.com/mastodon/mastodon/blob/main/app/javascript/mastodon/service_worker/web_push_notifications.js

window.addEventListener('load', function () {

// ADD THIS LINE
navigator.serviceWorker.register('/firebase-messaging-sw.js');

// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;

// ...
});

Another observation here. They register the push worker right before the flutter worker is registered. That ensures that the flutter worker is the 'active' (?) worker.
Another way to do this is to register it in dart, so app devs don't have to manually register this each time. However, the main obstacle to that is that the lib would have to make sure the right 'flutter_service_worker.js' got registered once after the push worker. This could be done by only registering the service worker if it hasn't already been registered. However, this might be susceptible to browser timeout behaviors. IDK, maybe just imitating the Firebase architecture is the right choice here.

Another question that needs to be asked and documented...
Do we send the push to each open window (if the app happens to be open in multiple tabs), or only the focused/visible one?


Fix ParseErrorType::UnrecognizedToken not to expose too much information

https://github.com/charliermarsh/ruff/issues/3520
It is too much now.
The information is expected to understandable for python users, not for python parser developers.

don't think issue is relevant actually, looking at the file the user was referring to, the unrecognized token is just a large triple quoted string.


stringify takes ownership instead of a reference

Is there a reason it takes the JsonValue by value instead of by reference?
I have a Cache that contains a JsonValue which is updated in place, and every once in a while it saves it to disk as JSON, so currently I have to clone the object which sounds like an artificial requirement.
Other than the obvious loss of the nice json::stringify(2) and friends, I think it would be a win performance wise (at least for my case :panda_face:)

Actually I'm partially dumb, there are JsonValue::dump and JsonValue::to_writer which kind of fit my need, but I want it to be pretty printed.

On a tangential note to_writer should probably return an io::Result otherwise I have no way to know if the write was successful.

Ok, I'm fully dumb and apparently also blind, there is JsonValue::pretty, except I want a to_writer that returns an io::Result and has an option to pretty print :panda_face:
Sorry for the stream of notifications.

On a tangential note to_writer should probably return an io::Result otherwise I have no way to know if the write was successful.

This is a separate issue (:+1: by the way) so I filed #88 to follow up.

Actually I'm partially dumb, there are JsonValue::dump and JsonValue::to_writer which kind of fit my need, but I want it to be pretty printed.

I filed #89 for pretty print to writer.

Until these are fixed, if you are stuck there is always serde_json::to_writer_pretty which (1) takes a reference, (2) writes to a writer (3) prettily, and (4) returns the error :wink:.

Sorry this took so long, been pretty busy lately, fixed with #88 and #89 (Thanks @dtolnay!)


Facebook Friends Incorrectly Displayed

Describe the bug
Facebook friends incorrectly displayed
Expected behavior
I expected my Facebook friends section too look like the screenshots provided
Screenshots

Specifics

OS: [Windows 10 21h1]
Spotify version [<IP_ADDRESS>3.g2d707698]
Spicetify version [2.5.0]
Theme name [Dribbblish(nord-light)]

How do they look like instead?

I'm not sure how they should look like, in the screenshots the friends tab is collapsed so they are not visible


Implement header styling changes to sync with Hugo repo changes

[description]

small styling changes are being made to the Hugo repo (link spacing and dropdown box shadow); this PR syncs the docs header with these changes

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/e327b819987cb4d2fb06fae7ffa99fe659c2b96d/

LGTM, but I have a hard time actually seeing the change in the test build.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/b56675af39082a535ed5c5a05522beaffa33b1ad/

@jseldess understandable...they are fairly minute, honestly.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/036eeb0ff78d1ad39d777235a133bcba22a1077c/


streamlining ECCO_FlowFields, OCCA_FlowFields

these examples include initialization codes, postprocessors, ... that should be easy to move to src
the parts that require new dependencies should by default be handled via extensions

done, after https://github.com/JuliaClimate/IndividualDisplacements.jl/pull/138


New simpler syntax for light orm

Use new syntax for the embedded light orm:
@Importable(
    "users",
    [
        "id",
        "email",
        "password",
        ["dateInscription", "date_inscription"]
    ]
)
class User extends Exportable {

    @exportable()
    public id: number;

    @exportable()
    public email: string;

    public password?: string;

    public dateInscription?: number;
}

// ->

@Importable("users")
class User extends Exportable {

    @exportable()
    @importable('id')
    public id: number;

    @exportable()
    @importable('email')
    public email: string;

    @importable('email')
    public password?: string;

    @importable('dateInscription')
    public dateInscription?: number;
}

The "issue" is that the decorator method receive the prototype and not the constructor when the decorator is placed on an attribute and not on the class.
It should be possible to to access the constructor from the prototype and store the metadata there.
The case of static properties should be handled as well. The constructor is given (not the prototype), but it should not be possible to use @importable for static attributes.


Store publishes in user session

As a spee.ch user, sometimes I upload my image and then accidentally close the tab or forget what URL I used. It would be useful if I could see my recent publishes (or really all of my publishes, as long as my cookie hasn't changed).

I think #170 makes this no longer a priority, but is probably still worth doing at some point.

Need to revisit how this would work in UI/UX; since we don't have a concept of a "user account" yet and users will want to be able to clear history in many cases, it is not clear how this should be implemented.
We may want to focus on user accounts instead.


IE 11 - TypeError: Object doesn't support property or method 'from'

Build an SPA with preact.js (8.2.7) not using any react component, not using any preact-compact.
Just pure preact + preact-router.
But it doesn't even render on IE11. And when it render (on a login page)
I get this error: TypeError: Object doesn't support property or method 'from'
The app works across platform and browsers, just not working on IE. Anyone encounter the same problem?

Sounds like you are missing a polyfill for Array.from. As far as I know I'm not aware that we rely on Array.from in either of those libraries, but perhaps you have some third party dependency or your own app code which uses it.
See mdn Array.from for a Polyfill and more information.

Also throw this two errors
Possible Unhandled Promise Rejection: ReferenceError "Reflect" is undefined
So I guess this is to do with the polyfill as well?

@joelchu No, that is a separate error. The Reflect api is a fairly recent addition to JavaScript which isn't supported in old browsers. We're not relying on it either in any official preact-related library. All our libraries do support IE11+.
If you do want to use newer JavaScript features that are not supported older browsers, I'd highly recommend checking out babel.
Closing, because this isn't about issues in preact.


Get the list of book categories in the library management system.

As an administrator, I need to get the list of book categories available in the library management system.
Following are the sub tasks for this user story.

[x] Design the API for get list of book categories https://github.com/chinthakarukshan/lbms/issues/11
[x] Develop API to get list of book categories https://github.com/chinthakarukshan/lbms-admin-service/issues/8
[x] Write unit tests for the get list of book categories API https://github.com/chinthakarukshan/lbms-admin-service/issues/9

All the sub tasks of this user story are completed. Therefore, closing this story.


index can not open

This file is not part of the standard LuCI distribution. The error indicates a filesystem corruption or invalid bytecode in the store.lua file.

thank you


Update pycurl version

We found that the pycurl version for WMAgent and the version for DBS were different.  This PR updates the DBS version to the correct one, keeping it consistent with WMAgent requirements file and the py2-pycurl RPM.

@goughes Please tested DBS with the newer version.

Tested following the instructions here: https://github.com/dmwm/WMCore/wiki/DMWM-Packaging-with-PyPi#installing-dbs-client-and-pycurl-client-via-pypi-on-lxplus7
I uploaded the new version to PyPI with the version number 3.7.8.post1 so I could test.
[egough@lxplus705 ~]$ export SCRAM_ARCH=slc7_amd64_gcc630
[egough@lxplus705 ~]$ cd CMSSW_9_4_12/src
[egough@lxplus705 src]$ cmsenv
[egough@lxplus705 src]$ pip --no-cache-dir install --user dbs-client==3.7.8.post1
Collecting dbs-client==3.7.8.post1
<snip>
Successfully installed dbs-client-3.7.8.post1 pycurl-7.19.3 pycurl-client-3.7.8.post1

[egough@lxplus705 ~]$ python dbs-test.py
Password for /afs/cern.ch/user/e/egough/.globus/userkey.pem:
[{'dataset': '/MinBias/Summer09-MC_31X_V3-v1_HLT_AlCa1E31-v1/RAW'}, {'dataset': '/MinBias/Summer09-MC_31X_V3-v1_HLT_AlCa8E29-v1/RAW'}, {'dataset': '/MinBias/Summer09-MC_31X_V3_CS_DiJetAve15U-v1/USER'}, {'dataset': '/MinBias/Summer09-MC_31X_V3_7TeV_CS_DiJetAve15U-v1/USER'}, {'dataset': '/MinBias/Summer11-DESIGN42_V11_428_SLHC1-v1/GEN-SIM'}, {'dataset': '/MinBias/Summer11-DESIGN42_V11_428_SLHChcal-v1/GEN-SIM'}]

Let me know if you need anything else!

I am quite busy with a DBS crisis and other stuff. I have only 25% FTE on CMS so it will take me  a while to look into details of this.
From: Erik Gough<EMAIL_ADDRESS>Reply-To: dmwm/DBS<EMAIL_ADDRESS>Date: Friday, April 26, 2019 at 8:49 AM
To: dmwm/DBS<EMAIL_ADDRESS>Cc: Yuyi Guo<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [dmwm/DBS] Update pycurl version (#602)
Tested following the instructions here: https://github.com/dmwm/WMCore/wiki/DMWM-Packaging-with-PyPi#installing-dbs-client-and-pycurl-client-via-pypi-on-lxplus7https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dmwm_WMCore_wiki_DMWM-2DPackaging-2Dwith-2DPyPi-23installing-2Ddbs-2Dclient-2Dand-2Dpycurl-2Dclient-2Dvia-2Dpypi-2Don-2Dlxplus7&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=8bursUuc0V63OwREQMBG2Q&m=JD4cdtINSZd2Do5yr8dgUtiPIlYN2a6WLu_34rl59X0&s=V3tAXpxYYV3zSQjP5-hQ_H74zmBaPb78-ePtSPIaDuY&e=
I uploaded the new version to PyPI with the version number 3.7.8.post1 so I could test.
[egough@lxplus705 ~]$ export SCRAM_ARCH=slc7_amd64_gcc630
[egough@lxplus705 ~]$ cd CMSSW_9_4_12/src
[egough@lxplus705 src]$ cmsenv
[egough@lxplus705 src]$ pip --no-cache-dir install --user dbs-client==3.7.8.post1
Collecting dbs-client==3.7.8.post1

Successfully installed dbs-client-3.7.8.post1 pycurl-7.19.3 pycurl-client-3.7.8.post1
[egough@lxplus705 ~]$ python dbs-test.py
Password for /afs/cern.ch/user/e/egough/.globus/userkey.pem:
[{'dataset': '/MinBias/Summer09-MC_31X_V3-v1_HLT_AlCa1E31-v1/RAW'}, {'dataset': '/MinBias/Summer09-MC_31X_V3-v1_HLT_AlCa8E29-v1/RAW'}, {'dataset': '/MinBias/Summer09-MC_31X_V3_CS_DiJetAve15U-v1/USER'}, {'dataset': '/MinBias/Summer09-MC_31X_V3_7TeV_CS_DiJetAve15U-v1/USER'}, {'dataset': '/MinBias/Summer11-DESIGN42_V11_428_SLHC1-v1/GEN-SIM'}, {'dataset': '/MinBias/Summer11-DESIGN42_V11_428_SLHChcal-v1/GEN-SIM'}]
Let me know if you need anything else!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dmwm_DBS_pull_602-23issuecomment-2D487063565&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=8bursUuc0V63OwREQMBG2Q&m=JD4cdtINSZd2Do5yr8dgUtiPIlYN2a6WLu_34rl59X0&s=U96Xxxb--YdEzELiJxxW24BrUSMnRaGxKRlyMsFHb7A&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AANROTSAAH3VSFUEUEWD72TPSMB45ANCNFSM4HIPGBNA&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=8bursUuc0V63OwREQMBG2Q&m=JD4cdtINSZd2Do5yr8dgUtiPIlYN2a6WLu_34rl59X0&s=ocvbHdN38MqWfBQc69wgVTcgMf829pVata9lopXxPzI&e=.

@goughes
Erik, Looked at this PR, I have a few questions:
1."Successfully installed dbs-client-3.7.8.post1 pycurl-7.19.3 pycurl-client-3.7.8.post1"
The instruction said that the special pycurl library was brought in by CMSSW. But we install a generic pycurl anyway?

The test you did was only to proved that the connection worked. Since DBS is a complicated system, we need to test the speed of the connection and how this change will affect the entire DBS operation.

I got a lot of things going on DBS land , this pycurl change may sit on my list for a while. It would be too much for you to run a full DBS evaluation. So if you and Alan (@amaltaro ) want , I could commit this PR for you know, but this change will only for pip.  WMAgent is going to run a  different versions of DBS for a while before I can apply the newer version of pycurl to the rest.
Yuyi

Hi Yuyi,
at least one of the DBS services rely on the COMP py2-pycurl spec:
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/py2-pycurl.spec
which is currently using version 7.19.3. So this PR is actually just fixing a typo made in Erik's previous PR (already merged). Sorry for the extra work, but it's completely safe to merge it, it won't change a bit of the DBS service, instead it will only provide a correct version for pycurl (which is at the moment only used when building a pypi release).

@amaltaro
OK, Alan. This was a typo correction instead of updating DBS to a new pycurl version.  Just chcked that DBS already using  7.19.3. Committing it now.

@goughes
All done.


[BUG] Remove-PnPTenantSite -> This site belongs to a Microsoft 365 group. To delete the site, you must delete the group.

Reporting an Issue or Missing Feature
I'm trying to immediately remove a SharePoint site permanently. So, a M365 group with a site that is deleted and not placed in de recycle bin or remove directly from recycle bin.
Expected behavior
Site is deleted and not placed in the recycle bin.
Actual behavior
When running Remove-PnPTenantSite -Url $siteUrl -Force -SkipRecycleBin I get the error message This site belongs to a Microsoft 365 group. To delete the site, you must delete the group..
Steps to reproduce behavior

Create a new M365 group in the Azure portal called 'testgroup1'. Result is a group and a sharepoint site.
Call the CmdLet and you get the error message.

I also tested that when you delete the group the site is automatically deleted after around 15 minutes. But then, what is the point of the cmdlet then? I can't use it? Maybe it can be used with older sites that aren't connected to a group??? We need to delete the site immediately.
What is the version of the Cmdlet module you are running?
Latest 2.3.0
Which operating system/environment are you running PnP PowerShell on?

[x] Windows
[ ] Linux
[ ] MacOS
[ ] Azure Cloud Shell
[x] Azure Functions
[ ] Other : please specify

Complete script
This script (when it's working) will be placed in an Azure Function with certificate authentication.
$filePath = "."
$AzAppId = "ClientId of app registration here"
$certFileName = "PnPProvisioningDemo.pfx"
$tenant = "tenant.onmicrosoft.com"

$url = "https://tenant.sharepoint.com"

Import-Module ("{0}/{1}" -f $filePath,"\PnP.PowerShell\2.3.0\PnP.PowerShell.psd1")
Connect-PnPOnline -ClientId $AzAppId -Tenant $tenant -CertificatePath ("{0}\{1}" -f $filePath,$certFileName) -Url $url

$siteName = "testralph10"
$siteUrl = "$($url)/sites/$($siteName)"

# Get active site by URL
$site = Get-PnPTenantSite -Url $siteUrl
# Property GroupId contains the ID of the connected M365 group

if ($null -eq $site) {
    Write-Output "Site not found"
}
else {
    Write-Output "Found site Url: $($site.Url) and name: $($site.Title) and group ID: $($site.GroupId)"

    $group = Get-PnPMicrosoft365Group -Identity $site.GroupId

    if ($null -eq $group) {
        Write-Output "Group not found"
    }
    else {
        Write-Output "Found group ID: $($group.Id)"

        Write-Output "Remove group ID: $($group.Id)"
        Remove-PnPMicrosoft365Group -Identity $group.Id

        # Wait for 5 seconds to let the group be deleted
        Start-Sleep -Seconds 5

        # Cannot remove deleted groups because of permissions...? Which permissions?
        # Write-Output "Remove group ID: $($group.Id) from deleted groups"
        # Remove-PnPDeletedMicrosoft365Group -Identity $group.Id
    }

    # Delete site by URL
    Write-Output "Remove site with URL: '$($siteUrl)' and skip recycle bin"
    Remove-PnPTenantSite -Url $siteUrl -Force -SkipRecycleBin # Failes because of 'This site belongs to a Microsoft 365 group. To delete the site, you must delete the group.'
}

# Get all deleted sites
$allDeletedSiteUrls = Get-PnPTenantDeletedSite | Select-Object Url

if($allDeletedSiteUrls.Count -eq 0) {
    Write-Output "No deleted sites found"
}
else {
    Write-Output "Found $($allDeletedSiteUrls.Count) deleted sites. Removing..."

    foreach ($deletedSiteUrl in $allDeletedSiteUrls) {
        Write-Output "Remove deleted site with URL: $($deletedSiteUrl.Url)"
        Remove-PnPTenantDeletedSite -Identity $deletedSiteUrl.Url -Force
    }
}

Hi,
I think this is by design.
As you said you can use this cmdlet with sites not connected to a group (such as Communication sites).

But do we know this for sure? Is there another way to do this? Waiting until a site is deleted is not really an option...

I did another test.
I created again a new group (and so a new site).
When you go to the SharePoint Admin Center -> Active sites and there delete the site, the site is deleted immediately.  Deleting the site will delete the group and all its resources, including the Outlook mailbox and calendar, and any Teams channels. You will have 30 days to restore the group..
The result is that the site is placed in the "Deleted sites" section and the M365 group is placed in the "Deleted groups" blade in the Azure portal.
After that, I can delete the deleted site without first delete the deleted group. When using PowerShell you first had to delete the deleted group before you could permanently delete the deleted site.
So, the SharePoint admin center is doing different commands then the PowerShell CmdLets.
Maybe the SharePoint site first disconnects the group??? Is there a CmdLet for?
Someone an idea?


Fix: polling interval type bug

Summary

Fixed polling interval type issue.
Added log messages.

Coverage decreased (-0.05%) to 99.476% when pulling 154b0445e91befba4d6d8a7d7b30783668cb5bf9 on rashid/dfm-fixes into 080531daeaa86f252f1395aadea5a12ab5058581 on master.


Basic/Visual Basic parsers lacks 'Reset' as a keyword

Information:

Prism version:
Plugins: Python + Visual Basic
Environment: all browsers

Does the latest version of Prism from the download page also have this issue? YES
Description
Check the code example in the link below and notice that the 'Reset' keyword is not highlighted as it should
Example
https://help.libreoffice.org/7.1/en-US/text/sbasic/shared/03050500.html?DbPAR=BASIC
I assume the problem is identical to issues #2375, #2422
Suggested patch
line:  Prism.languages['visual-basic'] = { …
Add 'Reset' into keyword regex

I don't think that's a keyword, is it?

Hi Michael

Thax for your prompt reaction.

Well, for VBA Reset is a keyword - https://docs.microsoft.com/en-us/office/vba/language/reference/statements - which is what's present in LibreOffice. Although we borrow Visual Basic parsing facility from PrismJS. I don't know what to say …
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/input-and-output-keyword-summary

Cordially
Alain / LibreOﬃciant
on behalf of the macro team
De : "Michael Schmidt"
A : "PrismJS/prism" ,"LibreOfficiant" ,"Author"
Envoyé: vendredi 10 juillet 2020 11:28
Objet : Re: [PrismJS/prism] Basic/Visual Basic parsers lacks 'Reset' as a keyword (#2468)

I don't think that's a keyword, is it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

VBA statements are not the same as VBA keywords (as in reserved keywords). Reserved keywords (e.g. Dim, As, Boolean) cannot be used as identifiers (e.g. function or variable names) but I don't think that statements like Name or Reset are reserved, are they? (This is an actual question. Is Name a reserved keyword?) I'm asking because Name and Reset aren't the only statements that aren't part of Prism's list of VB keyword. The MS VBA docs list 38 statements that are not part of the keyword list (please note that there is a lot of overlap between keywords and statements). I also want to mention that the MS VBA docs don't mention keywords like Until.

Full list of statements that are not keywords
AppActivate
Base
Beep
ChDir
ChDrive
Close
Compare
Deftype
DeleteSetting
Explicit
FileCopy
Input
Kill
Line
Load
Lock
LSet
Mid
MkDir
Name
Open
Print
Put
Randomize
Rem
Reset
RmDir
RSet
SaveSetting
Seek
SendKeys
SetAttr
Time
Unload
Unlock
Width
Write

From what I see, all of these statements (that are not keywords) are just functions. VB doesn't require parenthesis to group the arguments of function calls so functions can look like keywords but that's it.
I don't think we should make Reset (or the others) keywords.

Please close this issue as invalid


Use httpcomponent properties declared in AeroGear BOM (no overrides)

To be merged after https://github.com/aerogear/aerogear-parent/pull/52

will there be no code change required?

as long as the build passes I guess we are good to go

@matzew @lfryc yes exactly, this PR uses the same versions currently in use, but instead of declaring unused versions in aerogear-parent and overriding them in UPS, it changes the versions in aerogear-parent with the ones currently used, and gets rid of the override in UPS.

@lfryc @vibe13 should we include this in 1.1.0 final too ?

@matzew hi Matt this is more a nice to have, but not essential for the release. It would require a new release of aerogear-parent also (after https://github.com/aerogear/aerogear-parent/pull/52 merge), and the inclusion if this new parent

ok, thanks - I missed that cross reference. not merging :)


Port 3000 extremely slow when run watch

Version
10.8.2
What did you expect to happen?
No delay in request when loading page via run start
What actually happens?
npm run dev browser takes upwards of 20 seconds for each single request when hitting from localhost:3000
Loading the site at http://example.dev achieves respectable requests of less that 400ms. this is the case regardless of if npm run dev is running or not.
Steps to reproduce

Fresh install of sage 10, on a standard LAMP stack with Docker (php 8.2, mysql, nginx)
Add Acorn with composer require roots/acorn
Configure bud.config.js (adding paths)
Start the watch with npm run dev

It takes less than 400ms to load on my local URL, with or without the

But when i'm on localhost:3000, I'm reaching more than 20s of loading time.

Do you have any clue ?
Thank you
System info
Node v16.20.2
NPM 8.19.4
Same thing is happening with node v20
Docker with php 8.3, nginx and mysql. But the situation is the same with MAMP instead of Docker
Log output
No response
Please confirm this isn't a support request.
Yes

Everything is fine after clearing the npm cache and rebooting my computer...

Everything is fine after clearing the npm cache and rebooting my computer...


MudTable - Rows Per Page calculation is not correct

I am using MudTable with Pagination.
Consider Page Size 10.
When I first load the data and moves to second page Rows per page shows as 10-20.
Now if I search with a text which shows no records, Rows per page text comes as 10 -0. Which is not correct.
And by default if there is no data it is showing as 1-0 which is also not correct.
The issue is below code in MudTablePager.Razor.cs
    [Parameter] public string InfoFormat { get; set; } = "{first_item}-{last_item} of {all_items}";

    private string Info => Table == null ? "Table==null" : InfoFormat
        .Replace("{first_item}", $"{Table?.CurrentPage * Table.RowsPerPage + 1}")
        .Replace("{last_item}", $"{Math.Min((Table.CurrentPage + 1) * Table.RowsPerPage, Table.GetFilteredItemsCount())}")
        .Replace("{all_items}", $"{Table.GetFilteredItemsCount()}");

Yes, it is a bug .Replace("{first_item}", $"{Table?.CurrentPage * Table.RowsPerPage + 1}") this line have problem when filtered result count is not reach the current page
This algoritm automatically calculates with the static current page. However when we filter results, tablepagination doesn't change automatically. So we should fix with:

Force navigate the first page when filtered items count not reach the current page's first item number,
or
if GetFilteredItemsCount() is lower than (Table?.CurrentPage * Table.RowsPerPage) we should set first_item count to 1

If you have problem with this issue, plase re-open it.


Chap18: Large problem tools

Coverage remained the same at 100.0% when pulling 5648a26300624bb9a3b56223e85ba407cbe5494d on large-problem-tools-18 into bae3fafc68c545d6e358be2aaf444e1cd485971e on master.

Coverage remained the same at 100.0% when pulling ead2d7025b34a8005a5827e61f2d57fe3c6d63c4 on large-problem-tools-18 into bae3fafc68c545d6e358be2aaf444e1cd485971e on master.


Update build for OCaml 4.03

Signed-off-by: Thomas Leonard<EMAIL_ADDRESS>

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "fix-4.03" git@github.com:talex5/datakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "fix-4.03" git@github.com:talex5/datakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Blocked on https://github.com/mjambon/atdgen/issues/45 (when compiled with Github support).

The atdgen problem is now fixed. However, the 4.03 OS X build is now failing with:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/ocamlbuild
Target /usr/local/bin/ocamlbuild
is a symlink belonging to ocaml. You can unlink it:
  brew unlink ocaml

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "fix-4.03" git@github.com:talex5/datakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

Fix for OS X build issue: https://github.com/ocaml/ocaml-ci-scripts/pull/117


Getting Null and SyntaxError in getPlaylist Method

Hey,
I was trying to implement playlists recognition in my program and found out that it always return me "null".
So I checked the code and found that there's an error while parsing the data from the HTML pages:

Playlist used for this screenshot: https://youtube.com/playlist?list=PLpIYdjpi2QX4jU15ProfU8BsjXML-VFrZ&si=E7s6MwHI6aTo1qSF
And another one:

from: https://music.youtube.com/playlist?list=PLXftWo8BlN2lx5iHhkp-3Yg5aRRbe6Qme
Also, if you put these url in getPlaylist(url) it will return a 404 html page because it seems like the program is bugged and search for the page https://youtube.com/playlist?list=https://music.youtube.com/playlist?list=PLXftWo8BlN2lx5iHhkp-3Yg5aRRbe6Qme or  https://youtube.com/playlist?list=https://youtube.com/playlist?list=PLpIYdjpi2QX4jU15ProfU8BsjXML-VFrZ&si=E7s6MwHI6aTo1qSF. It will work if you use the ID of the playlist, the HTML Page get seems to be the right one.

Do you think you will fix this soon?

Okay, no problem. Well I don't think I have time to check your code to
modify it
Le jeu. 7 mars 2024 à 14:08, Twilight @.***> a écrit :

Do you think you will fix this soon?
hi, I am unable to update this lib at the moment as I am really busy these
days with a lot of other stuff but I am happy to review pull requests :)
—
Reply to this email directly, view it on GitHub
https://github.com/twlite/youtube-sr/issues/58#issuecomment-1983471784,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVRI7XV7VFDCFOJHFUN4ULDYXBRF7AVCNFSM6AAAAABDJ57DDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBTGQ3TCNZYGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


How to get the free disk space? (Question)

How to get the free disk space for a folder?
The file plugins does not offer such methods.

Does something like this help you out?:
https://blog.nraboy.com/2015/02/get-available-free-disk-space-using-apache-cordova/
Regards,

yes, this works. It would be great if there was a cleaner version, like $cordovaFile.getFreeDiskSpace() ?

I'll see about making a pull request on the project and adding one for you tonight or tomorrow.  Regardless it would still require callbacks since it is an asynchronous function.

Created a pull request for this function found at https://github.com/driftyco/ng-cordova/pull/658

great! Thank you @nraboy !

@pbernasconi you can close this ticket now.


Setting QUnit dependancy to major version 1

The current tests need to upgraded to support QUnit version 2.0 which was released on June 16th. In the meantime setting the QUnit dependancy to major version 1 so not to hold up the pull request in the queue.

👍


Add mappers when building products in facto.

Hi guys, good morning. Not sure if this will be out of the scope for facto, but here I go.
I was spending some time using facto and I probably noticed a common use case in some of the unit tests I've being working on. This common use case I’m referring to is that one where I found myself applying some repeated transformations to the Product object after it gets created by facto.
What kind of transformation do I mean?
things like parsing the object to a JSON format, parse them to a CSV  or transform object fields into url values for example.
About
This proposal is about adding the ability  to facto  to use "mappers" in the process of building a product. What do I mean with mappers? Well, basically this idea is brought out by the map function defined in Javascript arrays. The map function allows to return a new different array by applying some transformation to each element inside of it.
I have examples bellow where I illustrate this idea based on the scenarios I faced with:
Scenario 1

"I would like to make a POST request using the product object in a JSON format  when exercising my test case".

Inside facto we would implement a predefined mapper function that facilitates the task:
jsonUser := facto.Build(UserFactory, facto.JSONMapper).([]byte)
// jsonUser => `{"Name":"Wawandco 0"}`
...
http.Post(url, “application/json”, jsonUser)

JSONMapper would take product returned by userFactory and map it into a JSON formatted slice of bytes product.
This would also work for multiple Products when using BuildN function.
jsonUsers := facto.BuildN(UserNFactory, 5, facto.JSONMapper).([]byte)
// jsonUsers => `[{"Name":"Wawandco 0"},{"Name":"Wawandco 1"},{"Name":"Wawandco 2"},{"Name":"Wawandco 3"},{"Name":"Wawandco 4"}]`
...
http.Post(url, “application/json”, jsonUser)

By taking the idea of map function from javascript, a MapperFn in facto is a function that takes a Product and returns the Product transformed:

type func MapperFn(Product) Product

Build function would also need to be redefined as a variadic function. This allows multiple mappers to be called in a chain-like fashion. Scenario 2 bellow illustrate this.
func Build(f Factory, mappers ...MapperFn) Product
func BuildN(f Factory, n int, mappers ...MapperFn) Product

Scenario 2

I would like to create an object on my database and parse it into a JSON format when setting up my test case.

myDBMapper := func(p Product) Product {
    ...
     u := p.(User)
     err := dbConn.Create(&u)
    // assert err is not null.
    return Product(u)
}

body := facto.Build(userFactory, myDBMapper, facto.JSONMapper).([]byte)
...

Here, mappers act like a chain of transformations, meaning the product returned by myDBMapper becomes the input product for JSONMapper.
Facto could implement some mappers function commonly used in testing scenarios. Here is a list of some mapper functions I think could be defined inside facto package:
JSON Mapper: Maps a Product object into a formatted JSON slice bytes product.
Form Mapper: Maps a Product object into a url.Values.
URLEncoded Mapper: Maps a Product object into a url.Values object.
YAML Mapper: Maps a Product object into a YAML object.
CSV Mapper: Maps a Product object into a CSV slice bytes product.
Advantages
Some advantages I foresee based on the problem it solves

Adds a transformation layer to facto when building a Product.
It provides more dynamism to facto when creating a product through a factory.
Mappers can be extended and developers can define their own.
Allows reuse transformations commonly applied through testing life cycle.

Disadvantages
Here are some Disadvantages I foresee that could be a blocker to implement.

From an end user experience, it is not really obvious when using a mapper what is the expected type object returned that you need to cast.
From a maintenance  perspective, It increases the level of dependencies with external packages that helps to solve the mapping transformation (toml, yaml, csv).
Mappers chain are executed in the same order as specified in the arguments, this could bring unexpected behavior if one mapper of that chain does not support the product type received.

Thank you for reading this proposal and let me know your thoughts about this cc @paganotoni @amartine59 @rdiazrovira @EdwinPB

Hey @larrymjordan, Its great that you're starting to use Facto! Love it! I also appreciate you've put proposal in this way, it lays out the idea very well.
Getting into the idea I have to disagree with adding that in the build/buildN methods. And I think in general this kind of expands the use case of facto. Let me expand a bit more in here.
The use case for Facto is to build/create objects that we will need use for testing purposes.
I think the proposal expands that into transforming Go objects into something else, which is more of a data transformation and manipulation process (I receive A pass it through B and C and get D).
Also, the proposed implementation violates the SRP for the mappers, the proposed method signature receives those mappers (I would call them transformers but .. you know  😅 ) and now not only has to build the object but transform it, breaking the SRP for what they say to do (build and buildN).


Added Value's displayed decimal places

Simple change but feel free to change the variable names as I could not think of anything more interesting.
Decimal places are bound in dart from 0-20 so I put that check in and tested it on my fork.
See what you think :-)
My app now has some gauges with 3 decimal points others with two or none:-
Thanks
Colin

Thanks so much @cconstab. I just update the package at pub.dev, in a few minutes must be available.

By the way, if you have an open remote position for a flutter developer in the USA, i'm free 😉

@JErazo7 we are a global team so we work virtually from anywhere.. But the good news is that yes we are looking for Flutter developer to help with developer relations and I will drop you an email and introduce you to Anthony who is leading our search for the right person..
atsign.com


branch EUFl

chore(release): 1.87.1
chore(deps): bumps projen to 0.17.17

Codecov Report

Merging #133 (345f003) into main (e4c76bb) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #133   +/-   ##
=======================================
  Coverage   90.90%   90.90%
=======================================
  Files           2        2
  Lines         110      110
  Branches       19       19
=======================================
  Hits          100      100
  Misses         10       10

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 e4c76bb...345f003. Read the comment docs.


[FEATURE] Use custom SearchWindow to create new atoms

Is your feature request related to a problem? Please describe.
By default Unity Atoms adds many new asset "categories" (Events, Variables, Constants, Actions, etc.) with even more asset types (bool, int, string, Collider, etc.). Even with only the base types the regular Assets/Create context menu can become quite annoying to navigate due to the number of sub menus and menu items available when creating a new atom.
Describe the solution you'd like
Use Unity's SearchWindow from the experimental GraphView API to provide an alternative way to create new atoms:

Describe alternatives you've considered
Create a custom "Create Atom" window or wizard that does not depend on Unity's experimental API.
Additional context
I quickly put something together (see the gif above) and I could prepare a PR if requested. Also this does use a custom API to simplify the usage of the SearchWindow API which I still want to publish as an UPM package.

Thanks for submitting this issue! I think this sounds like a neat idea. If you are up for it a PR would be really appreciated. Since it's a new and experimental feature I would suggest to add Platform dependent compilation to the specific versions of Unity that supports it (also an upper limit since Unity is likely to remove the experimental namespace in future releases). Make sure also to read the contribution guidelines before submitting the PR.

this is fully solveable without the GraphView API, using: https://docs.unity3d.com/ScriptReference/IMGUI.Controls.AdvancedDropdown.html
I ran a quick test, with it:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityAtoms.Editor;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEditor.PackageManager.UI;
using UnityEngine;

public class TestScript : EditorWindow
{
   [ MenuItem("Assets/Create/MyAsset" ) ] //Adds to the project window's create menu
   public static void FOo()
   {
      var types = AppDomain.CurrentDomain.GetAssemblies()
         .SelectMany(assembly => assembly.GetExportedTypes())
         .Where(x => x                                            != null)
         .Where(x => (x.Attributes & TypeAttributes.Serializable) != 0)
         // .Where(t => !(t.Namespace?.Contains("System") ?? false))
         .Where(t => !(t.Namespace?.Contains("Microsoft")   ?? false))
         .Where(t => !(t.Namespace?.Contains("UnityEditor") ?? false))
         .GroupBy(t => t.Namespace.Split('.')[0]);

      var dropdown = new AtomGeneratorEditor.SearchTypeDropdown(new AdvancedDropdownState(), types, (s) =>
      {
         Debug.Log(s);
      });

      Debug.Log(EditorWindow.focusedWindow.GetType().Name);
      Debug.Log(EditorWindow.focusedWindow.position);
      EditorWindow.focusedWindow.BeginWindows();
      dropdown.Show(new Rect(0, -EditorWindow.focusedWindow.position.height+40, EditorWindow.focusedWindow.position.width, EditorWindow.focusedWindow.position.height));
      EditorWindow.focusedWindow.EndWindows();
   }
}

and the result:

I didn't know about AdvancedDropdown, thanks for pointing that out! I guess the main difference is that GraphView.SearchWindow uses UIElements. Tbh, I found that the hard part is to actually build the list of entries from the MenuItemAttribute.itemName and get the right icon to show up.
I could look into AdvancedDropdown and see if I can port my existing code.

AdvancedDropdown is sadly a dropdown, so it is rly awkward to get it to the correct position.
For the list i was using:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices.WindowsRuntime;
using UnityAtoms.Editor;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEditor.PackageManager.UI;
using UnityEngine;

public class TestScript
{
   class StringTree<T>
   {
      public Dictionary<string, StringTree<T>> subTrees { get; } = new Dictionary<string,StringTree<T>>();
      public T Value { get; private set; }

      public void Insert(string path, T value, int idx = 0)
      {
         Internal_Insert(path.Split('/'), idx, value);
      }

      private void Internal_Insert(string[] path, int idx, T value)
      {
         if (idx >= path.Length)
         {
            Value = value;
            return;
         }
         if(! subTrees.ContainsKey(path[idx])) subTrees.Add(path[idx], new StringTree<T>());
         subTrees[path[idx]].Internal_Insert(path, idx+1, value);
      }

   }

   [ MenuItem("Assets/Create/MyAsset &#Q" ) ] //Adds to the project window's create menu
   public static void Foo()
   {
      StringTree<Type> typeTree = new StringTree<Type>();

      foreach (var type in TypeCache.GetTypesWithAttribute<CreateAssetMenuAttribute>().Where(t => t.Namespace.Contains("Atom")))
      {
         typeTree.Insert(type.GetCustomAttribute<CreateAssetMenuAttribute>().menuName, type, 1);
      }
      var dropdown = new SearchTypeDropdown(new AdvancedDropdownState(), typeTree, (s) =>
      {
         EditorApplication.ExecuteMenuItem("Assets/Create/" + s.GetCustomAttribute<CreateAssetMenuAttribute>().menuName);
      });

      Debug.Log(EditorWindow.focusedWindow.GetType().Name);
      Debug.Log(EditorWindow.focusedWindow.position);
      EditorWindow.focusedWindow.BeginWindows();
      dropdown.Show(new Rect(0, -EditorWindow.focusedWindow.position.height+40, EditorWindow.focusedWindow.position.width, EditorWindow.focusedWindow.position.height));
      var window = typeof(SearchTypeDropdown).GetField
         ("m_WindowInstance", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(dropdown) as EditorWindow;
      window.position = EditorWindow.focusedWindow.position;
      EditorWindow.focusedWindow.EndWindows();
   }

   private class SearchTypeDropdown : AdvancedDropdown
   {
      private readonly StringTree<Type> _list;
      private readonly Action<Type>   _func;

      private readonly List<Type> _lookup = new List<Type>();

      public SearchTypeDropdown(AdvancedDropdownState state, StringTree<Type> list, Action<Type> func) : base(state)
      {
         _list = list;
         _func = func;
      }

      protected override void ItemSelected(AdvancedDropdownItem item)
      {
         base.ItemSelected(item);
         _func?.Invoke(_lookup[item.id]);
      }

      private void Render(StringTree<Type> tree, string key, AdvancedDropdownItem parentGroup)
      {
         if (tree.Value != null)
         {
            _lookup.Add(tree.Value);
            parentGroup.AddChild(new AdvancedDropdownItem(key){id = _lookup.Count-1});
         }
         else
         {
            var self = new AdvancedDropdownItem(key);
            foreach (var subtree in tree.subTrees)
            {
               Render(subtree.Value, subtree.Key, self);
            }
            parentGroup.AddChild(self);
         }
      }

      protected override AdvancedDropdownItem BuildRoot()
      {
         var root = new AdvancedDropdownItem("UnityAtoms");

         foreach (var subtree in _list.subTrees)
         {
            Render(subtree.Value, subtree.Key, root);
         }

         return root;
      }
   }

}

have not got to the icon yet, but that would be Type -> GetAttribute to  get the icon attribute and use the value of the attribute to get the icon

Looks like you've got most of it figured out. I am going to leave my implementation here in case it is helpful. BetterSearchWindow is just a base class that simplifies showing the GraphView.SearchWindow and BetterSearchTree just helps parse the CreateAssetMenu path into a tree and convert it to a list of SearchTreeEntrys.
public class CreateAtomWindow : BetterSearchWindow<CreateAtomWindow, Type>
{
    // A list containing a cached version of the entries shown in the search window.
    // This is returned instead of creating a new list every time the window opens.
    private List<SearchTreeEntry> cachedEntries;

    private void OnEnable()
    {
        cachedEntries = CreateEntries();
    }

    private List<SearchTreeEntry> CreateEntries()
    {
        // Start by creating a new BetterSearchWindowTree with a Syste.Type payload
        var tree =  new BetterSearchTree<Type>();

        // Fancy LINQ query to get all of the atoms
        var atoms =
            from a in AppDomain.CurrentDomain.GetAssemblies().AsParallel()
            from t in a.GetTypes()
            // Get types that inherit from BaseAtom and can be instanced
            where t.IsSubclassOf(typeof(BaseAtom)) && !t.IsGenericTypeDefinition && !t.IsAbstract
            // Get the CreateAssetMenu attribute which contains the "path"
            let createAssetAttrs = t.GetCustomAttributes(typeof(CreateAssetMenuAttribute), false)
            where createAssetAttrs.Length == 1
            // Get the EditorIcon attribute to display the icon in the search window
            let iconAttrs = t.GetCustomAttributes(typeof(EditorIcon), true)
            select new
            {
                type = t,
                path = createAssetAttrs.Cast<CreateAssetMenuAttribute>().First().menuName,
                icon = iconAttrs.Cast<EditorIcon>().FirstOrDefault()?.Name
            };

        // Icon lookup dictionary to cache icons that are already looked up
        var iconLookup = new Dictionary<string, Texture2D>();

        // Add all atoms to the tree
        foreach (var atom in atoms)
        {
            // Remove "Unity Atoms/" from the path
            var path = atom.path.Substring(atom.path.IndexOf('/'));
            var content = new GUIContent(path);

            // Try to get the icon
            if (!string.IsNullOrEmpty(atom.icon))
            {
                if (iconLookup.ContainsKey(atom.icon)) content.image = iconLookup[atom.icon];
                else
                {
                    var icon = GetIcon(atom.icon);
                    iconLookup.Add(atom.icon, icon);
                    content.image = icon;
                }
            }

            // Add the atom to the tree
            tree.AddLeaf(content, atom.type);
        }

        // Convert the tree to a list of search tree entries
        return tree.ToSearchTreeEntries("Create Atom");
    }

    // Get an icon by name from the project
    private Texture2D GetIcon(string iconName)
    {
        // Try to find the icon GUID
        var iconGuids = AssetDatabase.FindAssets($"{iconName} t:texture2D");
        var iconGuidsList = iconGuids.ToList();
        var guid = iconGuidsList.FirstOrDefault();

        // Resolve the GUID to an actual texture
        if (!string.IsNullOrEmpty(guid))
            return AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(guid));
        return null;
    }

    // Return the search tree entries for the search window
    public override List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
    {
        return cachedEntries;
    }

    [MenuItem("Assets/Create/Unity Atoms/Create...", priority = -1)]
    public static void ShowWindow()
    {
        // Event.current returns null in the MenuItem context so we can not use the mouse position
        // for the position of the search window. Instead we use the rough center of the currently focused window
        Rect win = EditorWindow.focusedWindow.position;
        Vector2 pos = win.position + new Vector2(win.width / 2, 50);
        Show(CreateScriptableObjectAsset, pos);
    }

    // Creates a scriptable object of the given type and saves it as an asset at the current position
    // in the project window
    public static void CreateScriptableObjectAsset(Type type)
    {
        var scriptableObject = CreateInstance(type);
        AssetDatabase.GetAssetPath(Selection.activeObject);

        // Get the currently "selected" path
        string path = "Assets";
        foreach (Object obj in Selection.GetFiltered(typeof(Object), SelectionMode.Assets))
        {
            path = AssetDatabase.GetAssetPath(obj);
            if (File.Exists(path))
            {
                path = Path.GetDirectoryName(path);
            }
            break;
        }

        // Create and save the asset
        AssetDatabase.CreateAsset(scriptableObject, path + "/new" + type.Name + ".asset");
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();
    }
}

@soraphis or @FreshlyBrewedCode is anyone of you planning to do a PR on this? I'm planning to release v4.2 sometime soon, but might wait if there is an incoming PR.

I was going to leave that to @soraphis as it looked like he got most of it already working with AdvancedDropdown and my time is currently very limited.


[Android] Comparing Okio and Retrofit in Performing Network Calls

Comparing Okio and Retrofit in Performing Network Calls
Proposed article introduction
Okio is a library that works in conjunction with java.io and java.nio to make data access, storage, and processing considerably easier. It started off as a component of OkHttp, Android's competent HTTP client.
Retrofit is a REST client for Java and Android application development that is type-safe. Retrofit is a library including interfaces, classes, and methods that provide the functionality required. The retrofit library can parse JSON or XML data and convert it to POJOs (Plain Old Java Objects).
Okio is a well-trained and eager to take on new challenges  and it is also fast and easy android networking library.
Key takeaways

Understanding the difference between Okio and retrofit network library
Advantages and Disadvantages of Okio in performing network calls
Implementing Okio as used in android to performing network calls
Understanding factors to consider when choosing a network library.

Article quality
Over the internet, most articles only major on the basic types of network libraries without going in depth. This article tends to explain the stated network library in depth and in a beginner friendly manner.It also state factors to consider on which network library to use and under which circumstances.
References
N/A

Hi @nia-vee
Thank you for submitting your topic suggestion.
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

Sounds like a helpful topic @nia-vee - Approved. Please make sure your article is unique and adds value to what is available in the official documentations.