Improve text handling

This should significantly improve the behaviour of the text input element. Only letters, numbers, and symbols should be entered now, and any null values ignored instead of being entered. Because I use Caps Lock a lot, I've also added that as a dummy check to prevent the previous character from being entered - there is probably a better way to handle this, but I can't think of one.

Hi,
There seems to be some corrupt code - no closed brackets and a - sign.
else if (key == kha.input.KeyCode.Return) {
 -		deselectText();
else if (key == kha.input.KeyCode.CapsLock) {

Is this correct?
if ((char != "") && char.charCodeAt(0) >= 32 || char.charCodeAt(0) < 127 || char.charCodeAt(0) >= 128)

I'm not entirely sure how I did that. Been fixed now.
And yes, that piece of code to check the character code is correct. It's meant to ignore the 127th character (DEL key) but allow any symbol beyond it to be input assuming it is a symbol, letter, or number. It might not be the perfect solution, but it works on my end.

Sorry I did not merge directly, pushed as part of https://github.com/armory3d/zui/commit/f7e83e85039339c349df9ffa733edcf51af3f17a. Also filtered out KeyCode.Shift, seems to cause similar trouble as KeyCode.CapsLock. Thanks!


Use normal p2p syncing instead of rpc syncing

RPC syncing is impossible when tip is orphaned. Use p2p syncing with a trusted node instead.

LGTM


Do notation

With coroutines we can implement a Haskell-ish do-notation. Call them "doroutines":
from pymonad.operators.maybe import Maybe, Just, Nothing
from pymonad.tools import curry

@curry(2)
def safe_div(x, y):
    if y == 0:
        return Nothing
    else:
        return Just(x / y)

@do
def something(a, b):
    x = yield Just(a)
    y = yield Just(b)
    divided = yield safe_div(x, y)
    return Just(divided + 10)

first = something(5, 0)
second = something(12, 4)

print(f"{first=}")
print(f"{second=}")

Nothing
Just 13.0

We yield monad values out of the coroutine, and get unwrapped values back. The decorator handles the bookkeeping logic. Here's a rough implementation:
def do(generator):
    def new_func(*args, **kwargs):
        gen = generator(*args, **kwargs)

        def recurse_bind(value):
            return gen.send(value) >> recurse_bind

        try:
            return next(gen) >> recurse_bind
        except StopIteration as e:
            return e.value

    return new_func

The main deficiency here is that we are limited by the Python interpreter's maximum recursion depth of about 1000. I tried to convert it to an iteration but it gave me a headache since we're returning a function each time rather than a value :S.
It currently relies on the generator raising a StopIteration exception to get the return value, which is incompatible with the Either monad which is supposed to capture exceptions and halt their journey up the stack. I see two ways of dealing with this: first, keep the do implementation the same and have the Either monad log all exceptions other than StopIteration; second, create some kind of wrapper/decorator for generators so that they use an Either monad to signal their return value instead of an exception, then alter do so that it exits when it sees this type of error. I think the second one is preferable.
I've only tested it with Maybe so far. I had to edit Maybe so that it doesn't swallow errors as I mentioned in #1. For that I just commented out some parts in the maybe.py file:
    def bind(self: 'Maybe[S]', kleisli_function: 'Callable[[S], Maybe[T]]') -> 'Maybe[T]':
        """ See Monad.bind """
        if self.monoid is False: #pylint: disable=no-else-return
            return self
        else:
            # try:
            return kleisli_function(self.value)
            # except: # pylint: disable=bare-except
            #     return Nothing
...
    def map(self: 'Maybe[S]', function: Callable[[S], T]) -> 'Maybe[T]':
        """ See Monad.map """
        if self.is_nothing(): #pylint: disable=no-else-return
            return self
        else:
            # try:
            return self.__class__(function(self.value), True) # pytype: disable=not-callable
            # except: # pylint: disable=bare-except
            #     return Nothing

I'm not familiar enough with the codebase to figure out a more robust solution yet.

I've been playing with this a bit. There are a few problems with the implementation but I think there are problems with the concept of do-notation in Python more generally. I've made attempts at do-notation in the past and never been particularly satisfied with them. That said, I'm not actually against the idea so if we can find something that works I'll definitely consider it.
With that said, I'll walk you through the problems that I see so far:
First a minor issue. The old version of PyMonad had operators by default but they're very un-pythonic. I've kept them around in the operators sub-package but for general purpose stuff like your 'do' function it's best to stick to the 'bind' instead of '>>' since that will be available  everywhere.
More problematic, this won't work as written for other monads. Consider Writer.
from pymonad.writer import Writer

@do
def log():
    yield do_a(None)
    yield do_a(None)
    return do_b(None)

def do_a(_):
    return Writer(None, 'Doing A, ')

def do_b(_):
    return Writer(None, 'Doing B, ')

print(log())

(None, Doing B, )

Even though the functions don't do anything, I want the full log but this will only give me back the log from the last line of log(). Changing the return to a yield means I end up getting nothing back at all.
We can actually fix that and the recursion problem at the same time.
from pymonad.writer import Writer

def do(generator):
    def new_func(*args, **kwargs):
        gen = generator(*args, **kwargs)

        val = next(gen)
        while True:
            try:
                val = val.then(lambda x: gen.send(x))
            except StopIteration:
                return val

    return new_func

@do
def log():
    yield do_a(None)
    yield do_a(None)
    yield do_b(None)

def do_a(_):
    return Writer(None, 'Doing A, ')

def do_b(_):
    return Writer(None, 'Doing B, ')

print(log())

(None, Doing A, Doing A, Doing B, )

This gives us what we want but we have to ban 'return' from any coroutines that we use with do because using return will end up throwing away the log. A similar problem would happen with State, etc.
Except now that implementation of 'do' won't work with your original example. When we try to divide by zero we get back a Nothing (as expected). The next iteration of the loop then calls 'bind' on Nothing which simply ignores the function passed to it. As a result gen.send() is never called, we never raise StopIteration and we're stuck in an infinite loop.
There are a couple ways we can solve that but neither is ideal.
The first is that we can modify 'do' to check the type of the monad it's working with and if it's a Maybe (or Either) we treat it slightly differently. This is brittle though since any new monads, whether added to PyMonad directly or added by users, might also need special conditions and 'do' becomes a mess and stops being general.
The second solution isn't really a solution, it just looks like one in the right light.
def do(generator):
    def new_func(*args, **kwargs):
        gen = generator(*args, **kwargs)

        val = next(gen)
        next_val = val
        while True:
            try:
                next_val = gen.send(val.value)
                val = val.bind(lambda _: next_val)
            except StopIteration as e:
                return val
            except:
                return next_val

    return new_func

Basically, we pull the gen.send() call out to get the next value and then we bind to a lambda, ignoring the input and returning the next_val. This works exactly the same for the logging example but it would actually fail for the Maybe example because we'd end up with 'divided' being assigned the value None and then attempting to add None and 10, raising a TypeError.
The example seems to work because the final catch-all except clause catches the TypeError and "backs up" to the last valid value and returns that instead. In your example that happens to be Nothing and so we seem to get the correct behaviour. And this is why it's not really a solution. Suppose we do something like this to the log example:
@do
def log():
    yield do_a(None)
    yield do_a(None)
    x = None + 10
    yield do_b(None)

(None, Doing A, )

That's an actual error that needs to be fixed but the program appears to work fine. In actual fact we're getting a truncated log and masking an error, not unlike the problem with Maybe in Issue #1.

More generally, I think do-notation in Python is just inherently problematic.
Do-notation in Haskell gives an imperative-like syntax to chain or monadic binds. It looks imperative but, under the hood, it's actually not.
Python, on the other hand, actually is imperative so what we're trying to accomplish with do-notation is to basically replace Pythons actual imperative semantics with our own. Which gets messy because we have to yield every line in our functions, or run into the problems above.
On the other hand, using the apply, bind, map, and then methods still gives us a way to order our operations while working with Pythons imperative model. The results aren't always as nice as we might like but at least we're not fighting the language quite so hard.
So, for instance, your original example I would probably write something like this:
def something(a, b):
    x = Just(a)
    y = Just(b)
    return (Maybe
            .apply(safe_div).to_arguments(x, y)
            .then(lambda just: just.then(lambda divided: divided + 10))
    )

And actually, if I add a join method (which I should because it's useful for exactly these situations) we could make it a bit cleaner:
def something(a, b):
    x = Just(a)
    y = Just(b)
    return (Maybe
            .apply(safe_div).to_arguments(x, y) # result: Just Just (x/y)
            .join()                                                 # result: Just (x/y)
            .then(lambda divided: divided + 10) # result: (x/y) + 10
    )

This still isn't perfect but it's not bad.
Note that join() isn't implemented (yet) so this example won't actually work if you try it. The call to apply().to_arguments() will result in a Maybe inside of a Maybe: join() unpacks that one level.
Anyway, as I said I'm not actually against do-notation, I'll probably come back to it periodically. I'll leave the issue open for now because I absolutely welcome any further thoughts on the problem.

More generally, I think do-notation in Python is just inherently problematic.
Do-notation in Haskell gives an imperative-like syntax to chain or monadic binds. It looks imperative but, under the hood, it's actually not.
Python, on the other hand, actually is imperative so what we're trying to accomplish with do-notation is to basically replace Pythons actual imperative semantics with our own.

That's fair. The reason I want to be able to use do-notation is monadic IO which composes cleanly with other monads.
There is a library called effect which lets you write purely functional IO code. It has its own do-notation decorator for imperative-looking IO code, which lets you hook into it and interrogate what side effects it's trying to do, and substitute your own fake inputs back in for testing purposes. That's something you can't do with normal Python imperative code.
However, effect's do-syntax is hardcoded to only work with its own effect system, so it doesn't compose with other monads. So you can't use e.g. a monad transformer to combine IO and Error monads.
A Python do-notation that works on arbitrary monads would be quite useful in this context.

I wasn't aware of effect, thanks for pointing that out. I haven't dug into it very deeply but I took a quick look and had some thoughts. I've not testing this with all monads yet so there might be problems but I think this might actually work. I'll detail the implementation in the next comment, for now I'll just talk about the syntax.
One thing I noticed about effect was that the do blocks didn't return functions/generators but actually returned an Effect value, which makes sense since that what a do block should return. So my implementation requires that the coroutine takes zero arguments. You can always wrap it in a function to send it arguments if necessary. The second thing is that, in Haskell, we just return the value and not an already wrapped value. In other words, in Haskell:
do
    x <- Just 1
    y <- Just 2
    return x + y

For that to work we're going to need to know what monad we're dealing with so we end up with something like this. So we get this:
@Maybe.do
def add_1_2():
    x = yield Just(1)
    y = yield Just(2)
    return x + y

print(add_1_2)
print(add_1_2.then(lambda x: x + 1))

Just 3
Just 4

Notice that add_1_2 is an actual Maybe value and we can treat it as such and continue using it with other monad operations.
We can even use your safe_div function from upthread:
@Maybe.do
def div_fail():
    x = yield Just(1)
    y = yield Just(0)
    z = yield safe_div(x, y)
    return z
print(div_fail)

Nothing

We can do a similar thing with Writer:
@Writer.do
def write_1_2():
    x = yield Writer(1, '-got 1-')
    y = yield Writer(2, '-got 2-')
    return x + y
print(write_1_2)

(3, -got 1--got 2-)

Here the return appends an empty string as the message so but we still get the log from the other two Writer values. If we wanted a message we could do this instead:
@Writer.do
def write_1_2():
    x = yield Writer(1, '-got 1-')
    y = yield Writer(2, '-got 2-')
    z = yield Writer(x + y, f'-adding {x} and {y}-')
    return z
print(write_1_2)

(3, -got 1--got 2--adding 1 and 2-)

So far so good. But this also makes it possible to do things like this:
@Maybe.do
def stacked():
    x = yield Just(1)
    y = yield Just(2)
    @Writer.do
    def write():
        z = yield Writer(x + y, f'adding {x} and {y}')
        return z
    return write

Just (3, adding 1 and 2)

So we've got a Writer inside of a Maybe. There aren't proper monad transformers in pymonad so at the moment you'd have to deal with these kinds of values manually but that would've been the case anyway. You can, of course, create values like this manually or using the monad methods without a do-syntax but this is not horrible, at least from my perspective.

The implementation is actually simple and not too different from what we had up above:
In the monad module:
class Monad:
    @classmethod
    def do(cls, coroutine):
        return do(cls, coroutine)

    # other monad methods, etc...

def do(cls, coroutine):
    def _do_internal():
        gen = coroutine()
        val = next(gen)
        next_val = val
        while True:
            try:
                next_val = gen.send(val.value)
                val = val.bind(lambda _: next_val)
            except StopIteration as final_result:
                return val.bind(lambda _: cls.insert(final_result.value))
    return _do_internal()

Can't it just be
def do(cls, coroutine):
            def _do_internal(*args, **kwargs):
                gen = coroutine(*args, **kwargs)

So that the coroutine can take arguments?

You could. My thinking is that if you do that though then what you get back is a new function/generator and not a Maybe (or whatever) value. Or a function/generator wrapped in a monad. Not really sure which is best.
You can always wrap the do block to inject values.
def a_function(a, b):
    @Maybe.do
    def do_block():
        x = yield Just(a)
        y = yield Just(b)
        return x + y
    return do_block

Maybe that's less clear/convenient though.
We'd also have to change the return value from do:
@classmethod
def do(cls, coroutine):
   # ...
   return _do_internal   # was return _do_internal()

Otherwise we can't actually pass it arguments at all. If we change nothing else then this doesn't work quite right.
@Maybe.do
def stacked():
    x = yield Just(1)
    y = yield Just(2)
    @Writer.do
    def write():
        z = yield Writer(x + y, f'adding {x} and {y}')
        return z
    return write

print(stacked)
print(stacked())
print(stacked().bind(lambda g: g())

<function Monad.do.<locals>._do_internal at 0x10d0fc268>
Just <function Monad.do.<locals>._do_internal at 0x10d0fcb70>
(3, adding 1 and 2)

The original seems clearer to me but I don't have a clear idea of your use case so your idea might be better. Do you have an example of how you want to use it by any chance?

Did anything ever come of this? I'd like to use do-notation rather than deeply nested if/else or a huge flatMap chain of lambdas. I found this: https://github.com/miiohio/ziopy but not particularly enamored with it given all the ZIO-specific stuff and the lack of clarify around how the do magic actually works (mostly the ZIO naming).

??

Oh hey, sorry, I somehow missed your previous comment. But to answer your
question: unfortunately no, nothing ever came of it. I've not done much
with pymonad at all for quite a while because I've just not had the time or
energy to do so.
The only  other thought I've had but not really explored is somehow using
the 'with' statement to create a monad context to work within. But, like I
said, I haven't really explored it.
On Mon, Mar 6, 2023 at 11:40 AM jleonard-r7 @.***>
wrote:

??
—
Reply to this email directly, view it on GitHub
https://github.com/jasondelaat/pymonad/issues/2#issuecomment-1456486851,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALD4GMTNYDI5TNKOFD3VQ6TW2YHQLANCNFSM4RST5VTQ
.
You are receiving this because you commented.Message ID:
@.***>

Yea, something like the ExitStack could work but the problem would be getting the individual bindings. Otherwise, a normal context per binding would still result in "nesting hell" (which is the whole syntactic problem i'm mainly trying to solve).

Yeah, that's pretty much the problem I run up against any time I take
another look at this idea. There's always some sort of trade-off that makes
it more of a pain than it's worth. I'm reasonably convinced that there's
just not a good solution to the problem unfortunately.
On Mon, Mar 6, 2023 at 2:14 PM jleonard-r7 @.***> wrote:

Yea, something like the ExitStack could work but the problem would be
getting the individual bindings. Otherwise, a normal context per binding
would still result in "nesting hell" (which is the whole syntactic problem
i'm mainly trying to solve).
—
Reply to this email directly, view it on GitHub
https://github.com/jasondelaat/pymonad/issues/2#issuecomment-1456803507,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALD4GMUMCGBZ5KH5TK2DW3LW2YZS3ANCNFSM4RST5VTQ
.
You are receiving this because you commented.Message ID:
@.***>

Well, at least not until this is passed:
https://peps.python.org/pep-0638/

Indeed. Wasn't aware of that PEP, thanks for pointing it out. I guess it's
true, everything really does become LISP sooner or later!
On Mon, Mar 6, 2023 at 3:16 PM jleonard-r7 @.***> wrote:

Well, at least not until this is passed:
https://peps.python.org/pep-0638/
—
Reply to this email directly, view it on GitHub
https://github.com/jasondelaat/pymonad/issues/2#issuecomment-1456909695,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALD4GMWM5ND56DW4KQYDAOLW2ZA27ANCNFSM4RST5VTQ
.
You are receiving this because you commented.Message ID:
@.***>

Well except that LISP’s homoiconocity would come in really nicely for this stuff.
But yea I’ve long considered these scripting languages to be mere imperfect reflections of LISP.

I implement a do decorator that works for a general object that implements a flat_map or bind method based on AST manipulation.
The following nested code runs (even) without monad transformers:
from donotation import do

from pymonad.maybe import Just
from pymonad.writer import Writer

pymonad_do = do(attr='bind')

@pymonad_do
def stacked():
    x = yield Just(1)
    y = yield Just(2)

    @pymonad_do
    def inner_write():
        yield Writer(x + y, f'adding {x} and {y}')

    return inner_write()

# Output will be (3, adding 1 and 2)
print(stacked())

https://github.com/MichaelSchneeberger/donotation/tree/main
Let me know what you think.


how to know Upsert is insert or update

maybe i can Register Callback???

I've not used Upsert, but say you have the model:
type Foo struct {
  gorm.Model

  FooID string
  OtherField string
}

You can achieve this by first doing an update with a where condition, then checking to see if the update affected anything. If it didn't you know you will have to insert a record:
func upsert(db *gorm.DB, foo *Foo) (wasUpdate bool, err error) {
	updates := db.Model(foo).
		Where("foo_id = ?", foo.FooID).
		Updates(foo)
	if updates.RowsAffected == 0 {
		err = db.Create(foo).Error
		if err != nil {
			return
		}
	} else {
                wasUpdate = true
        }
        return
}

I've not used Upsert, but say you have the model:
type Foo struct {
  gorm.Model

  FooID string
  OtherField string
}

You can achieve this by first doing an update with a where condition, then checking to see if the update affected anything. If it didn't you know you will have to insert a record:
func upsert(db *gorm.DB, foo *Foo) (wasUpdate bool, err error) {
	updates := db.Model(foo).
		Where("foo_id = ?", foo.FooID).
		Updates(foo)
	if updates.RowsAffected == 0 {
		err = db.Create(foo).Error
		if err != nil {
			return
		}
	} else {
                wasUpdate = true
        }
        return
}

Of course this can be achieved, but you must lock the table like for update to ensure atomic。 I test upsert,  when db.RowsAffected = 1 is insert,db.RowsAffected = 2 is update。 But I am not sure if it is correct

https://gorm.io/docs/create.html#Upsert-On-Conflict

use xmax


"impure" ModelErrorInterface.call()

In computer programming, a pure function is a function that (roughly) has no side-effects and, given the same arguments, has the same return value. The benefit is that those functions are easy to reason about, do not require much knowledge of their context and are easy to test. An example would be the obvious
error = model_error(parameter_list)
In our implementation, however, we do
model_error.parameter_list[...] = something...
error = model_error()

You need to know that every model error has a member parameter_list
Another function, like latent.update(...) here, may actually change that list without you expecting/noticing it.

Very unintuitive.
I honestly do not know why I chose the impure version. One reason could have been the distinction between the (implementation-wise) completely different (!!!) methods ModelErrorInterface.__call__ and VariationalBayesInterface.__call__.
Anyways, I'll try to revert that to the pure version.

The main issue is to think about "Who owns the parameter list?". Currently, there is exactly one parameter lists per model error and it is also stored at the model error.
A purely programmatical change would be to just keep a single parameter list per model error, but store it at the inference problem. Therefore, instead of the member self.parameter_list, the model error would need a self.generate_parameter_list() method. Or the user defines it:
def InferenceProblem.add_model_error(self, model_error, parameter_list=None):
   if parameter_list is None:
      parameter_list = model_error.generate_parameter_list()
   ...

Is anyone willing to implement that? Technically, this is a rather easy task (I think), but would provide great insights in the library.

Just a remark, maybe it would be better to initialize an empty list when no parameter list is given. IMO that is the standard case, when all parameters are latent. Otherwise, the user can generate the parameter list directly before initializing the inference problem (or in the constructor by calling the generate_parameter_list from the model error). But this does not need to be a standard interface.

Just one additional comment, I would also suggest to remove the parameter list being stored but rather provide a function that transforms the global vector into a dict of dict (for each model error a parameter list). For the generation, I would also suggest to simplify the interface such that
p.define_shared_latent_parameter_by_name("B")

is the replaced by
p.define_latent_parameter("B")

that automatically assumes this is a global, shared variable and named the same in all model errors. If someone wants the rather special case of local variables, they should provide a model error and eventually the local name this global latent variable is mapped to (e.g. in case the inference guy defines E, and one forward model requires YoungsModulus and another one Emodul).

Sounds good. The only issue is for vector valued parameters, where the dimension of "B_me" is unknown to the latent parameters. IMO that information must come from the model error, maybe in an (optionally provided) MEInterface.get_shape(self, name) that can also be used to check if B_me is a parameter of the model error in the first place.
So, unless specified otherwise via get_shape, all latent parameters are scalars, which should be a reasonable default case.

@aklawonn and I will have a pair programming session next week (with face mask and near an open window...) to try to solve this issue.

Maybe I am too focused on the current implementation and my applications, but I would state:

ModelError has to somehow inform the user or the library (for checks) what the needed parameters are.
Some of those parameters have really reasonable default values (e.g. some offset=0) that no one needs to know about, unless specifically declared as latent
In experiment 1, a parameter "E" could be latent. In experiment 2, it is deterministic and I want to set it directly via the model_error, not the inference problem.

Based on that, I'd say the model error must either have a parameter list as member (that the user can modify), or provide some kind of get_parameter_list() method. The latent.update(numbers) is replaced with latent_parameter_lists = latent.create_latent_parameter_lists(numbers), where latent_parameter_lists is dict{model_error_key, ParameterList}. Then, for each model error -- identified by model_error_key -- this parameter list with only the latent parameters is passed to the model error.
Within the model error, there must be something like:
class MyModelError:
# ...
    def __call__(self, latent_parameter_list):
        actual_parameter_list = join(self.parameter_list, latent_parameter_list)

In total, the model error still has a parameter list, but now there is not a single one, but three :yum:

I would say in the default setting, the model error should not have a parameter list. That said, all the latent variables are passed to the model error in the call routine. If the users wants to store additional stuff in there, I don't see any reason why we should prevent this, and that joining the list can also be done. In this case, the user would have to overload the call function, but the standard model_error call method should just forward the passed parameter list to the forward model.


data import fails with 'No data to import. Is the chosen format correct?'

Describe the bug
Data import fails with 'No data to import. Is the chosen format correct?' The data format seems correct, however when clicking on the data file, the website generates an error "Not Found. The requested resource was not found on this server."
To Reproduce
Steps to reproduce the behavior:

Import a data file
Click on the data file name after importing (see screenshot)
Observe "Not found error"

Expected behavior
Data file should be available after importing
Screenshots

Additional context
It is not clear whether this is really a problem with the data format, or somehow the system does not find the uploaded file.

There are two problems here:

Error message indicating that the upload failed. This might be for a number of reasons, and I agree that the message is not very informative. Even if the format object is correct, it might not have any variable associated with it. For that you need to create a Classification, linking one or more variables with a format. That you have this problem points to a need for more clear error messages and a more detailed HowTo in the documentation for uploading data.
The file cannot be downloaded because Django in production, by default, prevents from downloading raw data files for security reasons. They need to be served in a different way. If downloading the raw data files is a thing, I'll create an issue about that.

To be addressed in:

#333
#334

Data import works fine after generating a classification


Remove cassandra dep and read from postgres and code points

@ggdhines can you share some code links on where to switch the db reader dep in the codebase?

In aggregation_api.py, there is a call to the function cassandra_annotations - the function is at https://github.com/zooniverse/aggregation/blob/b31daa9bcbf3711b009bf125c825041c8db3f429/engine/aggregation_api.py#L381 - replace the code there with a call to postgres. cassandra_annotations is called at https://github.com/zooniverse/aggregation/blob/b31daa9bcbf3711b009bf125c825041c8db3f429/engine/aggregation_api.py#L1711 The actual call to query the cassandra db is at https://github.com/zooniverse/aggregation/blob/b31daa9bcbf3711b009bf125c825041c8db3f429/engine/aggregation_api.py#L402 and it is a simple select statement - there is stuff around that line to have the query be done concurrently which can be ignored if you're using postgres.
Annotations are copied from postgres to cassandra using migrate https://github.com/zooniverse/aggregation/blob/b31daa9bcbf3711b009bf125c825041c8db3f429/engine/aggregation_api.py#L1164 which you can basically just cut out. migrate also returns a list of subjects to aggregate over. You could do this with a simple query in postgres to get all the annotations since you last ran the aggregation and get those corresponding subjects. (I should try to do this anyways before I leave since that would really simplify things.)

thanks looks good.


Stop intercepting closed/cancelled server calls

There are sporadic occurrences of "IllegalStateException: call already closed" in server logs. This PR fixes https://github.com/Alluxio/alluxio/issues/8857 by making sure we don't close an already closed or cancelled server call.

Merged build finished. Test PASSed.

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

@bf8086 PTAL.

Merged build finished. Test PASSed.

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

alluxio-bot, merge this please


Inline statement event handler should be 'return'

What problem does this feature solve?
See @click="doSomething('params')", the generated code will be function($event){doSomething('params')}, no return in it. Normal syntax with method name only has the return. So I think  consistent  may be better.
And the use case is child component may want to manually call the event handler to get the result, not through this.$emit
What does the proposed API look like?
No added api

@sirlancelot You are right. So I use this.$listeners.click($event)

@sirlancelot Maybe $emit() can return the result array if there are multiple handlers? Anyway, that's another topic😀

Duplicate of https://github.com/vuejs/vue/issues/7628


get / setLabelString on CCTextInputNode

you kinda need this if you want to actually use a CCTextInputNode

added with correct corresponding symbol in android gd.


[Enhancement] Broken link in documentation.

Search before asking

[x] I had searched in the issues and found no similar issues.

Description
Please let me know whether the link is not working on my laptop or is broken. description can be found below,

Link: https://doris.apache.org/community/how-to-contribute/
Solution
No response
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Will you submit a pr and fix it?

yes, sure! I'll be happy to submit a pull request and fix it,


Can't find any introduction about "scales" option in the document

Expected Behavior

I want to learn about "scales" option
Current Behavior

but in the "configuration" part of the doc,  I  only find animation、layout、legend、title、tooltip and elements. Don't know where to find "scales" option
Possible Solution

hope you guys could tell me where to find information about "scales" option, thanks!
Steps to Reproduce (for bugs)

Context

Environment

Chart.js version:
Browser name and version:
Link to your project:

Axes (and its sub-categories)

Look for Axes (and its sub-categories)

@pundoo has the correct answer


Doc block info on hover

Would it be possible to get doc block information on hover, like in the following screenshot?

Method and param descriptions etc.

I've taken a short look at this, in hoverProvider.ts, the contents value is what is being displayed on actual hover events.
I'm not entirely sure where the documentation blocks are stored, but I do believe they're available somewhere in any of the variables in hoverProvider.ts's scope.
All that's needed afterwards is to just add it to the contents array.


chore: add alxckn to the org

@alxckn has expressed interest in joining the OpenFeature org. Alexandre has contributed to the Ruby SDK and the Ruby contribs repo.

https://github.com/open-feature/ruby-sdk/pulls?q=author%3Aalxckn+
https://github.com/open-feature/ruby-sdk-contrib/pulls?q=author%3Aalxckn+

@alxckn please signal your interest by adding 👍 or approving this PR. After it's merged, you receive an email inviting you.

@beeme1mr thanks for sponsoring and indeed I'd be glad to join the community 😊


Add eduvulcan home imporvements

Add login button in home
Hide eduVulcan features
Hide eduVulcan app download links
Hide eduVulcan banner
Hide maziaj

Now looks good! :)

May I see how it looks like on desktop?

Now looks good! :)

May I see how it looks like on desktop?

Now looks good! :)

May I see how it looks like on desktop?

Whatever is going on with the alignment of the element under the button, it needs to be fixed too (@Marioneq4958)

Now looks good! :)

May I see how it looks like on desktop?

Whatever is going on with the alignment of the element under the button, it needs to be fixed too (@Marioneq4958)

Fixed :)


Remove MSEDataConsistency

Closes #402

👍
I would keep the names as mse, i.e.
mse = L2NormSquared(....)
Furthermore, I would change the default of divide_by_n to True. Thinking a bit about it, there are almost no use case where it is not better to divide.

pre-commit.ci autofix


Angular-cli@Webpack: error when creating a module

Please provide us with the following information:

OS?  Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 7 - 64bits

Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:
c:\Users\kborra\web\pp>ng --version
angular-cli: 1.0.0-beta.11-webpack.8
node: 5.4.0
os: win32 x64

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
Created the app with the CLI. I added bootstrap and jquery to angular-cli.json.
The error only happens when I tried ng g module report.

The log given by the failure. Normally this include a stack trace and some
more information.
c:\Users\kborra\web\pp>ng g module report
installing module
create src\app\report\report.module.ts
installing component
create src\app\report\report.component.css
create src\app\report\report.component.html
create src\app\report\report.component.spec.ts
create src\app\report\report.component.ts
Cannot apply a change to a different path.
Error: Cannot apply a change to a different path.
at MultiChange.appendChange (C:\Users\kborra\AppData\Roaming\npm\node_modules\angular-cli\packages\ast-tools\src\change.ts:41:19)
at C:\Users\kborra\AppData\Roaming\npm\node_modules\angular-cli\packages\ast-tools\src\change.ts:32:86
at Array.forEach (native)
at new MultiChange (C:\Users\kborra\AppData\Roaming\npm\node_modules\angular-cli\packages\ast-tools\src\change.ts:32:45)
at C:\Users\kborra\AppData\Roaming\npm\node_modules\angular-cli\packages\ast-tools\src\ast-utils.ts:227:16
at lib$es6$promise$$internal$$tryCatch (c:\Users\kborra\web\pp\node_modules\es6-promise\dist\es6-promise.js:362:16)
at lib$es6$promise$$internal$$invokeCallback (c:\Users\kborra\web\pp\node_modules\es6-promise\dist\es6-promise.js:374:17)
at lib$es6$promise$$internal$$publish (c:\Users\kborra\web\pp\node_modules\es6-promise\dist\es6-promise.js:345:11)
at lib$es6$promise$asap$$flush (c:\Users\kborra\web\pp\node_modules\es6-promise\dist\es6-promise.js:119:9)
at nextTickCallbackWith0Args (node.js:456:9)
at process._tickCallback (node.js:385:13)

Mention any other details that might be useful.
I´m using RC6. I don´t know if its a real error ou just an error message with no impact.

Thanks! We'll be in touch soon.

I've also experienced the same error when executing ng g c MyComponent. I noticed that I had to remove MyComponent from app.module.ts  since it was previously created and the angular cli automatically generated the imports and added it to declaration.

@Brocco can you have a look?

@kassimorra & @chozzz have you been able to reproduce this issue with the latest version of the CLI (currently beta15)?
There have been improvements surrounding adding new generations to modules since reported.
I am closing this for now, but if you're still experiencing an issue comment here and I can reopen the issue.

Hi @brocco.
I'm using the currently version and it works nice.
Thanks
Kassim


Write a set of code solutions: "php mysql example" (php-mysql)

Please write code solution for this topics:
php mysql example (technology: php-mysql)
Fast way
Just write the code solution(s) in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments explain solution.
Link to this issue in comments of pull request.

How to get the number of affected rows in a MySQL using PHP?
Inserting data to MySQL using PHP
How to alter a table in a MySQL database using PHP?
How to install MySQL extension for PHP?
How to begin MySQL transaction in PHP?
How to store a BLOB in a MySQL database using PHP?
How to perform a bulk insert in a MySQL database using PHP?
How to bind parameters in a MySQL database using PHP?
How to perform a batch update in a MySQL database using PHP?
How to store a boolean value in a MySQL database using PHP?
How to connect to a MySQL database using PHP?
How to create a table in a MySQL database using PHP?
How to count the number of resulting rows in a MySQL database using PHP?
How to create a database in a MySQL database using PHP?
How to create a connection pool in a MySQL database using PHP?
How to store a datetime value in a MySQL database using PHP?
How to install MySQL driver for PHP?
How to delete data from a MySQL database using PHP?
How to compare datetime in MySQL and PHP?
How to convert MySQL datetime to string in PHP?
PHP and MySQL usage example
How to escape a string for MySQL in PHP?
How to execute MySQL query in PHP?
How to install the PHP MySQL extension on Ubuntu?
How to get query error message in PHP MySQL?
How to insert an emoji into MySQL table in PHP?
How to fetch data from MySQL in PHP?
How to fetch an associative array from MySQL in PHP?
How to get the last insert ID in PHP MySQL?
How to get a single value from query in PHP MySQL?
How to list tables in PHP MySQL?
How to get table column names in PHP MySQL?
How to hash a password in PHP and MySQL?
How to check if a record exists in PHP and MySQL?
How to insert data into a MySQL database using PHP?
How to insert an array into a MySQL database using PHP?
How to insert a date into a MySQL database using PHP?
How to check the result of an insert in PHP and MySQL?
How to use an IN query in PHP and MySQL?
How to join tables with PHP and MySQL?
How to escape JSON in PHP and MySQL?
How to get a key-value array from a MySQL database using PHP?
How to keep a connection open in PHP and MySQL?
How to use the LIKE operator in PHP and MySQL?
How to list databases in PHP and MySQL?
How to run multiple queries in PHP and MySQL?
How to use multiple prepared statements in PHP and MySQL?
How to insert a null value in MySQL using PHP?
How to check if a value is not in an array using PHP and MySQL?
How to order by a column in MySQL using PHP?
How to order by a column in ascending order in MySQL using PHP?
How to create pagination in MySQL using PHP?
How to prepare a statement in MySQL using PHP?
What port to connect to MySQL from PHP?
How to call a stored procedure in MySQL using PHP?
How to get the error message for a MySQL query using PHP?
How to return multiple rows as an array in MySQL using PHP?
How to get the first row of a result in MySQL using PHP?
How to reconnect to MySQL using PHP?
How to replace a string in MySQL using PHP?
How to create an SSL connection to MySQL using PHP?
How to create a socket connection to MySQL using PHP?
How to use MySQL transactions in PHP?
How to export data from MySQL to Excel using PHP?
How to set a timeout for MySQL query in PHP?
How to convert a MySQL timestamp to a datetime in PHP?
How to generate a UUID in MySQL using PHP?
How to change database in MySQL with PHP?
How to use a MySQL union in PHP?
How to write an update query in MySQL using PHP?
How to use utf8mb4_unicode_ci in MySQL with PHP?
How to update to null value in MySQL using PHP?
How to get the version of MySQL using PHP?
How to use a variable in a MySQL query using PHP?
How to output XML from MySQL using PHP?
How to set the time_zone in MySQL using PHP?


br_delay: add new output port out_stage (#79)

Adds a new output port "out_stage" which includes the output of each stage in a delay chain. This allows the module to be used as a simple delay element or as a shift register.
Note that out_stage[0] == in, out_stage[NumStages] == out.
fixes #79

Did you mean to close this @tbunker-openai ?

Did you mean to close this @tbunker-openai ?

nvm I see you have another PR 🤦


Not compatible with High-Performance Order Storage

Plugin version
4.2.22
WooCommerce version
8.9.2
WordPress version
6.5.4
PHP version
8.2
What went wrong?
With a newly setup webshop that automatically setups for High performant orders, Myparcel does not work anymore.
Reproduction steps

setup new webshop with high performant orders enabled
setup myparcel
see that metaboxes on order details and barcode columns are not rendering.

Relevant log output
No response
Additional context

From WooCommerce 8.2, released on October 2023, High-Performance Order Storage (HPOS) is officially flagged as stable and will be enabled by default for new installations.

https://woocommerce.com/document/high-performance-order-storage/
I would expect such a big new feature would be supported by this plugin after being stable and default for so long. I just wasted so much time debugging this.

Very sad indeed. I updated to 4.23.0 and read what's new, I first saw the word HPOS and was happy, only to find out it adds a warning it doesn't work with HPOS. How could it not have a warning before and still not work with HPOS?  😞

Unfortunately, we do not support HPOS with version 4.23. However, we do support HPOS with our beta plugin, which you can download via our GitHub page (v5.0.0-beta.8)
This beta version is a completely new plugin, which is why we are cautious about making this version live. Over the past few months, we have been working hard to make this beta as stable as possible.
We encourage you to test the beta plugin and share any feedback with us so we can further optimize the plugin.

HPOS is supported in v5.0.0.


Update data prep script for annotations

The script for munging the compliance test data needs to be updated to support the variant annotation test data.

@dcolligan would you mind taking a look to see if this has been made obsolete by the repo manager?

This is scripts/prepare_compliance_data.py, right?
As of right now, that script seems to do several things that the repo manager does not do.  The repo manager does not modify any bioinformatics files, it just copies them around.  But the script seems to compress files, write headers, index files, etc.
Perhaps we will add these features to the repo manager in the future, but at the moment we can't swap in the repo manager to completely replace the functionality in the script.

In any event the repo manager will not make this script 'obsolete' ... the script (at some point) will need to import the repo manager library and use its methods to move data from the test-data directory to another directory.

Closed by removing the need for JSON sidecar of Variant Annotation sets in server and changing naming structure and adding sequence ontology text to compliance test-data.
https://github.com/david4096/compliance/commit/9cfaffd31e5dffc1de4a5932ed50dfa8c4cdb319


Prevent chansrv input channels being scanned during a server reset

A server reset is used to implement  a client resize.
Currently this is done by sending a TS_DEACTIVATE_ALL_PDU and then resending capabilities with TS_DEMAND_ACTIVE_PDU by libxrdp_reset()
It's possible at the moment for channel data to be read from chansrv and sent to the RDP client between these two messages. This is because at the end of xrdp_mcs_send() for the 'deactivate all' we call xrdp_mcs_call_callback(). If there's pending chansrv data it's sent to the client.
This appears to be at odds with MS-RDPBCGR <IP_ADDRESS>.1 which calls for the client to disable all its input handlers.
This is also what FreeRDP 2.0.0 appears to do. If a message is received between TS_DEACTIVATE_ALL_PDU and TS_DEMAND_ACTIVE_PDU for a channel other than the MCS global channel an error is reported.
This PR disables the chansrv input checks while a libxrdp_reset() is in progress.

As my quick reading of the specification, the logic looks good to me but I concern some trivial points.

I had a think over the weekend, and there may be better ways to do this.
I could push the logic down into the MCS layer which would move it into libxrdp rather than the xrdp process itself. That might make it a bit cleaner.

Yup, handling in libxrdp layer would be nice.

OK - I'll refactor it down there, retest and update the PR.
Thanks.

Changes now implemented in the session layer, which I'm happier with.
The variable names should be clearer now. Happy to change if necessary.

LGTM now but let me some more time to test.


Scala reflection is broken in shaded JARs

When packages get renamed during shading, no changes are made to any the ScalaSignature annotations in those JARs.  The result is that Scala reflection will fail silently.
I imagine the fix would be to read and rewrite the ScalaSignature annotations along with the bytecode changes made by JarJar.  It it easy enough to decode the signature using scalap and rewrite the annotation using ASM, but I didn't see any way to modify and re-pickle the signature without extracting pieces of scalac.

I've started a PR on this:
https://github.com/sbt/sbt-assembly/pull/393

I believe this is fixed in 1.1.0

This was fixed in 0.15.0, and 1.1.0 improves on that - https://github.com/sbt/sbt-assembly/releases/tag/v0.15.0


instantsearch.js and AMD (requirejs & almond)

Does instantsearch provide support for AMD?
The reason I am asking this is that in my implementation using requirejs and almond, I am getting the following error from Almond: Uncaught Error: See almond README: incorrect module build, no module name
Here is an explanation of it.
In the instantsearch.js code, the module is defined here:
if(typeof exports === 'object' && typeof module === 'object')
        module.exports = factory();
    else if(typeof define === 'function' && define.amd)
        define([], factory);
    else if(typeof exports === 'object')
        exports["instantsearch"] = factory();
    else
        root["instantsearch"] = factory();

If I modify this and give define([], factory); a name like define('instantsearch', [], factory); then everything is fine.
Has anyone had success implementing instantsearch using Almond.js?

Hi @Giovanni-Mattucci I guess the option we should use then in webpack (we use webpack to build) is this: http://webpack.github.io/docs/configuration.html#output-umdnameddefine
What do you think?
Also, do you think you could try to build not from the dist file but from the raw sources (available in npm)?

@vvo that is in the right direction. Not naming the define() is the right way to go, I believe it is necessary for webpack, and has caused people some grief: https://github.com/webpack/webpack/issues/989
They fixed this when using webpack with the command you mentioned.
I just need to figure out how to have my compiled js detect unnamed defines, and give them names at compile. I am not sure how to do this using requirejs. :(
In the future I will be migrating to webpack but for now I am using requirejs + almond.
I've yet to try building from the source.

Unfortunately I've had to resort to doing this for the time being:
requirejs: {
      compile: {
        options: {
          baseUrl: '<%= config.jsDir %>',
          mainConfigFile: '<%= config.jsDir %>/config.js',
          name: 'main',
          out: '<%= config.distDir %>/<%= config.jsDir %>/main.js',
          paths: {
            'jquery': 'empty:'
          },
          optimize: 'uglify2',
          generateSourceMaps: true,
          preserveLicenseComments: false,
          onBuildRead: function (id, path, contents) {
              if (id.indexOf('instant-search') === 0) {
                  return contents.replace(/define\(\[\], factory\)/i, 'define("instant-search", [], factory)');
              } else {
                  return contents;
              }
          }
        }
      }
    }

I'm doing a string replace on build of instantsearch's define().
Eventually when I migrate to webpack this will be a non-issue, but I wish I could figure out how to make requirejs notice instantsearch and name it appropriately on build.

@Giovanni-Mattucci I was more proposing you to name the module in our UMD build for AMD, but maybe that's not the right choice? I must say I never use AMD so I blindy trust webpack to do the right thing.. :D

Not naming the define() is the right way to go

I thought what you wanted was us to NAME it, I wonder if naming our AMD define by using http://webpack.github.io/docs/configuration.html#output-umdnameddefine inside our own build step would make it easier for you? And also if it would break any existing website.

@vvo well naming it would fix my current implementation, but that would make your module less portable so says require.js documentation :) http://requirejs.org/docs/api.html#modulename generally the optomization tool should do this, but in my case it wasn't adding names for unnamed modules.
With many people moving to webpack though, in the future I'll be using that as well and this will be less of an issue. My above solution is working though going forward :)

Nice! Thanks for getting back here


Feat(topology_generator): Added module to generate the topology diagram using structured config

Change Summary

Added module to generate the topology diagram using structured config
Related Issue(s)
NA
Component(s) name
arista.avd.topology_generator
Proposed changes

Added new module and action plugin to generate the topology diagram.
Added a playbook in roles/topology_generator/tasks to generate the topology diagram
Added a hard-coded structured_config1 directory inside roles/topology_generator/tasks only
Generated svg output file will be visible inside roles/topology_generator/tasks
The location of structure_config and switch.jpg is temporary. It's not decided yet.

How to test

Added a playbook inside roles/topology_generator/tasks. Run the following command to test
$ ansible-playbook generate_topology.yml
Checklist
User Checklist

N/A

Repository Checklist

[x] My code has been rebased from devel before I start
[x] I have read the CONTRIBUTING document.
[] My change requires a change to the documentation and documentation have been updated accordingly.
[] I have updated molecule CI testing accordingly. (check the box if not applicable)

@hamptonmoore Related to the work you've been doing

@mayurgs34 can we close this PR? I believe this has been replaced with #2694

Closing stale PR. Linked this from internal task issue.


Cronjob checker

The cronjob-checker reaches out to a specified cronjob in a given namespace and lists events. It then ranges over the events for a specified reason. If there is an event with the specified reason in the given cronjob it will alert kuberhealthy. Issue #650

just a few comments! wondering if we can expand this to check on all cronjobs in a given namespace maybe? instead of just checking one cronjob at a time?

Include the cronjob name that is failing in the kuberhealthy error report
remove the reason env var and hard-code it into place (for now)
consider removing namespace env var reference in the readme, because it is automatically set to the namespace the check gets deployed into

remove all namespaces from flag spec files in readme
add specs to helm chart so that this deploys into the helm-specified namespace
change clusterrolebindings to rolebindings


jump_search

Added a jump search algorithm

[x] Read the contribution guidelines
[x] Added unit tests (or unit tests have already been added)
[ ] Updated the Contents

@daylanvig Thank you for contributing. The project is currently being reorganised (on the reorganise branch) due to which there are a few changes that I would like you to make:

Remove the main() function and convert the file into a header file (this will promote code reuse).
Move the header file to C++/include/algorithm/search/jump_search.hpp.
Drop .test from the unit test's filename, and remove the #define at its beginning.
Create a new PR towards the reorganise branch.


[Feature]:Add functionality to redirect "Start Solving" buttons to corresponding LeetCode problem pages

Feature Name
Add functionality to redirect "Start Solving" buttons to corresponding LeetCode problem pages
Feature Description
Currently, the "Start Solving" button for each problem in the Practice section is static and does not perform any specific redirection. This feature request aims to enhance the user experience by making each "Start Solving" button redirect to the corresponding problem on LeetCode. For example, clicking "Start Solving" for Problem 1: Two Sum should direct the user to the Two Sum problem page on LeetCode.
Motivation
Adding the functionality to redirect users to LeetCode problem pages from the "Start Solving" buttons would greatly enhance the usability of Algo. Currently, users may have to search manually for the problem on LeetCode after selecting it in the Algo platform, which can be time-consuming and disruptive to their workflow.
Implementation Suggestions (Optional)
No response
Feature Type
Performance Optimization
Does this feature require additional resources?

[ ] Additional Documentation
[ ] Third-Party Libraries
[ ] UI/UX Design
[ ] Other

References (Optional)
No response

/assign


TBDs on nativecall page

See https://docs.perl6.org/language/nativecall and search for TBD.

[ ] Typed pointers
[ ] Buffers and blows
[ ] Library path and names.

Library paths and names I've had to work out a lot of problems with because of OpenBSD's... rather interesting way of naming, versioning, and storing them, so I could probably write that up.

Please do it :-) Thanks!

@Kaiepi did you have the chance to work on that part?

:loudspeaker:
Just library path and names to go!

@Kaiepi can work on that if he wants, too.

I'll get started on this tomorrow


Migrating from formly to angular reactive forms

Hi all! There was a need to migrate from formly to reactive forms when developing a large application, can formly offer any tools for this in close future? I'm not talking about all config files of project forms, for example, only custom formly controls, if possible, wrappers.
Best regards

I'm not exactly sure I understand the use case. Could you be more
specific?
Under the hood formly uses reactive forms and returns the form group so you
can use that.
If you meant storing formgroups as a string I don't think that can be done
due to their recursive structure in some instances
An example would be very helpful!
On Wed, Jul 28, 2021, 2:06 PM Vlad @.***> wrote:

Hi all! There was a need to migrate from formly to reactive forms when
developing a large application, can formly offer any tools for this in
close future? I'm not talking about all config files of project forms, for
example, only custom formly controls, if possible, wrappers.
Best regards
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ngx-formly/ngx-formly/issues/2933, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADB4XNKFDJ7BAXYLVQPNLY3T2BIM7ANCNFSM5BE6TEJQ
.

Formly use reactive forms under the hood as pointed above and to get access of its instance in wrappers for example check:

formproperty which is an instance ofFormGroup` that return the paren form instance
formControl which returns the field control instance (FormControl).


Intermittent crashes while playing online

Also happens when in the main menu. I left the game open in debug for a bit and it crashed

Fixed in 9a68af34b25a1db7d5f7f5704b4d6c808e508ff7


mapping for Responsible Department

The mapping for Responsible Department doesn't show as image, instead "Welcome to PlantUML".
The mapping itself:
?entity_uri a crm:E22_Man-Made_Object ;
  crm:P46i_forms_part_of _:collection_class .
_:collection_class a crm:E19_Physical_Object ;
  rdfs:label ?collection_name ;
  owl:sameAs ?collection_class ;
  crm:P49_has_former_or_current_keeper _:department_class .
_:department_class a crm:E74_Group ;
  crm:P2_has_type <http://vocab.getty.edu/aat/300263534> ;
  owl:sameAs ?department_class ;
  crm:P107i_is_current_or_former_member_of ?institution;
  rdfs:label ?department_name .

Has these problems:

why P49_has_former_or_current_keeper and not P50_has_current_keeper ?
why not a direct link to the department but go through some imaginary Collection?
why the collection is E19_Physical_Object and not E78_Collection?
the owl:sameAs are not specified, so let's see what the students make out of them

Predictably, there are no sameAs statements, http://yasgui.org/short/SkyPR-y9e

Ignore the owl:sameAs statements in the queries generated by the review tool—they're artifacts left over from an experiment in the mapping tool and they're ignored throughout the actual mappings.
We don't use P50 or a direct link, because when an object is loaned to another institution, the custody of the object is transferred to that institution.  They have temporary custody of the object during that time, and it wouldn't make sense to invalidate the fact that it is still part of the department every time it goes on loan.
Regarding why we don't use E78_Collection:  This should be taken up with the CIDOC-CRM.  They seem reasonably adamant that 'collections of objects are E19_Physical_Objects, and that Collection has a very specific meaning involving curation and a collection plan, and our understanding is that the departments aren't doing that specific type of activity.   Personally, I think there should be a class for "human-selected collections of objects", but the CIDOC-CRM disagrees with me.

Yep. Hands are tied. Propose close.

So why not use a direct P49 then?
A department doesn't curate the collection it's responsible for? That is crazy
The mapping for Responsible Department STILL doesn't show as image, instead "Welcome to PlantUML"

Because even with a P49, I couldn't tell which of the many possible former holders is the responsible department.  The only way I can think to do without ambiguity it is to generate the departmental collection.
  But from my understanding of the scope notes and museum practice, it's not appropriate.  My assumption is that the CRM's definition of a "particular collection development plan" and a museum's definition of a "particular collection development plan" are different enough that they're not compatible except for entire museum collections.

(And the Responsible Department is already a known bug, #35).

You don't track any loans, do you?
About Collection: you could always argue to death. How's a museum collection a Collection, but a departmental one is not?


gradient_z support

Gradient Z support

Codecov Report
Base: 77.67% // Head: 77.79% // Increases project coverage by +0.11% :tada:

Coverage data is based on head (f0a75cc) compared to base (eeddb71).
Patch coverage: 97.29% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   77.67%   77.79%   +0.11%
==========================================
  Files         158      161       +3
  Lines        7941     7988      +47
==========================================
+ Hits         6168     6214      +46
- Misses       1773     1774       +1

Impacted Files
Coverage Δ

clic/include/core/clesperanto.hpp
91.66% <ø> (ø)

tests/gradient_z_test.cpp
95.23% <93.75%> (ø)

clic/include/tier1/cleGradientZKernel.hpp
100.00% <100.00%> (ø)

clic/src/core/clesperanto.cpp
89.30% <100.00%> (+0.06%)
:arrow_up:

clic/src/tier1/cleGradientZKernel.cpp
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


My Classroom listed twice

The 'My Classroom' Menu option is in both menus and active in only one.

Indeed, it is on both on the original mockup.  Do we want it only in one menu?
There are some links there that do not yet link to a page because we have yet to create those pages.  We will have to try to map out what content we want at each place at some point.  For now, maybe I can make a "Not yet ready" page that these all point to.

Hei - I could make this "Not yet ready" page : ) (= in practice now)
@RyanCCollins if you tell me which paths to direct to there, then I could take this over.

Shouldn't have been on the mockup. I'd like to leave the one in the right menu.


Isometry object

Also, it's usually a good idea to answer to each of the review comments with a short ack such as "Done." or "Fixed." just so that the reviewer knows that you read and addressed a particular comment. It also allows you to make sure that you addressed all of them.

Hi @patapufate , is this ready for review? If so, did you push your changes to the repo?


EF Core - Disable lazy-loading for some navigation properties

Hello,
I'm testing the lazy loading in EF Core (preview1-final version), leaving it enabled by default in my DbContext.
Ex:
protected override void OnConfiguring (DbContextOptionsBuilder optionsBuilder)
    => optionsBuilder
        .UseLazyLoadingProxies ()
        .UseSqlServer (myConnectionString);

From what I've noticed, this setting forces me to have my navigation properties marked as "virtual". In one of my entities, I have 3 navigation properties, but I want to enable Lazy loading in just two of them (I would not like to implement ILazyLoader, as it would "dirty" my domain). If I'm not mistaken, in EF 6.x this was possible by omitting the "virtual" markup on the navigation property.
In short, I would like to leave Lazy loading enabled, but choose on which property it will work without having to implement ILazyLoader in my entity. Is that already possible? If not, I believe that using the "virtual" markup as the criterion of lazy loading on certain navigation properties would be very good.
Thanks in advance.

@andreluizsecco Configuration of only specific navigation properties is tracked by #10787, which is currently on the backlog. We don't plan to pivot this behavior using virtual because that was a common source of errors/confusion in classic EF--it's very easy to miss a virtual and not notice.

Hi,
Sorry to open this topic again.
I have a problem in this scenario that is when i use the Include method on a lazy property and i store the result in a static cache, like ObjectCache.
The lifetime scope of my application is per request including and the DbContext. So, if i store the result of my query in a static cache with proxy lazy properties, when i refresh the page i get a

Microsoft.EntityFrameworkCore.Infrastructure.LazyLoadOnDisposedContextWarning
exception.
I think that was must be possible to disable the proxies in this scenario to make this works in sub sequents requests.
In this case, if i disable the lazy loading, all things works.
There is a way to make this running without disable all lazy loading?

@marlonbidu I filed #12895 to track this.


Run tests on CI (not under crippled)

There is https://github.com/datalad/datalad-catalog/blob/main/.appveyor.yml but I do not think that testing is enabled for anyone on appveyor, and thus PRs lack tests running.  There is only a run under crippled fs , but they were Red for the past two months and nobody looked in them and it could be upstream issue etc.  So before tackling those, runs under normal conditions should be established.
IMHO

@mih should add to his pool of "paid appveyor tests"
I will propose a workflow on github but not under crippled so we have consistent environment changing only in cripppled-vs-not

Update: https://github.com/datalad/datalad-catalog/pull/213#issuecomment-1324777561

Updated revert-PR with more commits: https://github.com/datalad/datalad-catalog/pull/223

Moved issue content to datalad-extension-template repo for further evaluation. Closing here.


Wallet for Apple iPad : vertical only

For some reason, the Bitcoin.com App for Apple iPad always forces me to vertical layout, while I typically work in horizontal mode, like on a Laptop.
Apple IOS v11 BETA on iPad Pro 10.5 + Bitcoin.com wallet v3.6.0

Hey Technologov,
We have had some extensive overhauls since this issue was created, we are currently on Version 4.8.
If you are still having this issue do let me know, but I believe it may have been addressed in one of the recent updates.
Regards,
Ornn.


Math-Magicians, PR for creating the Calculator UI

In this milestone i

Used React Components
Created a directory called components and create Calculator.js file
Developed the required design in Calculator.js component.

@t-yanick  Thank you for the review, Happy coding 😄


Dockerizing the project

Dockerize the frontend, spin the frontend, the backend and the database.

resolve conflicts


update transformers package

Related Issue
#470
Checklist

[x] I have read the CONTRIBUTING guidelines.
[ ] I have added tests to cover my changes.
[x] I have updated the documentation (docs folder) accordingly.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.54%. Comparing base (d2941c7) to head (e248a8a).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

:exclamation:  There is a different number of reports uploaded between BASE (d2941c7) and HEAD (e248a8a). Click for more details.
HEAD has 3 uploads less than BASE

Flag
BASE (d2941c7)
HEAD (e248a8a)

4
1

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #471      +/-   ##
==========================================
- Coverage   79.57%   73.54%   -6.03%
==========================================
  Files          41       41
  Lines        3417     3417
==========================================
- Hits         2719     2513     -206
- Misses        698      904     +206

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

Got it. Updated the lock file by running
poetry update transformers

Reverted pyproject.toml to the version on main branch.

Let me try that. However with the 0.45.2 version of the transformer package I got the error described in the issue.


There are no  uv-map texture results after i runned this code.

Hi,there are no  uv-map texture results after i runned this code.It only produces an empty folder named save_folder.
What's the matter, please?

Hi there,
Please make sure that --path (line 14) is pointing to your image folder.
For example, if your image folder is /home/image/folder, then: python create_beautygan_uv.py --path /home/image/folder --savedir /path/to/save_folder should work.

Hi,Thank you for your reply！
It has shown that the new picture is saved in the folder, but I didn't see the picture after opening the folder. I changed the 1 code to this one, but it still can't work.
python create_beautygan_uv.py --path /home/zhangwei/CPM-main/Color/data --savedir /home/zhangwei/CPM-main/Color//save_folder
------------------ 原始邮件 ------------------
发件人:                                                                                "VinAIResearch/CPM"                                                                                @.>;
发送时间: 2021年7月1日(星期四) 下午5:55
@.>;
<EMAIL_ADDRESS>主题: Re: [VinAIResearch/CPM] There are no  uv-map texture results after i runned this code. (#8)
Hi there,
Please make sure that --path (line 14) is pointing to your image folder.
For example, if your image folder is /home/image/folder, then: python create_beautygan_uv.py --path /home/image/folder --savedir /path/to/save_folder should work.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi there, please change (line 30):
list_imgs = glob.glob(os.path.join(args.path, "images", "*", "*.png"))
to:
list_imgs = glob.glob(os.path.join(args.path, "*.png"))
and see if it works.

And as read in README.md, to run the code successfully, please make sure the dataset folder follows THIS STRUCTURE:
all
|__ images
	|__ makeup
	|__ non-makeup
|__ segs
	|__ makeup
	|__ non-makeup

Else, I'm sorry to say that I can not help you. Hope this helps! ( ´ ▽ ` )b

Thank you very much for your reply. I'll try to debug the code here
------------------ 原始邮件 ------------------
发件人:                                                                                "VinAIResearch/CPM"                                                                                @.>;
发送时间: 2021年7月2日(星期五) 上午10:34
@.>;
<EMAIL_ADDRESS>主题: Re: [VinAIResearch/CPM] There are no  uv-map texture results after i runned this code. (#8)
And as read in README.md, to run the code successfully, please make sure the dataset folder follows THIS STRUCTURE:
all |__ images 	|__ makeup 	|__ non-makeup |__ segs 	|__ makeup 	|__ non-makeup
Else, I'm sorry to say that I can not help you. Hope this helps! ( ´ ▽ ` )b
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

You're more than welcome ( ´ ▽ ` )b
Feel free to ask if you have any other questions.

Hi, I'm sorry to disturb you again.Firstly, I want to tell you that I got the Segmentation Mask  of the images like this.
But when i change  uv_texture, uv_seg = generator.get_texture(image, seg)
to try: uv_texture, uv_seg = generator.get_texture(image, seg) except: print('Something wrong with: ', list_imgs[i])
it will report an error like this:
Traceback (most recent call last):
  File "create_beautygan_uv.py", line 55, in <module>
    cv2.imwrite(os.path.join(args.savedir, "images", filenames[i]), uv_texture)
NameError: name 'uv_texture' is not defined
So it's not generated UV-texture.The folder of segs have no change like this.
In view of this situation, how should I deal with it? Please give me some advice! Thanks a lot~
------------------ 原始邮件 ------------------
发件人:                                                                                "VinAIResearch/CPM"                                                                                @.>;
发送时间: 2021年7月2日(星期五) 上午10:51
@.>;
<EMAIL_ADDRESS>主题: Re: [VinAIResearch/CPM] There are no  uv-map texture results after i runned this code. (#8)
You're more than welcome ( ´ ▽ ` )b
Feel free to ask if you have any other questions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target/pull/208 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target.git

Docs Build status updates of commit cf3e083:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-11-07-09-09-40 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-11-07-09-09-40

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


GitLab connectors missing build environment

The connectors from the GitLab Authomize Repository which have been copied over to the Open-ITDR/Connectors are missing the build environment that was originally provided by GitLab.  The GitLab repository includes a Dockerfile, Makefile, PipFile, and sample.env which provide a nice environment for building and running the connectors.  There is no such environment provided in the Open-ITDR repository.
The ability to run the GitLab connectors from Open-ITDR also depends on issues #34 and #35

Yes - agreed - we need this - I have it on my list of "things to do" - another backlog item - Will bubble this up and see about getting this implemented - thanks for the feedback your exactly right.

Files available here


Hardware-in-the-Loop example

Describe your use case
I am looking for documentation regarding distributed simulation to be able to implement communication between Basilisk and the satellite's on-board computer. I would like to use Basilisk in my testing pipeline.
Describe alternatives solutions you've considered
To my knowledge, Basilisk uses ZeroMQ and (custom) BlackLion, but the search engine on the documentation page doesn't show any useful results. I found several publications and videos from conferences, but in none of them I found a piece-of-code demonstrating the implementation of distributed communication. Basilisk communicates with Vizard, but since my main language is Python, I haven't delved into how vizSupport implements its interfaces.
Are there examples of such communication available?
In scenarioBasicOrbitStream.py I found an example of using the SimSynch module, which can be useful for adjusting the simulation frequency. Are there other modules worth knowing when implementing Hardware-in-the-Loop?
The ideal solution would be to create a tutorial or example in which messages are defined and communication between Basilisk and a separate Python process is implemented.
Additional context
N/A

As far as I know, the code was never released. In addition, the Basilisk message passing system has changed since 2021 so any code from that project would not currently work anyways.
Here is the paper: https://arc.aiaa.org/doi/10.2514/1.I010827
It is fairly straightforward to implement something that follows the same general architecture based on the ideas presented in the paper.


build: bump version to 0.9.0

We need to bump the version from 0.8 to 0.9 because we have some minor API changes in https://github.com/angular/zone.js/pull/1044, and we also add support for evergreen browsers.

@IgorMinar, maybe we need to get a new release with a version bump to 0.9.0, I also removed Firefox 65 in this PR. please review, Thanks!

@IgorMinar, got it! will revert the Firefox change. thanks!

can you try to pull in terser and use it to create es2015 bundle for the evegreen browsers in a separate PR? Thank you

@IgorMinar, sure, will do!

I will create another PR.


UUID extension?

Is there any plan to enable the UUID extension?
Extension: https://sqlite.org/src/file/ext/misc/uuid.c
Release note: https://sqlite.org/releaselog/3_31_0.html

Nope, but you can use db.loadExtension() to load a shared library/DLL.


Resolve Mirror node timeout

Watcher connections to the mirror node are dropped after several minutes.
Verify that connections are dropped only if there is more than 1 connection to the mirror node (in the 3 validator network). If the problem occurs only in the 3 node validator network we can dismiss the issue.
If the problem occurs in a standalone node as-well, the issue must be resolved.
How to reproduce:

Start a signal node and wait for ~10 minutes. See in the logs whether there are any issues with a timed out connections.
Start the three-node validator docker-compose. Wait a couple of minutes and notice the timeout errors.

cannot reproduce

Cannot reproduce