Level Zero Revisions

This is just a series of suggestions and my review of the LevelZero code now knowing more.

Why do we need to change the FPS here? I'm pretty sure since we're referring to "pygame.time.Clock()", it refers to the same one as the one referenced in main and will change the game's FPS to 30.

Change morse_dict's keys to be a series of s and l to represent short and long. This would reduce the memory load in level_zero by a lot. Considering right now there are 37 items multiplied by 6-30 (a single short to short 5 times being the longest string) char's compared to that divided by 6 if they're shortened to 1 char, resulting in 37 x 1-6 memory usage.

We don't need to declare a self.morse_code_count to check length like in the image. It would be better to use len(self.str_morse_code)

Agreed mainly due to it not being used for the if statement below

I would redo this method because display as a parameter is not being used since you can get away with using a dummy variable (no need to pass it). Additionally, the line for g_string = str(f_string) is not needed (extra unnecessary step).

Your first if is if the count is < 5, and the second is if it's == 5. If there's a scenario that you're able to get past 5, then the check/safety measures in == 5 are avoided.

In this case, the self.action_timer (delay before next button pressed) is not used, and without it the player can hit the buttons twice in an instant. This causes letters to be added 2 or more at a time, (2, 4, 6, always even), avoiding 5 since it's odd and causing the issue below:

In the worst scenario, it can cause lag due to the sheer amount of text. The lag causes the player to collide with the convert_code box longer, meaning more text is generated for each jump, compounding the issue you see here:

These issues don't have to be fixed immediately as we're still early in development, but should be done within the Long Term Development Goal deadline as stated in this issue's Milestone.

Why do we need to change the FPS here? I'm pretty sure since we're referring to "pygame.time.Clock()", it refers to the same one as the one referenced in main and will change the game's FPS to 30.

This wasn't an intentional change as I was trying to fix the frame rate issue so that multiple inputs wouldn't be inputted (which still hasn't been resolved) and it is almost being used and recalled for the text timing.

Change morse_dict's keys to be a series of s and l to represent short and long. This would reduce the memory load in level_zero by a lot. Considering right now there are 37 items multiplied by 6-30 (a single short to short 5 times being the longest string) char's compared to that divided by 6 if they're shortened to 1 char, resulting in 37 x 1-6 memory usage.

Memory wasn't even being considered as an issue here. We can change it, however, I only kept it that way because it was easier for the player to see what inputting they have put on so far and from there I called the dict to translated everything easier. If memory is a serious issue, we can change it.

We don't need to declare a self.morse_code_count to check length like in the image. It would be better to use len(self.str_morse_code)

Oh, that works too. We can change it to that.

I would redo this method because display as a parameter is not being used since you can get away with using a dummy variable (no need to pass it). Additionally, the line for g_string = str(f_string) is not needed (extra unnecessary step).

g_string was used for testing purposes but you're right. It should be removed.

Your first if is if the count is < 5, and the second is if it's == 5. If there's a scenario that you're able to get past 5, then the check/safety measures in == 5 are avoided.

Thanks for catching that mistake. I'll change that as well.

These issues don't have to be fixed immediately as we're still early in development, but should be done within the Long Term Development Goal deadline as stated in this issue's Milestone.

All of these issues are noted and thanks for bringing them up.


DSA <IP_ADDRESS> Stacks: Infix to Postfix - Documentation

Description
How to convert infix expressions to postfix? Show examples and implementation.
Task

[ ] Documentation

Note

Do not use assign command for this issue.
While requesting the issue to be assigned, please mention your NAME & BATCH NUMBER.
Kindly refer to Issue Guidelines.
Changes should be made inside the DSA/directory & DSA branch.

I'm Interested in this also.
Motasim (DSA Batch - 01)

Please assign me this one, I was looking for such topics i can explain well.
Maneet kaur
DSA batch 1

I am done with this one please review it


Setting PATH for forked programs with coq extensions (QuickChick) ?

I'm trying to use VSCoq along with QuickChick. I am getting an error that when trying to run QuickChick it cannot find ocamlbuild in order to build and execute the quickcheck tests:
Could not compile test program: /var/folders/8d/bt1pyh894313lkwr0f8y5z780000gr/T/QuickChick/165155_4c0838/QuickChick12913f.ml

Build stderr:
sh: ocamlbuild: command not found

This error arises for the Introduction.v file in the Software Foundations QuickChick volume (which you can download from here), when I try to do the QuickChick removeP. command (right toward the front).
I installed VSCoq using opam as prescribed in the README. I have version 2.2.1 and Coq 8.18.0. I installed QuickChick also with opam, via opam install coq-quickchick after running opam repo add coq-released https://coq.inria.fr/opam/released.
I find that if I symlink my opam bin directory into /user/local/bin/ the error goes away. So there's something about the PATH configuration that is messed up. I.e., if I do the following and then try to run QuickChick removeP. it works:
for file in /Users/mwhicks/.opam/4.14/bin/*; do sudo ln -s $file /usr/local/bin/`basename $file`; done

Perhaps I need to configure VSCoq some way I'm not aware of, or else there needs to be a way to instruct it in the default PATH to use for Coq extensions? I don't know how QuickChick works so I'm not sure.

This might be related to vscoq (and electron apps). How do you start code? A few remarks:

if you open a shell, you check that ocamlbuild is in your PATH, and then you start code from there (and you have no other code windows open), does it work?
not that the PATH you may set in the embedded code terminal does not affect the value of the variable used by vscoqtop, only the value before you start code
if you have multiple code windows, I think there is (maybe there was) a limitation of electron (hence code) that only the env variable of the first window of code are taken into account. E.g. the second window you open inherits the environment from the first window, not from the shell you start code from

Given the mess above, a suggestion: if you exec from quickchick (hence from vscoqtop) you could add the path of vsqcoqtop (eg via ocaml's executable_name and dirname) to the PATH explicitly (either via passing an explicit env to Unix.fork or by using Unix.setenv which is not called like that in caml but now I don't recall exactly how it is named).
Hope it helps.

if you open a shell, you check that ocamlbuild is in your PATH, and then you start code from there (and you have no other code windows open), does it work?

Yes! In fact, if I just quit VSCode, open it, and then open my Coq development, that works too. It wasn't working yesterday.

if you have multiple code windows, I think there is (maybe there was) a limitation of electron (hence code) that only the env variable of the first window of code are taken into account. E.g. the second window you open inherits the environment from the first window, not from the shell you start code from

I believe that this was probably the issue. I had a remote window opened when I started and tried to run QuickChick, and I suspect that the PATH from that window, which does not relate at all to my local environment, was getting used.
Thanks for the help! CC @lemonidas in case he wants to try out your suggestion on enhancing the PATH from QuickChick.


Link for Trait Working Group book is broken.

What
Link for the wg-trait book results in a 404: https://rust-lang.github.io/wg-traits/
Where
Source code location: https://github.com/lborb/book/blob/main/src/official.md?plain=1#L27

Thanks @joegesualdo!


swc_bundler: does not handle property shorthands

Describe the bug
swc_bundler does not appear to handle named re-exports
Input code
example3.ts
import { d } from "./d.ts";

console.log(d);

d.ts
import { a } from "./a.ts";

export const d = { a };

a.ts
export const a = "a";

Expected behavior
An emit something like:
const a = "a";
const d = {
  a
};
console.log(d);

Actual:
const d = {
    a
};
console.log(d);

Version
Version: swc_bundler 0.7.4
Additional context
Working to integrate swc_bundler into Deno.

With #1105, the output is now:
const a = "a";
const d = {
    a: "a"
};
console.log(d);

It has some redundant code there, but it is functionally accurate.


client.whisper

Hello there,
looks like there is still wrong with client.whisper.
I am trying to /w to user:
client.whisper(userstate.username, "test").then(function(data) {
  console.log('data', data);
}).catch(function(err) {
  console.log('something went wrong', err);
});

I am getting back data in console, no any errors, also

info: [#jtv] Executing command: /w 'here is the correct username' test

but nothing happens.
I tried to update to 1.2.0 version but got the same result, correct data,

info: [#tmijs] Executing command: /w 'here is the correct username' test

and still nothing.
Interesting thing is when the user how is supposed to get message is broadcaster of the channel he is able to receive the whisper, but nobody else is not.
Operating system: Windows 10
Node version: 6.10.2
npm version: 4.4.4
Tmi.js version I've used: 1.1.2, 1.2.0.
Looking forward for your answer.

Just discovered the same. PRIVMSG #tmijs :/w name test is send over the WebSocket, but nothing happens afterwards!
It should use the IM api: https://im.twitch.tv/v1/messages?on_site= with POST:
body : "test"
from_id : ...,
nonce : "Rqdj7nJSVnNjvL0JFlHFxK1UZEiR1b"
on_site : "",
to_id : ...

I'm not sure what the actual problem is. Everything seems to be working correctly.
Manual through wscat

tmi.js

The result

The user being whispered to in my case is a DeepBot. It is whitelisted and is usually able to receive whispers. I was now able to get some more information from the users using my Extension, that is based on TMI.
While both the messages !bet 49999 2 and !bet 51010 2 are sent,  !bet 50000 2 is not. I am still not sure why this happens. I will have to debug this on my own and provide you with further information. Maybe Twitch is filtering out the messages because it contains a 50000? I am not sure! I will let you know ...

Ok I can confirm this now. I can send messages like test but NOT !bet 50000 2.
[09:11] info: [#tmijs] Executing command: /w nookys_cookiemonster !bet 12345 2
[09:11] info: [#tmijs] Executing command: /w nookys_cookiemonster !bet 50 1
[09:11] info: [#tmijs] Executing command: /w nookys_cookiemonster !bet 500 1
[09:12] info: [#tmijs] Executing command: /w nookys_cookiemonster !bet 5000 1
[09:12] info: [#tmijs] Executing command: /w nookys_cookiemonster !bet 50000 1

All messages except the last one are sent and I can see them in the chat window:

However, I can send !bet 500000 1, but not 50000, which means Twitch somehow prevents the word 50000 from being send?

Just tested and it's working fine on my end

I have a similar problem, not sure if it's because of the new version of the Twitch API, if I follow my bot it can send me PMs, but if I'm not following it, I can't send event driven PMs.
Any thoughts? Maybe I'm missing something.

Yeah, can confirm it, got the same thing. I can see PMs from my bot only if I am following it.
Unfortunately no ideas atm how to avoid it.

any solution to this yet?  I can also only receive whispers from the bot if I am following it.

@metal-messiah You need to submit your bot account here: https://discuss.dev.twitch.tv/t/have-a-chat-whisper-bot-let-us-know/10651

@AlcaDesign No. This has nothing to do with submitting the bot to the whitelist. Even after it was whitelisted, problems occured. The simple solution would be to use the actual whisper service, instead of PRIVMSG to a user.


FSD Module 5 Activity > In Class > Conditional Statements > Creating a Choose-Your-Own-Adventure Game > Extraneous Step

Activity on Canvas has students perform npm install, but there is no longer a package.json so it throws an error. The canvas activity instructions may need updating to remove that line of instruction.

This problem is only in UNLV-FS-02-IC-A and not in UNLV-FS-02-IC-B, apparently.


Pattern creation

New pattern created in c

@gr8rithic Complete all the steps...otherwise your PR will be flagged as invalid

I am new to open source so I dont know how to create multiple commits in a single pull request. Can you help me out that's the reason I was not able to commit it. Can you please help me out in that?

@gr8rithic no issue...create a new PR with all the modifications


Support dynamic CSS classes (1 per line)

Feature request for supporting the ability to give different CSS classes per text entry item.
Example:
<vue-typer
  :text='["1st text","2nd text","3rd text"]'
  :styles='["first","second","third"]'
></vue-typer>

New style would be applied before typing on a new line begins.

It's not clear whether those "styles" would be applied on the text or caret, and during which phase of typing. I'd prefer to avoid multiple/complex props and keep the styling in CSS,
We could support this without breaking the existing customizable CSS selector structure (but perhaps making it a bit awkward) by adding a `text-${index}` class to vue-typer signifying the current text item index being typed.
Something like: .vue-typer.text-0 > .custom.char > etc.

A bit late but I solved it in a bit hacky way. In my version, the class is the lowercase version of the text.
<vue-typer
  :text="strings"
  :class="klass"
  @erased='onErased' />

function getNextElement (arr, i) {
  if (i === arr.length - 1) {
    return arr[0]
  } else {
    return arr[i + 1]
  }
}

export default {
  data () {
    return {
      strings: ['Foo', 'Bar'],
      klass: 'policy'
    }
  },
  components: {
    VueTyper
  },
  methods: {
    onErased (erasedString) {
      const i = this.strings.indexOf(erasedString)
      this.klass = getNextElement(this.strings, i).toLowerCase()
    }
  }
}

.vue-typer {
  &.foo .custom.char.typed {
    color: red;
  }

  &.bar .custom.char.typed {
    color: blue;
  }
}

Would be much nicer if vue-typer would emit an event beforeType with the upcoming string.

I think this is more better. I packaged the component, then you can define your font color in parent component.
<style lang="scss">
  .vue-typer {
    .typed {
      color: inherit;
    }
  }
</style>


Prototype prodigy recipe for classifying sentences types

Description
Fixes # (issue)
Instructions for Reviewer
To try out the prodigy instance:

First run dap_job_quality/pipeline/prodigy/make_data_for_sentence_classification.py in order to get the data ready for labelling.
To run the prodigy instance, follow the instructions at the top of dap_job_quality/pipeline/prodigy/sentence_classifier_recipe.py
If you want to inspect the data, export using prodigy db-out job_sentences_sample > ../../../inputs/labelled/job_sentences_labelled.jsonl and then you should be able to clean it using the functions in dap_job_quality/utils/prodigy_data_utils.py

Please pay special attention to ...

For the data sample, I took a random sample of 500 job ads from 2022 onwards because I figured that remote working options that are COVID specific (eg "currently we are working from home due to COVID-19") are not helpful for our purposes. Do you agree with this?

Checklist:

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

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

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

Thanks for this, looks good! I had a couple of thoughts/ questions:

Should we shift this to EC2/ AWS storage, so we can create a shared labelled dataset?
Are we using the company descriptions in the current labelling task? If not, should we remove for now to keep it neat/ small?
I think taking a sample from 2022 seems fine for now, but a big decision to make longer term. Maybe we should have it on the agenda for next sprint planning to get views from the group. An alternative could be to capture the remote work as benefits, but then try to identify it and filter it out down the track

Beyond that, there are some minor comments in there - mostly I had to create directories before running the code, and made a couple of suggestions on the instructions. But all worked well, and the task itself looks good!


Drag-n-Drop file from explorer doesn't copy file to obsidian vault

plugin settings:
location for new attachments: ./${filename}
plugin version: 0.0.6
obsidian version: 0.13.23
When I drag-n-drop image or other file and folder for this note wasn't created before, plugin just create attachment folder without copying file to this attachment folder.
Can recreate in new vault with legacy editor, but can't understand why sometimes It works and sometimes not. Mostly not is attachment folder wasn't created by plugin before. Can post video if you need.

I believe this is caused by using mkdir and also updating the default attachment file for the vault. Updating the vault isn't synchronous (I believe) so checking if the directory exists doesn't actually guarantee it won't be created. I solved this problem by removing all mkdir since Obsidian will create the attachments directory for you automatically if it doesn't exist.

plugin settings: location for new attachments: ./${filename}
plugin version: 0.0.6 obsidian version: 0.13.23
When I drag-n-drop image or other file and folder for this note wasn't created before, plugin just create attachment folder without copying file to this attachment folder. Can recreate in new vault with legacy editor, but can't understand why sometimes It works and sometimes not. Mostly not is attachment folder wasn't created by plugin before. Can post video if you need.

I believe this is caused by using mkdir and also updating the default attachment file for the vault. Updating the vault isn't synchronous (I believe) so checking if the directory exists doesn't actually guarantee it won't be created. I solved this problem by removing all mkdir since Obsidian will create the attachments directory for you automatically if it doesn't exist. This only occurs when the first attachment is added and the attachment folder doesn't exist yet.

Can you post your vault folder ?

I believe this is caused by using mkdir and also updating the default attachment file for the vault. Updating the vault isn't synchronous (I believe) so checking if the directory exists doesn't actually guarantee it won't be created. I solved this problem by removing all mkdir since Obsidian will create the attachments directory for you automatically if it doesn't exist. This only occurs when the first attachment is added and the attachment folder doesn't exist yet.

I did some tests and It is really wired how obsidian handle attachments folder.
If using absolute path for attachment folder, obsidian will not automatically create attachments directory.
If using relative path, obsidian will create the attachments directory automatically. If I create attachment folder in my plugin, obsidian will not able to create the folder again and copy process get interrupted. This problem only occurs when drag-drop files which cannot recognized by obsidian(like ".xmind", or ".ahk". Copying "pdf", "txt" doesn't trigger this).

I believe this is caused by using mkdir and also updating the default attachment file for the vault. Updating the vault isn't synchronous (I believe) so checking if the directory exists doesn't actually guarantee it won't be created. I solved this problem by removing all mkdir since Obsidian will create the attachments directory for you automatically if it doesn't exist. This only occurs when the first attachment is added and the attachment folder doesn't exist yet.

I read obsidian code from "app.js" and found that obsidian call "saveattachment" function first before triggering "handleDrop" handler in my plugin. That's why this wired problem occurs.

Can you post your vault folder ?

Empty vault. With default settings and only custom-attachment-location plugin installed. Tested with live preview mode with source code editing mode.
Created vault. Plugin works fine as should with any type of attachment. Close obsidian, open vault again and got this bug. Any drag-n-drop any attachment will create attachment folder without copying attachment.

Can you post your vault folder ?

Empty vault with created one test note. With default settings and only custom-attachment-location plugin installed. Tested with live preview mode with source code editing mode. Created vault. Plugin works fine as should with any type of attachment. Close obsidian, open vault again and got this bug. Any drag-n-drop any attachment will create attachment folder without copying attachment.

I will update a new version as a work-around.


Switch to tokio-timer and lay the groundwork for mock timers in tests

This PR rewrites the conduit_proxy::timeout module to include a wrapper that abstracts over timer implementations, allowing us to transparently replace the default timer with a mock timer in tests. It also configures everything that used the old timeout code to use the new timers instead. The default timer is now based on tokio_timer rather than tokio_core::reactor::Timeout, which is likely more accurate and performant, and gives us a dedicated timer thread.
I had to increase the DEFAULT_PRIVATE_CONNECT_TIMEOUT value, as the old value was causing several tests to fail due to timeouts. I suspect the value was always too low, but the previous timer was not accurate enough for that to matter.
Closes #412. Unblocks #455.

I thin kwe should verify that we can implement the mock timer in a reasonable way with this strategy before we spend time reviewing it. In particular, if we can't implement the mock timer using this strategy then we can skip over this to find an alternative that we can mock.

@briansmith I have a fairly clear plan in my head for how to implement a mock timer, but haven't actually done it yet as other work is higher priority. I figured I'd put this up for review now anyway, but if you prefer I'd be happy to wait on merging it until there's a working mock timer implementation as well?

OK. If I have time to review this after making more progress on my 0.3.1-prioritized work I'll take a look at it. I think the primary advantage of this change is improving the testing b/c this is where we can add the mocks, so if you can make progress on the mocks without a review here then that sounds good to me.

The default timer is now based on tokio_timer rather than tokio_core::reactor::Timeout, which is likely more accurate and performant, and gives us a dedicated timer thread.

/cc @carllerche
One question I have regarding this: Do we really want/need to have a separate timer thread? The Conduit proxy is already adding threads (in a separate process) to each pod, which means it is increasing threading-related contention for the other containers in the pod. Further, there could be multiple Conduit proxies on the same node, when there are multiple pods running on the node that each have Conduit injected into them. We're likely making a significant contribution to the node running with more threads than cores, creating contention. Therefore, it seems good for us, in general, to minimize the number of threads we create in the proxy.
Given that, what is the specific motivation for having a dedicated timer thread, besides cleaner code? (I think we could probably get cleaner code without a dedicated timer thread.) Is there no reasonable way to get good performance without the separate thread?

which is likely more accurate and performant, and gives us a dedicated timer thread.

It is most likely more performant, but definitely less accurate (by design).
@briansmith The next iteration of tokio-timer will not require a dedicated thread.

@briansmith et al, just a quick update on this: I have a separate branch which rewrites all the existing timing-dependent tests to use the mock timer instead. It still depends on tokio-timer.
It's trivial to implement the timer facade for a reactor handle as well, which I've already done on the branch, but actually wiring that up is trickier. We'd want Main::new to be able to take a timer parameter for injecting the mock timer in tests, but in a case where we're using a Handle as the timer, we can't do this until the Core is actually created. I'm sure I could figure out a solution, though, given a bit more time.
Should I go ahead and open a PR for the current set of changes, relying on tokio-timer, or should I wait until we can make the mock timer change without switching our production timer from the core timer to tokio-timer?

Should I go ahead and open a PR for the current set of changes, relying on tokio-timer, or should I wait until we can make the mock timer change without switching our production timer from the core timer to tokio-timer?

I don't think we want to use the current version of tokio-timer that adds another background thread, especially if even the tokio-timer developers don't think that having another background thread is a good idea.

I don't think we want to use the current version of tokio-timer that adds another background thread, especially if even the tokio-timer developers don't think that having another background thread is a good idea.

Okay. Will hold off on opening a PR until I have it working with the reactor timer, then, thanks!

I've opened #534, which adds a mock timer and rewrites the tests to use it. It also removes the tokio-timer dependency introduced in this branch and goes back to using reactor timeouts as we do currently.


Sending a message and then updating it with just "0", deletes the message - reported by @adeel0202

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to any chat
Send any message e.g. "10"
Now edit the message to "0" and save changes

Expected Result:
The message is updated to "0"
Actual Result:
The message is deleted
Workaround:
unknown
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.2.7-0
Reproducible in staging?: Y
Reproducible in production?:  It seems that in PHP:
>>> empty("0")
=> true
``

This is in production already! We need to pay the bug bounty for reporting, so assigning a CME!

@joekaufmanexpensify  We just need to pay the reporting bonus since we fixed it internally!

Looking into this today.

This is my first CME issue, so clarifying some questions here.

Okay confirmed that next steps here are:

Create the job in UW.
Hire the contributor (who reported).
Pay the contributor/close the job.

Working on that now!

Posted in upwork!

Thanks @joekaufmanexpensify. I have applied.

Sounds good. I just hired you, LMK when you've accepted!

Accepted.

Payment sent!

Contract ended, posting removed

closing as this is all set!


When a ship rams into land, the last person that shot them should get the kill

Perhapes the ship should be left for another player to pillage it instead of an instant reward. This would solve this problem.


How does someone install the new 1.18 version?

I could find it neither as a release nor as an action package

Hello?
does anyone know the answer?

ive got a version working on 1.18 but i had to change some stuff about the mod.json to get it working

where did you take it from

@omoflop Would you create an action with a download


add manager provider to experimental settings

Type
Feat
Context
LL-2900
Parts of the app affected / Test plan
Experimental Settings

latest design

@Arnaud97234 ready for review

@Arnaud97234 ready for review, round 3


Branch 1.3

Fixes
Use Buffer::Copy instead of Buffer::New #163
Fix leak at MessageId::Serialize #160
Fix Leak in MessageId::ToString #159

@Liapin
Hi, thank you for backporting these patches.
Though 1.4.0 has already been released, do you need 1.3.1 ?

Hi @nkurihar. Yes, it would be great to have 1.3.1

@Liapin
Thank you for your reply.
I guess the main reason for not 1.4.0 but 1.3.1 is the version of C++ Client, i.e., you need to upgrade the version from 2.7.0 to 2.8.0 in order to use 1.4.0.
Is my guess right?
Honestly speaking, we don't have any backporting plan for now...
Please give me some time to think about it.

@Liapin
Could you rebase this PR?
I have cherry-picked the fix for segmentation fault on tests.
https://github.com/apache/pulsar-client-node/pull/170


[Blazor Server Side] Redirecting from /Customers/123ABC to /Customers/456DEF using anchor doesn't work.

Describe the bug
If user is on the page /Customers/123ABC and he clicks on an anchor on the website that redirects him to  /Customers/456DEF - the redirect doesn't work.
The URL changes on the browser but the page doesn't reload, as in: it stays on the /Customers/123ABC page.
To Reproduce
Steps to reproduce the behavior:

Create a page with url /Customers/{userId} - userId being a string
@page "/Customers/{userId}"

[Parameter]
public string userId{ get; set; }

Add an anchor on the Customers page referencing /Customers/456DEF
Access /Customers/123ABC and click on the anchor
You'll see that the redirect didn't work.

Additional context
Blazor Server Side preview 7
VS 16.3.0 preview 1.0

@page "/Customers/{userId}"

@name

123ABC

456DEF

@code {
    [Parameter]
    public string userId { get; set; }
    string name;
    protected override void OnParametersSet()
    {
        if (userId == "123ABC")
        {
            name = "Jon";
        }
        else if (userId == "456DEF")
        {
            name = "Fred";
        }
    }
}

sort of that?
@page "/Customers/{userId}"

@name

123ABC

456DEF

@code {
    [Parameter]
    public string userId { get; set; }
    string name;
    protected override void OnParametersSet()
    {
        if (userId == "123ABC")
        {
            name = "Jon";
        }
        else if (userId == "456DEF")
        {
            name = "Fred";
        }
    }
}

Yes. Precisely. Thank you!
Although I still feel that OnInit / OnInitAsync should be called because this is a page redirect.

Thanks for answering, @GhostOfTheWind.
Note that we retain the page instance (and hence don't re-invoke OnInit) so that you can do things like animated transitions between the old and new states.


[VS2015]Formatting multiline class expressions indents incorrectly

Running the autoformatter over a multiline class expression causes the indentation to shift in incorrectly.

//CC: @SaschaNaz


Nest 9.X support?

Bug Report
Describe the Bug
This package cannot be installed on NestJS 9 projects
How to Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

try to install this package on a NestJS 9 project.

Expected Behavior
Tell me what should happen.
Error
Error resulted by the potential bug.
Your Environment

OS: [e.g. macOS, Windows]
Version of nestjs-twilio: [e.g. v1.0.0]

Error reproducing steps
Please explain how did your error ocurr, you can also leave gists, repos or any kind of codebase.
Additional Information
Any other information about the problem here.

Sorry I did not include all details, IMHO the title is pretty self explanatory 😅
Happy to help if needed!!

@ricbermo, I'll be releasing a major version compatible with Nestjs 9.X in a couple of days. Thanks for showing interest in contributing!

Any updates on this? Happy to help if needed :)

@thisisomar Just an Update, I'm cutting down the code and making it more maintainable by utilizing the configurable module builder. For the time being, I'm deprecating @InjectTwilio decorator and instead, it will be used as a service until I figure out how to provide the decorator as well. I'm publishing the new major version tonight.
Change in usage
@InjectTwilio()
private readonly twilioClient: TwilioClient

will change to
private readonly twilioService: TwilioService

If you're familiar with any approach that could provide us with a service approach and decorator, I'd be glad to hear it and/or look at any pr requests coming my way.

@thisisomar @ricbermo Released v3.0.0 a couple of minutes ago, be sure to check out the docs because of the breaking changes. #38

@ricbermo Closing the issue, considering it's resolved with v3


fix: replace invalid lock file references

I deleted yarn.lock, and examples/react/yarn.lock and ran yarn install and yarn build in both directories.
It appears to have resolved the CI build failures related to referencing: repo.phorton.eu.ngrok.io
Also had to bump up the version of the Terser dependency in the react example project.
CI appears content now.

:tada: This PR is included in version 1.1.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


foreach as statement modifier with a , expression generates bad code

foreach as statement modifier with a , expression generates bad code.  For example (from Exporter.pm):
    s/^&//, $export_cache->{$_} = 1
      foreach (@$exports, @{"$pkg\::EXPORT_OK"});

Fixed in v1.027


pull request for e2e test at 01/26/2017 12:56:10

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


todoist-electron: Use electron_11 to run

Motivation for this change
Fixes #116101 by replacing electron w/ electron_11 as a dependency.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 116103 run on x86_64-linux 1

1 package built:

todoist-electron


feature/req-303-workforce-scheduling-marketplace-app

Description
Replaces a stored based shift scheduling template with a MIP based one.
Changes

Removes old template files
Adds new files

@nilsbeck there are some unresolved comments from mine. Have you seen them? The GH UI hid them 🤔

According to bug bash one feedback was that the shift limits were not that bad and didn't bother too much.
I think there is no specific reason other than that you can easily read the input and just have different time units to express your stuff. we use time.Duration for other times related things as well? but here it is hours already in the field name. which makes sense because we are talking shifts....express a shift in seconds or minutes is odd.


ENH: wet antenna attenuatoin following Leijnse et al 2008

Added functions and tests for calculating the wet antenna attenuation assuming a rain rate dependent thin flat water film on the antenna following the results from Leijnse et al 2008.

The following code

R = np.arange(0, 100, 0.01)

In [67]: fig, ax = plt.subplots()

In [68]: for f in [10, 20, 27, 50, 70]:
    ...:     waa = pycml.processing.wet_antenna.wet_antenna.waa_leijnse_2008(f_Hz=f*1e9, R=R)
    ...:     ax.plot(R, waa, label=str(f))
    ...: ax.legend()
    ...: plt.show()
    ...:

Can be used to reproduce the relevant figure in the reference:

There are slight differences in the offsets between frequencies, but in general this looks very similar. It would be interesting to compare to the original data.

Codecov Report

Merging #50 into master will increase coverage by 0.16%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
+ Coverage   60.36%   60.53%   +0.16%
==========================================
  Files          33       33
  Lines        1471     1495      +24
==========================================
+ Hits          888      905      +17
- Misses        583      590       +7

Impacted Files
Coverage Δ

pycomlink/processing/wet_antenna/wet_antenna.py
62.5% <100%> (+37.5%)
:arrow_up:

pycomlink/spatial/interpolator.py
89.78% <0%> (-5.11%)
:arrow_down:

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 8670e44...8958597. Read the comment docs.

The difference mentioned above stems most probably from the assumed temperature.
For T_K = 290 K it looks a lot more like the plot in the paper:


Generate JSON from Ink at build time

hulk.ink.json should not be checked into the repository, instead it should be generated at build time.
https://www.npmjs.com/package/inklecate should make this pretty trivial, but I don't know if it will play nicely with Github actions.

https://www.npmjs.com/package/inklecate-loader looks promising


feat: enable Go 1.18 on golangci-lint per default

This PR enables Go 1.18 support in GolangCI lint per default.
Draft until someone can verify it works as intended in Go 1.18
NOTE: GolangCI Lint removes the bodyclose comment for some reason

This is probably not needed since https://github.com/einride/sage/pull/227

Closing it then


PushyModule.h Not Found

I have followed the directions 3 different times and I get this error every time after linking the iOS project.

Not sure if there is a better manual way to include this

Hi @LoganArnett,
I'd be glad to help.
It appears that the integration process of our RN iOS SDK did not go so smoothly.

Did you link the library?

react-native link pushy-react-native

Did you create an empty .swift file in your main RN Objective C project?

Closing due to lack of response. Please feel free to let us know if you are still facing this issue.

Hey,
I have the same error. I have linked the (react-native link react-native-pushy) successfully but I am not sure if I have added the blank .swift file correctly. Could you provide some more information about creating that? I think the documentation in pushy's website is kinda unclear.
Thanks!


[AutoPR containerservices/resource-manager] [AKS] update list of supported VM sizes

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/2668

(message created by the CI based on PR content)

Codecov Report

Merging #2185 into restapi_auto_containerservices/resource-manager will increase coverage by 0.05%.
The diff coverage is 72.78%.

@@                                 Coverage Diff                                 @@
##           restapi_auto_containerservices/resource-manager    #2185      +/-   ##
===================================================================================
+ Coverage                                            52.06%   52.12%   +0.05%
===================================================================================
  Files                                                 5567     5588      +21
  Lines                                               133508   133778     +270
===================================================================================
+ Hits                                                 69510    69726     +216
- Misses                                               63998    64052      +54

Impacted Files
Coverage Δ

...dels/container_service_orchestrator_profile_py3.py
100% <100%> (ø)

...ice/models/container_service_agent_pool_profile.py
100% <100%> (ø)
:arrow_up:

...rservice/models/container_service_linux_profile.py
100% <100%> (ø)
:arrow_up:

...e/models/container_service_orchestrator_profile.py
100% <100%> (ø)
:arrow_up:

...ice/azure/mgmt/containerservice/models/__init__.py
100% <100%> (ø)
:arrow_up:

...ice/models/container_service_master_profile_py3.py
100% <100%> (ø)

...erservice/models/container_service_client_enums.py
100% <100%> (ø)
:arrow_up:

.../mgmt/containerservice/models/container_service.py
100% <100%> (ø)
:arrow_up:

...service/models/container_service_ssh_public_key.py
100% <100%> (ø)
:arrow_up:

...models/container_service_agent_pool_profile_py3.py
100% <100%> (ø)

... and 57 more

Continue to review full report at Codecov.

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


Add ability for transformers to download files after check_continue() call

Task to do
Enable the download of data after check_continue() call returns with an indication that data can be downloaded.
Reason
For some environments it's better to delay downloading data until conditions are right. This issue is to enable that functionality
Result
The environment is able to download data when needed

Pull Request: https://github.com/AgPipeline/base-docker-support/pull/8


Thank you

I apologise if this is the wrong place for this. But I really wanted to get across to the library's creator, @xaviergonz
I've been using mobx-keystone for about a month now and I've never been so in love with a tool. In my eyes it is the perfect state management tool for TS/React projects. Building complex clientside apps has never been so easy and fun for me. Big love and long may it live 🫶
Feel free to close

Much appreciated!! 😄

Is there a Patreon for support?

Sorry for the late reply. No, there's no Patreon currently, but thanks for asking 😄


LinkedIn API requires Company page access

Creating a LinkedIn API app to request and display a user's info requires Company page access.
I believe it might be better to either hardcode recommendations or build a server-sided app based on MLH (we would need their authorization) that requests info for deployed websites.
thoughts?

Had a great discussion with @SnowPrimate about this and gaming.


[SMALLFIX]  Fix a backward compatiblity issue

@apc999

@Xenorith

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/10672/
Test PASSed.

Merged build finished. Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/10673/
Test PASSed.

LGTM


fix(Boards): Adding weak definition of GPIO0 handler to MAX32665's MAXREFDES178 BSP

Description
Migrating the PushButton code to MiscDrivers caused existing cube camera projects to hang because they relied on the GPIO0_IRQHandler defined in the old implementation of pb.c. This GPIO handler was not included in the MAX32665's MAXREFDES178 BSP because it does not have any push buttons connected to GPIO0. This PR adds a weak definition to the MAX32665's MAXREFDES178 BSP to support the legacy implementation while cube camera projects get updated with their own definition of GPIO0_IRQHandler.
Issue #49 has been submitted to the MaximIntegratedAI/refdes repo to request the GPIO0_IRQHandler get added to each of their projects, however this change should still be added in the meantime because it doesn't seem like anybody has been maintaining that repo.
Checklist Before Requesting Review

[x] PR Title follows correct guidelines.
[x] Description of changes and all other relevant information.
[x] (Optional) Link any related Github issues using a keyword
[ ] (Optional) Provide info on any relevant functional testing/validation.  For API changes or significant features, this is not optional.

Build error fixed in https://github.com/Analog-Devices-MSDK/msdk/pull/667


Implement a rubocop for consistent usage of parens

Implement a new cop that enables the enforcement of parentheses in factory bot calls.
This cop attempts to solve the "issue" outlined in #416

Before submitting the PR make sure the following are checked:

[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Updated documentation.
[x] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

[x] Added the new cop to config/default.yml.
[x] The cop is configured as Enabled: pending in config/default.yml.
[x] The cop documents examples of good and bad code.
[x] The tests assert both that bad code is reported and that good code is not reported.
[x] Set VersionAdded in default/config.yml to the next minor version.

If you have modified an existing cop's configuration options:

[ ] Set VersionChanged in config/default.yml to the next major version.

This cop attempts to solve the "issue" outlined in 12940

RuboCop is red, I hope you'll find it relatively easy to fix it.

@Darhazer Sorry for a long time between activities ^^ I pretty much forgot that this pr exists :D.
I added your concern about the 'nested' call as a spec: https://github.com/rubocop/rubocop-rspec/pull/1096/files#diff-e694e1d15e68306d0a724e35afadbc5a430fd6602ccd827e985f2aefae2935c7R228.
I also added some specs for multiline calls: https://github.com/rubocop/rubocop-rspec/pull/1096/files#diff-e694e1d15e68306d0a724e35afadbc5a430fd6602ccd827e985f2aefae2935c7R160-R175.
🙏🏻 Thank you for the work on rspec and rubocop.

@pirj I rebased onto upstream, regenerated the docs and implement your suggestions ^^ Thank you for the review :D

Thank you! Looks great 🙌

ah 🤦🏻 @pirj Sorry. Should have checked again if the CI passed :/. Thank you very much for fixing it!

Thank you for the contribution, your time and effort, @Liberatys! My apologies for delaying the merge.


Wrong resolution when Implementing nerfies on nerifies-vrig data

Hi,
I implemented nerfies on nerfies-vrig data with default setting. The results are similar to the ones presented in the paper, however the resolution of the outputs is much lower than expected. Do I miss anything in configuration?

Hi Chilson. How small are your outputs? Some of the datasets have smaller resolutions (the ones taken as a video rather than a collection of photos).


docs: Add information about new methods

Description
Changes only in the documentation
Added information about new methods that exists in V3 nuget, but not existed before and which old methods they are replacement.

Can you, please, update it also in here?

HI @lpcouto Somebody needs to approve again PR to merge code to main branch? :)

@tomaszprasolek Merged :)


Add support for disabling signatures

I'd like to be able to disable signatures so that I can filter down signatures that I either want to deal with later or don't find useful. This is especially when trying to roll out gitrob across a large organization.
This PR isn't final, I wanted to hammer out a basic outline and then poll for thoughts. (It does work though)

I'm not sure if I like having just an array of patterns.

I didn't notice any duplicate patterns that were match vs regex, but it could happen I believe
However, it seemed cumbersome to basically duplicate the signature just to disable it
Ideally, it would be an array of names/ids for the signature, but there isn't such a field currently.

Gotta write tests, but the tests don't pass for me on master. I suspect I'm just missing some config, but there wasn't much documentation in the readme

This looks very interesting! It's cool to have the possibility to tune the signatures.
I was wondering if it would make sense to define the ignore-signatures a bit like the actual signatures, something like this:
[
    {
        "part": "extension",
        "type": "match",
        "pattern": "log"
    },
    {
        "part": "path",
        "type": "regex",
        "pattern": "/test/"
    }
]

The above signatures would instruct Gitrob to ignore any files with the .log extension as well as any file where the word test is in the complete path.
I think this would make it very flexible and it's nice that it follows a familiar "syntax".
What do you think?

Yeah, I was wavering back and forth on how I wanted to do it. I opted for just the pattern for simplicity to start.
There are a couple of ways I see that this could be implemented:

More or less how I have it. It's pretty simple, but also more limited.
You can disable existing signatures by specifying the part, type and pattern.
You can specify signatures of files to ignore by specifying part, type and pattern. So, instead of just working with existing signatures you can say never flag a file that matches this pattern.
Making the signatures a bit more robust by adding a state and an id. Additionally the signatures would be stored in a hash with the id as a key. Then the custom signatures could update the base signatures and set the disabled state by just including the id and the state.

I like the third and fourth the best, but they are much more extensive changes. It might also make sense to implement both the third and the fourth as they server different features. By ignoring the exact specification of a server you get the effect of disabling it, but if the signatures had an id and that was displayed in the ui, then it would be much easier to know how to disable one if you could just use that instead of digging into the source code to figure out which one matched the file.
The fourth one alters the  format of the signatures file and would either need some finessing to get the old format to work as well or would be a breaking change. If we go with the fourth one it might also make sense to add a category to the signatures since we'd be altering the format anyway, that way down the road you could set something (in your .gitrobrc for example) that says I only want to look at signatures with the 'key' category.
Just throwing thoughts out there, let me know what you think.

Any thoughts? I'm happy to alter/fix it to whatever makes the most sense.

I'm not too fond of changing the structure of the signatures right now as it would be a breaking change, but it's definitely something to look into in the future. If we implemented a .gitrobignore file with signatures to ignore, Gitrob would just have to load those the same way as it loads the other signatures and first run the files through those and skip the file if it matches any ignore signatures.
This would allow users to define very broad ignore patterns e.g. "Ignore all log files regardless of why they were flagged" as well as more precise ignoring of specific signatures by simply copy-pasting the signature's pattern.
This could also work as a way to permanently whitelist files if you are certain that it will always be a false-positive. For example an organization that has credentials.enc files in their projects, but they are always encrypted and therefore safe. An auditor could then add an ignore pattern that would match this type of file to get rid of them in the assessments.

Updated to the ignore style. .gitrobignore will ignore any entries that match. I removed the requirement for caption and description as I wasn't sure how they'd fit into the UI.
That more or less what you were thinking? If so I'll clean it up with some test and so on.

This is excellent, thanks so much for contributing this back, and sorry for being slow. I will have a test run and merge it in. :clap:

I'm happy to add some tests and rebase down to a single commit. However, the last time I tried to run the tests on master they weren't passing for me.


Check for circular dependencies

I believe App::Ack::File and App::Ack::Files rely on each other mutually.  They should not.
Check for any others.

I was wrong.  They do not rely on each other.


Remove mgelman08

Description
mgelman08 will no longer need permissions to our repository. Please remove his permissions from Artifactory.
https://github.com/jenkinsci/contrast-continuous-application-security-plugin
cc/ @meg23
Submitter checklist for changing permissions
Always

[x] Add link to plugin/component Git repository in description above

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] All newly added users have logged in to Artifactory at least once

Not currently a committer either.


Route53 challenges: upsert records instead of create

Signed-off-by: Florin Vlaicu<EMAIL_ADDRESS>
Pull Request Motivation
In my previous PR: https://github.com/cert-manager/cert-manager/pull/4793, I thought that given the fact that each record that we'll create will be unique would not require to upsert records. It turns out I am wrong.
On our clusters, we've been using this code for almost a month and it turns out that sometimes cert-manager tries to write the same record twice. I have not pinpointed the source of the problem, it might be a restart of the controllers during the validation process that restarts the process from the beginning.
failed to change Route 53 record set: InvalidChangeBatch: [Tried to create resource record set [name='_acme-challenge.domain.com.', type='TXT', set-identifier='"unique_ID_goes_HERE"'] but it already exists]

Even if that record already exists it is ok to overwrite it since it has the same ID. The only thing that will happen now is that cert-manager will succeed at writing the challenge.

Kind
bug

Release Note

NONE

/assign @munnerz

/milestone 1.8
/ok-to-test

/milestone v1.8

Even if that record already exists it is ok to overwrite it since it has the same ID.

To confirm, we need to merge values rather than overwrite the existing value if the record already exists. So if one already exists, after update, there should be two values for the same record key.

Even if that record already exists it is ok to overwrite it since it has the same ID.

To confirm, we need to merge values rather than overwrite the existing value if the record already exists. So if one already exists, after update, there should be two values for the same record key.

Nope. What I did in the previous PR was to create a new record for each distinct challenge. So let's say we have 4 distinct challenges, each with t's own TXT value (let's say value1, value2, value3 and value4).
I would create a txt record for each of them with a SetIdentifier set to the same value as the TXT record.
The error I saw there is that the record already exists. This means that a different cert-manager instance on the same cluster has already created that record previously and the full process wasn't finished somehow and that a new cert-manager tried to recreate the same record.
Hence I am updating the same record with the same values, it should do no harm whatsover.

/kind bug

/assign

Thanks for the contribution!
I had a brief read through #4793 again, I think this change makes sense.
Also I see that upsert was already being used pre-#4793 and was changed to create in that PR.

This means that a different cert-manager instance on the same cluster has already created that record previously and the full process wasn't finished somehow and that a new cert-manager tried to recreate the same record.

The way cert-manager prevents a challenge being presented (which includes the record creation/upsertion) multiple times is by setting the challenge's status.Presented to true here.
I see that there are a couple places between the record being created in Route53 and that status update being applied to the Challenge where we could error out so the Challenge would actually not get marked as presented and cert-manager would again attempt to create the record on next reconcile of that Challenge. One such case would be if the call to kube apiserver to update the Challenge status would fail.
So, it is possible that you are hitting one of those edge cases and that way getting multiple creations of the same record. Perhaps that's also why the record was originally being upserted.
/lgtm
/approve

/lgtm
/approve

(I assume Github is down again https://www.githubstatus.com/incidents/tyc8wpsgr2r8 so my lgtms don't work :) )


CAMEL-21082 - do not delete existing file sin target folder when

creating a new Camel integration files with Camel JBang init
Description

Target

[x] I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

Tracking

[x] If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

[x] I checked that each commit in the pull request has a meaningful subject line and body.

[x] I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

updated branch to remove the Important note from the documentation


The POST method is not supported for route admin/login. Supported methods: GET, HEAD.

Hello
When transferring to hosing, the following message appears when logging in:
The POST method is not supported for route admin/login. Supported methods: GET, HEAD.
applies to the page: https://host238122.xce.pl/filament/public/admin/login
user:admin
pass:123456789

user:admin
pass:123456789

It sounds like something is preventing Livewire from loading and thus is doing a POST request to the login route instead of firing wire:submit - I would check storage/framework/logs/laravel.log and see if it has any errors. I know Livewire in particular requires a few functions that are typically disabled by default on some shared hosts - but why this is happening could stem from a lot of different things.

Newbie here. Same. I was using xampp firectly by 'http://localhost:80/qqq/filament-starter/public/index.php' instead of php artisan serve


Update howto-using-azure-redhat-openshift.md

Update Red Hat URL for accessing pull secret, and update az command to access the pull secret from the saved file.

@lamek @sakthi-vetrivel ptal

@sakthi-vetrivel
Could you review the proposed updates?
Thank you

@jim-minter : Thanks for your contribution! The author(s) have been notified to review your proposed change. @lamek

@ktoliver looks good to me, thanks!


Get imported libraries

Hello! Is there any way to import necessary libraries dynamically with Sourcery?
example template code:
func testMethod() -> CLLocation {
    return CLLocation()
}

would generate:
import CoreLocation

func testMethod() -> CLLocation {
    return CLLocation()
}

I want this to work for Apple's and our's internal libraries

Not with Sourcery, but I think you can do something like that with sourcekitten directly https://github.com/jpsim/SourceKitten/issues/202

Thank you for the fast answer, I will try it!

Actually, you might need to use Sourcery for that anyway because sourcekitten will only give system libraries. So you will need to use both.
Using Sourcery you need to make sure you scan sources of your frameworks, then its types will have module property (for some reason it's not documented). Then you can use that in the template to get list of all modules by matching types. You'll not be able to use that for system modules as we don't scan sources, so you'll have to combine that with sourcekitten results.

I've tried to realise how to use module without documentation and have bumped into a problem. As I fully understand, If I correctly set all sources for Sourcery, I get Type property and module in the type for all Variables witch lays in the 3d party libraries. Eventually, I've gotten Type property, however module property still nil.
Theres my code:
generation target:
import CoreLocation
import FrameworkForTests
import AviaCore

// sourcery: Libraries
class Foo {
    var internalFramework: SomeStructure!
    var appleFramework: CLLocation!
    var internalPro: Boo!
    var cocoaPods: Offer!
    var simple: Int!
}

stencil code:
{% for type in types.all %}
    {% if type|annotated:"Libraries" %}
        {{type.name}}
        {% for variable in type.variables %}
            {{variable.name}}: {{ variable.type }}
        {% endfor %}
    {% endif %}
{% endfor %}

generated output:
        Foo
            internalFramework: Struct: module = nil,
            appleFramework:
            internalPro: Struct: module = nil,
            cocoaPods: Struct: module = nil,
            simple: Type: module = nil,

expected output:
        Foo
            internalFramework: Struct: module = FrameworkForTests,
            appleFramework: // CoreLocation (Should take from SoureKitten)
            internalPro: Struct: module = nil, // Internal type
            cocoaPods: Struct: module = AviaCore,
            simple: Type: module = nil, // Foundation Int

@Atimca sorry, to get module property you need to instruct Sourcery to what projects they belong using project key in configuration file


closes #125 better error stack

For some reason wrapping gen.throw() in a try/catch always ends up being catched.
That's why we can't call next(err).
Personally I think we should drastically change the implementation of this, because the stack trace of any error bubbling up in the yieldabe should point to the yield line with gen.throw.
Also after a gen.throw() you can't yield anymore, the generator appears to be closed
Some of this behavior is documented here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators

bump

It's a promise problem now. If you know how to make better stack traces with promises, make a PR!


[MM-41873] MM-42002, MM-42376: Playbook Editor, new layout starter

Summary

Creates a new playbooks/playbooks/<id>/editor route and root container component as a new home for the main playbook page. Tabs now centered.
New title_bar component (extracted), simplifying root container.
tab_outline copied over, sectioned contents still referencing existing components. (Copy/move over to new folder as-needed).
tab_outline_navbar copied over and now on left side; stripped Edit and Runs in progress buttons.
Old components marked as @deprecated.

No major styling updates; design changes will come in smaller pieces after this main foundational layout is in.

Ticket Link
https://mattermost.atlassian.net/browse/MM-42002
https://mattermost.atlassian.net/browse/MM-42376
Checklist

Item
Y / N / NA [^1]

Telemetry updated?
Y

Gated by experimental feature flag?
N

Unit/E2E tests updated?
N, failures unrelated

[^1]: Yes / No / Not Applicable.

/update-branch


Not found: FeedInputs: unable to find feed output Mul

@satok16 I have already set up and was able to run hexagon_graph_execution on my hvx board, however, when I tried to use my own inception-v3 pre-trained model that I froze using this quantization method, I am receiving this error:
[ RUN      ] GraphTransferer.RunInceptionV3OnHexagonExampleWithTfRuntime
native : hexagon_graph_execution_test.cc:519 Fuse and run inception v3 on hexagon with tf runtime
native : hexagon_graph_execution_test.cc:94 Hexagon controller version is 90
native : hexagon_graph_execution_test.cc:142 Read /data/local/tmp/img_299x299.bmp, size = 269156bytes
native : hexagon_graph_execution_test.cc:148 header size = 54
native : hexagon_graph_execution_test.cc:150 image size = 40
native : hexagon_graph_execution_test.cc:152 width = 299
native : hexagon_graph_execution_test.cc:154 height = -299
native : hexagon_graph_execution_test.cc:533 Ioading image finished.
t1(loading image time)=0.026770
native : hexagon_graph_execution_test.cc:546 Build fused graph
native : remote_fused_graph_execute_utils.cc:259 Error during inference: Not found: FeedInputs: unable to find feed output Mul
native : graph_transfer_utils.cc:110 Check failed: status.ok()
Aborted

Do you know if the issue is because of an incorrect input argument here:
curl -L "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz" |
  tar -C tensorflow/examples/label_image/data -xz
bazel build tensorflow/tools/graph_transforms:transform_graph
bazel-bin/tensorflow/tools/graph_transforms/transform_graph \
  --in_graph=tensorflow/examples/label_image/data/inception_v3_2016_08_28_frozen.pb \
  --out_graph=/tmp/quantized_graph.pb \
  **--inputs=input \**
  --outputs=InceptionV3/Predictions/Reshape_1 \
  --transforms='add_default_attributes strip_unused_nodes(type=float, shape="1,299,299,3")
    remove_nodes(op=Identity, op=CheckNumerics) fold_constants(ignore_errors=true)
    fold_batch_norms fold_old_batch_norms quantize_weights quantize_nodes
    strip_unused_nodes sort_by_execution_order'

I found on [this] (https://stackoverflow.com/questions/43022516/tensorflow-inception-feedinputs-unable-to-find-feed-output-input) and also [this]https://github.com/tensorflow/tensorflow/issues/2883#issuecomment-226591095 posts that we might have to use Mul instead. Tried that with no success. Interestingly, when I test my frozen_quantized graph with:
bazel-bin/tensorflow/examples/label_image/label_image --graph=/tmp/my_inception_quantized_graph_hvx.pb
I receive similar results compared to a non-quantized version, so it shows that my frozen_quantized is not faulty. Can you verify the issue here?
Was the file https://storage.googleapis.com/download.tensorflow.org/models/tensorflow_inception_v3_stripped_optimized_quantized.pb used in the original hvx hexgon_graph_execution produced differently?

Nagging Awaiting TensorFlower: It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

Nagging Awaiting TensorFlower: It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

Nagging Awaiting TensorFlower: It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

Nagging TensorFlower: It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.

Nagging Assignee @skye: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

I am trying to build the more recent libhexagon_nn_skel.so version mentioned in TF-HVX, however, I am having a compilation error:
make[1]: Entering directory /home/aashouri/Qualcomm/Hexagon_SDK/3.0/examples/common/nnlib'
ERROR: Could not open file (/prj/dsp/qdsp6/arch/cnn/setup/inceptionv3_uint8in.c)
make[1]: *** [android_Release/inceptionv3_uint8in.o] Error 255`
working around by defining a dummy input data as mentioned by @satok16 here did not solve my issue neither.

@suharshs are you able to comment on this? Thanks.

We have focused quantization efforts to https://www.tensorflow.org/performance/quantization with support in TensorFlow Lite.
That being said, your current issue seems specific to contrib/hvx. @satok16 @petewarden @andrewharp do you have any ideas what could be the issue here?

Nagging Assignee @suharshs: It has been 31 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @suharshs: It has been 46 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @suharshs: It has been 61 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @suharshs: It has been 76 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @suharshs: It has been 91 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @suharshs: It has been 106 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 29 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 44 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 59 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 74 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 91 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignees @petewarden, @suharshs, @rockyrhodes: It has been 106 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

I'm also encountering these errors in trying to build a demo model to run to the hexagon DSP chip. In TF Light I see good work on quantization (though a little sparse in terms of references to exactly what technique is being applied there), but I don't see any reference in TF Light to running those quantized models on the Hexagon DSP. Has there been more recent work in TF Light to support platforms like the Hexagon DSP or mobile GPUs? Is contrib/hvx still the right place place to look to work with the Hexagon DSP?
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/hvx

@satok16 is the only one I know that has really worked on this, and it doesn't appear that he has been involved in it for some time.  TFLite's NNAPI delegate supports the Hexagon DSP and mobile GPU's indirectly through the vendor's NNAPI HAL drivers.  Have you tried this acceleration path?

I see, thanks for the reply. I'll try to set up a demo using Tensorflow Lite and the android NNAPI and see how it goes. I'm currious where XLA is going then? I was under the impression that this hvx contrib effort was a start at generic accelerated device support via XLA/LLVM.

Closing this, since the direct HVX support in TensorFlow is deprecated in favor of the NN API through TF Lite.


p-value code

Will the code calculating p-value be released? Thanks!

Hi, I'm using this package to calculate the p-value. Hope this can be helpful to you!


Viewmodel clipping experiment

I've been wanting to implement 2nafish117's viewmodel shader for a while now
https://www.youtube.com/watch?v=NF-U5J92ivk
However I didn't love the fact that it required all materials to be reconfigured with a not-exactly 1-to-1 version of the StandardMaterial3D.
Well, inspired by #116, where @Phazorknight shows a 4.0+ compatible version of the Viewmodel shader, I decided to see what it would take to dynamically create a "ShaderSpace" for viewmodel versions of wieldables. This is the result of that experiment.
Basically, I now have a Prefab 'ViewmodelBasePrefab.tscn' that if you make a parent of your mesh holder, it will go through all the materials available as its children (or children of children of children of children....) and configure it to be as close to the original StandardMaterial3D as possible.
This, I acknowledge, is most definitely not performant, however it only does it once per load of a wieldable's viewmodel. So as long as you're not trying to have hundreds of individual wieldables, this seems acceptable. I will probably see about making it into an editor tool later down the line so you can instead "bake" the materials and thusly ship it without the on-runtime generation
This all works via the ShaderSpace script I've written. If you choose to use that manually, you can set any shader you like, and if your property names share that of StandardMaterial3D names, it will automatically port a shader to that -- though right now the viewmodel concept is fairly hardcoded.
You can also change ShaderSpace's shader_override_enabled flag in code which will toggle the no-clipping feature for that specific wieldable on demand. Not sure if this actually has a use for anyone, but it's there!
Right now the ShaderMaterial conversion is very basic. It does not do Godot's dynamic conversion to ShaderMaterial so it doesn't include all the possibilities. I'm working on a better way to do this, but right now this works with all view model features used by Cogito's included wieldables.
EDIT:
Turns out, there's no way to access Godot's internal Shader Conversion directly thanks to _get_shader_rid being entirely internal usage, BUT, the code that is used to actually convert shaders from StandardMaterial3D to ShaderMaterial is all readily available... in C++. Simple stuff: the code is legitimately just an appended string based on a whole bunch of conditionals. So convert that, and you have a GDScript implementation of it.
I'm sure it's still not perfect, but it's 95% of the way there. Again, not performant, but probably still fine for a couple of wieldables.
So I now have 'Material3DConversion' as well, which allows you to run Material3DConversion.create_shader_code(mat,variables,vertex) to inject variable code and vertex code into whatever ShaderMaterial would have been generated if you'd done it via the Editor. (Though this does not currently support anything but StandardMaterial3D -- this excludes ORM based materials)

Yep! @Phazorknight

Very open to any requests/extensions on this, this is a large feature.

Overall the setup seems pretty straight foward and the results are great.
I took the LaserRifle into the Lobby scene and had correct shadows from the big windows on the weapon model.
I think this will work for most use cases. Though I definitely noticed the performance spikes when first equipping wieldables. I'd definitely welcome the option to either A) convert the materials in the editor - or B) convert them during scene load, though I'd prefer option A as it would give more control to the developer while reducing load times.
Additionally, if you could provide a documentation paragraph that explains on how to set up a mesh inside a Wieldable to work with this, I'd say this would be ready to merge into main.

Though I definitely noticed the performance spikes when first equipping wieldable

Hm, equipping wieldables should not be causing a performance spike from this. It should be doing Option B pretty much as you stated: The materials are created when the scene loads the nodes, after that they should just have the new materials and the ShaderSpace code basically stays idle after.

@Phazorknight Give it a shot now. There's documentation directly in the scripts. If you want more, just ask!
You can now check (or un-check) 'Bake' on ShaderSpace and it will do the conversions in editor. Please note it stores the old version of the Material into a new folder .prebake so that way there's somewhere on disk that you can "un-bake" your material and get back the original.
I believe even without baking, the stutter that occurred on equip should be improved if not gone now as I've added seven ways to Sunday to stop any "rematerializing" code from running if it's not necessary.

@FailSpy thanks so much for this!
So, after baking, Godot crashed twice for me, each time when switching to a different scene (once from switching from the Wieldable scene to the Player scene, and then after a restart, again when switching to a level scene).
I've restarted it again, and everything was fine until I baked another wieldable, then the crash occured again on scene switching.
I was also not able to get a wieldable to not clip without baking the materials. Just checking/unchecking the Disable Viewmodel Clipping had no effect on my end on either the Pickaxe or the Toy Pistol.
A note on the stuttering: I think know this might've been caused by something else. I did get it again when I first equipped the laser rifle when loading this PR, but haven't gotten it since.

Yikes, any chance you managed to catch what crashed it? Haven't personally had my Godot editor crash in all my testing

Actually hmm, I may have a theory

@FailSpy
this is what the shell caught when it crashed, though it might not help you that much:

Whaaaaaat. I wonder if that's your Godot editor trying to do an HTTPS connection for submitting the error??

https://github.com/godotengine/godot/issues/84966
Hmm, wonder if this has anything to do with it?

@Phazorknight aaactually, try this latest run.

Ready for review again. Curious to know if editor crashes still occur, as I've been completely unable to reproduce.

So I tryed this PR out, and this is strange:
When I first picked up the flashlight there was a little lag, same on the toypistol, but not much, only like a 0,3sec delay, but it was noticeable and never happened again after that.
and
I cannot place any wieldable for some reason, the ones that were already there work:
https://github.com/Phazorknight/Cogito/assets/87974401/a62df8a3-d71b-48aa-b9d4-43443966bdac
You may need to pause to see them in the editor.

@FailSpy not only do you implement this in a godlike speed, you also know what i did wrong.
The light influence and the shadows on the models is great and the pickupable doesn't cast a shadow, I think that's good too, otherwise it looks weird because we don't have a player shadow.
I get a little lagspike and delayed showing when I first equip a pickupable, but after that it seems that the shader is cached, not sure if godot or my amd driver. I can rerun the scene and the lag does not happen again.
This could be due to https://github.com/godotengine/godot/issues/61233 ?
https://github.com/Phazorknight/Cogito/assets/87974401/bd3c5340-84f9-4ae9-a516-f10090f71ca4
So maybe the shader could e.g. get loaded in the main menu behind the visible menu to avoid those lagspike ?

That issue you mentioned sounds like a perfect fit. Will investigate the potential solutions later.

@Phazorknight Hm, bake should not be removed! Is the checkbox not there?
What I changed about baking is that it no longer attempts to save the resource files to disk, and instead expects the dev to save any original materials that they might want to convert back.
Did this because I suspected that automated filesystem access may be causing issues, so instead it gets stored into the ConvertedMaterial's memory.
My concern is I'm not sure how Godot handles unaccessed attributes like that, so it very well might increase RAM usage, but shouldn't do it by much as the StandardMaterial3D resource itself is fairly small.

Out of curiosity to @ksjfhor and @Phazorknight: equipping a wieldable, lagspike, then equipping a different wieldable... lagspike or no lagspike?
I would test it myself but I don't seem to get the same shader compilation lagspike.

No lagspike on other wieldable, just the first.
A 4.x shader pre render is mentioned as the last comment in the godot issue from earlier.
May this lag be an amd thing ?

Hm, bake should not be removed! Is the checkbox not there?

Nevermind, I think I haven't properly pulled the PR on my end. It's there. Everything seems to work great!

Lag spike

The spike on my end is only the first time I equip a wieldable, and it doesn't seem consistent, but I haven't tested this extensively. I'm not really considering this a major issue at the moment.

I might see about making a PR to unify this to make implementing wieldables easier

Please let me know what kind of changes you're considering (maybe in a Discussion thread).
Otherwise I feel like this PR is about ready to merge into main, unless there are more objections.

I think I successfully implemented shader precompilation. Fairly hacky, but from looking at the various threads about shader precompilation, the way I'm doing it may actually be the cleanest way without recompiling the whole of the Godot engine, and Vulkan...
When precompilation is enabled, you'll probably face some stutters at the start of the scene, but hopefully this means the rest of it is smooth.
If this works, I'm happy to have this be merged!

A 4.x shader pre render is mentioned as the last comment in the godot issue from earlier.

Oh bugger, I completely missed that. I'm quite happy with my version though, it's fairly similar, but it doesn't require any nodes to be added to the scene manually. If you choose to precompile a shader in ShaderSpace/ViewmodelSpace, it will do the magic itself, and reliably keep it off screen.
As well, other scripts can hook into it the same way. I also have a queue system implemented in mine to make it so the game only tries to compile one shader per frame, allowing the game to not go too long between frames and thusly the game can keep up.

So with the newest fetched up, godot starts the project with:
  scene/main/viewport.cpp:137 - Viewport Texture must be set to use it.
  scene/main/viewport.cpp:127 - Viewport Texture must be set to use it.
 scene/resources/resource_format_text.cpp:284 - res://COGITO/Assets/Shader/ShaderLoader.tscn:21 - Parse Error:
  Failed loading resource: res://COGITO/Assets/Shader/ShaderLoader.tscn. Make sure resources have been imported by opening the project in the editor at least once.
So I wanted to open the ShaderLoader.tscn and:

But as you can see in the screenshot, when I run the project the messages are gone, and also the lagspike, but I am not sure if this is due to some caching on my end ....
"It just works" - Todd  ?

It just works.
Anyways, that's weird that it got invalidated/corrupted. I've modified the script now because I realized there's a way to do it without a scene, and I think the shader precompiler is even more reliable now after remembering custom_aabb
Give it a shot now.

Fun tidbit, you can apply ViewmodelSpace to anything, and you get wallhacks!

It just works sing
Without a doubt, no more errors or lagspikes or anything.
Well done !


--disable-nls doesn't actually disable NLS

configure says that you disable NLS with --disable-nls:
  --disable-nls           Don't support NLS (gettext()).

However, configure seems to ignore that command and it links against libintl.so anyway if it's present. The only way I've found to actually disable NLS is to pass --enable-nls=no.
I see the configure block that translates --disable-foo into enable_foo=no, so I'm not sure why --disable-nls isn't doing that.

Adam Weinberger wrote:

configure says that you disable NLS with --disable-nls:
  --disable-nls           Don't support NLS (gettext()).

However, configure seems to ignore that command and it links against libintl.so anyway if it's present. The only way I've found to actually disable NLS is to pass --enable-nls=no.
I see the configure block that translates --disable-foo into enable_foo=no, so I'm not sure why --disable-nls isn't doing that.

It works fine for me.
configure .... --disable-nls

log:
configure:13752: checking --disable-nls argument
configure:13906: result: yes
auto/config.mk:
INSTALL_LANGS	=
INSTALL_TOOL_LANGS	=

I understand that saying "yes" for "not enabled" can be confusing.
--
hundred-and-one symptoms of being an internet addict:
49.
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Oh! Oh geeze you're completely right, Bram. This error was encountered on FreeBSD, and it was due to the switch being coded incorrectly. Sorry for the noise!


[WIP] filterBy/rejectBy: third argument optional

My go at #362. So far I only added tests.
I won't be able to properly implement this without also submitting a PR to ember-awesome-macros, as build-computed (and all) appear to assume a fixed arity.
const defaultValue = [];

export default createClassComputed(
  [false, true, false],
  (array, key, value) => {
    return computed(normalizeArrayKey(array, [key]), value, function(array, value) {
      console.log(arguments.length, typeof value); // => 2, "undefined"
      if (!array || !key) {
        return defaultValue;
      }
      return array.filterBy(key, value);
    });
  }
);

Also a little side note: Does createClassComputed or computed copy the returned array?
Because by returning defaultValue instead of [] you are returning the same array instance every time, meaning that if that array was mutated by a user, strange things will happen.

@buschtoens Good catch, it should use a new copy every time. My bad.


Add support for full .NET framework

Changing the target frameworks did the trick for #46 .
Not sure what will happen on the CI server.
Also creating an old school fsproj  console app and getting AspNetCore in general to work on it is a pain.
Some issues I came across:

Libuv was not copied, see https://github.com/aspnet/KestrelHttpServer/issues/1652
System.Numerics.Vectors gave a strange assemblyRedirect problem, I had to change my fsproj to

    <Reference Include="System.Numerics.Vectors">
   <HintPath>..\packages\System.Numerics.Vectors.4.3.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
      <Private>True</Private>
    </Reference>

See https://github.com/dotnet/corefx/issues/3103
And a redirect in app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

In case anyone every tries to do the same.

Hi, thank you, sorry for the late merge - I was away until today!

No problem, thanks for merging.


When using a custom artifactscript, apiserver pod needs to be restarted

When using a custom artifact script after a dspa was already deployed (using default artifact script), the apiserver pod needs to be restarted so the custom artifact script configmap is used. The DSPO should do this automatically so that only the dspa field needs to be updated and apiserver is re-deployed to consume the new custom artifact script.

Migrated to Jira: https://issues.redhat.com/browse/RHOAIENG-1633


Intercept JSON responses to internationalize them

Currently JSON responses are being internationalized inside Jackson classes. This is a mess, and they are unable to acquire the client's locale.
Instead some sort of interceptor or filter should be used. For example ResponseBodyAdvice.
Check this example:
http://stackoverflow.com/questions/26756811/post-processing-of-a-json-response-in-spring-mvc

https://www.mkyong.com/spring-mvc/spring-mvc-handler-interceptors-example/

https://examples.javacodegeeks.com/enterprise-java/spring/mvc/spring-mvc-interceptor-tutorial/

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/AbstractMappingJacksonResponseBodyAdvice.html

Internationalization is now handled in the frontend


docs(virtctl,create): Fix wrong example descriptions

What this PR does
Fix wrong example descriptions in the virtctl create vm command.
Before this PR:
Example descriptions mention instance types and preferences although they are not in the example.
After this PR:
Example descriptions are correct.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

None

/lgtm


Generate store type from vuex-simple

I'm submitting a ...
[ ] bug report
[x] feature request
[x] question about the decisions made in the repository
[x] question about how to use this project

Summary

There are cases where you need Store<StateType> directly.
And there's no way to write it.
When we use vuex-simple we write classes instead of a regular Store, and we do not have this StateType, since it is bundled with other methods, getters, etc.
What do I suggest?
import { State, Module, StateTypeOf } from 'vuex-simple'

class CommentsModule {
  @State()
  public comments: CommentType[] = []
}

class TypedStore {
  @Module()
  public comments = new CommentsModule()
}

type StateType = StateTypeOf<typeof TypedStore>

And later it can be used for Store<StateType>. This way we have the best from the bosth worlds. Native types and no code duplication.
Similar approach: https://github.com/gcanti/io-ts#typescript-integration

That's what I am talking about: https://github.com/wemake-services/wemake-vue-template/blob/feature-typed-vuex/template/client/logic/types.ts

This might be interesting to you: https://github.com/wemake-services/wemake-vue-template/pull/1197


Embed Donation form - Stripe API integration

Basic Information
[Give a brief summary of what the issue is about]

Create a form that offers donors the option to choose between making a one-off payment or setting up a monthly recurring donation.
Integrate with Stripe's API

Other Information
[Are there any additional information that we should know about?]

Sample donation form: https://luma.org.au/get-involved/donate/
Figma: https://www.figma.com/file/eNA06epSMBC9n79F4aF3Zs/Starick?type=design&node-id=0-286&mode=design

Hi Aifert, the checkout session isn't working anymore, it was before, do you have any idea what the problem is?

Hi Aifert, thaanks for fixing up the frontend. The checkout session isn't working anymore, it was before, do you have any idea what the problem is?

Hey, previously, in the donation-stripe.tsx, I saw the amount to be checked out and the interval was being hard coded in, so I've since made a amount useState hook to register the amount selected, and also the interval. These values are working fine in the api when logged. I didn't change much of what was previously written with the api calls, only thing I did was added a body so the api can receive the amount and interval being chosen. Where did you get the apikey before? Right now my logs are telling me the apikey is invalid.

If you can dm me @yet._. on discord the apikey you were using and let me know what you were seeing. I'd be able to see if I can make it work again. Right now just saying no apikey.

dm'd you


Time line chart stack issue

Version
5.0.2
Steps to reproduce
option = {
    tooltip: {
        trigger: 'axis'
    },
	legend: {top:30},
    xAxis: {
        type: 'time'
    },
    yAxis: {
        type: 'value'
    },
    stack:true,
    series: [
        {
            name: 'Remaining',
            data: [
                ["2021-03-01 00:00:00",100],
                ["2021-03-02 00:00:00",90],
                ["2021-03-10 00:00:00",70],
                ["2021-03-11 00:00:00",60]
            ],
            type: 'line',
            step: 'end',
            //stack: 'IN'
        },
        {
            name: 'Deposited',
            data: [
                ["2021-03-03 00:00:00",20],
                ["2021-03-07 00:00:00",50],
                ["2021-03-08 00:00:00",65],
                ["2021-03-12 00:00:00",70]
            ],
            type: 'line',
            step: 'end',
            //stack: 'IN'
        }
    ]
};

What is expected?
The first 'Deposited' value is not 110.
What is actually happening?
Stack over time

Time axis doesn't support stack yet.

@pissang Looks like stacking is only supported for category type axes. Is there a simple workaround to make it possible for value type axes?

Link: https://echarts.apache.org/examples/en/editor.html?c=line-stack
Go to the above link, and put the following code. You'll see the weird result.
option = {
  title: {
    text: 'Stacked Line'
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value',
    data: [0, 1, 2, 3, 4, 5, 6, 7, 8]
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      name: 'Email',
      type: 'line',
      stack: 'Total',
      data: [[0, 120], [1, 132], [2, 101], [3, 134], [4, 90], [5, 230], [6, 210]]
    },
    {
      name: 'Union Ads',
      type: 'line',
      stack: 'Total',
      data: [[0, 120], [1, 132], [2, 101], [3, 134], [4, 90], [5, 230], [6, 210]]
    },
  ]
};

@pissang @Ovilia
If I flip x, y axis, it seems to be working.
Link: https://echarts.apache.org/examples/en/editor.html?c=line-stack
Go to the above link, and put the following code. You'll see the weird result.
const data = [[0, 120], [1, 132], [2, 101], [3, 134], [4, 90], [5, 230], [6, 210]];

const newData = data.map(item => [item[1], item[0]]);

option = {
  title: {
    text: 'Stacked Line'
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  yAxis: {
    inverse: true,
    type: 'value',
    data: [0, 1, 2, 3, 4, 5, 6, 7, 8]
  },
  xAxis: {
    type: 'value',
  },
  series: [
    {
      name: 'Email',
      type: 'line',
      stack: 'Total',
      data: newData,
    },
    {
      name: 'Union Ads',
      type: 'line',
      stack: 'Total',
      data: newData,
    },
  ]
};


Feature: output elapsed time for tests

Thanks for the library, I'm exploring using it instead of other Cucumber implementations.
With the Ruby implementation of Cucumber, the elapsed test run time is printed at the end of the run, like so:
8 scenarios (8 passed)
28 steps (28 passed)
1m36.877s

It'd be 💯 to see elapsed test run time printed in this library as well. 😄

I don't have time to implement this feature at the moment, but I'd be happy to accept a pull request adding it.
Slap a time in the DefaultOutput struct, get the current time in the visit_start function of the impl OutputVisitor for DefaultOutput and then print the final time in visit_finish. :smile:

@matthewkmayer this now exists on develop branch. :+1:


Give server admins a choice whether to allow the bot to serve unwholesome content/other features

Make a command like /settings to change settings. For now just whether the unwholesome command should be available.
This should be done with a Database. Since this bot always runs in docker I want to make a compose file that includes a database so it will not be nessecary to use external requests, and every database query can stay within the docker network. Looking at mysql right now.
Adding /settings would also allow me to add other choices to admins, but I have no plans for that right now. Something like allowing users to make the message from the bot ephemeral
I will have to reimplement the registering feature. Random ideas: Go through each server the bot is on and delete commands before redeploying.(if there's an api for that) Or make the /unwholesome command write other data depending on what the server's settings are. I would prefer the first option.
Might want to eventually add a system for users to check how many mangas they've requested. Another database feature!!!
Allowing users to save certain pieces of culture would be cool as well.

The database is done, now all that's left is to rewrite all the register function to be guild specific and trigger when the bot joins a guild or the bot is restarted.
Also the /settings command.

Now the just the /settings command and some basic documentation.


Use events to drive mouse input

Need people to test this and see how it performs on different operating systems. Also whether it is more or less RAW than previous.

Need macOS users to test if this fixes cursor input not working for some devices.
Need windows users to test whether this has acceleration or not.
Need linux users to test how this works in general.

As I'm currently running windows in a virtualised device, I haven't tested native behaviour yet myself. OpenTK docs suggest using the events gives raw input response, but from my testing so far this doesn't seem correct.

Tested with native mouse on windows, does not bypass acceleration. See #775 for a different attempt.

Continuing developing this PR as a base implementation (replacement for previous non-raw input polling handler).

So do we still want to merge this one in or look towards merging https://github.com/ppy/osu-framework/pull/775 ? This PR looks fine (also, doesn't bypass acceleration for me either).


Turing Minor Release

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/1832
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:
git tag -a v0.6.18 -m "<description of version>" 8a72e2930d2edad87c06068b479be612444f4a61
git push origin v0.6.18