How to communicate an action to a React component

I asked this question on StackOverflow, but it's not getting much traction. I'm hoping someone here will have an opinion... Sorry in advance for the length.

While my scenario is pretty specific, I think it speaks to a bigger question in Flux. Components should be simple renderings of data from a store, but what if your component renders a third-party component which is stateful? How does one interact with this third-party component while still obeying the rules of Flux?
So, I have a React app that contains a video player (using clappr). A good example is seeking. When I click a location on the progress bar, I want to seek the video player. Here is what I have right now. I've tried to strip down my code to the most relevant parts.
    var PlayerActions = Reflux.createActions([
        'seek'
    ]);

    var PlayerStore = Reflux.createStore({
        listenables: [
            PlayerActions
        ],

        onSeek(seekTo) {
            this.data.seekTo = seekTo;
            this.trigger(this.data);
        }
    });

    var Player = React.createClass({
        mixins: [Reflux.listenTo(PlayerStore, 'onStoreChange')],

        onStoreChange(data) {
            if (data.seekTo !== this.state.seekTo) {
                window.player.seek(data.seekTo);
            }

            // apply state
            this.setState(data);
        }

        componentDidMount() {
            // build a player
            window.player = new Clappr.Player({
                source: this.props.sourcePath,
                chromeless: true,
                useDvrControls: true,
                parentId: '#player',
                width: this.props.width
            });
        },

        componentWillUnmount() {
            window.player.destroy();
            window.player = null;
        },

        shouldComponentUpdate() {
            // if React realized we were manipulating DOM, it'd certainly freak out
            return false;
        },

        render() {
            return
;
        }
    });

The bug I have with this code is when you try to seek to the same place twice. Imagine the video player continuously playing. Click on the progress bar to seek. Don't move the mouse, and wait a few seconds. Click on the progress bar again on the same place as before. The value of data.seekTo did not change, so window.player.seek is not called the second time.
I've considered a few possibilities to solve this, but I'm not sure which is more correct. Input requested...

1: Reset seekTo after it is used
Simply resetting seekTo seems like the simplest solution, though it's certainly no more elegant. Ultimately, this feels more like a band-aid.
This would be as simple as ...
    window.player.on('player_seek', PlayerActions.resetSeek);

2: Create a separate store that acts more like a pass-through
Basically, I would listen to a SeekStore, but in reality, this would act as a pass-through, making it more like an action that a store. This solution feels like a hack of Flux, but I think it would work.
    var PlayerActions = Reflux.createActions([
        'seek'
    ]);

    var SeekStore = Reflux.createStore({
        listenables: [
            PlayerActions
        ],

        onSeek(seekTo) {
            this.trigger(seekTo);
        }
    });

    var Player = React.createClass({
        mixins: [Reflux.listenTo(SeekStore, 'onStoreChange')],

        onStoreChange(seekTo) {
            window.player.seek(seekTo);
        }
    });

3: Interact with window.player within my actions
When I think about it, this feels correct, since calling window.player.seek is in fact an action. The only weird bit is that I don't feel right interacting with window inside the actions. Maybe that's just an irrational thought, though.
    var PlayerActions = Reflux.createActions({
        seek: {asyncResult: true}
    });
    PlayerActions.seek.listen(seekTo => {
        if (window.player) {
            try {
                window.player.seek(seekTo);
                PlayerActions.seek.completed(err);
            } catch (err) {
                PlayerActions.seek.failed(err);
            }
        } else {
            PlayerActions.seek.failed(new Error('player not initialized'));
        }
    });

BTW, there's a whole other elephant in the room that I didn't touch on. In all of my examples, the player is stored as window.player. Clappr did this automatically in older versions, but though it has since been fixed to work with Browserify, we continue to store it on the window (tech debt). Obviously, my third solution is leveraging that fact, which it technically a bad thing to be doing. Anyway, before anyone points that out, understood and noted.

4: Seek via dispatchEvent
I also understand that dispatching a custom event would get the job done, but this feels way wrong considering I have Flux in place. This feels like I'm going outside of my Flux architecture to get the job done. I should be able to do it and stay inside the Flux playground.
    var PlayerActions = Reflux.createActions({
        seek: {asyncResult: true}
    });
    PlayerActions.seek.listen(seekTo => {
        try {
            let event = new window.CustomEvent('seekEvent', {detail: seekTo});
            window.dispatchEvent(event);
            PlayerActions.seek.completed(err);
        } catch (err) {
            PlayerActions.seek.failed(err);
        }
    });

    var Player = React.createClass({
        componentDidMount() {
            window.addEventListener('seekEvent', this.onSeek);
        },
        componentWillUnmount() {
            window.removeEventListener('seekEvent', this.onSeek);
        },
        onSeek(e) {
            window.player.seek(e.detail);
        }
    });

Action => Store => Component that wraps the player, why does that feel like a hack to you?

@ce07c3
Because of actions like seek. It's a one-shot action. I go through the store, because it's what I'm "supposed to do" but the seek value has no use beyond the immediate flow.
I'll try to walk through the workflow:
Seek-To-5-Sec-Button-Component => Action => Store => Player-Component

player is playing.. which means current time updates automatically
user clicks the button
Seek-To-5-Sec-Button-Component calls Action.seek(5)
Store hears action, updates itself, and triggers
handler in Player-Component reacts to the trigger, calling this.player.seek(newStoreData.seekValue)
user clicks the button again
Seek-To-5-Sec-Button-Component calls Action.seek(5)
Store hears action, updates itself

dilemma: The seek value is the same this time. Shouldn't I not trigger? The store has not changed. The value was 5. It still remains 5.
I know that I need to trigger for this to work, so I trigger anyway.

handler in Player-Component reacts to the trigger, calling this.player.seek(newStoreData.seekValue)

Note that I always have to call this.player.seek, because it's plausible for "last value" to equal "next value".

So what do we have here?

A store that always triggers regardless of the value from the action?
A component that always calls this.player.seek(...) whenever the store makes any noise.
What if the store holds additional data, like current time? A change in current time would trigger a seek. Can't have that.

Maybe your answer is to have a SeekStore that only stores this seek value. That way we know every trigger is a legitimate request to seek. Still, it feels like a hack. The only reason we have a store is because we're "supposed to" have a store.
With Player-Component, we're not dealing with a component that simply renders data based on the state of a store. It actually contains another completely separate state machine (this.player), and interacting with that state machine is awkward.

To be clear, I'm not necessarily calling this a bug. There are exceptions to any rule, and I can make this work in a variety of ways. I'm merely looking for recommendations that would as closely as possible align with best practices.

Normally, I would close this question because it doesn't follow our contributing policies... but I think this is something that needs discussion. I'd ask you to take it to the #reactiflux slack, but I'm tired of all the helpful stuff there getting deleted.
I don't really have time to give this the time it deserves at the moment though, but I did want to let you know I have looked at it, and will give it some thought later tonight.
Kneejerk reaction though:  I think sometimes people take the flux pattern and even the reflux pattern a bit too seriously. I tend to keep state that I consider atomic state out of my stores entirely, and just handle them within components.
I define Atomic State as any prop that is temporary in nature, and state can be completely lost, without consequences to the app.

@H3Chief, thanks for giving it thought.
I didn't know about #reactiflux slack, but it looks like they aren't accepting new users right now (according to http://www.reactiflux.com/). I guess a fast-growing community is a good problem to have.

@jfairley I had "similar" issues with resource stores. Whenever I retrieved a list of resources, it would replace any previously fetched lists - very annoying in case a page has multiple lists of the same resource type.
In this case I'd probably say the player does not need to go to the store. It's a stateful view component built without Flux in mind. One use case where a store could make sense: persist the player's seek position in local storage e.g. by video id (I just leave out URL query parameters for now so this example makes sense).
Videos are a great subject for discussion. Usually, the frequent state updates from stores are "flattened" by the virtual DOM -> DOM diffing and patching. For videos, you might have to include a creator in your actions which you propagate to the components, so that you only update when a user seeks (this.trigger(state, creator)).

+1 to @ce07c3's suggestion.

@ce07c3 :+1:
I'd say you don't need to use Flux if the component is stateful and cohesive (i.e. can do by itself and it's children). That way you have a Player component that can be reused. The parent that is using the Player could then just wire in actions through it's props if needed. For example:
// In the parent (ES6)
import Player from "./Player";
// in render
<Player ref="thePlayer" onSeek={(position) => Actions.seek(position, "thePlayer")} />

// In Player.js
const Player = React.createClass({
    propTypes: { onSeek: React.PropTypes.func },
    // this gets called from within the component:
    _onSeek: function(position) {
      if (this.props.onSeek) { this.props.onSeek(position) }
    }
});
export default Player;

Thanks for the suggestions.
Unfortunately, while the player I'm using is a self-contained, stateful, cohesive component, I've disabled the default controls and am reimplementing my own buttons plus some. My controls go way beyond the typical play-pause / volume / full-screen that you typically see, so using Flux actually is helpful for managing button states... the play-pause button icon, various annotations along the seek bar, the having anything show as disabled when appropriate, etc.
Also, since my React DOM is laid out such that the buttons are not children of the Player component, doing the work with callback functions isn't clean either.
Right now, I'm sitting fine with option #1 "reset seekTo after it is used". I see all the drawbacks, but functionally it works, and I can pretty confidently rely on the player seek action completing more quickly than a user intent on seeking to the same place twice.
I'm also toying with the idea of listening to this action directly in the component. I see this as basically the same as using an event architecture rather than flux, so it doesn't bother me a ton the more I think about it.

@H3Chief, your comment about not taking the flux pattern too seriously keeps bubbling up in my head. It think it most fits my problem and less-than-ideal solutions. I'm glad I have flux in my app, and it simplifies 99% of my workflows, but for those 1% of square-peg-in-a-round-hole scenarios, I'm not sweating it too much. Rather I'm more interested in making it work so I can move on to other tasks. This is more an academic discussion for when my mind wanders at night. :wink:

Alternatively you could have two components: Player and PlayerButtons, the latter taking Player as prop from a parent component so it can wire itself up to the player events. Here is an example of using both in the same parent's render method:
render: () => {
  var player = <Player />;
  return (
    <ParentBase>
      <PlayerButtons player={player}></PlayerButtons>
      <something else="lol" />

      { player } /* here be the player */
    </ParentBase>
  );
}

You can use propTypes to validate the player prop in PlayerButtons:
// assuming PlayerButtons is an ES6 Class
PlayerButtons.propTypes = {
  player: React.PropTypes.element // or shape if you want to be more specific with callbacks
};

@spoike Interesting suggestion... I've never thought of doing anything with the react component other than returning it to be rendered. I'll try that out.

This was a rich conversation!  It's been a while since there's been any activity here, so I'm going to close this out.  If the conversation wants to continue on (which I hope it does!), please just open a new issue in our new discussion repo and link back to this issue: https://github.com/reflux/discuss


Dartium fails compile on mac

We have seen this error before, and it is showing up again:
tools/build/mac/verify_order: unordered symbols in /b/build/slave/dartium-mac-full-be/build/src/out/Release/Chromium Framework.framework/Versions/A/Chromium Framework:
_Dart_CreatePrecompiledSnapshotAssembly
_Dart_CreatePrecompiledSnapshotBlob
ninja: build stopped: subcommand failed.
It seems to have started on Apr 25.
@alan-knight @jacob314 @terrylucas

Fixed with below 2 CLs VM added 2 new DART_ APIs that need to be defined in the framework.order file for Mac builds.
Chromium CL
Dart CL


Unit tests fail due to Keras import error of np_utils

ERROR: Failure: ImportError (cannot import name np_utils)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/travis/build/iskandr/fancyimpute/test/test_similarity_weighted_averaging.py", line 4, in <module>
    from fancyimpute import SimilarityWeightedAveraging
  File "/home/travis/build/iskandr/fancyimpute/fancyimpute/__init__.py", line 7, in <module>
    from .matrix_factorization import MatrixFactorization
  File "/home/travis/build/iskandr/fancyimpute/fancyimpute/matrix_factorization.py", line 16, in <module>
    from keras import regularizers
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/keras/utils/__init__.py", line 2, in <module>
    from . import np_utils
ImportError: cannot import name np_utils

@sergeyf any ideas?

Well that is weird. You should really be able to do from keras import regularizers... Can we try requiring a newer keras?

You're seeing this on your home machine?


Port code examples to C# of classes beginning with A and B

First PR in my code example port effort.
See #40613 for more details.
Since there are a lot classes (and a lot less having examples) I group the changes together, but I don't really know what is practical so ¯\(ツ)/¯
I created this code translation tool to speed up the conversion process.
I left the sort as it is, because I don't know how and if it is done in C#

Fixed issue in Animation.xml
Does anybody have an idea, how to parse $Node["some/property"]using static analysis? I might use the $ as strong indication and/or if there is a slash in the subscription operator. Anyhow I updated the codetranslator again and made it more reliable as well as adding some features

fixed a ton of codeblock which should have been codeblocks
fixed suggestions and reviewed the code again.

@HaSa1002 Since #42000 was merged, you can add array concatentation. I suggest adding these lines:
// Array concatenation is not possible with C# arrays, but is with Godot.Collections.Array.
var array1 = new Godot.Collections.Array("One", 2);
var array2 = new Godot.Collections.Array(3, "Four");
GD.Print(array1 + array2); // Prints [One, 2, 3, Four]

@aaronfranke Added the array concatentation example and did another review pass. All code examples should compile. I removed the wrong example for Array.sort Godot.Collections.Array has no support for it.

It would need a last rebase so that we can get CI to pass (the error is on the master commit this PR is currently based on).

rebased

Thanks a ton!


Accumulator for computing Count, Sum, Mean

Context
The Accumulator Framework has been developed for flexible computing DP metrics (based on when the API user requested).
The accumulator is the object that accumulates values and produces the aggregated result. The computing of all Differential Private (DP) metrics is done in corresponding accumulators.
Computing of COUNT, SUM, MEAN might be achieved in one accumulator using summation, more details.
Goals
Implement class MeanAccumulator which computes any subset of COUNT, SUM, MEAN, metrics.
API
class Metrics(Enum):  # it already exists
    COUNT = 'count',
    SUM = 'sum',
    MEAN = 'mean',

class MeanAccumulator(Accumulator):
    def __init__(params: MeanParams, values: Iterable[double])
    def merge(cls,  aggregators: Iterable[MeanAccumulator]) -> MeanAccumulator
    def compute_metrics() -> tuple

Stages of the development

Implement not DP aggregations.
Add anonymization with DP, using functions.

It was implemented on PR


[FEAT] Update UI of Signup and Login Pages to Inherit New Design from Index Page

Description:
The current design of the signup and login pages does not match the newly updated design of the index.php page. To ensure consistency across the website, the UI of the signup and login pages should be updated to reflect the latest design standards seen on the index page.
Tasks:
Update the layout and styling of the signup page (signup.php) to match the design of index.php.
Update the layout and styling of the login page (login.php) to follow the same design guidelines.
Ensure responsiveness of both pages across all devices (mobile, tablet, desktop).
Test for cross-browser compatibility (Chrome, Firefox, Safari, Edge).
Additional Info:
Screenshots of the current signup page, login page, and the new index.php page design are attached for reference.
Attachments:
[Screenshot] Signup Page

[Screenshot] Login Page

[Screenshot] Index Page

Expected Outcome:
The signup and login pages should visually align with the design of the index.php page, providing a seamless user experience across all pages of the site.
Comment under this issue if you are interested in contributing.

I would like to work on this issue, please assign it to me.

@PragnyaRavikumar, Please share me a Figma design that you are planing to implement.

Hey  please assign me this task

Hey, I want to work on this task. please assign this tasK

Thanks for assigning this task to me.
On Wed, 23 Oct 2024 at 20:02, KANISHK RAJ @.***> wrote:

Hey, I want to work on this task. please assign this tasK
—
Reply to this email directly, view it on GitHub
https://github.com/Vimall03/Alimento/issues/149#issuecomment-2432424188,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A4RFNAQJ2QQNMYDU6NDK7XTZ46XRRAVCNFSM6AAAAABQMSDBGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZSGQZDIMJYHA
.
You are receiving this because you commented.Message ID:
@.***>

if this issue's open can i work on it?

@Sourabh782 Can you share me a design ?

@Sourabh782 Can you share me a design ?

I an thingking of implementing something same as in #112  something similar to this one?

Okay, I understand. But please know that I wont be able to accept the PR if the design is not good. So the level will be based on the PR. Is that okay ?

hii @Vimall03 sorry for late update but i found some designs :

Hey @Sourabh782 the design in the second image looks good, Please go ahead with it

Hey @Sourabh782 the design in the second image looks good, Please go ahead with it

Ok sure, working on it👍👍

hey @Vimall03 this looks good?

Yes, looks good, I believe you have changed the UI of the signup page as well

Yes, looks good, I believe you have changed the UI of the signup page as well

Yess just working on it, i tought first taking your opinion before starting so.
any suggestions on it? cause signup and login pages will be nearly similar layout wise so, it would be easier to make change on login and then starting signup

Okay, This looks good. Just make sure all the CRED operations works as expected

Okay, This looks good. Just make sure all the CRUD operations works as expected

ys its working

hey @Vimall03, while testing i npticed the email verification page for user is also old, should i improve it with this pr? or create a new issue for it?

Yes, Please update the Email verification page in this PR itsef.

Hey @Vimall03 check these:

all are working

Great, Looks good 👍


Suggestion. Option to choose what speed to use for a token for the calculation

I think an Option to choose what speed to use for a token for the calculation would be nice, for example I have a fairy and an aarakocra in the party and an artificer who made himself winged boots to keep up with them. Would be pleasant to have an easy to switch button or so to toggle between what speeds to use for the tokens drag ruler calculations. Because it's annoying having to set the walking speed of the token to a higher number just to display the speed it uses for its flight. (ps: the fairy we use has 10 feet walking speed and 30 flying speed, the aarakocra has 25 walking and 50 flying)...also would help with the fly spell.
Also, a neat option would be to simply have it tied to the elevation, but I think that would conflict with a lot of modules that use elevation to display different levels in a scene like the levels' module, better roofs etc. but I think such an option would still be great. That way, the players could just set themselves to like 2 to 5 feet above the ground, and it would automatically use the other speed.
I think this would also tie in neatly with the difficult terrain modules this one is compatible with, if it could auto select lets say swimming speed when going through water and the token has one, unless an option is triggered for that token that says it is wearing a ring of water walking or has that water walking spell active etc.

This kind of feature is usually handled by game system integration modules, since the details of how this stuff should work can differ dramatically between different game systems. In fact there are already several integrations that implement flying/swimming rules exactly like you proposed (for example the integrations for Pathfinder 1 and Pathfinder 2 do this). You can check the list of game system integrations to see if someone has already built an integration for the game system you're using.

I think there's an argument to be made for setting up flexibility in the default integration. For example, pf1e's integration isn't updated and the color changing is broken because of it. Also, from what I can tell, their integrated solution seems to be to allow the user to check the elevation of the token to switch to flight/burrow, but that of course only works if everything is on a flat plane.
One option would be to allow users to add multiple movement mods in the default configuration and add a token UI that allows them to switch the current mode of movement.

I'm not a fan of this suggestion. This is why: The generic speed provider is intended to be a fallback solution for game systems where a game system integration does not exist. Users that aren't able to code are able to gain basic functionality through the generic provider. Currently, it does this job reasonably well, since there isn't much to configure. However, it's already locking out some users, because not everyone is able to figure out the correct speed path.
Extending the generic speed provider to be able to do what you suggest would require one of two things:

Build game-system specific concepts like the pf1 burrow speed into the generic speed provider
Build an extensive configuration UI which users can use to make the generic provider aware of the specific rules of the game system.

The first won't happen. This is specifically what game system specific speed providers are supposed to do. Adding game system specific options to the generic speed provider will only benefit users of that specific game system while making the configuration interface less intuitive for all other users since the configuration interface is now bloated with options that serve no purpose for those users.
The second isn't great either. It would make the configuration interface of the generic speed provider much harder to use, which locks out even more users from using it. The configuration process would also turn out to be much more work than it has been before, which is especially bad since every user will have to do it again for each world. Settings are much harder to share between worlds and users than an integration module is. Even worse, even the more tech-savvy users would probably be better off writing an integration module for their game system than learning how to use the configuration UI, because that UI would have to become very complicated by the nature of its flexibility.
That being said, I think the generic speed provider is in a pretty good spot where it currently is, and I'm certain that most additional needs are better addressed by custom speed provider implementations, which are pretty simple to make. To work around the current PF1e situation: The speed providers are usually pretty self-contained, so you can simply extract the code from the PF1 project, put it into a separate module and then use that module instead. That way you can update the integration code at your own pace without having to wait for the PF1 project to make releases.


Decouple TokenEngine and RazorEngine from ModuleDataSource

Currently they are strongly coupled with the ModuleDataSource instead to the ViewDataSource. Because of that Streams can't be exchanged.

Create almost working solution in this branch:
https://github.com/2sic/2SexyContent/tree/Engines-with-ViewDataSource

Urgent. Pls do on 2015-02-24


Using Ollama hosted on another machine is not working

When client is sending to ollama running on another machine, its not working. it keeps saying model not found.

set ollama to listen on <IP_ADDRESS> on host1
modify client.baml

client MyClient {
provider ollama
options {
model mixtral
options {
temperature 0
base_url "http://host1:11434" // Default is 11434
api_key "ollama"
}
}
}
PS C:\Users\anonuser\Source\functiontest> baml-cli generate
Generated 1 baml_client
PS C:\Users\anonuser\Source\functiontest> & C:/Users/anonuser/AppData/Local/miniconda3/python.exe c:/Users/anonuser/Source/functiontest/bamltest.py
Traceback (most recent call last):
File "c:\Users\anonuser\Source\functiontest\bamltest.py", line 87, in
asyncio.run(main())
File "C:\Users\anonuser\AppData\Local\miniconda3\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\anonuser\AppData\Local\miniconda3\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anonuser\AppData\Local\miniconda3\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "c:\Users\anonuser\Source\functiontest\bamltest.py", line 79, in main
summary = await b.ExtractSummary(email_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\anonuser\Source\functiontest\baml_client\client.py", line 78, in ExtractSummary
return coerce(mdl, raw.parsed())
^^^^^^^^^^^^
baml_py.BamlError: LLM call failed: LLMErrorResponse { client: "MyClient", model: None, prompt: invocation_params: {"options": Object {"temperature": Number(0), "base_url": String("http://host1:11434"), "api_key": String("ollama")}, "model": String("mixtral")}, start_time: SystemTime { intervals:<PHONE_NUMBER>57031827 }, latency: 314.7287ms, message: "Request failed: {"error":{"message":"model 'mixtral' not found, try pulling it first","type":"api_error","param":null,"code":null}}\n", code: Other(404) }

Thanks for the bug report! Just to confirm, are you able to make a curl to http://host1:11434?
also FYI, you don't need an api_key when calling the ollama client (i believe).

Thanks for getting back so quick.
Yes, curl works.. , Even if i remove the api_key it does the same.
PS>curl http://host1:11434
Ollama is running

thanks! i just looked at the error and it looks like the error isn't in communicating with the ollama service, but rather just in which models you have on ollama:

Request failed: {"error":{"message":"model 'mixtral' not found, try pulling it first

have you already run this on
PS> ollama run mixtral

The bug on our end is that that error message is attrociously hard to read

Looking further, it looks like we also need to update the docs! We require the base_url to point to the openai version of the api.
Additionally, base_url needs to be in the top level options, not inner!
client MyClient {
  provider ollama
  options {
    base_url "http://host1:11434/v1" // Default is 11434
    model mixtral
    options {
      temperature 0
    }
  }
}

This is how we parse out options FYI:
https://github.com/BoundaryML/baml/blob/canary/engine/baml-runtime/src/internal/llm_client/primitive/openai/properties/ollama.rs

yes, adding v1 fixed it. thanks

these docs are now up to date!
https://docs.boundaryml.com/docs/snippets/clients/providers/ollama


Inputmap on cloud

relates to #147:
<+Imago> what do u think of the idea
<+Imago> of automatically saving/loading your inputmap
<+Imago> regardless waht artwork or install or where you are
<+Imago> it will pull your inputmap based off your callsign from the server
<+Imago> for the pilot it would'nt be any work at all
<+Imago> and it would save the pain of reconfiguring your controls
<+Imago> i'm strongly considering implementing the get/post for the inputmap ;p
<+Imago> if it didnt pull it in by the time you join a game (not a trianing missino) then it just uses what you got saved last or the default
<+Imago> and once u connect to he lobby is when it trys to posts ur last saved
<+Imago> how does that sound?
<C101_> it sounds like what you are suggesting is a "steam cloud"
<+Imago> see thats why we all need our own kepmaps saved to the cloud1
Imported from trac ticket #176,  created by Imago on 07-25-2010 at 13:08, last modified: 02-25-2012 at 16:21

it's up to you now.
Trac comment by Imago on 07-28-2010 at 23:24

i don't know how it could get any better than this, besides paying for more than one storage (inbound) node
Trac comment by Imago on 07-30-2010 at 09:32

xynth found a bug.  yay - it's probably with the scramble/unscramble.
Trac comment by Imago on 08-01-2010 at 19:18

scramble/unscramble seemed fine - added debugging for Xynth so he can better confirm if there really is an issue.  Please reopen this ticket if so.
Trac comment by Imago on 08-04-2010 at 01:47

I will need to see the code behind this.
Trac comment by Bard on 08-06-2010 at 00:32

you have access to everything
Trac comment by anonymous on 08-06-2010 at 00:33

Replying to anonymous:

you have access to everything

Where is this particular code? I don't see it and there's nothing here telling me what files to look for.
Trac comment by Bard on 08-07-2010 at 23:18

Code was removed from R6, we need to find a different solution for storing input map.
Trac comment by pkk on 02-25-2012 at 16:21

I didn't know I needed to hold your hand or else be accused of being a thief.  I see now that if I do not hold your hand with things you do not want to put forth effort into understanding, you will slander me.  Please don't do that again.
The code is at "Repository Changesets":
r842 r847 r848 r860 r879
The handler is on CDN at C:\Inetpub\wwwroot\build\nph-InputMap.cgi as the code I outlined in the repository suggests.
Trac comment by anonymous on 08-09-2010 at 19:13

Can't we create a batch script that backups the user's inputmap1.mdl in "my documents/allegbackup" when run?

@echo off
xcopy /W “C:\Program Files(x86)\Microsoft Games\Allegiance 1.2\Production\Artwork/inputmap1.mdl" C:/Users/My Documents

imho, this is very low priority and depends on a much needed major reorganization of artwork files and game files in general.
Meanwhile ACSS could handle this. it's easier to do from it. so better open that issue on ACSS issue list.


Rule fired for optional attribute which is missing

Description
Rule is getting fired for a required attribute which is nested within an optional attribute and when the whole optional hash is missing (which should be allowed) it reports an error causing the validation to fail.
To Reproduce
Create a contract with a rule for an optional hash attribute with a required key + a rule for the required key and run with an input not including that hash. I use custom macro and I don't know if it's related to the bug.
So given:
class SignUpContract < Dry::Validation::Contract
  params do
    required(:user).hash do
      optional(:id) { filled? & str? }
      optional(:first_name) { filled? & str? }
      optional(:last_name) { filled? & str? }
      required(:email) { filled? & str? }
      required(:password) { filled? & str? }
      required(:accepts_terms) { filled? & bool? }
      optional(:freelancer).hash do
        required(:id) { filled? & str? }
      end
      optional(:clients).array(:hash) do
        required(:id) { filled? & str? }
      end
    end
  end

  rule('user.id').validate(:uuid_format)
  rule('user.email').validate(:email_format)
  rule('user.password').validate(min_length: 8)

  rule(user: %i[freelancer clients]) do
    freelancer = values.dig(:user, :freelancer)
    clients = values.dig(:user, :clients)

    unless freelancer ^ (clients && clients.size == 1)
      key(:user).failure(:profile_missing)
    end
  end

  rule('user.freelancer.id').validate(:uuid_format)
  rule('user.clients') do
    have_valid_uuid = lambda { |client|
      client[:id].nil? || client[:id].match?(Macros::UUID_REGEXP)
    }

    unless value.all?(have_valid_uuid)
      key.failure('not a valid UUID format')
    end
  end
end

And params:
{
  "user": {
    "id": "d16dfef3-50f9-4588-b7d7-837801e403cd",
    "first_name": "Blah",
    "last_name": "Blah",
    "email"<EMAIL_ADDRESS>    "password": "blahblahblah",
    "accepts_terms": true,
    "clients": [
      {
        "id": "d287fdff-78ac-45ed-871b-b1b5c9548399"
      }
    ]
  }
}

It produces:
#<Dry::Validation::Result{:user=>{:id=>"d16dfef3-50f9-4588-b7d7-837801e403cd", :first_name=>"Blah", :last_name=>"Blah"<EMAIL_ADDRESS>:password=>"blahblahblah", :accepts_terms=>true, :clients=>[{:id=>"d287fdff-78ac-45ed-871b-b1b5c9548399"}]}} errors={:user=>{:freelancer=>{:id=>["not a valid UUID format"]}}}>

Expected behavior
The validation rule for optional attribute should never be run when it's missing.
In the example rules related to freelancer attributes should not be run and the validation should pass
My environment

Affects my production application: NO as I haven't upgraded yet
Ruby version: 2.6.3
OS: MacOS Mojave Version 10.14.5 (Darwin Mateuszs-MacBook-Pro.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64)

Please see #550 and let me know if this makes sense to you.

I'm gonna close this one since, after all, this is not a bug. See #550 where new features have been added to make it easier to work with optional keys and rules that depend on them.

It is awesome, it does add the condition here and then more often than not but I do get the idea behind it so thank you, I really appreciate your work :)

@mateusz-useo cool! I plan to add a bigger feature soon where you'll be able to use pattern matching to run rules conditionally, so ie this would work:
rule(:numbers).if(:key?).each do
  key.failure("must be even") if value.odd?
end

for the record, this thing in PM is usually called "guard", just to save some time on coming with proper naming which is, you know, hard...

Maybe rule? or validate??

@mateusz-useo oh that's a nice idea, thanks. I'll keep it in mind!

Please consider how this can work with .validate as well.

@shepmaster good point

I've a contract like this:

params do
  optional(:per_page).filled(:integer)
  .....
end

rule(:per_page).validate(gt?: 0, lteq?: 20)
.....

If there's no per_page key, this code creates error with the predicate macros as defined in its rule. As an alternative, we can check for key? in a rule block. But doing the works of predicate macros and their associated errors manually inside a rule block will create a lot of boilerplate codes.
I've been trying to upgrade dry-validation from 0.13 to >= 1.0.0. Optional keys are very common and this appears to be a major blocker for me to upgrade.
We would love to see a solution implemented soon. Thank you.
@solnic @flash-gordon

@musaffa I'm not yet sure how to solve this. Adding key? check automatically may not be desired in various cases, see #550's description for more info.

Exposing validate inside the rule block might solve the issue. For example:
params do
  optional(:per_page).filled(:integer)
end

rule(:per_page) do
  validate(gt?: 0, lteq?: 20) if key?
end

For maybe with optional:
params do
  optional(:per_page).maybe(:integer)
end

rule(:per_page) do
  validate(gt?: 0, lteq?: 20) if key? && value
end

@musaffa I reckon it'd be simpler (and better UX too) to extend rule DSL with pattern-matching-like API, starting with support for key? like I mentioned above, so:
params do
  optional(:per_page).maybe(:integer)
end

rule(:per_page).guard(:key?).validate(gt?: 0, lteq?: 20)

that would just work and you could also use it with block-based rules. WDYT?

A guard can be a good shortcut. It's simpler and concise.
rule also supports multiple keys. How will guard(:key?) function in those cases?
guard(:key?) will only cover for optional key. For maybe, we will also need to guard the value before passing it to the validate function.
 Not just for optional key or value but for the other use cases. For example, I would love to use registered macro inside a rule block.

@musaffa I reported two feature requests:

https://github.com/dry-rb/dry-validation/issues/678
https://github.com/dry-rb/dry-validation/issues/679

It's tentatively scheduled to be part of 1.7.0 release. I marked both as help wanted for the time being though. I'll give this a shot during xmas break unless somebody beats me to it.


EnitityId is serialized as a base64 encoded string on the wire

Internally it's just u128 so we are artificially creating 29 bytes out of 16.

I do believe it was like this originally to aid debugging when viewing the serialized world as a file or through logs.
It also helps when comparing network traffic with other sources such as the ecs debugger as entity IDs Debug impl uses the same representation.

I've been looking into how we are using entity ids. And I'd like to make them smaller or at least smaller on the wire.
From what I've seen we can kind of split entity ids into 3 groups depending were they originate from:

Generated during build and stored in asset descriptions (for example in main.json in models and prefabs).
Generated on the server.
Generated on clients.

Is it correct that entities originating from the client (3.) are never shared with the server or other clients?
Assuming that most of the entities referenced on the wire are going to be the ones generated on the server (2.), I'd like to use sequential ids for them and use VarInt encoding. This would shorten most entity ids on the wire from 29 bytes to <5 bytes.

@pierd Sequential won't work, because they need to be creatable distributed (i.e. you can create an id on the client). We had generational before (kind of like sequential), but switched for that reason. Here's the issue where I was working on the switching: https://github.com/AmbientRun/Dims/issues/543


Support for proxies

In some cases, a remote could be behind a proxy, it would be handy to be able to pass in the following variables to deployments that need to use a proxy

HTTP_PROXY / http_proxy
HTTPS_PROXY / https_proxy
NO_PROXY

Some services that need to use proxy will be:

docker-host (https://github.com/uselagoon/lagoon/issues/3036)
remote-controller (https://github.com/uselagoon/remote-controller/issues/105)

We do have additional env vars which can be added in an ad-hoc manner to individual services but I guess you mean having a single variable for all affected services?

Yeah, single var for all affected services would be ideal.
Otherwise extending the ability to providea adhoc envvars to deployment templates would be good. Currently in the lagoon-remote chart, the docker-host deployment doesn't support this (https://github.com/uselagoon/lagoon-charts/blob/main/charts/lagoon-remote/templates/docker-host.deployment.yaml#L29-L71) there may be others, but this is the first one I looked at as it is a requirement for a specific client right now

Some proxy support is already added to remote-controller and docker-host charts


dyld: Library not loaded

Hi there,
I'm trying to include swiftline into a fresh Swift command line template Xcode project. I've built swiftline using carthage and included it in the "Link Binaries With Libraries" section to no avail.
dyld: Library not loaded: @rpath/Swiftline.framework/Versions/A/Swiftline
  Referenced from: /Users/cooltrooper/Library/Developer/Xcode/DerivedData/wlV1-fnrxshgimtnooghhhpyaripgrewy/Build/Products/Debug/wlV1
  Reason: image not found

Any tips?

@cooltrooper could you please attach 2 screenshots: one for General tab with included framework visible, and another with Build Phases tab (I'm particularly interested in Embed Framework step)

@cooltrooper I will close this issue since its been open for a while.
Please feel free to reopen if the issue persists :)


Flexible client initialization

This adds some additional flexibility when initializing the client.
It includes:

No longer assumes that api_version is prefixed with v
Allow passing additional headers that will be merged into each request
Include a PUT HTTP method for completeness

Not sure why coveralls is stalling on this, but coverage remains at 100% after running specs locally. going to merge & release this

Coverage remained the same at 100.0% when pulling 3dd26985da49298649b6e47883d71829f7625256 on feature/initialization-flexibility into 406ad7c5b3315140ae3655dfbdca99615a822e5b on master.


Doesn’t work

Thanks for your issue. Can you confirm that you already added your OpenAI API key in the settings?

If you want to try v1.0.3: I improved error messages, if you still have "I got an error", let me know :+1:

I assume this is not an issue anymore, feel free to reopen if you still have a problem :)


Enable Travis caching

As seen on https://docs.travis-ci.com/user/caching#Caching-directories-(Bundler%2C-dependencies)
Looks like the new container-based infrastructure has to be used, which means no sudo.
Not sure if it's feasible, but if so, would speed up Travis checks considerably.

It isn't feasible unfortunately, as we need sudo in order to run our tests using system Ruby.


[BUG] Understand sorting_without_excess_spikes

Understand what   sorting_without_excess_spikes = load_sorting_output(data, recording, sorter)  is doing in quality.py.
Si throws an error if not used and says that this must be used. It works but I have no idea what it is doing / what the error is called in the first place.

This seems to be due to strange behaviour of KS in some instances where it returns a spike time outside of the available number of samples. This is discussed here in this PR and it's implementation here does what is expected, removing any spike times that are larger than the number of samples.
As remove_excess spikes is required for waveform extraction, and it should have no effect on sorting output nor quality metrics, it is applied automatically and not mentioned in logs.
However, it is weird KS does this! But investigating this is out of scope.


Incorrect attribute value type error when using terraform 0.12 and terraform-aws-eks v5.0.0

I have issues
I am trying to upgrade to use of terraform 0.12.x with terraform-aws-eks module v5.0.0, and am experiencing an error.
I'm submitting a...

[ ] bug report
[ ] feature request
[X ] support request
[ ] kudos, thank you, warm fuzzy

What is the current behavior?
After updating terraform to latest 0.12.3 version,  changed my use of the module to v5.0.0 of the terraform-aws-eks module as follows:
module "terraform_aws_eks" {
source = "github.com/terraform-aws-modules/terraform-aws-eks?ref=v5.0.0"

cluster_name    = var.identity
cluster_version = var.kubernetes_version
subnets         = var.aws_subnets
tags            = var.tags
vpc_id          = var.aws_vpc

write_kubeconfig   = true
config_output_path = pathexpand("~/.kube/")
kubeconfig_name    = var.identity

worker_groups = [
    {
    asg_desired_capacity           = var.num_workers_desired
    asg_max_size                   = var.num_workers_max
    asg_min_size                   = var.num_workers_min
    autoscaling_enabled            = true
    create_elb_service_linked_role = true
    instance_type                  = var.worker_instance_type
    key_name                       = var.ssh_key_name
    name_prefix                    = "${var.identity}_worker_group"
    public_ip                      = true
    subnets                        = join(",", var.aws_subnets)
    },
]

worker_sg_ingress_from_port = "22"
}

When I run terraform plan I see the following error:
$ terraform-0.12.3 plan
provider.aws.region
The region where AWS operations will take place. Examples
are us-east-1, us-west-2, etc.

Enter a value: us-west-2

Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

module.usw2.module.eks.module.coresvcs_eks.module.terraform_aws_eks.data.aws_region.current: Refreshing state...
module.usw2.module.eks.module.coresvcs_eks.module.terraform_aws_eks.data.aws_caller_identity.current: Refreshing state...
module.usw2.module.eks.module.coresvcs_eks.module.terraform_aws_eks.data.aws_ami.eks_worker: Refreshing state...
module.usw2.module.eks.module.coresvcs_eks.module.terraform_aws_eks.data.aws_iam_policy_document.cluster_assume_role_policy: Refreshing state...
module.usw2.module.eks.module.coresvcs_eks.module.terraform_aws_eks.data.aws_iam_policy_document.workers_assume_role_policy: Refreshing state...

------------------------------------------------------------------------

Error: Incorrect attribute value type

on .terraform/modules/usw2.eks.coresvcs_eks.terraform_aws_eks/workers.tf line 37, in resource "aws_autoscaling_group" "workers":
37:   vpc_zone_identifier = lookup(

Inappropriate value for attribute "vpc_zone_identifier": set of string
required.

If this is a bug, how to reproduce? Please include a code sample if relevant.
Create an instance of the terraform-aws-eks module v5.0.0 as shown above and run terraform plan on it.
What's the expected behavior?
Successful creation of the EKS cluster
Are you able to fix this problem and submit a PR? Link here if you have already.
No.  Please advise.
Environment details

Affected module version: v5.0.0
OS: macOS (Mojave)
Terraform version: 0.12.3

Any other relevant info

Drop the join on var.aws_subnets as the vpc_zone_identifier does the split.
   subnets                        = var.aws_subnets

That fixed it.  Everything working as expected now.  Thanks!

@srikanthkodali9 you da man


The road to add simd support?

Now simd landed on nightly, do we have any plan to add the simd support?

The libc memchr is probably already vectorized.
It would be a nice experiment to see if we can match or beat memchr using vendor intrinsics. Note though that GNU libc's memchr is, I believe, handwritten ASM.
This isn't a priority for me personally.

I don't think there is any need to track this. SIMD isn't really a fixed goal. If people want to try their hand at making the fallback implementations faster, then that sounds like a fine idea.

@BurntSushi, I just measured rust-memchr's performance, and everything is great with vectorized instrinsics, however, the fallback path is frequently quite similar in performance to naive Rust code. Would you accept PRs with vectorized instructions on other hardware if using a nightly compiler (since only x86 vendor intrinsics are stable)?
https://gist.github.com/Alexhuszagh/f9929e7d8e0277aa1281f511a841a167

Those plots are pretty misleading IMO, since they are on a log scale. The fallback implementation does much better (usually at least 2x) with respect to throughput when compared when the naive version. They tend to have similar characteristics (with naive sometimes being better) when the frequency of match is high, but that's somewhat expected and there's not much that can be done about that AFAIK.

Would you accept PRs with vectorized instructions on other hardware if using a nightly compiler (since only x86 vendor intrinsics are stable)?

No, sorry. It's too much of a maintenance hazard. I generally do not use any nightly features in crates, especially core crates like this. The best path forward here is to prototype it in a separate crate or get the intrinsics you need stabilized. (It's also plausible that packed_simd could be used, which would give you more portability.)

@BurntSushi I mean, the log scale is for visualizing, but the idea that they are misleading is wrong. Simply put, the naive is slower than the fallback on the latest stable (Rustc 1.32.0) on x86_64 for 5/12 for memchr3, and only excels for memchr1. It's also only ~2x faster for the never and rare benchmarks. Otherwise it's typically within +/-10% of the naive implementation for most benchmarks. It's not a criticism, your crate has excellent performance for specific use-cases, and the fallback is generally good, I'm just looking to improve performance for more cases.
I understand the issues with maintenance, I'd be fine with adding packed_simd, if that's ok? That way we could have a single non-fallback path for nightly for non-x86 hardware, which would presumably simplify the maintenance and portability issue.

I'm going to have to pass, sorry. Nightly only code is a maintenance hazard, as I mentioned in my previous comment. I've been through this before with other crates, and I've almost always regretted adding nightly-only code. On top of that, packed_simd takes an extremely long time to compile, which will make CI take longer.

No worries, let me know if you ever change your mind, since I've already got a working implementation. I understand the maintenance concerns.


Add integration tests using Newman

See http://blog.getpostman.com/2017/08/23/integrate-api-tests-with-postman-newman-and-travis-ci/

Closed #192


Local decorations lost when remote client changes document

Describe the bug
When widget decorations are present on one client and another remote client makes a change the decorations disappear. Note that the remote edit does not have to be on the same node, it can be elsewhere in the document entirely.
To Reproduce
Steps to reproduce the behavior:

Create a widget decoration and pass to the prosemirror view
Edit the document in another window using the y-prosemirror plugin
Widget decoration disappears

Clone repro from this branch
npm install && npm run dist && npm start
Click to add decorations in one client
Edit in another (see attached video)

Expected behavior
Local decorations should be retained when remote client edits document
Screenshots
https://user-images.githubusercontent.com/380914/118734109-8538e880-b7f2-11eb-83c3-e5d76178b88b.mp4
Environment Information

<EMAIL_ADDRESS>

You know, what's weird is that the decorations from the sync-plugin are retained, which also includes a widget deco for the cursor. If you have any thoughts on where to look I'm happy to dig in from my side

y-prosemirror replaces the complete document with every change. Of course, only the differences are rendered to the view.
This means that decorations will be automatically destroyed. In collaborative editing mode it can't be guaranteed that decorations based on index-based positions will converge. Which is why the "replace" behavior is justified. y-prosemirror provides some utilities to transform index-based positions to "relative positions" (see docs.yjs.dev). On every change from y-prosemirror, you are responsible to transform the relative positions to index-based positions and render them as decorations.
My intention was always to provide better utility for this. Unfortunately, I currently don't have the time or funding to improve y-prosemirror with helper utilities like these. But you can have a look at the y-prosemirror/selections implementation.

This repository provides a solution to map the decorations to relative positions, so we can restore the index position properly which guarantees that decorations will stay in sync. However, this is indeed pretty hard to use.
It would be nice to have a plugin that automatically updates certain decorations, if the user choses to do that.
If you wish to provide a solution for this problem, I'd be happy if you open another ticket / PR. However, I want to organize my open work using issues and this is not something I can immediately tackle.

any advance in this ?, we are using a plugin for language tool but decorations are draped every time other users write.
thanks

if you use instead of replace or you pass a virtual mapping correctly this issue is gone. only problem is the mapping so we don't know what's is the trace, this should be easy to fix if you follow the steps in the doc

@tommoor did you manage to find a workaround for this? We're running into the same issue.

You either have to:

Store the decorations outside of Prosemirror and then map their positions every tick using the appropriate YJS methods, sorry I forget the specifics and no longer have access to that codebase.
Don't use decorations, use something else like inline nodes or marks.

Please; any code example? We have same issue


Introduce TestNG to JUnit migration module [DRAFT]

DRAFT

Rebased, let's see what Sonar has to say 😋.


Can not binding data

Hi all,
I'm using it but i can not binding data for this case. I have two select box is country & states select box. When i selected country, i want filter the list state but can not render it in the view. (Using Angular , webpack)
Many thanks,

+1
Binding data to property "data" has no effect. Even the demo seems not to work properly.


Ec2 updates error

i'm retrieving the tf and tfstate files for ec2 using terraforming only but when i execute terraform plan it shows me various updates instead of no changes

@monicagangwar Could you show me your tf, tfstate and the result of terraform plan ?
I'd like to confirm the detail of your issue...

i cant exactly show you those files but the reason why terraform is forcing a new ec2 resource is because when i retrieve tfstate for ec2 its unable to fetch the security groups for the instances.

OK, I'll investigate this.

@monicagangwar Just released v0.1.2 including these fix :shipit: please try it.
If you have any problems at this version, please reopen this issue.


Make silences expire by default and limit their validity period

Make silences expire by default and limit their validity period.

Add an expiration field to the Silence CRD

This field should support expiry date with different timezone, e.g.

    "2023-03-21": expires on 2023-03-21 at 09:00 CET > 08:00 UTC
    "2023-03-21 09:00": expires on 2023-03-21 at 09:00 CET > 08:00 UTC
    "2023-03-21 09:00 MST" expires on 2023-03-21 at 09:00 MST > 15:00 UTC

Implement expiration logic in silence-operator

Background
We recently discovered that gorilla / 4muwu was silenced for more than one year and we no longer know why the cluster was silenced.
### Tasks
- [ ] https://github.com/giantswarm/silence-operator/pull/285
- [ ] https://github.com/giantswarm/roadmap/issues/2496
- [ ] https://github.com/giantswarm/roadmap/issues/2497

Some thoughts during planning:

@nprokopic - we can keep GitOps approach, and automatically open PRs that are removing the silences, like dependabot/renovate
@AverageMarcus - only expire during business hours to limit potential impact on someone else out of hours

Obviously our GitOps approach to try and delete expired silence via automated PRs is not working, as I count 19 PRs open for expired silences today and this is a more or less constant number over time.

I have now crafted a new PR to add support silence expiry in silence-operator, so valid-until date will actually be used as real expiry date in alertmanager, see https://github.com/giantswarm/silence-operator/pull/285

@TheoBrigitte Do you think it would help if we added automation that added the PRs to the teams project boards so they discuss them during standup?

@TheoBrigitte Do you think it would help if we added automation that added the PRs to the teams project boards so they discuss them during standup?

Sure that's an improvement, let's see how this works out.

Turns out that's not possible (at least how I implemented it) because it's a bot opening / assigning the PR which doesn't trigger actions. 😞  I'm going to revert the PR adding the action.

Do you think it'd be possible to have the delete only performed during working hours? I wouldn't want the silence (incorrectly) expiring during the night and waking someone up when there's nothing for them to do.

Do you think it'd be possible to have the delete only performed during working hours? I wouldn't want the silence (incorrectly) expiring during the night and waking someone up when there's nothing for them to do.

Yes that's possible, that was one of the suggestion there. We just have to choose what is the time we expire silences then.

We still have company business hours as central European because of customer obligations. At least last I heard that was the case.

We still have company business hours as central European because of customer obligations. At least last I heard that was the case.

Yeah, I believe that is the case currently. I meant more how we can do this without leaving out non-European folks that are also doing on-call, regardless of any official business hours.
I guess silences expiring during European business hours would be fine, as long as there are European folks doing business hours on-call, so they can react if needed, and we do not wake up by design on-call people in South/North America or Asia.

We can set the default expiry hour to be 9:00 and default timezone to be Berlin, and allow to customize it via the valid-until label. Something like:

valid-until: "2023-03-21": expires  on 2023-03-21 at 09:00 CET > 08:00 UTC
valid-until: "2023-03-21" 09:00: expires  on 2023-03-21 at 09:00 CET > 08:00 UTC
valid-until: "2023-03-21 09:00 MST" expires  on 2023-03-21 at 09:00 MST > 15:00 UTC

WDYT ?

Sounds good, yeah, can't think of a better way TBH.
One detail though, since we own silence-operator and Silence CRD, can we add ValidUntil field in the Silence CRD, instead of adding annotation? Is there some specific reason to use the annotation, or that was just an ad-hoc solution that we started using over time as we didn't have ValidUntil field?

That's an ad-hoc solution we are just living with. But I agree we should make this a concrete field.

I would rather we use a standard for dates (i.e. https://en.wikipedia.org/wiki/ISO_8601) that some custom ones though. I'll get to that

Re-opening as I added 2 tasks for validation and alerting.

Both tasks are done, closing


feat(pagination): added pagination Component

This component is based on pf-pagination from angular-patternfly repo.
Issue: #32
https://rawgit.com/sahil143/patternfly-ng/pagination-dist/dist-demo/#/pagination

@dlabrecq @dgutride Please review this component.

@dlabrecq

Is there a way to check linter error? Because when  I build It exits successfully...no linter error

For completeness, I'd like to see gotoFirstPage($event), gotoPreviousPage($event), gotoNextPage($event), gotoLastPage($event), and onPageSizeChange($event, increment) where MouseEvent is provided as the $event parameter. Even if the MouseEvent object is not ultimately used, it's clear that a mouse click invoked these functions.

passing $event as parameter throws AOT error. If we also pass a parameter inside class method then it works fine but then we would have unused parameters passed back and forth between class methods.
Marking lastPageNumber private throws AOT errors.

I believe we may want to use Angular's onchange event here instead of keyup.enter? That way, an event is only generated if the value changed.
And instead of using onPageNumberChange(pageNoInput.value), use a two way model binding. For example, [(ngModel)]="config.pageNumber", then use (onchange)="onPageNumberChange($event)" where MouseEvent is passed as the $event object. The component can easily access config.pageNumber internally.

[(ngModel)]="config.pageNumber", with (onchange)="onPageNumberChange($event)" changes the page even when we press backspace(some undefined values are being shown) and when I add another number(invalid) in input

onPageSizeChange in place of onPageSizeSelect is not possible because we have method with same name onPageSizeChange().

Regarding the linter error, the build won't fail, but you can clearly see the error in an IDE. I use Webstorm, for example.
For the AOT error, make _lastPageNumber private and add an accessor. For example:
get lastPageNumber(): number
Regarding the backspace, you can test the MouseEvent for the key pressed and perform an action based on the key that was pressed (i.e., only if the enter key was pressed). The only problem with keyup.enter is that your function is called regardless if the value actually changed.
It would look something like this:
<input type=text (onchange)="eventHandler($event: MouseEvent)">
eventHandler($event) {
if ($event.keyCode === 13) {
console.log($event, $event.keyCode, $event.keyIdentifier);
}
}
Regarding the onPageSizeSelect event; yes, it is possible to rename that. If there is already  onPageSizeChange method, simply rename that method to something else, like onPageSizeClick.

@dlabrecq

I have added the List example.
Its still not working for me

when we use one-way data binding i.e. [ngModel]="config.pageNumber" and on-change=onPageNumberUpdate($event, input.value) I have to pass it the input value because ngModel does not reflect the changes back to config.PageNumber.....  but works fine because it only changes the page number and updates config.pageNumber when enter is pressed. (this is the one I have used in code)
When we use two-way data binding i.e.  [(ngModel)]=config.PageNumber and on-change=onPageNumberUpdate($event, input.value) it instantly reflects the changes back due to which page number change on backspace and on config.pageNumber more than the total number of pages ....  this is happening because first, it performs the two-way binding( change the page number and updates config.pageNumber) then it performs on-change(execute onpageNumberUpdate() after enter is pressed and updates config.pageNumber again).
Travis is failing because one of the unit test depend on input.

Entered "a2" in the inpiut field and see "NaN" as the result -- "2a" was handled, tho.

@sahil143 Per your request, I've pushed changes to fix code review various issues.

ngModel cannot bind to config.pageNumber; otherwise, pagination is updated as user types
Prevent bad characters from being entered (a2, 2a, etc.)
Removed unused ngOnChanges method
Fixed blur and keyup events
Fixed linter quote issues

The changes can be found here:
https://github.com/patternfly/patternfly-ng/pull/151/commits/3adc6082e9ab807e740e03ec0709491b0967dae3
Note that I did not address the unit test that was commented-out, please fix that so we can merge.

@dlabrecq Thanks for the fix.
Yes! typed KeyboardEvent object does not provide keyCode access for (change) event and also for type any it doesn't.
I have added two more tests one is for blur and other is for keyup.enter. As for Keyup.enter I used a spy to see if the method onPageNumberKeyup is called.

For code reviews, it's best not to squash commits after the PR has been created -- it'seasier to see the history of what changed. Github allows us to squash as the PR is being merged.


Show UUID`s

Adding a option to have the disk/partitions UUIDs shown would imo of advantage.
Beside this, useful and good app. Thanks!

disk/partitions UUIDs

Do you mean the filesystem's UUID or PARTUUID ? Or both ?
UUID is probably the most useful, and the one which makes most sense for dysk.

A good question...
I think UUID is a must have and partuuid a maybe/useful bonus, as it can also always by other means obtained. So another way would be by showing the uuid as standard for the base view and --show-partuuid a cli option.
Greets

I'll probably define two columns and allow eg dysk --cols +uuid+partuuid.

Done

Great! Thanks a lot.


Good First Issue: in sitemap, dynamically generated level name casing not consistent -> main

You can refer to the boxed level names. Notice that the casing is not consistent here. Resolve by making all the level name to be capitalised for the first letter of each word. (Hint: use lodash _.startCase() function)
Reference: https://docs-lodash.com/v4/start-case/

Target branch -> main

Hi @xmliszt, is this feature only shown when you are logged in? I can't seem to navigate to this page based on your screenshot.

It should be a generic page without user with. Can try /sitemap ? Else can find it in the side menu


nap2-beta: Add version 7.0b4

The NAPS2 developer has been making beta versions of NAPS2 that come with massive improvements over the latest version.

[x] I have read the Contributing Guide.

/verify

/verify

/verify

Close as not needed.


Test issue notification

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Mac/Windows
Version [e.g. 22]

Additional context
Add any other context about the problem here.

test


lakectl diff fails when diff is big

lakectl diff uses exponentially growing page sizes, starting from 50 and doubling on every page.
The server doesn't allow page size > 1000, so when there are enough records in the diff to get to an amount bigger than 1000, the server returns an error.
I suggested #2811 as a fix, in which the client will limit itself - but after discussing with @arielshaqed, we decided that it makes sense to cap the page size on the server side instead of returning an error. That is, if the amount received by the server is greater than 1000, return at most a 1000 records.

I suggest returning an error instead of truncating the response to the allowed limit. A pattern that is (unfortunately) pretty common when working with paginated responses, is to assume that if amount of results received for current page < amount I request per page, I don't have to go check the pagination fields, I can just assume there are no more results to return.
If we truncate at 1000, a user requesting 1100 can assume there were only 1000 results and no further pages exist. This is of course an anti-pattern, and likely a wrong assumption - but I believe good DX means making it easy to build a correct system.

@ozkatz, I see your point - I'm find with both solutions (in your suggestion the client needs to limit the page size to the one allowed by server)

I suggest returning an error instead of truncating the response to the allowed limit. A pattern that is (unfortunately) pretty common when working with paginated responses, is to assume that if amount of results received for current page < amount I request per page, I don't have to go check the pagination fields, I can just assume there are no more results to return.
If we truncate at 1000, a user requesting 1100 can assume there were only 1000 results and no further pages exist. This is of course an anti-pattern, and likely a wrong assumption - but I believe good DX means making it easy to build a correct system.

OTOH, AWS do exactly the truncation behaviour that you do not like.  In fact this caller bug (anti-pattern suggests bad practice that yields correct results) inhibits many optimizations that we may wish to add in future.  In exchange, it is also immediately less efficient -- always adds another API call to get to the correct value.
As an alternative that avoids tying us to unjustified behaviour, the paginator could (probably) use the max_per_page field on pagination.

@arielshaqed I see your point.
I agree we need to allow clients to pass their preference even if it's larger than the max size, and let the server return a smaller response if it goes over the max allowed per page. This will indeed allow clients to negotiate a desired payload size more efficiently and reduce the coupling between client and server.


Forward rel/6.3 to rel/6.4

Forwarding rel/6.3 to rel/6.4

http://ci.ironmann.io/gh/scality/Integration/9471


autoConnect

The autoConnect function is to connect when available, but can we set it up to try to connect automatically after disconnection?

Hello!
Thank you for using the library.
This is a general usage question and as such should be posted on stackoverflow with rxandroidble tag—it will be easier to find by other users. Also feel free to check already posted questions as a similar one may be already answered.
Best Regards


[Darwin] MTRDevice should support wildcard reads

The current MTRDevice:

The read API requires nonnull endpointID, clusterID, and attributeID
The cache does not do wildcard search

This issue is to track support for wildcard reads.

@jtung-apple Is this a duplicate of https://github.com/project-chip/connectedhomeip/issues/23375?

Yup, but I closed that one, and this now has a use case. Adding to 1.3


rustup

Just making sure it all still works.

@bors r+

:pushpin: Commit 7a3ccb1b5711eb6ed563953e988652fbacc7f312 has been approved by RalfJung

:hourglass: Testing commit 7a3ccb1b5711eb6ed563953e988652fbacc7f312 with merge de9a0ad51f3bf68f0b7d45d260fb5c5e4168ed3a...

:sunny: Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing de9a0ad51f3bf68f0b7d45d260fb5c5e4168ed3a to master...


Check if code compiles on Playdate OS 2.0

Update codebase if needed.

Code compiles, no updates needed.


Alexa function API response returning 204?

Hello, I have been trying to debug this for a few hours now. Can confirm the microphone is working, plugged in credentials correctly, install script ran fine with no errors. Wasn't getting any response from Alexa so decided to print r.status_code from within alexa function. That is how I found out what was actually happening. It appears the API is responding with a 204. Running main.py as root. Has anyone had the same issue can anyone think of how to resolve this?

204 is the normal 'null' response, usually I get this when sending a very short or blank audio clip.
Its worth checking that you are recording the whole command, (remember to hold the button down while speaking) you should be able to listen to  the last recorded command sent to alexa in recording.wav

I will give this a try later and reply back. Thanks

Fixed faulty microphone. Thanks


Token authentication

The NC API accepts token authentication in newer versions.  Currently, the provider is hard-coded to use SSL-auth.  Add a facility to use tokens instead.

Adding some work to https://github.com/WhatsARanjit/prosvcs-node_manager/compare/master...WhatsARanjit:remote_auth?expand=1 to start this.

Merged in from https://github.com/WhatsARanjit/prosvcs-node_manager/pull/20.


[GH-3544] Add null check for Application.Current

Describe the changes you have made to improve this project
Add null checks for usage of Application.Current in the main part of the library. Note that the demo and the unit tests haven't been updated as they are unlikely to be used wrapped in a WinForm App.
Unit test
No unit test added but if needed I can add a new test project with a WinForm app hosting the WPF MahApps window.
Additional context
Closed Issues
Fix #3544

Would you mind added your changes/fixes also to Fluent.Ribbon?
We (@punker76 and i) try to keep the classes in sync.

@Evangelink your changes have been merged, thanks for your contribution 👍

@batzen I'll do the PR on FluentRibbon today!


Test Issue created at Mon, 31 Jan 2022 02:16:20 GMT

Test issue body  Mon, 31 Jan 2022 02:16:20 GMT

Comment on issue at Mon, 31 Jan 2022 02:16:22 GMT


After upgrade from 3.5.3 to 3.6.0 ArangoDB often restart after several minutes

My Environment

ArangoDB Version:       3.6.0 (from 3.5.3 in-place upgrade)
Storage Engine:             Rocks DB
Deployment Mode:       Single Server
Deployment Strategy:   systemctl start arangodb3
Configuration:               nothing special
Infrastructure:               own (bare metal)
Operating System:        CentOS Linux release 7.7.1908 (Core)
Total RAM in your machine:        24GB
Disks in use:        HDD
Used Package:              default repository

Steps to reproduce
I upgrade from 3.5.3 to 3.6.0 with inplace upgrade. I change the yum repo definitions from 35 to 36. Stop ArangoDB and do yum update, it will update to ArangoDB 3.6.0 and I start with systemctl start arangodb3
Problem:
I notice several minutes (around 3 minutes) server will restart and it happen on every around 3-5 minutes. I check log but I can't found any useful information to report. On the log only there is something like LOCK from previous PID that already dead.
Expected result:
Should be normal and smooth like my previous 3.5.3
My Workaround now is:

I downgrade from 3.6.0 to 3.5.3 and now run smooth again
But the database is already upgraded to 3.6.0 so on the log I see something that mention database version difference, but so far the server running well.

Please help :)

Met this problem today.
Any sub queries will cause arangodb process crash with no error log.
Only log appears is the LOCK pid from previous after restart arangodb.

@arloliu so do you have solution for 3.6.0? I am downgrade to 3.5.3 and that problem gone.

@arloliu : thanks for adding this. You are stating that "Any sub queries" will cause ArangoDB to crash. Is it possible to share a bit more details here, e.g. a few example query strings plus the setup you are using (single server/cluster, community/enterprise version, operating system, docker/kubernetes etc.)?
Thanks in advance!

@jsteemann where to look for detailed log? I want to investigate this as well, is changing log level can help?
@arloliu Do you run sub-query via ArangoDB Web UI or from application?

@sonyarianto : if you get arangod to crash, there will likely not be any log messages available that would help with analyzing the crashes. A crash is unintended, so likely no logging will be involved here.
If the issue is actually subquery-related, what may help is to turn off certain subquery processing globally. This can be done by adding a startup option for single servers or coordinators.
The arangod option is --query.optimizer-rules "-splice-subqueries", the equivalent option for the arangodb starter is `--coordinators.query.optimizer-rules="-splice-subqueries".

Thank you for fixes!
I can also confirm, that version 3.6.1 is running solid when our application is querying it


Hugo Papermod

Hugo Papermod theme is ported as a Hyvor theme

[ ] Remove the Powered by Hyvor & Papermod line in the bottom
[ ] Translation: should not be shown if there are no variants

[ ] Inline code styling. Usually, they need a background color

[ ] Callout style

[ ] Code block styles (padding, highlighted lines should be 100% width, font size, etc.).

[ ] Bookmark style

[ ] Add _comments and _newsletter placeholders. See this

[ ] I think using the default background color of the original theme is better.

[ ] If the post has a featured image, it should be displayed
[ ] Footer navigation links are missing

[ ] Inline code background color (take from the original theme)
[ ] Code block issue: https://hyvor.notion.site/Code-Block-Issue-e7fd09d203244baa984a4be17ab81f33


some css resets removed

Please undo the bootstrap resets change i.e. reinstate them. I realise it's a weird state to leave things in but the first update to this will break things again anyway. So only our own resets become specific, and we leave bootstrap's in. Will deal with those separately.

done


Wrong versions of dependencies?

While installing things through pip, opencv-python and cmake come back as wrong versions. Indeed according to pypi.org there are no
opencv-python==5.1.1
cmake==3.14.0
Wonder if conda has different version name conventions or it's just a mistake in the spec.

Yes, seems that is an error for the environment.yml. Please use the updated environment.yml file for installation. It is also copied here for your convenience.
name: softgym
channels:

defaults
dependencies:
numpy=1.17.2
imageio=2.6.1
glob2=0.7
cmake=3.14.0
pybind11=2.4.3
click
matplotlib
joblib
Pillow=6.1
plotly=2.0
pip:

gtimer
gym==0.14.0
moviepy
opencv-python==<IP_ADDRESS>
Shapely==1.6.4.post2
pyquaternion==0.9.5
sk-video==1.1.10


Windows support

The blocker for Windows support is being able to get the current folder in Explorer, so it can know where to look for a gulpfile. I'm not sure how to find that on Windows.

hey I've just forked to support Windows also https://github.com/fritx/gulp-app

Close?
@fritx made the port to Windows on a repository
Or a pull request is welcome in this repository?

PR welcome :)

Closing as this app is now deprecated.

Closing as this app is now deprecated.


About Generative module and GAN loss

The above is the generative module in the paper.
Can I ask why you applied the x'org part in the GAN loss?
Is it because the training generator is hard without using x'org part?

Yes, it helps to train generator. This part is traditional reconstruction in GAN and AE. Reconstruction allows for better adapting the decoder to the person distribution.


Cache buffers, allow omitting span names, options for not formatting KVs all the time

With this plain error!("banana") can take as little as 200ns (~0 overhead) but it will also lead to no meaningful messages if you have error!(someotherkey), and it will also drop all the KVs too.
Similarly, emitting a span can happen in “just” 1.2µs which is also pretty nice.
Finally, tracy_client::span!() “just works” and produces meaningful trace outputs, which is very nice. I think this one is likely uncontroversial and can be landed as is (see 2nd commit).
Otherwise this is just a code/brain dump to which I don't anticipate returning for a foreseeable future. If somebody/anybody wants to finish this up somehow, I encourage you to do so ^^.

I went ahead and merged the 2nd commit, since improving on it is difficult, others though…


ContentBlock Keys with "-" in them cause the editor to crash

Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Passing a string with a "-" character within it causes the editor to fail when getting the new selection state. It looks like the editor adds a suffix to the content block key (Ex. "key-0-0"), then removes the suffix by splitting on the first "-" character.
That leads to this error when the malformed key is used to retrieve the BlockTree:

What is the expected behavior?
The editor doesn't crash due to specific characters in the key.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
I'm able to repro this in the most recent versions of Chrome and Firefox. We're using v0.10.5 of draft.js.
We're currently getting around this by replacing any "-" characters with another before creating ContentBlocks.

@nayomitchell - thanks for reporting this issue. I think the block keys are intended/assumed to be alphanumeric, though I don't see that documented anywhere.
The recommended way to generate a new block key is using the generateRandomKey method defined in https://github.com/facebook/draft-js/blob/master/src/model/keys/generateRandomKey.js (it converts a random number into a string in base 32, resulting in only characters 0-9 & a-v).
I'll leave this issue open. My recommended fix is adding to the docs to clarify that keys are alphanumeric & that generateRandomKey is recommended.

Hey guys, I would like to work on this :)

@erick2014 given what @niveditc recommended above it doesn't look like anything needs to be validated. It seems like adding a sentence or two to this section of the documentation that explicitly states block keys are alphanumeric and recommends using generateRandomKey to create block keys would be a good approach

#1892 fixed this issue. Thanks for the PR, @flowkraD 👍


The latest sample isn't completed.

The latest sample isn't completed.
// Example of an event
[WMI, guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
Dynamic, Provider("WMIProv"),
locale("MS\0x409"),
Description("Serial Send Event"),
WmiExpense(1)]
class Vendor_SerialSendEvent : WMIEvent
{
// Required items
[key, read]
string InstanceName;
[read]
boolean Active;
Need to post the rest content in here.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a71ac393-9940-cb7e-e254-27839dbed116
Version Independent ID: e961a9a1-a9f0-283b-19d6-dacb738a77b5
Content: WMI Class Examples - Windows drivers
Content Source: windows-driver-docs-pr/kernel/wmi-class-examples.md
Product: windows-hardware
GitHub Login: @tedhudek
Microsoft Alias: tedhudek

Hi @wayyt sorry for the delay.  Trying to find someone who can answer your question.  What is it that you are trying to do?

Hi @wayyt you are correct!  I've updated the sample code.  Change will appear on the doc page in a few minutes, but here's the commit: 7da1ae19da23955a7ca2a245b218d68d65df59a5.  Thanks again for the feedback!


Dialog should allow wrapping content, header, and footer (for example in Suspense or some context)

Description
Currently the API for Dialog does not support an ergonomic way to wrap the full contents of the dialog (header, footer, and body) in a wrapper such as a Suspense boundary, context provider, error boundary etc. These all seem like legitimate use cases!
In particular it is a very common pattern to want to lazy-load the content (header, body, and footer) of a dialog along with providers (eg. relay environment, or other context) only when the dialog is opened. This would require providing a "connected content" (header, body, footer) as a lazy component, while providing a "dumb content" (header, body, footer) as fallback to a Suspense boundary.
Steps to reproduce
This is a simplified example of the very common pattern of wanting to lazy-load a dialog within a suspense boundary
// THIS DOESN'T WORK
const LazyLoadedDialog = React.lazy(() => import('./MyConnectedDialog'));

<Suspense fallback={() => <Dialog title="loading"><Spinner /></Dialog>} />
  <LazyLoadedDialog />
</Suspense>

However the above doesn't work: if one were to wrap the entire dialog in a suspense boundary, the animation on the Backdrop will play as  suspense transitions between the fallback and real dialogs, causing jarring animation between fallback and loaded states.
Desired solution
Separate the Dialog.Window from the Dialog.Contents — Split the Dialog component into two components with separate roles:

Dialog.Window:  simply renders the Portal, Backdrop, and StyledDialog. Receives the role, width, height, position props.
Dialog.Content: renders the content (header, footer, body) and all the other props. Manages state, event handlers etc.

This would provide an API that allows wrapping all content within the Portal, Backdrop, and StyledDialog (Dialog.Window). This Dialog.Window can thus remain stable and open on the page while transitioning between states in a suspense boundary that wraps the Dialog.Content.
This would allow us to do something like:
// MyConnectedDialogContent.tsx
import {Dialog} from "primer/experimental/dialog";
import {useMyExpensiveState, MyExpensiveStateContext} from './MyExpensiveStateContext';
import {MyExpensiveFormThatRequiresStateContext} from './MyExpensiveFormThatRequiresStateContext'

export default function MyConnectedDialogContent({onClose}) {
  return (
    <ExpensiveStateContext>
      <MyDialogContent onClose={onClose} />
    </ExpensiveStateContext>
  )
}

function MyDialogContent({onClose}) {
  const {myExpensiveState,  doMyExpensiveThing, resetState} = useMyExpensiveState()

  return (
    <Dialog.Content
      onClose={() => {
        resetState()
        onClose()
      }
      renderHeader={() => <Dialog.Header>{myExpensiveState.title}<Dialog.Header/>}
      footerButtons={[{buttonType: primary, content: 'Save', onClick:  doMyExpensiveThing}]}
    >
      <MyExpensiveFormThatRequiresStateContext />
    </Dialog.Content>
  )
}

// MySuspendedDialog.tsx
import {useState, Suspense, lazy} from 'react';
import {Dialog} from "primer/experimental/dialog";
import {Spinner} from "primer/react"

const LazyMyConnectedDialogContent = lazy(() => import('./MyConnectedDialogContent'))

function MyFallbackDialogContent({onClose}) {
  <Dialog title="Loading Dialog" onClose={onClose}><Spinner /></Dialog>
}

export function MySuspendedDialog() {
  const [isOpen, setIsOpen] = useState(false);
  function onClose(){
    setIsOpen(false)
  }

  return open && (
    <Dialog.Window> // this just renders the `Portal, `div.Dialog__Backdrop` and `div.Dialog__StyledDialog` so that its stable between suspensions
      <Suspense fallback={<MyFallbackDialogContent onClose={onClose} />}>
        <LazyMyConnectedDialogContent onClose={onClose} />
      </Suspense>
    </Dialog.Window>
  )
}

Version
v36.12.0
Browser
No response

I'm curious if you're able to suspend just the dialog contents, or if you feel like you need to suspend the dialog's title and other content?
Ideally, Dialogs should be present on the page, with a title, to avoid AT users pressing a button and either:

not receiving immediate feedback that a dialog has opened (either because the dialog is not on the page, not open, or there is a boundary waiting to fetch the dialog to show it).
receiving feedback that focus has changed, but not having a title to announce

I'm curious, would you be able to construct a dialog that is always available on the page and the suspense boundary is just the Dialog contents?

The issue is that things like buttons need to be wired up to context that I want to be able to lazy load onto the page.
I do want to be able to provide a fallback header, footer, and content in order to provide immediate feedback (see the first example in the description, or the example in the slack): I just need the ability to lazy load content to swap in for the header, footer, and content.
 It's really the header and footer that need a new API.
Does that make sense @keithamus ?

👋 Hi, I'm catching up after leave and came across this issue.

In particular it is a very common pattern to want to lazy-load the content (header, body, and footer) of a dialog along with providers (eg. relay environment, or other context) only when the dialog is opened. This would require providing a "connected content" (header, body, footer) as a lazy component, while providing a "dumb content" (header, body, footer) as fallback to a Suspense boundary.

@theinterned are there any instances of this pattern required/in progress that you are aware of? If not, can you share more about how/why/when this came up for you? Trying to gather some more context for informed prioritization.

Yes! This came up in the "create issue" dialogue linked from the global nav.
I have an issue to track it here https://github.com/github/web-systems/issues/2061 and there's more details in the PR linked from that issue.

@theinterned thank you! Is that part of the global nav already shipped? If not, do you know if there's a planned date for going live?

It's really the header and footer that need a new API.

@theinterned can you share more about the use case for wrapping the header in Suspense? It seems like the "Create new issue" header would stay consistent, but let us know what we're missing.


⚠ Samsung has degraded performance

In 058efbf, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2428 ms

Resolved: Samsung performance has improved in 43b4498.


feature-request:  retrieve public-key from private-key(pem)

get, or create RSA key-pair and convert  cryptoKey(private) to pem
from this pem(private), can i retrieve public key ?
if not , what  about add such method ...

Hi there, thank you for the suggestion. It is very appreciated!
I just published a new version v1.5.3, which includes support for public key retrieval using the getPublicKey method.
Please see the code below as a reference on how you can retrieve a public key from an RSA-OAEP, RSA-PSS, ECDH, or ECDSA private key.
const keyPair = await crypt.getRSAKeyPair()
console.log(keyPair)

const pemPrivateKey = await crypt.cryptoPrivateToPem(keyPair.privateKey)
console.log(pemPrivateKey)

const cryptoPrivateKey = await crypt.pemPrivateToCrypto(pemPrivateKey)
console.log(cryptoPrivateKey)

const publicKey = await crypt.getPublicKey(cryptoPrivateKey)
console.log(publicKey)

Feel free to let me know if you need any further help.
Best Regards,
Peter Bielak


Add markdown support

What does this change?
With these changes, question texts, answers and result page table support markdown content.
For example,
# Markdown
## A question
> A block quote
A paragraph with *emphasis* and **strong importance**.
[a URL](https://daringfireball.net/projects/markdown/).
### Lists
1. First ordered list item
2. Another item
* Unordered
* Unordered
* [ ] todo
* [x] done
A table:
| Column 1 | Column 2 |
|----------|----------|
| Data 1   | Data 2   |
| Data 3   | Data 4   |

will look like this:

Relates to XI-6337
Decisions
Libraries
I decided to use react-markdown.
It is a widely used React component that takes care of safely rendering the content.
With a plugin to support GitHub flavoured markdown we have the same markdown support as in the xikolo web project.
Styling
I added a neutral background colour to the question text.
Especially rendered markdown is now better readable.

Not sure why the CI fails, it works locally. I'll investigate.

Not sure why the CI fails, it works locally. I'll investigate.
Update: It's the tsc failing, it also does it on main. It may broke with a dependency update.

Solved on main, see https://github.com/christophblessing/quiz-recap/commit/d3709d68ff3b2bf38c2beafe33731c3bc17aa86e


Redesign Solver API, Solver Implementations and Configuration in terms of modern Java

Some input:

dependency injection
method naming
better project structure

Also includes #22

Also implement a solveAsync() again


Discrepancies in scipy.optimize.minimize(method='L-BFGS-B')

This page (http://docs.scipy.org/doc/scipy/reference/optimize.minimize-lbfgsb.html) describes the solver options one can pass to the L-BFGS-B' method of scipy's optimization package.
The docs mention two options for solver tolerance (although only one in the example), the one I would have preffered to use is 'factr', where the solver exits when: (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr * eps (where epsilon is machine precision). However when I run my code is get a warning:
OptimizeWarning: Unknown solver options: factr
So I presumed this option has been deprecated in favour of ftol (not sure why it would be though?). ftol being a specified number (i.e. diff <= n rather than <= n * machine_error).
That's fine by me, however the exit message I get for the solver is
CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
which suggests the L-BFGS-B routine is still using some value of factr which I do not know, and seemingly can't specify.

Yes, factr option got replaced by ftol to be more consistent with other solvers and avoid playing with machine epsilon. The documentation is wrong here and reference to this option should be dropped.

@dlax I'm not sure this is simply a documentation issue as the solver convergence messages also refer to factr, suggesting the value (perhaps a default set internally) is still used over ftol. e.g.
CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH

Line 489 in lbfgsb.py sets factr to be 1e7. There are also docstring references to the option (e.g. line 82)

You should interpret ftol = factr * eps.

Line 489 is dead code.

@pv are you referring to line 250: factr = ftol / np.finfo(float).eps ?
So the tolerance one sets through ftol is used by the code (only converted to a factor of the machine precision)?
This should definitely be made clear in the docs and cleaned up in the code


Part II: Typo

Change from:

As explained earlier, any implementation using a metadata standard is will inevitably become obsolete.

To:

As explained earlier, any implementation using a metadata standard will inevitably become obsolete.

Fixed


Breaking: drop Modulefile support

The goal of this PR is to give it a major overhaul and work with modern dependencies.

This is now ready for review.


fix bazel query

Description: fix bazel query
Risk Level: Low
Testing: built //source/exe:envoy-static
Docs Changes: n/a
Release Notes: n/a
Signed-off-by: Dan Rosen<EMAIL_ADDRESS>

To be honest, I don't actually know if this is correct, or if the @//api/... trick in #5821 is better, or neither. Specifically, I don't know if this change will break anybody using the standalone https://github.com/envoyproxy/data-plane-api.

This should be better than #5821.
/retest


rmetric test failed on my machine

rmetric did not pass the test
======================================================================
FAIL: Loads the results from a matlab run and checks that our results
Traceback (most recent call last):
File "/home/jerry/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/jerry/anaconda/lib/python2.7/site-packages/megaman/geometry/tests/test_rmetric.py", line 72, in test_equal_original
assert_allclose( Gtest, G, tol)
File "/home/jerry/anaconda/lib/python2.7/site-packages/numpy/testing/utils.py", line 1391, in assert_allclose
verbose=verbose, header=header)
File "/home/jerry/anaconda/lib/python2.7/site-packages/numpy/testing/utils.py", line 733, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1.04681e+11, atol=0
(mismatch 0.25%)
x: array([[[  3.104310e+15,   2.125112e+01],
[  2.119583e+01,   5.400388e+01]],
...
y: array([[[  4.421211e+15,   4.985776e+01],
[  5.055786e+01,   5.400388e+01]],
...
-------------------- >> begin captured stdout << ---------------------
('phi.shape = ', (200, 2))
('G.shape = ', (200, 2, 2))
('H.shape = ', (200, 2, 2))
('L.shape = ', (200, 200))
--------------------- >> end captured stdout << ----------------------

Ran 140 tests in 7.220s
FAILED (failures=1)
make: *** [test] Error 1

I just pulled down a fresh clone of the master branch and ran all the test and they all passed.
Can you get a diff between when it passed for you and when it started failing? Nothing in those two recent megest ought to affect the rmetric code or the test function.

weird. I also cloned a fresh master branch.

Yes I have those warnings. They're sparse efficiency warnings when computing the affinity matrix and a warning about the selected eigen solver.
I'm very curious why you seem to get a failure on the rmetric but I'm not getting it...

what blas are u using? I'm using openblas
scipy                     0.17.1          np111py27_blas_openblas_200  [blas_openblas]  conda-forge
numpy                     1.11.0          py27_blas_openblas_200  [blas_openblas]  conda-forge
nose                      1.3.7                    py27_1

I'm using anaconda
Here's the relevant package info from conda installation:
jmcq@spc114:~$ conda list
packages in environment at /home/jmcq/miniconda2:

nose                      1.3.7                    py27_0    defaults
numpy                     1.10.4                   py27_1    defaults
scipy                     0.17.0              np110py27_2    defaults

@jmcq89 okay, i downgrade my numpy to 1.10 which does not use openblas, and the test passed.

Any idea why 1.11 is causing a failure?

Could be openblas, but i'm not sure right now. let's discuss on https://github.com/mmp2/megaman/issues/60