How to allow ctx.data::<T: Repository>() instead of ctx.data::<Box<dyn Repository>>

Hello,
I'm rather new on graphql & this crates, and I already have a repository trait implemented InMemory and OnTheRealDatabase.
After a few hours, I didn't succeed to implement a generic version of the Query struct allowing me not to box the repository in a trait object.
Here is the actually working code :
pub struct Query;

#[Object]
impl Query {
    async fn items(&self, ctx: &Context<'_>) -> Vec<Item> {
        let repo = ctx.data::<Box<dyn Repository>>().unwrap();
        let result = repo.get_items().await.unwrap();
        result
    }
}

Here is what i'm trying to do :
pub struct Query<T: Repository>;

#[Object]
impl<T: Repository> Query<T> {
    async fn items(&self, ctx: &Context<'_>) -> Vec<Item> {
        let repo = ctx.data::<T>().unwrap();
        let result = repo.get_items().await.unwrap();
        result
    }
}

Do you folks have an example showing how to achieve this ?
with axum ?
Is it even possible ?

I wrote you an example:
    trait Repository {
        fn get(&self, key: &str) -> Option<&String>;
    }

    #[derive(Default)]
    struct InMemory {
        values: HashMap<String, String>,
    }

    impl Repository for InMemory {
        fn get(&self, key: &str) -> Option<&String> {
            self.values.get(key)
        }
    }

    struct Query<T: Repository> {
        repository: T,
    }

    #[Object]
    impl<T: Repository + Send + Sync + 'static> Query<T> {
        async fn get(&self, key: String) -> Option<&String> {
            self.repository.get(&key)
        }
    }

    let mut values = HashMap::new();
    values.insert("a".to_string(), "1".to_string());
    values.insert("b".to_string(), "2".to_string());

    let schema = Schema::new(
        Query {
            repository: InMemory { values },
        },
        EmptyMutation,
        EmptySubscription,
    );
    assert_eq!(
        schema.execute(r#"{ get(key: "a") }"#).await.data,
        value!({
            "get": "1"
        })
    );

Yes, I indeed ended up with something like that, but then I have the generic implementation of the axum graphql_handler :
pub async fn graphql_handler<T: Repository + Send + Sync + 'static>(
    schema: axum::extract::Extension<Schema<Query<T>, EmptyMutation, EmptySubscription>>,
    req: GraphQLRequest,
) -> GraphQLResponse {
    schema.execute(req.into_inner()).await.into()
}

By the way, I managed to have only a PhatomData<T> in the struct so I can call the ctx.data::<T>() as I understand I should do to get dependencies.
and then the graphql_handler becomes generic too :
pub async fn graphql_handler<T: Repository + Send + Sync + 'static>(
  schema: axum::extract::Extension<Schema<Query<T>, EmptyMutation, EmptySubscription>>,
  req: GraphQLRequest,
) -> GraphQLResponse {
  schema.execute(req.into_inner()).await.into()
}

So the axum router definition cannot be as simple as before :
  let app = Router::new()
        .route(
            "/",
            get(graphql_playground).post(graphql_handler),
        )
        .layer(AddExtensionLayer::new(schema));

type annotations needed
cannot infer type for type parameter `T` declared on the function `graphql_handler`

I tried to use type inference somehow to get this handler, but got bitten, so I ended up declaring a type alias in the same place I create the repository
    type TRepo = MemoryRepository;
    let repo = MemoryRepository::default();

And using this alias in the router configuration :
    let app = Router::new()
        .route(
            "/",
            get(graphql_playground).post(graphql_handler::<TRepo>),
        )
        .layer(AddExtensionLayer::new(schema));

It's kinda working, so far ... while I don't know when this solution will bite me again

Update here,
I'm starting to add generics and PhantomData to all my graph of object, it's painful and I really doubt this extra vtable indirection will change anything in production ...

using Box<dyn>.
closing this topic


Config file for 1.12.2 Server isn't applying changes (Armor sound mainly)

Mod Version:
DynamicSurroundings-1.12.2-<IP_ADDRESS>.jar
Forge Version:
<IP_ADDRESS>44
Description:
When I change the settings for bedrock haze/armor sounds/tool swing sounds, the effects don't apply after server restart.
I'm using Multicraft server hosting and I have the same mod version downloaded onto my client. I also cannot change the settings individually from my client to be different from the server but I don't know if this is even possible to begin with when it comes to Multiplayer modding.
Additionally, I have very hollow/tinny sounds coming from the mod. Not very much bass for any of the sound effects. Ie the armor sound I want turned off is because it sounds like a bag of tin spoons clanging around or chainmail even rather than the heavy armor it is
Please help because I would love to use this mod and tell my playerbase to start using but these few issues make it unenjoyable.

It's also not applying aurora settings. I made a similar post: #497

So you are making changes server side for these things?  They are client side features.

@Nexonian Following up. :)

Closing due to inactivity. If the changes are being made client side then feel free to re-open.  As mentioned prior settings are not pushed from the server to the client.


.golangci.yml: disable nilness check

Local make presubmit test currently doesn't work.
I don't yet understand why the cloud version works well.
It seems to be a golangci-lint v1.55.2 specific problem.
The fix alternatives are to rollback to the older version or this fix specific problem.
The fix was picked from here -> https://github.com/signalfx/splunk-otel-collector/pull/4027

What warnings does it produce? Is it something worth fixing in our code?

No. It was a linter internal error.
./tools/syz-env make presubmit
...
bin/golangci-lint run ./...
ERRO [runner] Panic: SA4023: package "gce" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [1] with length 1: goroutine 26344 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:109 +0x27c
panic({0x176e880?, 0xc0396d2570?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
honnef.co/go/tools/analysis/facts/nilness.(*Result).MayReturnNil(0xc037496000, 0xc017bb6780, 0x1)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/analysis/facts/nilness/nilness.go:56 +0xee
honnef.co/go/tools/staticcheck.CheckTypedNilInterface(0xc045ce9d40)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/staticcheck/lint.go:4615 +0x8d8
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc0071ffc40)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:195 +0x9d6
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:113 +0x17
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001aa1090, {0x17e4e20, 0x6}, 0xc003934f48)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc004b35b00?)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:112 +0x7a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc0071ffc40)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xa8
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze in goroutine 607
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x205
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: SA4023: package "gce" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [1] with length 1
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: goanalysis_metalinter: SA4023: package "gce" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [1] with length 1

What's better keep older working version? Or update to newer broken version? :)

I wanted to deal with false positive "duplicated strings" and landed some changes to github.com/jgautheron/goconst v1.7.0 .
I expected next golang-ci release to include this change and because of that integrated with 1.55.2.
After the update I realized goconst change wasn't yet integrate this I disabled goconst checks for tests to close topic and decided to keep golangci-lint because it was already integrated...
Finally realized it also breaks local build :(
Having this context I can answer your question...:
And the answer is "Knowing newer version is broken it was better to keep old one". Next time knowing it is broken I will not integrate it :)


Format Request

Hello.
I don't know if you are accepting requests, but could you change the format? Instead of only the title, having
Title
-Episode, time

Because as it is right now the bot posts the same title twice if it happens to have two episodes in one day.
Plus, if you could, the option for timezone.

Good point. I hadn't considered the possibility of multiple episodes releasing on the same day.

Timezone should be supported now.
Commands:
-> anime-today America/New_York

should give you times in the provided timezone. If none is provided, it will default to America/Los_Angeles. You can find the list of supported timezones here.
Along with this update, you can specify interval length and timezones for the -> update command.
Interval is now required and must be given in milliseconds. Timezone is optional.
-> update <interval> [TZ]

Wonderful.
Maybe it would be best if it was sorted by airing time? So when it doesn't get airtime data, the entry is pushed to the bottom with no time there or "N/A". Maybe the TZ should also change the time format, like the USA is Month/Day and other places are Day/Month or Year/Day/Month.

By the way, does it filter or just posts everything? Like Music/Specials/recaps. It filtering recaps would be interesting.
I have more suggestions and will use the feature template and open another issue since this one was already fixed.

I update the sorting by time and try to see how monthly.moe handles listing with no airtime. My best guess is that they put the datetime stamp for the day with the airing time at 0:00.
As for locale with date formatting, I can look into it. I can think of a quick and dirty solution but it seems a bit tedious.
As for filtering, the bot doesn't do any internal filtering other than grabbing anime for the date. Monthly.moe's api doesn't seem to store music with the episode listings; however, specials and recaps are grouped together. I don't think the api returns enough information to determine if it is a recap or special (distinguishing the two).

If it was sorted by what is going to air first, then it would be more organized.
Descending Order.  Yeah, I saw that in the API about the specials and thought they would do that.

Here is the new logic for the ordering:
Given 2 shows, show1 and show2, with a list of airing episodes for the given day, show1 will come before show2 if all show1 episodes airing on the given day are before show2. vice versa. In the case of a mix (i.e some of show1 episodes come before and after some of show2 episodes), the title of the shows will determine the ordering (I don't know when or how often this would occur). For shows with episodes with 0:00, they will be moved towards the bottom of the list since these have unknown airtime and will be displayed as ???.
As for locale, I decided to not try to update the displaying order of the date. The abbreviation of the month and 4 digits for the year makes it pretty clear if it was a confusion issue.

I mentioned the time format because of completion/consistency since it provides timezone option and time zones have different time formats, I thought it would be the logical next step.

@L11K
I am going to create a new issue. If you would like to do this, feel free to do so and submit a PR.


OpenCL performance difference between arm_benchmark and examples using same model

I ran alexnet using examples/graph_alexnet with optional Target 1 (0 = NEON, 1 = OpenCL) and benchmark cases (CL/SYSTEM_TEST/AlexNet@DataType=F32:Batches=1) as below:
yuanshuai@firefly:~/code/ComputerLibrary-17.12/build/tests$ ./arm_compute_benchmark --list-tests | grep SYSTEM
[0, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F16:Batches=1
[1, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F16:Batches=4
[2, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F16:Batches=8
[3, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F32:Batches=1
[4, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F32:Batches=4
[5, ALL, ACTIVE] CL/SYSTEM_TEST/AlexNet@DataType=F32:Batches=8
[6, ALL, ACTIVE] CL/SYSTEM_TEST/LeNet5@Batches=1
[7, ALL, ACTIVE] CL/SYSTEM_TEST/LeNet5@Batches=4
[8, ALL, ACTIVE] CL/SYSTEM_TEST/LeNet5@Batches=8
[9, ALL, ACTIVE] CL/SYSTEM_TEST/MobileNet@Batches=1
[10, ALL, ACTIVE] CL/SYSTEM_TEST/MobileNet@Batches=4
[11, ALL, ACTIVE] CL/SYSTEM_TEST/MobileNet@Batches=8
[12, ALL, ACTIVE] CL/SYSTEM_TEST/MobileNetV1_224@Batches=1

The examples/graph_alexnet result of inference time is 0.247441, however the result of arm_compute_benchmark for alexnet@FP32:bsize=1 is 0.136934. So Strange!!!!!!
examples/graph_alexnet
yuanshuai@firefly:~/code/ComputerLibrary-17.12/build/examples$ taskset -c 4 ./graph_alexnet 1

./graph_alexnet

Usage: ./graph_alexnet 1 [path_to_data] [image] [labels]

No data folder provided: using random values

Time used: 0.247441

Test passed

arm_compute_benchmark
AlexNet@DataType=F16:Batches=1  0.114563
AlexNet@DataType=F32:Batches=1  0.136934

Besides, mobilenet also has the performance loss between examples and arm_compute_benchmark.

Do you observe similar execution times if you call "run" several times ?
The first run is usually slower because we need to reshape the weights

@AnthonyARM Thanks my big brother, I forgot it. I'll try later! 😀

@AnthonyARM I tried with a problem: I ran each example 11 times. However, the 1st, 4th, 7th of 10 times are so fast, strange!
Below is my code added in ./example/graph_*.c:
    double s_time = timer();
    graph.run();
    double e_time = timer();
    std::cout << "Time used: " << e_time - s_time << std::endl;

    for (int ridx = 0; ridx < 10; ridx++) {
        s_time = timer();
        graph.run();
        e_time = timer();
        std::cout << ridx << "Time used: " << e_time - s_time << std::endl;
    }

The execution results are below:
$ ./graph_mobilenet 1                                                                                [22/90]

./graph_mobilenet

Usage: ./graph_mobilenet 1 [path_to_data] [image] [labels]

No data folder provided: using random values

Time used: 0.220446
0Time used: 0.183237
1Time used: 0.000885963
2Time used: 0.176579
3Time used: 0.177057
4Time used: 0.000503063
5Time used: 0.177596
6Time used: 0.177103
7Time used: 0.0008111
8Time used: 0.176596
9Time used: 0.177247

Test passed
yuanshuai@firefly:~/code/ComputerLibrary-17.12/build/examples$ ./graph_squeezenet 1

./graph_squeezenet

Usage: ./graph_squeezenet 1 [path_to_data] [image] [labels]

No data folder provided: using random values

Time used: 0.179796
0Time used: 0.167973
1Time used: 0.000462055
2Time used: 0.166664
3Time used: 0.165501
4Time used: 0.000305891
5Time used: 0.177851
6Time used: 0.170221
7Time used: 0.0012331
8Time used: 0.166191
9Time used: 0.167294

Test passed
yuanshuai@firefly:~/code/ComputerLibrary-17.12/build/examples$ ./graph_alexnet 1

./graph_alexnet

Usage: ./graph_alexnet 1 [path_to_data] [image] [labels]

No data folder provided: using random values

Time used: 0.256728
0Time used: 0.140293
1Time used: 0.00079608
2Time used: 0.140693
3Time used: 0.137981
4Time used: 0.000552893
5Time used: 0.141899
6Time used: 0.139774
7Time used: 0.00067997
8Time used: 0.140914
9Time used: 0.140361

Test passed
yuanshuai@firefly:~/code/ComputerLibrary-17.12/build/examples$ ./graph_vgg16 1

./graph_vgg16

Usage: ./graph_vgg16 1 [path_to_data] [image] [labels]

No data folder provided: using random values

Time used: 3.90138
0Time used: 3.63174
1Time used: 0.00145102
2Time used: 3.65831
3Time used: 3.67454
4Time used: 0.00602293
5Time used: 3.66178
6Time used: 3.61321
7Time used: 0.00813103
8Time used: 3.65153
9Time used: 3.68021

Test passed

Same issue as here

Fixed in 18.01: closing.


Update copyright 2023

Reviewer checklist

[ ] Read the contributing guide
[ ] PR should be motivated, i.e. what does it fix, why, and if relevant, how
[ ] Ensure relevant issues are linked (description should include text like "Fixes #")
[ ] Ensure any appropriate documentation has been added or amended

Coverage: 99.625%. Remained the same when pulling 26a98c6cd553d333737713433687a5455f70cfe7 on copyright into 3936b4314b32a84aa460b61a9a4bdaba3db3bfa5 on main.


Replace screenshot with a gif in readme

Would be nice if it wasn't just the screenshot and a gif that illustrated tmuxinator in action :)

I actually made one for a work presentation recently. I'll make a new one that doesn't have trade secrets and put it in a PR tomorrow 😄


modifying install.sh for only cpu

Hi,
I am using a laptop with only cpu available. I believe I have to modify the *.sh files as was specified in the repository's README. Problem is that I don't know how to modify it, and the way to do it was not specified. I would really appreaciate your help to get this FlowNet implementation to work on my cpu only device. Thanks a lot for your time.
Error upon running install.sh:
Compiling correlation kernels by nvcc...
rm: cannot remove 'correlation_cuda_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 12: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling resample2d kernels by nvcc...
rm: cannot remove 'Resample2d_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 10: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling channelnorm kernels by nvcc...
rm: cannot remove 'ChannelNorm_kernel.o': No such file or directory
rm: cannot remove '../_ext': No such file or directory
./make.sh: line 10: nvcc: command not found
Traceback (most recent call last):
  File "build.py", line 3, in <module>
    import torch.utils.ffi
  File "/home/cangozpi/miniconda3/envs/carla/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
    raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

I think you have to use GPU for it since some operations are GPU-specific.


Allow for polyfill scripts to be loaded before other scripts

perhaps follow the h5bp method of a 'plugins' js folder and inject that before per project js. Alternatively call it 'polyfills' to be more explicit.
https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/html.md#what-about-polyfills

Dealt with by ditching bower and manually adding tasks for scripts in the head.
This is likely to be a rare occurrence for per site. Bower was causing as many issues as it solved.
Complete by eb96ac4


teamcoco.py preload information could not be extracted

looks like it's failing here
https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/teamcoco.py#L84

Post the full output with the --verbose option.

youtube-dl --verbose http://teamcoco.com/video/full-episode-mon-5-4-jeremy-renner-tj-miller-and-comedian-mikal-cronin
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://teamcoco.com/video/full-episode-mon-5-4-jeremy-renner-tj-miller-and-comedian-mikal-cronin']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.05.04
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: none
[debug] Proxy map: {}
[Teamcoco] full-episode-mon-5-4-jeremy-renner-tj-miller-and-comedian-mikal-cronin: Downloading webpage
ERROR: Preload information could not be extracted
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 650, in extract_info
  File "youtube_dl\extractor\common.pyo", line 273, in extract
  File "youtube_dl\extractor\teamcoco.pyo", line 84, in _real_extract
ExtractorError: Preload information could not be extracted

Can you watch the video in browsers?
Anyway, teamcoco extractor is broken, and I've fixed it in ac6c358c2ab882427f74af47fe5df762dd348c20. Now it works for at least the three test cases in youtube-dl.

@yan12125 I'll close this issue and open a new issue if ac6c358 fails. Thanks.

teamcoco changed again, and it's obvious that their work is directed against youtube-dl.

I managed to fix it in 3a105f7b20e8a3f742ac86cc1a6b02935b831778. Currently teamcoco extractor works.


Cross-compile for mingw32 from Linux

This pull request enables cross-compilation of VIC for mingw32 from Linux.

[ ] closes #xxx
[ ] tests passed
[ ] new tests added
[ ] science test figures
[ ] ran uncrustify prior to final commit
[ ] ReleaseNotes entry

no information provided


Unexpected TextSpan.recognizer behaviour

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
In my app I am trying to install TextSpan with onTap gesture on each word in the text. To do so I split the words by a special character and then pass the wordIndex to the callback so that I know which word was tapped. However, when I tap the word I get the same index every time.
Sample Code:
class _MyHomePageState extends State<MyHomePage> {
  void myOnTap(int word) {
    print("Tapped word: $word");
  }

  List<TextSpan> getSpans() {
    String line = "This is a line";
    List<String> words = line.split(' ');
    List<TextSpan> spans = [];
    int index = 0;
    for (final w in words) {
      spans.add(
        TextSpan(
          text: w,
          recognizer: TapGestureRecognizer()
            ..onTap = () {
              myOnTap(index);
            },
        ),
      );
      spans.add(const TextSpan(text: ' '));
      index = index + 1;
    }
    return spans;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text.rich(
              TextSpan(children: getSpans()),
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
    );
  }
}

Expected results
When the above sample code is run, I expect that when I tap a word I get the index for that word. Instead I get 4 every time as if the index was stored by reference. The current work around I have is to do something like:
      for (final w in words) {
        int index = words.indexOf(w);
        // add span
      }

If I do the above, I get the correct index every time.
Actual results
I get 4 instead of the correct index
Code sample
Code sample
class _MyHomePageState extends State<MyHomePage> {
  void myOnTap(int word) {
    print("Tapped word: $word");
  }

  List<TextSpan> getSpans() {
    String line = "This is a line";
    List<String> words = line.split(' ');
    List<TextSpan> spans = [];
    int index = 0;
    for (final w in words) {
      spans.add(
        TextSpan(
          text: w,
          recognizer: TapGestureRecognizer()
            ..onTap = () {
              myOnTap(index);
            },
        ),
      );
      spans.add(const TextSpan(text: ' '));
      index = index + 1;
    }
    return spans;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text.rich(
              TextSpan(children: getSpans()),
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video
No response
Logs
No response
Flutter Doctor output
[✓] Flutter (Channel stable, 3.13.1, on Manjaro Linux 6.1.49-1-MANJARO, locale en_US.UTF-8)
• Flutter version 3.13.1 on channel stable at /home/waqar/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e1e47221e8 (2 weeks ago), 2023-08-22 21:43:18 -0700
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /home/waqar/Android/Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /home/waqar/Downloads/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
• clang version 15.0.3 (https://github.com/llvm/llvm-project.git 4a2c05b05ed07f1f620e94f6524a8b4b2760a0b1)
• cmake version 3.27.4
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2022.2)
• Android Studio at /home/waqar/Downloads/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Manjaro Linux 6.1.49-1-MANJARO
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.

@Waqar144, are you expecting to run the getSpan() function every time you click the text?
I am asking for the following reasons.
The function only runs (single time) when the MyHomePage widget initializes, i.e., before the MyHomePage screen appears on the screen.
for (final w in words) {   '''' '''' }
It is executed before the widget renders.
Therefore, after the screen renders
TextSpan(children: getSpans()) is equal
TextSpan(children: [Widget1, Widget2, Widget3, ... WidgetN])
n is the length of the word. So, the index value = N(4)
So,
Widget contains the second index value = 4
I hope you understand.

@Waqar144, are you expecting to run the getSpan() function every time you click the text?
I am asking for the following reasons.
The function only runs (single time) when the MyHomePage widget initializes, i.e., before the MyHomePage screen appears on the screen.
for (final w in words) { '''' '''' } It is executed before the widget renders. Therefore, after the screen renders
TextSpan(children: getSpans()) is equal TextSpan(children: [Widget1, Widget2, Widget3, ... WidgetN]) n is the length of the word. So, the index value = N(4) So, Widget contains the second index value = 4 I hope you understand.

Overall, I want to convey. It is the way the dart/flutter screen rendering works. You can change the TextSpan widget to an elevated button or something. You can see the same situation.

@Waqar144, are you expecting to run the getSpan() function every time you click the text?

No.
I expect that the index value is what I stored i.e., [0] = This,  [1] = is,  [2] = a, [3] = line

Overall, I want to convey. It is the way the dart/flutter screen rendering works. You can change the TextSpan widget to an elevated button or something. You can see the same situation.

I think you didn't understand the issue at all.
The issue isn't with rendering. The issue is that when I tap the text, I expect the right index in the callback. Currently, no matter which word I tap, I get index == 4 printed in the handler.

Sir, it won't work in that way. if you want to bind the index to the word, try something different.
It is the screen render flow of Dart/Flutter Framework.
Write a print (print(index)) statement in the for loop.
to see the value of the index exactly after running the code. You can see 1,2,3,4 prints on the screen. Indicating the text span widgets are built.
Now, the index = 4. It would be always 4.
As there is no binding relation between the index and the word.
Hope this can clear you.
You can check with ElevatedButton, TextButton, or anything else instead of textspan.

As there is no binding relation between the index and the word.

Why does that matter? I am just using the index in the onTap callback. What does that have to do anything with render flow? It does work if I get the index with index = words.indexof(currentWord) after all.

index = words.indexof(currentWord) is in the local scope for the onTap function.
That means you are creating a new variable, which means you are allocating a new memory location every time the loop executes.
Dart is a lexical compiler, meaning a function's variable binds to the nearest name/variable.
While the thing you are thinking unexpected behavior is due to
index being global for the onTap function (at least for this function).
Therefore, the same variable or memory location is used for every onTap callback function.
It's not an issue. It is how a lexical compiler works. Dart is a lexical compiler.

I believe it's called 'reference semantics'. I was under the impression that ints were value types.


Add render for Math equations

Like, Sin or other methods for t (progress calculation) aswell as parsing your own.

Done For notes.

Add Math Equations for Playfield next, function would be based on t = time

should also add custom functions per Column.


WNNM wrapper

WNNM requires an additional, user-defined loop for effective noise reduction:
https://github.com/WolframRhodium/VapourSynth-WNNM#implementation

Simply will be done

Done something simple in https://github.com/Irrational-Encoding-Wizardry/vs-denoise/commit/f72a1b5b201034ea032115f0e54b0b163442e1bb
Reopen this issue if you want something else in it


Implement concrete types for OAuth Application and Applicaton builders

Implement concrete types and builders for OAuth flows. This should be similar to Microsoft's MSAL library:

ConfidentialClientApplicationBuilder
ConfidentialClientApplication
PublicClientApplicationBuilder
PublicClientApplication

MSAL Models


Binary data in request not working

I'm trying to record a http post to Docker using Remote API where I send a tar file (via a stream) in Java via OkHttp Client.
Hoverfly records the binary data and shows green in captureMode but fails in simulation mode. My guess is that the JSON doesn't like the binary data in the request. (I got Wiremock to do this and I would like to avoid having Wiremock for one measly test).
image_tarball_import.json.txt
https://docs.docker.com/engine/api/v1.26/#operation/ImageLoad   "Tar archive containing images"

Hey @Khazrak,
There is some checks around binary data in the body, but this is only on response. These should be moved to request body too.
Was this simulation working before being exported? My assumption is that binary data worked as a body and the only issues occur when trying to encode the bianry data into a JSON document.

I used the
HoverflyRule.inCaptureOrSimulationMode
and called, in this case my local, docker via HTTP and got a correct response that was recorded.
It then fails when it uses simulation mode.
But as you say, since I send binary data and it gets recorded and is used to match, this fails since it's binary in JSON.
So it would be awesome if the encodining of body can be on both request and response (instead of just response).

@Khazrak You are correct and we will aim to fix this after our v0.11 release.
If you want to workaround this temporarily, one way is to open your json file and change the matcher from type recording to type template. Once you've done this you can remove the body field from the json, meaning it won't use the body for matching.

Having looked at this issue, I think the best way to go about implementing this would be implement a binaryMatch matcher for requests. The binaryMatch would work the same as the Response.Body field and the Response.BodyEncoded field. It would take a base64 encoded string of the binary data.
This seems cleaner than trying to overload exactMatch.

Wouldn't it be easier to ignore the binary data in the request (which isn't of interest anyway and could be treated as noise) and match on using something in the JSON request?

I think capturing and simulating the binary data in the request body is a bit overkill. One workaround is to remove the request body so that it's not used for matching.
We could provide a binary matcher but it'll be low priority in our roadmap.


TensorRT-LLM(TRT-LLM) LMI model format artifacts not found when deploying

Description
(A clear and concise description of what the bug is.)
Model artifacts are in the (TRT-LLM) LMI model format:
` aws s3 ls ***
PRE 1/
2024-10-25 14:59:16        739 config.json
2024-10-25 14:59:16      11222 config.pbtxt
2024-10-25 14:59:16        194 generation_config.json
2024-10-25 14:59:16         21 requirements.txt
2024-10-25 14:59:16        444 special_tokens_map.json
2024-10-25 14:59:16    9085698 tokenizer.json
2024-10-25 14:59:16      52097 tokenizer_config.json
`
Latest DJL tensorrt container being used:<PHONE_NUMBER>84.dkr.ecr.region.amazonaws.com/djl-inference:0.29.0-tensorrtllm0.11.0-cu124
DJL is looking for hugging face artifacts to convert and fails upon not finding any:
OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /tmp/.djl.ai/download/bf8a789f03a76ad3e0773d75f1a9a366b66e57ba.
Expected Behavior
(what's the expected behavior?)
Model was converted and quantized prior to being deployed, so the expectation is these artifacts should deploy properly with the djl tensorrt container.
Error Message
(Paste the complete error message, including stack trace.)
OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /tmp/.djl.ai/download/bf8a789f03a76ad3e0773d75f1a9a366b66e57ba.
How to Reproduce?
(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.)

Convert huggingface format artifacts to quantized TRT-LLM artifacts using a DJL container in a sagemaker notebook
Push tensorrt, quantized artifacts to new s3 path
Deploy to sagemaker using DJL container:<PHONE_NUMBER>84.dkr.ecr.region.amazonaws.com/djl-inference:0.29.0-tensorrtllm0.11.0-cu124

Steps to reproduce
(Paste the commands you ran that produced the error.)
See above
What have you tried to solve it?
Tried different paths is serving.properties without any success.

can you provide the serving.properties configs you are using?


[BugFix] Fix the miss profile metrics for GIN

Fix the miss profile metrics for GIN, pr(#48521) delete the code of the profile metrics for GIN by mistake
Fixes #issue
https://github.com/StarRocks/StarRocksTest/issues/8575
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.3
[ ] 3.2
[ ] 3.1
[ ] 3.0
[ ] 2.5

https://github.com/Mergifyio backport branch-3.3


how to regist the person voice and predict it by new wav file

with your code,i don't know how to regist the person's voice and predict it by new wav file.

@joonson Can you give an idea about this? How we can enroll a new speaker and test new single audio segments with your code?

After training the SV network, it can generate speaker embeddings for new speakers as well. You can choose some utterances, save theirs embedding (enrollment), and then compare the cosine similarity of an unregistered voice and the saved embeddings. If the similarity is greater than the threshold, then they will be considered as the same person.

@lengjiayi , I am kind of struggling on the save the embedding, Could you please explain how to do it in the code?
Really appreciate your support on this.

@lengjiayi  , I am kind of struggling on the save the embedding, Could you please explain how to do it in the code?
Really appreciate your support on this.

Hi @dimuthuanuraj .
I recommend you to check out this: https://github.com/Jungjee/RawNet/blob/master/python/RawNet3/infererence.py.
Especially args.inference_utterance part.
Thank you.


feat: add alertExtraLabels and rulePrefix to prometheusrule

:tada: This PR is included in version 3.1.0-beta.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 3.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Refactor PackageDiffImpl to use ProjectConfig

Codecov Report

Merging #376 (614e659) into develop (935a95a) will increase coverage by 0.11%.
The diff coverage is 93.33%.

@@             Coverage Diff             @@
##           develop     #376      +/-   ##
===========================================
+ Coverage    82.18%   82.30%   +0.11%
===========================================
  Files           31       31
  Lines         1044     1034      -10
  Branches       183      181       -2
===========================================
- Hits           858      851       -7
+ Misses         186      183       -3

Impacted Files
Coverage Δ

packages/core/src/package/PackageDiffImpl.ts
92.30% <93.33%> (+1.39%)
:arrow_up:

packages/core/src/project/ProjectConfig.ts
88.52% <0.00%> (+1.63%)
:arrow_up:

Continue to review full report at Codecov.

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


The link to download Spyder for win donwloads Spyder 3

Issue Report Checklist

[ ] Searched the issues page for similar reports
[ ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[x] Tried basic troubleshooting (if a bug/error)

[ ] Restarted Spyder
[ ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
What steps reproduce the problem?

What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version:
Python version:
Qt version:
PyQt version:
Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

https://github.com/spyder-ide/spyder/releases/tag/v5.3.1 the link downloads version 3 instead of 5.3.1

Hey @michaelsheidaei, thanks for reporting. I don't understand what you mean. Could you post a screenshot of what you're seeing in your computer?

its downloading version 3
not the version 5.3.1

Hey @michaelsheidaei, that means that you have previously downloaded Spyder and your file downloader is renaming new downloads to not overwrite the previous ones.

It installed spyder 3.1 on my laptop

It seems you have an old Spyder installation. So, you need to find it and remove it. After that, you need to run the installer you downloaded before.

Carlos, I am not being rude but do you even understand English?
when I click the link on the Spyder website or on Git, instead of downloading version 5.X.X its downloading version 3.X.X
do you understand?  I sent the pictures to you to show you that there is something wrong and you keep insisting I am wrong.
Its downloading version 3.X.X and I installed it because its what it downloaded.

Oh just to be clear, I am trying to install Windows version

Windows is saving the link as Spyder_64bit_full_3.exe but that does not mean that it is Spyder 3. The file is called Spyder_64bit_full.exe, but presumably you already have a file of that name in the same folder, so Windows gives it a different name in order to preserve the file that you already have.
Spyder 3 was not released as an .exe file.
What Carlos says is that you have Spyder 3 installed at the moment. When you download the new file, it does not replace the existing Spyder 3.


<EMAIL_ADDRESS>start failed on MacOS high sierra 10.13.3

when I run

react-native start --reset-cache

The error like this:

Metro Bundler ready.

ERROR  spawn watchman EAGAIN
Loading dependency graph...Process terminated. Press  to close the window

Try to ulimit to 1024, it seems not work.
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 8.4.0
Yarn: 1.5.1
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: ^0.54.0 => 0.54.0

when change another project, react-native run-android, it seems works.

Metro Bundler ready.

Loading dependency graph, done.

Metro Bundler ready.
ERROR  spawn watchman EAGAIN
Loading dependency graph...npm ERR! code ELIFECYCLE
npm ERR! errno 11
npm ERR<EMAIL_ADDRESS>start: node node_modules/react-native/local-cli/cli.js start
npm ERR! Exit status 11
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      /Users/taowei/.npm/_logs/2018-05-19T17_45_47_777Z-debug.log

这个问题怎么解决的啊。也碰到了同样的问题

I'm also having this issue. Any ideas?


axios setToken

when I use this.$axios.setToken(),It's work
but I want setToken in check-auth.js  router middle
import { getUserFromCookie, getUserFromLocalStorage } from '~/utils/auth'

export default function ({ isServer, store, req }) {
  // If nuxt generate, pass this middleware
  if (isServer && !req) return
  const loggedUser = isServer ? getUserFromCookie(req) : getUserFromLocalStorage()

  if (loggedUser) {
    store.commit('user/SET_TOKEN', loggedUser)
    store.$axios.setToken(loggedUser.token)
  }
}

the store.$axios.setToken or app.$axios.setToke is not work
my request header don't have auth token
what's the better method when I reload website can use axios.setToken

How are you storing your token? I currently use js-cookie to store in cookie and read back.

@OrangeXC Check this:
https://github.com/nuxt-community/modules/issues/89


Respect trusted_nodes_only setting during peer selection

Describe the feature
#569 added trusted nodes, however, the setting is currently not enforced
This needs to be integrated here
https://github.com/paradigmxyz/reth/blob/76e76bb651097daefcf4298d654eda56de074453/crates/net/network/src/peers/manager.rs#L453-L454

if trusted_only: only check trusted nodes
trusted nodes should be prioritized

cc @MegaRedHand
I think we also want to introduce some kind of enum PeerKind to the Peer so we can tag them, this will prevent that the peer will be removed for example if the trusted peer is also on the discovery network which can send remove peer events.
Additional context
No response

closed via #660


GIX-1381: Add total tokens supply endpoint

Motivation
Show important data like total tokens supply in the Project Detail page in the nns dapp.
Therefore, we expose the ledger endpoint icrc1_total_supply to use it in nns dapp and others to get this important data.
Changes

Add new endpoint totalTokensSupply to IcrcLedgerCanister.
Add new endpoint totalTokensSupply to Sns Wrapper.

Tests

Test new endpoint in IcrcLedgerCanister
Test new endpoint in SNS Wrapper

@peterpeterparker please review


Can anyone help with this problem ?

https://stackoverflow.com/questions/48992062/importing-leaflet-draw-ngx-for-angular-4

Closing this as it's being discussed on stack overflow.


Traffic Router: HTTP-routed delivery service handles 'format=json' qstring incorrectly

Observed in Traffic Router 2.3.1-9053
When sending query string ?format=json in a request to a non-steering HTTP-routed DS (HTTP_LIVE_NATIONAL in this case), TR intercepts this request and does not redirect as expected. Only seems to happen with json.
Examples of correct behavior:
jtucke01@ARGO ~$ curl -I -X GET 'http://ccr.[REDACTED]/foo/bar'
HTTP/1.1 302 Found
Location: http://[REDACTED]/foo/bar
Content-Length: 0
Date: Wed, 06 Mar 2019 21:54:04 GMT

jtucke01@ARGO ~$ curl -I -X GET 'http://ccr.[REDACTED]/foo/bar?format=xml'
HTTP/1.1 302 Found
Location: http://[REDACTED]/foo/bar?format=xml
Content-Length: 0
Date: Wed, 06 Mar 2019 21:54:08 GMT

Example of unexpected behavior:
jtucke01@ARGO ~$ curl -I -X GET 'http://ccr.[REDACTED]/foo/bar?format=json'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 101
Date: Wed, 06 Mar 2019 21:55:46 GMT

Along the same lines of ?trred=false for client_steering requests, ?format=json will also convert the response to a 200 with the location in the response body for non-client-steering requests. My guess is we can't really change that behavior because it might break clients that depend on that.

@guzzijason - what do you think the severity is? critical, major, medium, minor?

This is not a bug and is something that has existed in Traffic Router for some time. Closing this issue for now. If you would like to see this behavior changed, please post to the dev or general list and ask if others are currently relying on the behavior and we can evaluate the change based on that discussion.


Top level redirect isn’t working

While this URL works:
http://chocolatey.org/docs
The following:
http://chocolatey.org/docs/
Doesn’t work, and results in a 404.

@pauby this should now be addressed.


fix(list): disableRipple on selection list not affecting list options after init

Along the same lines as #14836. Fixes changes to disableRipple not being propagated immediately the list options.

@crisbeto could you rebase this?

Rebased.


PhantomJS fails on ES8, implemented in all common browsers

Which version of PhantomJS are you using? Tip: run phantomjs --version.

PhantomJS is installed in version 2.1.1

What steps will reproduce the problem?
2.1. Write a website calling ''.padStart(1, '-')
2.2. Watch it failing 😉

Which operating system are you using?

Mac OS X 10.11.6

Did you use binary PhantomJS or did you compile it from source?

Binary

Please provide any additional information below.

I expected the method, standardized in ES8 to work in PhantomJS because it works in all major browsers, including NodeJS.

http://node.green/#ES2017-features-String-padding-String-prototype-padStart
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart#Browser_compatibility

Do you know of a workaround?

Yes, just use the polyfil method provided on the MDN website: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart#Polyfill
I saw that you referred to a version 2.5.0 on #14951, which is in beta phase as of the time writing, but this version doesn't solve it.

Modern JavaScript features (from ES6/ES2015 or later) will be only supported via an updated QtWebKit.
From now on, please track #15342. Thank you!


Add language names to Source/Target labels in annotation UI

Is your feature request related to a problem? Please describe.
Sometimes it seems that annotators score non-translated text (in the source language, not in the target language) very highly. We assume that this may be due to the fact that they forget that the candidate text output should actually be in the target language.
Describe the solution you'd like
Adding the language names to Source/Target labels in the annotation UI will help make the different languages more explicit to the annotators.
Additional context
Should add this for all current annotation UIs.

The language pair under investigation is already visible on the top-right corner of the annotation UI. However, it feels advantageous to also add the language names to the Source/Target labels…


Unit Testing

This isn't an issue, but rather a question. There isn't really a discussion forum, is there?
I don't see any unit testing examples for MUI. Is there a framework for testing an MUI-based app? There are articles about testing MVVM-based apps, but all tend to follow a Service/Model/Repository architecture.
Has anyone added a Unit Test suite to their MUI app?

AFAIK ...MUI is a visual framework.... i.e they provide styling for the WPF applications....
and
unit testing is something that i would expect a developer would do...to test their individual ViewModels.... in Isolation.... as each application will have their own contexts of operation.


Popover & Tooltip: Allow dispose/hide methods usage, through jQueryIntreface

All the other components, forward called methods through jQueryInterface.
Popover and Tooltip is good to have the same behavior, as it is on the developer hand to decide how to use them, regardless of js/jQuery usage

As I understand this, the purpose of this was so it wouldn't initialize it just to hide/dispose it, which can be considered an extra roundtrip just to do nothing.
Maybe it makes sense to initialize and immediately hide things but just to dispose it? Wouldn't it rather makes sense to have this dispose checks in all the other components?
And is this a breaking change maybe? Because popovers and tooltips would dispatch events now when hidden through jQuery (without being initialized before)?

I guess yes, but only if a developer initializes its code like : jQuery('.tooltips.').tooltip('hide'), which lets admit it is awkward by itself as tooltips are hidden by default

@rohit2sharma95 any other considerations on this?


i cant fix System.InvalidOperationException: Cannot start process because a file name has not been provided. and dont know what to do

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.
[ ] My answer given in the checkbox above is a lie.

What problem did you encounter?
when trying to open bloxstrap ive been getting this error code System.InvalidOperationException: Cannot start process because a file name has not been provided.**** and i dont know what to do.

Duplicate of #2315


Need millisecond precision in log format

Right now the time format isnt precise enough for us to write data into influx. We should be specifying at least millisecond precision.
See this - https://serverfault.com/questions/732395/can-nginx-log-time-in-iso-8601-format-but-include-milliseconds

I don't think it's correct to classify this as a bug.
According to the link above, the options seem to be patching Nginx or running a separate process to do some transformations on the logs.  Both of these seem really ugly.
Is there any possibility that Influx can do anything with $msec?  That's just ever-increasing milliseconds since epoch.

well ill have to turn it into a time object and then send it but yeah it handles it just fine.

sounds like this is just an enhancement now... or can we close this?

@bacongobbler, I think we need to add $msec to the logs, probably right next to the current timestamp.

we still need to figure this out but we can do this later.

closing this for now. we handle this differently now with fluentd


Not An Issue: New Game Idea

Expected Behavior
Warper
People who can teleporter at will are called warpers. You are a young person trying to control your power. There are different types: Short distance, long distance, etc.  Upgrade equipment and do things to win.
Relevant Information to Reproduce
Use SDL mouse events to control warping
Category of Issue
New Idea

Fixed; new repository made.
https://github.com/123outerme/Warper


Add pytest example

This PR:

adds/changes/removes etc

Checklist

[ ] Update changelog in CHANGELOG.md.

I ran into some problems. In general understanding the pykube api is not that easy and then the app installation takes sometimes so long that the test runs into timeouts. So developing on the test takes a long time and sometimes leads to frustration.
I would suggest to allow using kubectl binary in tests to just get the tests done. Experience is then similar to manual testing. Later we can then still refactor tests to use the pykube api when we see the need to that. For example this is implementet in pytest-kind.


Client build failed on ARM64

Hi,
It seems that the client can't be successfully built on arm64
Sending build context to Docker daemon  1.214MB
Step 1/16 : FROM node:12.16.2-alpine AS build
 ---> 88c5c4733931
Step 2/16 : WORKDIR /app
 ---> Using cache
 ---> bd689303d0cf
Step 3/16 : COPY package.json .
 ---> Using cache
 ---> df87d9a247b5
Step 4/16 : COPY yarn.lock .
 ---> Using cache
 ---> d46ec77a6f33
Step 5/16 : RUN yarn
 ---> Running in<PHONE_NUMBER>b1
yarn install v1.22.4
[1/4] Resolving packages...
warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>[2/4] Fetching packages...
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^3.0.0".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^15.0.0".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^15.0.0".
warning "razzle-plugin-scss ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^4.0.0".
[4/4] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error /app/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /app/node_modules/node-sass
Output:
Building: /usr/local/bin/node /app/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/local/bin/node',
gyp verb cli   '/app/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| linux | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21) {
gyp verb `which` failed   stack: 'Error: not found: python2\n' +
gyp verb `which` failed     '    at getNotFoundError (/app/node_modules/which/which.js:13:12)\n' +
gyp verb `which` failed     '    at F (/app/node_modules/which/which.js:68:19)\n' +
gyp verb `which` failed     '    at E (/app/node_modules/which/which.js:80:29)\n' +
gyp verb `which` failed     '    at /app/node_modules/which/which.js:89:16\n' +
gyp verb `which` failed     '    at /app/node_modules/isexe/index.js:42:5\n' +
gyp verb `which` failed     '    at /app/node_modules/isexe/mode.js:8:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:167:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/app/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/app/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/app/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /app/node_modules/which/which.js:89:16
gyp verb `which` failed     at /app/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /app/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21) {
gyp verb `which` failed   stack: 'Error: not found: python\n' +
gyp verb `which` failed     '    at getNotFoundError (/app/node_modules/which/which.js:13:12)\n' +
gyp verb `which` failed     '    at F (/app/node_modules/which/which.js:68:19)\n' +
gyp verb `which` failed     '    at E (/app/node_modules/which/which.js:80:29)\n' +
gyp verb `which` failed     '    at /app/node_modules/which/which.js:89:16\n' +
gyp verb `which` failed     '    at /app/node_modules/isexe/index.js:42:5\n' +
gyp verb `which` failed     '    at /app/node_modules/isexe/mode.js:8:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:167:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/app/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/app/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/app/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/app/node_modules/which/which.js:80:29)
gyp ERR! stack     at /app/node_modules/which/which.js:89:16
gyp ERR! stack     at /app/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /app/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:167:21)
gyp ERR! System Linux 5.3.0-1032-aws
gyp ERR! command "/usr/local/bin/node" "/app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /app/node_modules/node-sass
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
The command '/bin/sh -c yarn' returned a non-zero code: 1

Any advice?

This is related to the project using alpine images.  I was able to get the client image to successfully build after moving away from alpine.  See this change I made: https://github.com/slapula/kube-scan/blob/53596f260b0aee142d1c340e8313572d92865d40/client/Dockerfile
I haven't actually tested the server/client images yet on my cluster so I'll report back once that's done.


where is the assets/lib directory?

project doesn't work without it.

Looks like I forgot to add bower install the README, feel free to do a PR :)

10x!! :)


Available risk bundle display

If there is only 1 risk bundle available, it automatically shows the price in the premium field, without showing the details of the risk bundle. Still prefer to see the list of bundles after the premium amount is generated E.g. a filtered list of the risk bundles  available after I enter my criteria (even if only 1 on that list)

We decided to only show the available bundles if no match for the criteria was found. So right now this works as expected.

thats implemented now


create a collection of simple bash script examples

We may call it dvc-examples and it will contain simple (minimal) bash script examples that illustrate a single concept or feature.
When we use real life examples (like example-get-started), it is often the case that several concepts and features are intertwined. Sometimes this makes it a bit difficult to explain just a single concept/feature without having to explain the others as well (or referring to other explanation pages).
This is where a simple bash script may be useful. It can be minimal and focus just on the concept or feature that needs to be explained (although it may look like an unreal situation). This minimalism may make it easier for the reader to grasp the concept that we are trying to explain.
We can link to these bash examples from the doc pages (command-reference, user-guide, etc.) Moving out examples may also help to keep the doc pages small an uncluttered.

I think simple bash examples can be useful. Not sure about keeping them in a separate repo and asking ppl follow to an external link - it can make reading docs more complicated to my mind.
Also, some of them might become complicated and not focused on DVC - we will need to run a lot of preparation code - git init, dvc init, git commits, creating tags/branches, come up with some artificial stages, generate some artificial data.
My take on this, is that we should be including simple bash scripts (as a link to Github or as a snippet is TBD), but we should also keep example-get-started framework, in certain cases it is the easiest way to get data/scripts with git clone and ready to show some concept.

Sometimes this makes it a bit difficult to explain just a single concept/feature without having to explain the others as well (or referring to other explanation pages).

see above. In a lot of cases bash script will be cluttered and unfocused. In a lot of cases (and we should be working to simplify and keep it this way) - example-get-started is made already to show a concept you want to show. Usually, you can illustrate the concept right away. And if not, then the problem not with this framework, but with the way it's used and probably we should update/simplify a specific reference.

but we should also keep example-get-started framework

It is absolutely useful. I did not even doubt that. My idea is to add more simple/basic examples, like those that our engineering team uses to explain a situation. I find them useful for educational purposes.

as a link to Github or as a snippet is TBD

Having them as a separate script has these advantages:

You can test them easily, to make sure that they work as expected (for example there are no typos).
You can update them easily to the latest versions of DVC.
Keeping the doc pages up to date becomes easier.

These scripts should be meant as try-yourself hands-on examples, with commands that should be executed and lots of comments and explanations. They should not be meant as read examples. But you still can get something just by reading them anyway.

These scripts should be meant as try-yourself hands-on examples, with commands that should be executed and lots of comments and explanations. They should not be meant as read examples. But you still can get something just by reading them anyway.

To better explain what I was talking about, I started to write a couple of such examples: https://github.com/dashohoxha/dvc-examples
Then I had the idea of making them interactive.
However, the prize for being able to convert reliably a script to interactive script is that ":;" has to be used in front of each command, like this:
## Create a file and track it with DVC:

:; echo 'test 1' > file1.txt

:; cat file1.txt

:; dvc add file1.txt

:; ls -l

:; tree -a

: DVC is now tracking 'file1.txt'.

This seems to me a bit clumsy and ugly, but I couldn't find a cleaner solution.
I am not sure anymore if such examples would be useful.
What do you think?

By the way, these interactive examples look like a "poor man's katacoda". But since we are already using Katacoda (which is way better), they don't seem to be quite useful.


Single Cell Data QC

The current Alevin workflow does not perform any particular QC steps; we have been doing this by hand so far.
We should implement some automated QC!
The simplest version of this would be adding alevinQC to the run-alevin.nf workflow. For this to work, the current alevin workflow will need to be modified to include the --dumpFeatures flag
While this is pretty easy, it isn't always as robust as we might like, and does not support cross-library summarization (like MultiQC?), which we might like to add in the future.
To allow for future flexibility, we should make sure to output the entire AlevinQC report directory, not just the html files, so that we may be able to process them later after reading in data tables with readAlevinQC() or similar.

miQC: https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>3798v1

Could be useful for training too. It takes the challenge of picking a threshold for dead cell / debris removal and reframes it as a mixture model. The cases where it doesn't work well are samples where there is not a mixture (i.e., no dead cells/debris or no live ones).

Can this be closed?

Yes, I suppose it is largely superseded by our current QC reports.

I would say yes.


Create new-to-sustainable-computing-guide

I will be at the conference all day please Edit directly on my behalf adding the images in the following sections. Thanks so much! : https://docs.google.com/document/d/117Mt6sDInSxdsVA-vBI9Cwls67FvQbU2KR1WqqKY0U8/edit?usp=sharing

48e)

Hey @berryq460 thanks for opening the PR! Could you retarget the PR to point towards https://github.com/cncf/tag-env-sustainability:main ? Thanks!


i18n: Ultima_weapon_ultimate fr

For Grand Whirlwind, i couldn't find this skill. Is this something you created for the timeline or that it was an error when creating the timeline? Otherwise, i made this correction, because i found this skill Great Whirlwind. Tell me if this is wrong and I will correct my modification.
This image is from the FFLOGS on UWU.

I checked my logs, and it sure looks like Great Whirlwind a few years ago too.  Thanks for the fix!

It's always a pleasure to contribute for everyone.


Pytest pexpect implementation

Run system test using command: pytest. Test can be added to, to verify more text input and ouput.

The System test failed because the pythoon version was not formatted correctly

Whoops. I also forget to add Gradle to the system test action as well :(


Parametric family of toy models with affine dynamics

Proposal
Add a function toy_models(n; system=..., X0=rand(BallInf(n))) that returns a list of control problems (described below). system should be a default random affine system of dimension n.
Purpose
Investigate the precision of the individual steps of the set propagation. For affine dynamics we know how to do (almost error-free) set propagation.
Control problems

controller = identity
Here we can see the influence of interrupting and re-discretizing.
controller = 2 layers with a nonlinear activation function
Here we can see the influence of a nonlinear activation function
controller = 5 layers with nonlinear activation functions
Here we can see the influence of a somewhat real network

sounds good. i don't have a specific model in mind. maybe one of the nonlinear models linearized around some operating condition.


Replace TCP with WebSockets (when feature gate enabled)

This PR replaces all instances of TCP with WebSockets when the ln_net_native_ws or ln_net_wasm_ws features are enabled. This is step 1 for 10101 WASM :tada:
The new, default, ln_net_tcp carries out the old behaviour. When it is not enabled, the node will not listen for incoming TCP connections. The coordinator supports both TCP and WS connections. WS connections simply connect to its HTTP endpoint at / with a Websocket upgrade header.
There is a potential breaking protocol change in how we handle pings/pongs with the orderbook. I have swapped uses of tungstenite in transitive dependencies of native to the tokio_tungstenite_wasm crate, which is a facade over tungstenite and WASM websockets (depending on target). Since WASM websockets can't directly intercept Ping/Pong frames, instead we use Text messages with the content "ping" and "pong". Additionally, we do the same in the BitMex protocol (which supports this natively as well).
The coordinator's axum websocket implementation is not perfect as it kind of 'lies' to rust-lightning about when the data gets sent exactly. See the SocketDescriptor send_data implementation comment for more info. FWIW, this is how Mutiny does it too so hopefully it's okay. This also applies to the ln_net_native_ws implementation, but this is only intended for testing anyway and should be removed later down the road.
Because of the large potential impact, I've requested a review from everyone.

Ah, it seems that the WASM websocket approach won't work due to the Send bound in BDK.

@luckysori just checking if we are ready for merge on this?

Sure thing! I will add it to the merge queue.


Carousel touch slide

For carousel control, using a mobile device's browser, is there a way to scroll through slides by dragging with your finger instead of pressing the next/previous buttons?

Carousel doesn't support swiping on touchscreen devices at the moment.
We're looking into adding this functionality.

@juanmmett thanks!
fixed in @coreui/angular version 4.2.13


【Need Help】The title of the article is displayed above the picture in the recommended articles

Discussed in https://github.com/tangly1024/NotionNext/discussions/1936

Originally posted by vlafriday March  2, 2024
Hello, I have a preview with the text in the recommended articles on the post page. But the title of the article is displayed above the picture. I wanted to ask if I can disable the display of text above the preview. So that only the picture is visible. Where is it configured?
Here https://www.vlafriday.space/my-set-for-a-25-year-old-grandfather
Screenshot

Hi, currently there is no toggle to control whether the text is displayed here, but you can easily modify a piece of code to achieve the requirement of hiding the text.
The relevant code is located here:
https://github.com/tangly1024/NotionNext/blob/80a7a9b2d8e901faec5f010229c05b83ad6e2ead/themes/hexo/components/ArticleRecommend.js#L49-L51
Simply add invisible or hidden to the className, and the text will be hidden.

Thanks a lot, very helpful 👍

@tangly1024 how can I add a shadow to this picture? to make the white text better visible in a light picture

before pointing the mouse at the picture

Adding a brightness-75 will be helpful:
https://github.com/tangly1024/NotionNext/blob/695fca0dac2db3a6bfe8643f260862641d741d70/themes/hexo/components/ArticleRecommend.js#L47-L54

This will better highlight white text:

Brightness defaults to these options:

@tangly1024 but how can I add a shadow to the picture? Not the brightness

Adding a shadow-xl will be helpful:
https://github.com/tangly1024/NotionNext/blob/695fca0dac2db3a6bfe8643f260862641d741d70/themes/hexo/components/ArticleRecommend.js#L45!
改为：
className="shadow-xl flex h-40 cursor-pointer overflow-hidden"

@tangly1024 I did this, but the image still has no shadow :(
The shadow is not needed for the text. The shadow is needed for the image


Github Action for automatically running pgbench

Hey
Quick check: for this issue what would happen to the logs after running PGPASSWORD=postgres pgbench -M extended --transactions 100 --jobs 10 --client 100 -h localhost -p 7654 -U postgres.localhost postgres or similar?
Would it be piped somewhere or would it remain in the CI logs in case anyone wanted to inspect that changes are not affecting the performance of Supavisor too much.
If it's still relevant at all I mean


Upgrade org.apache.commons:commons-compress to version 1.16 or higher

As described in this vulnerability warning, we should upgrade our direct and transitive dependencies of org.apache.commons:commons-compress to version 1.16 or higher. If this is coming via a transitive dependency and there is a newer version of it that already uses a recent enough version of org.apache.commons:commons-compress, then we should upgrade to that. We need to make sure that no transitive dependencies are bringing this.

I'm picking this up.

Fixed! ;)


How do I change animation speed?

Sorry that I was unable to find it on the README.md!

react-native doesn't allow this. For example for iOS https://github.com/facebook/react-native/blob/13dfb6267a16f3430cf609d47b290ab977082300/Libraries/Components/ScrollView/ScrollView.js#L370 there is no such option. I think it is possible to do (decelerationRate in scrollView for ios, dont know about android). I will keep this issue if you open issue in react-native repo.

I was wrong. You can set decelerationRate. You can try with contentProps. But you cant change speed of scroll neither for UIScrollView nor ViewPager.


Added light group support

Magic Areas will create $ROOM Lights light groups for all areas. Will add enable/disable support in another feature

Closes #40

Closes #40

Waiting on the merge of #72 to add the feature check and merge this PR.

Waiting on the merge of #72 to add the feature check and merge this PR.


Form saved Callback inside Transaction

Hi, first of all, superb package !!!
In current implementation, saved callback is called outside transacation.  But, it could be the case, where additional inserts/updates/deletes or more complex validations are made inside the callback returniong errors or not, not just redirects. In this case, inconsistent data could be leaveing in db
Thanks in advance, and keep rocking with this !!!

Currently, solved hooking saved event on model in the form method of the controller. Like this:
         $form->model()::saved(function ($empleado) use ($form) {
                $meta = $form->input('meta');
                $empleado->syncMeta($meta);
            });


Retire cleardata/forseti-policy-enforcer Docker Hub container

After two releases where Forseti deployment is using the new forsetisecurity/real-time-enforcer  we should retire the cleardata/forseti-policy-enforcer container.
Issue #9 needs to be completed before we take any action on this issue..

Are there further AI's that need to be completed?  Or can this be closed?

looks good to me - thanks for the nudge!


Models CALF_calibration approach

Hi guys, first of all thank you for share all this knowledge, it is impressive. I was wondering if it can be possible to access the models of CALF_calibration approach since training for scratch the networks in my case is very slow. I am doing my master thesis and I am trying to reproduce the experimentation that you did, this is the reason which I am interested in that.
Sorry for inconvenience and thank you very much.

Hi @antosanto97 , thank you for raising this issue. We will upload the models of CALF_calibration with in this folder: https://github.com/SilvioGiancola/SoccerNetv2-DevKit/tree/main/Task1-ActionSpotting/CALF_Calibration/models with the precious help of @cioppaanthony :) Stay tuned.

Hi @antosanto97!
Thanks for your comment. :+1:
As requested, I have uploaded our two models:

Trained on the 8 visual classes with the help of calibration,
and trained on the 9 other non-visual classes without calibration information.

I also invite you to check out the new version of the README where I added a section related to "how to use these pre-trained weights for inference on SoccerNet". The command lines to run these models can be found there as well.
Don't hesitate to give me your feedback on the matter! I would be glad to help you should you have any issue or question.
I wish you all the best in your work.


Question regarding lib/models/patchnet.py

May I know the purpose of the operations on lines 67, 74, and 90? I don't understand why patch values are deducted by mean value and later adding mean value back to center to get stage1_center. Thank you very much in advance.

May I know the purpose of the operations on lines 67, 74, and 90? I don't understand why patch values are deducted by mean value and later adding mean value back to center to get stage1_center. Thank you very much in advance.

For the coordinate system transformation. There is a visualization for this in Fig.4 of the paper [1]
[1] Frustum PointNets for 3D Object Detection from RGB-D Data, Charles et al., CVPR'18

Thank you.


Vault Jsonnet Native Function

I'd love to be able to pull secrets from vault when I apply. We do this already with tooling we have but would like to start using tanka. Any reason why we shouldn't or can't have this? Or how are others handling their secrets with tanka?
For example when I apply this jsonnet tanka would use the standard vault envvars VAULT_ADDR and VAULT_TOKEN to create a client for use with the native jsonnet function:
{
  secret: {
    apiVersion: 'v1',
    kind: 'Secret',
    type: 'Opaque',
    metadata: {
      name: 'secret',
    },
    data: {
      password: std.native('vault')('secret/path', 'password'),
    },
  },
}

I like that idea!
Internally at Grafana, we use git-crypt to store secrets gpg-encrypted in the git repository. However, we have already hit the limitations of this concept (hard to rotate secrets, no tight access control).
I think we can definitely implement a native function for pulling secrets from vault as long as it is documented thoroughly :D

(Upstream Jsonnet dev chiming in.)
Perhaps these can be passed as regular extvars? Tanka could have an integration with the Vault, have the keys to pull and connection info specified somewhere and fetched before the evaluation of the script. They could then be passed to Jsonnet as ExtVars, which is one of the intended mechanism of passing data to Jsonnet code.

I have thought about this idea as well ... However, I didn't come up with a nice way of specifying which secrets to obtain from vault.
Vault is basically a very secure key-value store. Tanka on the other hand uses Jsonnet code to define Kubernetes objects where the Jsonnet is the single source of truth.
As far as I understand, extVars need to be statically resolved at the time the Jsonnet evaluation is invoked. However, at that point we do not yet know which secrets the user might need. Letting them specify in advance feels overcomplicated, as there would be another source of truth involved which needs to be maintained. Another option would be to pull all secrets from vault into a dict, but as secrets should be accessed sparingly I would vote against that as well.
Unless I miss something, it looks as if pulling dynamically during evaluation has the least drawbacks. WDYT?

I agree @sbarzowski I would use extvars if I were using the jsonnet binary and I'd wrap it all up into a Makefile. But I see that as the enticing part of tanka and in general any tool using the jsonnet go library. That we can create tools for very specific workflows, like tanka is doing for us with k8s, with all the things we need in one binary. Ok two here if you count kubectl.
A drawback I also see is that the configuration of all of those secrets is another set of configs I have to maintain. And probably I'd have to maintain those in a different fashion then the jsonnet that I'm using to render the k8s resources. Like @sh0rez I also don't see a nice way to do this. Plus I'll need an additional script or something to take that input then actually call vault so that I finally get it all in the form that I need to finally put it in the extvars.
If it's here it's all nice and clean. Or should I open a pull-request on https://github.com/google/jsonnet :thinking:

@sh0rez

As far as I understand, extVars need to be statically resolved at the time the Jsonnet evaluation is invoked.

That's right.

However, at that point we do not yet know which secrets the user might need.

I think this is something that a user may want to statically find out. Being able to tell what is calculated based on what data is kinda what Jsonnet is about :-). Having some deep part of the code fetch arbitrary secrets - and not even knowing what secrets are needed for the whole config to run - sounds not ideal.
However, specifically with Vault, I think these issues are not so bad. Vault has its own concept of roles and grouping of who-can-access-what, so being pedantic about it on Jsonnet side may be not worth it.

Letting them specify in advance feels overcomplicated

Well, that would require some additional manifest (probably in JSON or Jsonnet) which needs to be processed before the main evaluation.
I would consider that the most "proper" solution. But I don't know if it's pragmatically worth it.

Unless I miss something, it looks as if pulling dynamically during evaluation has the least drawbacks.

Hmmm... FYI native functions were designed for pure computation and not IO, which means quite a lot of things would need to be done on Tanka side to provide the optimal experience.
I would recommend doing the following if native functions are going to be used for fetching values from Vault (or other external datasource):

Cache request results within one evaluation (ensure purity within one execution, even if a secret changes during the evaluation).
Have a way to produce a log of accessed secrets.
Have a way of specifying these secret values from file (e.g. for development and debugging purposes). Ideally adding other key-value secret backends would be possible in the future.
Recommend in the documentation for the users to create separate file(s) which define secrets and assign them to object fields instead of sprinkling the calls to tanka.secret('some-random-string') over the codebase.

@forestsword

If it's here it's all nice and clean. Or should I open a pull-request on https://github.com/google/jsonnet 🤔

More convenient upstream support for data input (including loading of secrets) would definitely be a good thing. This issue is definitely one of the sources of inspiration for that. Still, I think it's best to start with Tanka.

I would like to pick this up. @sh0rez Do we have any Contribution guidelines?

I would like to pick this up. @sh0rez Do we have any Contribution guidelines?

Awesome! No, we do not really have any specific rules on contributing .. try to keep your changes as small and focused as possible, use good commit messages (what and why), address linter suggestions (golangci-lint) if they make sense, everything else will resolve during review :D
Regarding the design of this feature, I like what @sbarzowski outlined above and I would still go with a std.native func.
One thing that seems nice is that the parameters to this func are kept general enough to be swapped out with other kv stores (not only vault), to allow easier local development, e.g:
// local:
std.native("gpgSecret")("/home/user/.secrets/supersecret.yaml.gpg", "field")

// production:
std.native("vaultSecret")("path/to/secret", "field")

I look forward to see your solution. Reach out to me here or on Slack if there are any questions / open points!

Reopening, as we are still planning to ship this, even though it might be delayed further because of our focus being put on other things at the moment

Instead of binding to a specific secret management solution (and implementing the plethora of different combinations), would it be possible to consider delegating to something like sops (which already has many secret backends, and Hashicorp Vault support is being developed currently).

@sh0rez this was closed without any comments (after removing the keepalive label), could you talk about the rationale ?

Is there a new recommended approach for managing secrets?  Or are we still stuck with pulling down ExtVars from Vault?


Making use of 'monitorSession'  (user signed out at OP)

Hi Brock
I am trying to make use of the userSignedOut event to remove the user from local storage (unless the client does this automatically and I am missing something).
So, I've added an event listener and can see it getting attached.
userManager.events.addUserSignedOut(() => {
        ...
});

I then go and log out at the OP. The next time there's a silent refresh, the OP returns an error as expected:
.../oidc-silent/?error=login_required&state=xxx
Because it gets processed by the SigninResponce, and the parseUrlFragment function is called with a # delimiter, this error is lost and I can see a number of attempts before the token eventually expires.
The callback endpoint .../oidc-silent/ is just doing the following (as per example):
new Oidc.UserManager().signinSilentCallback();

Thanks for your help 👍

What OP are you using? The error should come back in as a hash fragment for implicit clients.

Makes sense and confirmed this in specs. Will take it up with OP. Cheers

Can you share which OP? I'm curious.

It's a custom built 3rd party OP from a vendor. Black box.


Why not to use querystring.parse() for parsing query parameters in NodeJS runtime?

Hello. I found an issue with req.query where data came in URL-encoded format.
I checked runtime and found that req.query is building by code that do not decode data:
https://github.com/open-runtimes/open-runtimes/blob/a3f20033b642d75096bc9754301e6d1525cebd1e/runtimes/node-18.0/src/server.js#L46-L53
If I request URL: https://some.com/?text=a+text+from+request I get in req.query: a+text+from+request. In that case I need to do a manual work in my function:
import querystring from "node:querystring";

// ...

const query = querystring.parse(req.queryString);

Question: Why we parse GET parameters in current way? Can we replace this part of code with querystring.parse(...)?

We should definitely do this.
cc @Meldiron


Few fixes for failback edge cases

Cleanup secondaries once failover or failback
is complete, by requeuing if reconcile is not complete
Amend MCV condition checks to ensure NotFound is
correctly reported, and reconcile is attempted otherwise
Remove generation change as a reconciler predicate to
reconcile on requeues without any spec change

As some actions take time, the generation change
predicate prevents reconciles, and hence is removed

Once MCV is watched, the generation change perdicate can
be bought back to cut down unwanted reconciles.
Signed-off-by: Shyamsundar Ranganathan<EMAIL_ADDRESS>

@BenamarMk this will fail tests, but pushing the changes as I work on the tests so that there is no work conflict.

@BenamarMk this will fail tests, but pushing the changes as I work on the tests so that there is no work conflict.

@BenamarMk test cases updated as well.


Unable to install plugin without root permissions

Trying to install plugin using cordova cli,
Unable to install npm dependecies without root permissions,
If using root permission, all other operation in cordova cli (build/run) require root permission
Cordova cli version 6.0
Npm version 2.7.3
Error on running: cordova plugins add cordova-universal-links-plugin
Fetching plugin "cordova-universal-links-plugin" via npm
Installing "cordova-universal-links-plugin" for android
Checking dependencies:
Can't find module mkpath, running npm install
Installing "cordova-universal-links-plugin" for ios
Failed to install module mkpath:Error: Command failed: /bin/sh -c npm install -D mkpath
npm WARN locking Error: EACCES, open '/Users/Sergo/.npm/_locks/mkpath-2eed79c4f3589c41.lock'
npm WARN locking     at Error (native)
npm WARN locking  /Users/Sergo/.npm/_locks/mkpath-2eed79c4f3589c41.lock failed { [Error: EACCES, open '/Users/Sergo/.npm/_locks/mkpath-2eed79c4f3589c41.lock']
npm WARN locking   errno: -13,
npm WARN locking   code: 'EACCES',
npm WARN locking   path: '/Users/Sergo/.npm/_locks/mkpath-2eed79c4f3589c41.lock' }
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-D" "mkpath"
npm ERR! node v0.12.1
npm ERR! npm  v2.7.3
npm ERR! Attempt to unlock /Users/Sergo/src/oktopost/mobile/board/node_modules/mkpath, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Sergo/src/oktopost/mobile/board/npm-debug.log

You should not need root permissions for that. I'm not running as a root, and it get's installed fine.
Either way, when plugin is installed - it executes JS hook, that loads additional npm packages (locally), defined in package.json.  As a workaround you can do the following:

Delete plugin from your project:

cordova plugin remove cordova-universal-links-plugin

Install dependency modules manually inside your project by executing:

npm install mkpath
npm install xml2js
npm install rimraf
npm install node-version-compare
npm install plist

Add plugin:

cordova plugin add cordova-universal-links-plugin

I did it yesterday as a workaround to make it work,
It probably because installing packages with npm on mac require root privileges, (There several workaround for this).
It is ok if I need to install the npm packages as a root, (for example cordova installation guide:
sudo npm install -g cordova)
The issue that it will require all other operation with cordova cli a root permissions.
I think it might be fixed by updating permission on copied files