MsPASSError handling

In our meeting today we discussed how to implement error handlers in python wrappers.  We discussed the problem that pybind11 was mapping MsPASSErrors automatically into RuntimeError exceptions.   It was suggested we might just be able to have a block with MsPASSError handlers and it would just work.  A simple test I just did showed I don't think it will be that easy.
I ran a portion of the test_algorithms code in ipython so it has some of the variables below defined.   Let me show you want happens first with a code section a RuntimeError handler:
try:
    twin=mspass.TimeWindow(-5.0,-3.0)
    d=mspass._WindowData(ts,twin)
except RuntimeError as err:
    print(str(err))

produces
WindowData(TimeSeries):  Window mismatch
Window start time=-5 is sample number -50
Window end time=-3 is sample number -30
Parent seismogram has 1000 samples

Which is the message string in a MsPASSError thrown by that function that is produced from an override of the method in std::exception.  Have many examples of simpler errors from existing code base.  The problem we need to solve is not the message, but the fact that in mapping this to std::exception we cannot retrieve the "ErrorSeverity" code to handle different levels of errors differently.
When I replace this same block with a MsPASSError handler
try:
    twin=mspass.TimeWindow(-5.0,-3.0)
    d=mspass._WindowData(ts,twin)
except mspass.MsPASSError as err:
    print(str(err))

I get this error from the interpreter:
raceback (most recent call last):

  File "<ipython-input-2-227dd157a9ef>", line 4, in <module>
    except mspass.MsPASSError as err:

TypeError: catching classes that do not inherit from BaseException is not allowed

Unless I read this wrong this shows we will need to implement a custom exception type with pybind11 - it isn't as easy as hoped.
The pybind11 documentation is here and it doesn't look as bad I remembered.   I'll experiment with this a bit and see if I can make this work.

understood, thanks Gary, let's see how it goes

Made some progress, but I think someone who knows more about python than me needs to take it the next step.  I just checked in a change to the pybind11 wrappers.   I did two things:

I fixed a mistake wherein MsPASSError had no binding for it's "severity" method.   It is, in fact, the severity information that is the  current problem.  An error handler needs to know the nature of the error thrown as it will want to handle different levels of "badness" differently.
I added this line as the simplest solution to the binding code:

py::register_exception<mspass::MsPASSError>(m,"MsPASSError");

However, that created a problem that import of ccore complained about multiple symbol definitions for MsPASSError.  I got around that by changing the class definition line to this:
py::class_<mspass::MsPASSError,std::exception>(m,"_MsPASSError")
    .def(py::init<>())
    .def(py::init<const MsPASSError&>())
    .def(py::init<const std::string,const char *>())
    .def(py::init<const std::string,mspass::ErrorSeverity>())
    .def("what",&mspass::MsPASSError::what)
    .def("severity",&mspass::MsPASSError::severity)
  ;

Noting that includes the additoin of the severity method definition.
Well, this works in the sense that I can now use a construct like this and it will at least run:
try:
  code throwing an exception
except mspass.MsPASSError as err:
  print(str(err))

Problem is if you add in the error handler print(err.severity()) it fails.
I think what is happening is the simple approach I used here isn't doing much more than what the default is other than defining a symbol MsPASSError.   I don't know enough about python exceptions (maybe you guys don't either) in general to be sure to know how to fix this.  I looked at the test_exceptions code in pybind11, but it didn't help me much in how to solve this problem.
I am pretty sure we need to do some magic with register_exception_translator but I don't really understand their examples well enough to know how to even start.
Let me make it clear that what we need is that within a handler we need to be able to deal with this kind of construct one way or the other:
except mspass.MsPASSError as err:
  sevlev=err.severity()
  if(sevlev==ErrorSeverity.Invalid):
    do something
  elif(sevlev==ErrorSeverity.Fatal):
   abort
  else:
    normally post the message to the elog of the data

A crude solution just occurred to me if we can't crack this nut.   We could change the what method to concatenate the posted error message and some string or int representation of what "severity" means.  We'd need a stock function to then parse the string to get severity.   I'd rather do it right than go that route, but it would work at the cost of some efficiency.

Hey Gary, understood our problem. I have a question, is the "what" method working fine? if it is, it does not make sense that the "severity" method is not working.
And it seems we don't immediately need a fix to get started on the wrapper class coding, but anyway we eventually need it.

Yes, we can revise the error handling part later in the wrapper code. I need to look into the pybind11 code to see how to fix it.

After some research and trying, I found that this feature is not supported by pybind11. There are quite a few request in their issues, and there is even a pull request (https://github.com/pybind/pybind11/pull/2333) adding that feature there. It seems the pybind11 developers have not found a efficient way to handle attributes in customized exceptions. I think we will have to go with the string or int representation route now.

Good find.  Definitely agree we don't want to use the new stuff the author of that issue posted or we would need a special fork of pybind11 - a really bad idea for multiple reasons.
This should be easy to implement.  I'm going to change the what method to produce a string of this format:
message:severity_string

where severity_string will be a string version of the ErrorSeverity enum class.  Specifically so other can proceed while I finish this the string will be versions of the enum names.  That is:
Fatal
Invalid
Complaint
Debug
Informational

I'm planning to use the ":" character as the separator because most things in ccore already post algorithm:message so it is consistent.
For speed I will also implement a couple C++ functions to use for testing these message strings.   I'm thinking it would be convenient to have two:
bool message_says_data_bad(const string messagestring);   //maybe too verbose
string message_error_severity(const string messagestring);

Where the first would be used for a standard test for Invalid and would be use in python wrappers with this logic:
if(message_says_data_bad(err.what())):
  d.kill()

The second would be a more generic interface to query what level error was encountered.
For C++ programmers, in particular, I will at this convenience function:
ErrorSeverity string_to_error_severity(const string s);

Perhaps should wrap the convenience function anyway.  However, the enum class syntax for pybind11 is at best confusing and probably should be avoided for any user interactions.   I say that because it is (a) rather verbose, and (b) confusing to me as a C programmer because of a syntax different (e.g. ErrorSeverity::Invalid in C++ becomes ErrorSeverity.Invalid).   I think I'll include the wrapper anyway as it should be faster than implementing such a think in python.

I am still testing the idea here for handling ErrorSeverity, but thought I should pass on some minor names changes I made to the above.  Important if either of you are trying to utilize this new feature for python functions.
First, here is the C++ prototype from MsPASSError.h with the doxygen comments:
/*! \brief Test if a thrown error indicates data are no longer valid.

Errors vary in severity.  Use this function as fast test for an error so
severe an algorithm failed and any subsequent use of the data is ill advised.
*/
bool error_says_data_bad(const mspass::MsPASSError& err);

/*! \brief Return a string representation of error severity.

This function uses the what method to retrieve the message string with the
error severity appended.  It then simply returns the keyword defining the
error code contained in the message.   The list is:  Fatal,Invalid,suspect,
Complaint,Debug, or Informational.   It will return Fatal if there is no
match to any of the keywords assuming something has corrupted memory for
that to happen.
*/
string parse_message_error_severity(const mspass::MsPASSError& err);
/*! \brief return message severity as an ErrorSeverity enum class.

ErrorSeverity is bound with pybind11 and provides a way to define the
severity of an error.  This function is a close companion to parse_message_error_severity.
In fact, in the current implementation it calls parse_message_error_severity and converts
the result string to an ErrorSeverity it returns.    That process has a small
overhead and it is largely a decision of asthetics whether or not to use this
function of parse_message_error_severity.
*/
mspass::ErrorSeverity message_error_severity(const mspass::MsPASSError& err);

For the moment I changed the names slightly in the python bindings.   I would like opinions on which you think are preferable.  My inclination is to make the C++ names the same as the python names as they are a bit less verbose, but in our next meeting perhaps we can reach a concensus.   Anyway, here is the pybind11 section for these:
m.def("error_says_data_bad",&mspass::error_says_data_bad,
    "Test if what message from MsPASSError defines data as invalid and should be killed")
  ;
  m.def("error_severity_string",&mspass::parse_message_error_severity,
    "Return a string defining error severity of a MsPASSError exception")
  ;
  m.def("error_severity",&mspass::message_error_severity,
    "Return an ErrorSeverity object defining severity of a MsPASSError being handled")
  ;

The first uses the same name and should be the most common trap for an error in a ccore function.   i.e. any call to ccore for a Seismogram or TimeSeries object should contain this construct:
# assume x is a TimeSeries or Seismogram object
try:
  foo=ccorefunction(x)
except MsPASSError as err:
  if(mspass.error_says_data_bad(err)):
    foo.kill()   # sometimes x.kill() if ccorefunction is altering x in place (common)
    foo.log_error(err)

Noting the above is currently theoretical and assumes this will work as implemented.
The other two would be used only if an error handler needed to deal with errors of a less severe nature.  One might, for example, throw a "Questionable" message and want to exclude those.   Because those two functions are not of immediate interest but added for completeness, the name chosen is soft and we could change it you guys think it is needed.
I also thing "error_says_data_bad" is too verbose, but I couldn't come up with anything else that makes the code more or less self documenting.   I remember a colleague who was into writing cryptic code with only short symbols like "db" and "ax" telling me "don't your finger's get tired" when commenting on my coding style.    His code, however, was impenetrable to understand.  Hopefully, constructs like this help make what the code does easier to understand without excessive comments.

Update:   initial testing results are not encouraging.   I can catch a newly defined MsPASSError, but overriding the what method for std::exception does not seem to be working.  This is going to take some more digging.

This is becoming increasing frustrating.   Have been off this topic for over a week when the computer I was using died.   After restoring the data onto a new computer I have spent a fair amount of time on this today and remain puzzled.   The following is not in the original order but it records the sequence I've been through that has me puzzled.
First, here is more or less where I started.  Let me show you what happens when I use the wrapper code:
py::class_<mspass::MsPASSError>(m,"MsPASSError")
    .def(py::init<>())
    .def(py::init<const MsPASSError&>())
    .def(py::init<const std::string,const char *>())
    .def(py::init<const std::string,mspass::ErrorSeverity>())
    .def("what",&mspass::MsPASSError::what)
    .def("_message",&mspass::MsPASSError::core_message)
    .def("severity",&mspass::MsPASSError::severity)
  ;
py::register_exception<mspass::MsPASSError>(m, "MsPASSError");

This is pretty much the stock simple approach described in the pybind11 documentation.   ccore builds find with this construct, BUT here is what happens if you try to even get started with that version:
import ccore as mspass
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d3095c1fe810> in <module>
----> 1 import ccore as mspass

ImportError: Error during initialization: multiple incompatible definitions with name "MsPASSError"

The reason is that apparently we can't use that name that way.
First let me show that the wrapper for MsPASSError is functioning as it should.   I comment out the py::register_exception line and get the following outputs in a simple set of tests:
e1=mspass.MsPASSError('test message 1 with string constructor','Invalid')
e2=mspass.MsPASSError('test message 2 using ErrorSeverity',mspass.ErrorSeverity.Fatal)
e1._message()
'test message 1 with string constructor'
 e1.severity()
ErrorSeverity.Invalid
e2._message()
'test message 2 using ErrorSeverity'
e2.severity()
ErrorSeverity.Fatal

i.e. I can call the severity and _message(wrapped) methods and they work and show all is fine.  There seems to be some weird type mismatch in what(), however, as I get this if I try to use it in this construct:
>>> e1.what()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 0: invalid start byte
>>> e2.what()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 0: invalid start byte

Noting the difference of byte 0xa0 and 0x90 for e1 and e2 respectively.   The weird thing is if I insert a print statement in the code for what(), which for the record is this (with the print statement):
virtual const char * what() const noexcept override
	{
		string s2ret(this->message);
  	s2ret += ":";
  	string es=severity2string(this->badness);
  	s2ret += es;
		cout << "what method should return this string:"<<endl<<s2ret.c_str()<<endl;
  	return s2ret.c_str();
  };

Running that with this shorter script has this result:
e1.what()
what method should return this string:
test message 1 with string constructor:Invalid
''

i.e. the string s2ret string isn't being properly mapped back somehow.  How and why is what I'm not understanding, but I think it is fundamentally why this doesn't work with the exception mechanism.
Last example is if I use a variant of the pybind11 documentation examples on how to create a custom exception (retaining that print statement) like this:
static py::exception<mspass::MsPASSError> exc(m, "MsPASSError");
  py::register_exception_translator([](std::exception_ptr p) {
    try {
        if (p) std::rethrow_exception(p);
    } catch (const MsPASSError &e) {
        exc(e.what());
    }
  });

Now let's run that on a ccore constructor I know will throw a MsPASSError.
 x=mspass.MetadataDefinitions('foo')
what method should return this string:
bad file:Invalid
---------------------------------------------------------------------------
MsPASSError                               Traceback (most recent call last)
<ipython-input-2-e97641225a57> in <module>
----> 1 x=mspass.MetadataDefinitions('foo')

MsPASSError:

Note the print statement produces what I expect the what method to return, but when it goes through pybind11 the output is null.   The print statement shows that the what method called in the wrapper code was executed, BUT the return got garbled and ended up in this case showing null.
So it seems the problem here is something about the way pybind11 is handling the const char* of the what method.  I'm wondering if this is maybe a mismatch of gcc/g++?   What I know is that with C++11 strings and char * are less rigidly typed than they were in older days.  i.e. there seem fewer compiler errors if I'm not careful about mixing strings and C char* things.  That is, however, a total guess and it could be a red herring to use a weird idiom.   I'm just mystified and can't seem to find any combination that makes this work.
Do either of you have a more fundamental understanding of how python handles exception?   I note one more thing in closing.
try:
    x=mspass.MetadataDefinitions('foo')
except mspass.MsPASSError as err:
    print(err)
    y=err

returns this
what method should return this string:
bad file:Invalid

Noting the last line is an empty string returned by print(err).  My final point is what you get with dir(y):
['__cause__',
 '__class__',
 '__context__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__format__',
 '__ge__',
 '__getattribute__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__setstate__',
 '__sizeof__',
 '__str__',
 '__subclasshook__',
 '__suppress_context__',
 '__traceback__',
 '__weakref__',
 'args',
 'with_traceback']

My reading says this is the contents of the python base class Exception.   Further strengthened by the top section of help(y):
Help on MsPASSError object:

class MsPASSError(builtins.Exception)
 |  Common base class for all non-exit exceptions.
 |
 |  Method resolution order:
 |      MsPASSError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Data descriptors defined here:
 ...

So, I think this says MsPASSError is a child of Exception, but what I don't get is how pybind11 is supposed to alias std::exception.what() to which method of Exception?  I cannot find this anywhere, but maybe it is something basic in python I just don't know - I am fairly new at this language.
A very long comment, but wanted to get this down for the record to record what I now know.   I'm stumped and any ideas would be appreciated.

I didn't see any real problems in your implementation, so I just tried stepping through the lines around the what() method trying to understand why it returns an empty string. Turns out somehow the execution is not linear. For example, if we step through the following code:
https://github.com/wangyinz/mspass/blob/50061f29f803ae2a03886d86c0b92815b4e63043/cxx/src/lib/utility/MsPASSError.cc#L62-L68
this is how it behaves:
Breakpoint 1, mspass::MsPASSError::what (this=0xbb12d0) at /home/iwang/mspass/cxx/src/lib/utility/MsPASSError.cc:64
64        string s2ret(message + ":" + severity2string(badness));
(gdb) n
65        char * cstr = new char [s2ret.length()+1];
(gdb) n
66        std::strcpy (cstr, s2ret.c_str());
(gdb) n
67        return cstr;
(gdb) n
64        string s2ret(message + ":" + severity2string(badness));
(gdb) print(s2ret)
$1 = "maspass_data_directory procedure:  required environmental variable=MSPASS_HOME is not set:Invalid"
(gdb) n
67        return cstr;
(gdb) print(s2ret)
$2 = "\000\000\000\000\000\000\000\000data_directory procedure:  required environmental variable=MSPASS_HOME is not set:Invalid"
(gdb) n
68      }
(gdb) n
pybind11::exception<mspass::MsPASSError>& pybind11::register_exception<mspass::MsPASSError>(pybind11::handle, char const*, _object*)::{lambda(std::__exception_ptr::exception_ptr)#1}::operator()(std::__exception_ptr::exception_ptr) const (__closure=0x0, p=...) at /home/iwang/mspass/cxx/build/pybind11/include/pybind11/pybind11.h:1823
1823            } catch (const CppException &e) {

As you can see the return line is executed twice, and at the second time (when it actually returns), the content of s2ret is padded with a bunch of \000. That's why the returned cstring appears to be empty. I could not understand how this could happen, but did find a solution, which is what have shown above. I have to copy the string into a char * to circumvent that behavior.
Now the MsPASSError is behaving as expected. You can do things like:
>>> try:
...     raise mspass.MsPASSError('test message 1 with string constructor:Invalid')
... except mspass.MsPASSError as err:
...     print(err)
...
test message 1 with string constructor:Invalid
>>> try:
...     x=mspass.MetadataDefinitions('foo')
... except mspass.MsPASSError as err:
...     print(err)
...
maspass_data_directory procedure:  required environmental variable=MSPASS_HOME is not set:Invalid

hmmm... just realized I am explicitly introducing a memory leak here...

Marvelous - I so love working with you.  It is always great to have a collaborator who you can punt to like this and get a solution, and especially as fast as you did that!
Yes, that would be a memory leak, but a solvable one if we can understand the fundamental problem here.  I am wondering if this is actually a gcc compiler bug.   You might want to test this with clang to see if it behaves the same.
This gives me some ideas for a workaround that won't have a memory leak.   I'm working on a hypothesis that the compiler messes up in asking it to deal with too many things at once in that return call that confuse it.  Normally in C/C++ a return is an automatic variable, which by definition is not const.   Here we are asking for a const char * return (we have to to match the type signature of std::exception)  and I'm not sure how the compiler will handle the memory management for such an entity.   Normally, as you know, a char * is a pointer to some memory location.   One of the common sources of bugs in regular C code is forgetting that the * means a pointer and all the standard stuff is just convenience.   I won't dwell on that, but this is what makes me suspicious that the const stuff is confusing the way the compiler handles this.
I'll see if I can fix this and not create a leak.  Again thanks for the very quick help - I was stumped.

Well, none of my ideas panned out.  I tried two things that didn't help:

Making a temporary const char *s=s2ret.c_str() and returning that - did nothing.
I tried a shared_ptr implementation that was a bit more complicated but also didn't work:

std::shared_ptr<const char *> sptr = std::make_shared<const char *>(s2ret.c_str());
return *sptr;

I confirm we can make it work with strdup, but that is definitely a memory leak.   I'm inclined to let it leak for now because exceptions by definition are supposed to be exceptional and this leak is only called when what is called, which is often, so we do need to fix it eventually.   Next step, I think, is to verify if clang shares this issue.

Yeah, always a pleasure to resolve tricky issues like this.
Actually, I was running out of time when realized the memory leak, and I am now finally back to work on it a little bit more. It is always a good idea to take a break, and now I understand exactly what the problem was.
https://github.com/wangyinz/mspass/blob/50061f29f803ae2a03886d86c0b92815b4e63043/cxx/src/lib/utility/MsPASSError.cc#L62-L68
It is that the s2ret went out-of-scope when we return s2ret.c_str(). Because the return value of string.c_str() is a const char* that points to the memory address within the string object. Once we are outside of the what() method, that memory is released, and I think where the \000 comes from.

Well, none of my ideas panned out. I tried two things that didn't help:

Making a temporary const char *s=s2ret.c_str() and returning that - did nothing.
I tried a shared_ptr implementation that was a bit more complicated but also didn't work:

std::shared_ptr<const char *> sptr = std::make_shared<const char *>(s2ret.c_str());
return *sptr;

I confirm we can make it work with strdup, but that is definitely a memory leak. I'm inclined to let it leak for now because exceptions by definition are supposed to be exceptional and this leak is only called when what is called, which is often, so we do need to fix it eventually. Next step, I think, is to verify if clang shares this issue.

Interestingly that we are posting at the same time. Anyway, yep, none of the pointer solutions works because exactly the problem I just mentioned. It is the memory that these pointers pointing to got released after return is called.

Ahh - that totally makes sense.   A very subtle issue in pybind11.  That would never happen in a C program.  Since pybind11 adds a layer between the python and C++ function I can completely see now that happens.   So glad you found a solution.

Well, we aren't quite there yet, I'm afraid.   I think this is one you can solve easier than me as I think the solution may be on the python side.
The problem comes testing to see if the new functions I created to use MsPASSError work.  Unfortunately, they don't.   First, this block works as expected:
try:
    x=mspass.MetadataDefinitions('foo')
except mspass.MsPASSError as err:
    print(err)

Yielding the correct message:  bad file:Invalid
This variant, however, is the issue:
try:
    x=mspass.MetadataDefinitions('foo')
except mspass.MsPASSError as err:
    print(err)
    b=mspass.error_says_data_bad(err)

yields this:
MsPASSError: bad file:Invalid

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
<ipython-input-16-3ded2758428f> in <module>
      3 except mspass.MsPASSError as err:
      4     print(err)
----> 5     b=mspass.error_says_data_bad(err)

TypeError: error_says_data_bad(): incompatible function arguments. The following argument types are supported:
    1. (arg0: mspass::MsPASSError) -> bool

Invoked with: MsPASSError('bad file:Invalid',)

which I find mysterious for two reasons.  (1) the "invoked with" looks wrong to me, (2) why is this giving a type error anyway?  The reason I say the later is that if I insert a type(err) line in exception block I get <class 'mspasspy.ccore.MsPASSError'>.
If we can't fix this problem easily it might be easier to just make a python function with the same functionality as error_says_data_bad.   Could you have a look at this and see if you can solve this problem?

I just looked at the pybind11 code and figured that the error_says_data_bad() won't work. The problem here is exactly the same as previous, where the MsPASSError class is not bind to Python as a normal object. The register_exception binding is really only translating the what() string into Python, and the MsPASSError exception in Python is not much related to the original MsPASSError object in cxx. Thus, it is a type error because they are different types under Python. The MsPASSError exception in Python has no member variables or methods like the ones called within error_says_data_bad().
There are only two ways around it. We can either write a string parser that interprets the full error message, or correctly bind the MsPASSError object with something other than pybind11.

OK, I think I found a cleaner solution. Working on it right now.

Well, turns out it didn't work as I expected, but I do find a better solution than we previously had. See below:
https://github.com/wangyinz/mspass/blob/3e422602a80aceaee445527ef2e1aee7f6a7141d/cxx/python/mspass_wrapper.cpp#L985-L1030
I initially wanted to use that PyErr_SetObject line to throw a custom exception type built with a hybrid of pybind11 and CPython code. That attempt failed due to some incompatibility from pybind11_object that I don't quite understand. I suspect it is essentially the same problem as the one in https://github.com/pybind/pybind11/pull/2333.
Anyway, current implementation is not at all bad given that it is mostly using standard pybind11 constructs. We can now access the what and severity methods in Python like this:
https://github.com/wangyinz/mspass/blob/3e422602a80aceaee445527ef2e1aee7f6a7141d/python/tests/test_ccore.py#L494-L505
I know the args[0] and MsPASSError(_MsPASSError()) there are ugly, but we will have to live with that until a better (potentially more complex) solution is found.

OK. Thanks to this great write-up that I found this morning. I am able to follow the initial idea of using a hybrid of pybind11 and Python C API to implement a clean interface for MsPASSError. The relevant code are the following:
https://github.com/wangyinz/mspass/blob/35dac00a82339f3551c21843f1f9286c528aa691/cxx/python/mspass_wrapper.cpp#L400-L446
https://github.com/wangyinz/mspass/blob/35dac00a82339f3551c21843f1f9286c528aa691/cxx/python/mspass_wrapper.cpp#L1033-L1068
The comment already described how it is implemented. The code itself does look complicated, but it is already the cleanest one comparing to the other examples from that write-up. Most of the code is not at all intuitive so I am glad that we are able to follow that great example.
This is how it looks like in Python:
https://github.com/wangyinz/mspass/blob/35dac00a82339f3551c21843f1f9286c528aa691/python/tests/test_ccore.py#L493-L503
As you can see we can directly access the message and severity attributes of a MsPASSError object thrown from either C++ or Python code.

Cool, I see how that works and it makes sense - mapping methods to args of the python base exception class.  Well done  - again it is so good to have a partner who is better than me.

Well, only slightly better in python.
I later updated the implementation so that the custom PyMsPASSError object can parse a sting to corresponding ErrorSeverity type.


Update Cosign verify command with identity

Verification of the identity of the signer is a critical part of Sigstore verification. Otherwise, you are only verifying that there is some signature that is valid, instead of checking that the signature was generated by someone you trust.
For more information, https://github.com/sigstore/cosign/issues/2056 contains some discussion around why we want to require these flags, and https://github.com/sigstore/cosign/issues/1947 for why we require both of these flags.
An open question for you is if this specified identity (which came from the certificate) will change between releases. If so, how would you like users to know which identity signed a release?

Something that was unexpected is that the binary was signed by a different identity than the image -<EMAIL_ADDRESS>vs<EMAIL_ADDRESS>Was this intentional?

Hi @haydentherapper, please sign EasyCLA as it will reviewers to review your PR.
Check these links for EasyCLA -

Find about EasyCLA here - https://docs.linuxfoundation.org/lfx/easycla

Steps to sign EasyCLA are here - https://docs.linuxfoundation.org/v2/easycla/contributors/individual-contributor

Follow this link for EasyCLA - https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/18706487/51478266/38056/#/?version=2

Moving PR to draft after speaking with @puerco about the expected identities.

@haydentherapper Howdy there – just wanting to check in on the status of this draft. Happy to keep it open if you're still working, or close for now until an agreed upon way forward with the expected identities. Thanks!

I'll close it for now, unless there's an identity that's been locked in. We'll want to update the documentation for Cosign 2.0 also.


Fixed bugs with dialogs

Ref: #429

Coverage remained the same at 78.125% when pulling 7cad2b74ddb7317e26c32f0d1860e0bd14d4d63b on vxsx:bugfix/dialog-z-index-cover-issues into b0184c8707c1f5b4ae49189a2f826695ede25071 on divio:master.


Removed sh files from iOS Copy Bundle Resources phase.

The fact that the sh files are present on the framework yields an error:

Thank you @sgl0v

@tjanela Thanks for fixing. I've released SCrypto v4.0.1 via Cocoapods. Feel free to upgrade if you are using one as a package manager.

Thanks for that @sgl0v, we appreciate it.


OPS: Create environment files

Task: Configure Environment Files in Angular
Description
Create environment configuration files to define project-specific variables for each environment (development and production) in the Angular project. These variables may include API URLs, API keys, and other project settings that differ between environments.
Tasks

Create environment files:

By default, Angular already includes two environment files: environment.ts (for development) and environment.prod.ts (for production).

Add environment-specific variables to these files.

Example configuration in environment.ts (development):
export const environment = {
  production: false,
  apiUrl: 'http://localhost:3000/api',  // API URL for the development environment
  appName: 'My App Dev',                // Application name for development
};

Started at https://github.com/diverintech/diverintech.github.io/pull/25


Tracking: env_proxy loses :80 on http proxies

A user reported on the discord that this was happening, we've tracked it through and filed https://github.com/inejge/env_proxy/issues/6 this issue is here to track that so that we can update our Cargo.{toml,lock} when a fix is released.

This has now been fixed in env_proxy version 0.3.1 which means we need to update our Cargo.{toml,lock} now.


Adding linear interpolation support to Object3DSync behavior

Updated Object3DSync behavior to support linear interpolation for position and scale updates, and spherical linear interpolation for rotation updates, which aids in smoothing out jerky object synchronization.
Interpolation is currently enabled by default, and can be explicitly enabled or disabled on creation of the behavior with config parameters.  For example:
obj.addBehavior(Object3DSync({ position: true, rotation: true, scale: true, lerp: { position: true, rotation: true, scale: false, duration: 150 } }));

Just want to suggest that sometimes a "speed" is useful to use instead of a duration of the total lerp.  This would allow an object to always lerp-sync at the same speed regardless of the distance of the lerp.

Thanks for the suggestion @smsithlord, I'll take a look at revising for speed over duration sometime this week.
I have also been debating whether the lerp algorithm should be applied by default?  Is this going to cause any notable issues with existing apps that expect objects to snap from one position to another?  Any thoughts on this?

Thanks for tacking this @NGenesis. I agree about lerping at a constant speed.
You shouldn't have to worry about breaking existing apps, since the SDK library is versioned. However, I would still opt for disabling lerping by default, since it could be quite surprising if all you want is a basic transform sync.

Off by default might be best.  If the coder is doing stuff like testing object distances to detect a game event, they probably expect the objects to snap to position on clients.  I do expect most people to always use it though.  The side-effects of lerp syncing on clients is minimal.
Another useful behavior to consider is a "lerpMove" behavior that animates object transforms on the local PC as well, but special care must be given to make a lerpMove behavior play nice with a lerpSync behavior on the same object.


Overload the stream insertion operator for types that are missing it

Description
Overload the stream insertion operator for types that are missing it.
Expected behavior
To be able to print any data structure with a single line, e.g.:
os << indent << "MyStructure : " << m_MyStructure << std::endl;

Actual behavior
Developer's are forced to iterate over such structures to get them printed (usually in the PrintSelf method), e.g.:
  while( it != m_CirclesList.end() )
    {
    os << indent << "[" << i << "]: " << *it << std::endl;
    ++it;
    ++i;
    }

Additional information
Some fundamental ITK types (e.g. IndexTypes, SizeType, SpacingType, OffsetType,  DirectionType, OffsetTable, RegionType) either seem not to have such an overload or it is just because some filters (itkImageConstIteratorWithIndex.h, itkImageIORegion.h, itkNeighborhood.h,  itkImportImageFilter.h, itkConstNeighborhoodIterator.h, itkImportImageFilter.hxx, itkDisplacementFieldJacobianDeterminantFilter.h, itkGaussianBlurImageFunction.h, itkEllipsoidInteriorExteriorSpatialFunction.h) that declare ivars of such types are not using the correct types, since it looks weird that such fundamental types do not have the stream insertion operator overload.
Other more exotic type aliases (GradientType, StrideTable, SeedsContainerType, WeightsType, ErrorArrayType, ExtentArrayType) would also deserve some investigation, as well as other aliases that are not consistent with the toolkit convention for the intended use (e.g. InputType in itkEllipsoidInteriorExteriorSpatialFunction.h).
Finally, other data structures that are also missing such an overload are regular arrays, e.g.
double m_Sigma[ImageDimension2];

in itkBSplineControlPointImageFunction.h or itkGaussianDerivativeImageFuncton.h
or
double          m_Scale[NDimensions];

in itkScalableAffineTransform.h.
std::list types (e.g. itkHoughTransform2DCirclesImageFilter.h or itkHoughTransform2DLinesImageFilter.h).
Or vnl_matrix matrix (e.g. itkBSplineScatteredDataPointSetToImageFilter.h).
This is related to #512.

Hi again @dzenanz!
As far as I am able to see the problems with printing fundamental types from itkIntTypes.h and itkFloatTypes.h no longer exist. Compiler seemed happy printing ImageConstIteratorWithIndex::GetIndex() returning an IndexType.
As for native arrays and std::list, I have so far added support to itkPrintHelper.h for those.
vnl_matrix already has an operator<< overload, so I'm leaving that one as well.
W.r.t.

Other more exotic type aliases
can you give me some examples of where they are printed currently and how you would like them printed/formatted?

Example of an exotic type: GradientType: 1 2 3
A large part of the job is finding instances of these types and replacing custom printing operators by the new specialized overloads.

And of course printing instances of these types as ivars now that it is convenient to print them.

@ChristianJacobsen contributions are always welcome :100:, and as @dzenanz says, this is still relevant. It would be awesome to finally have all necessary overloads in ITK ! So thanks for considering this :+1:.
Besides what @dzenanz pointed, section C.21 of the ITK SW Guide gives some more guidance about ivar printing in ITK. Essentially we would like to overload the  << operator or  for all non-trivial types so that we can potentially print any type in ITK with a simple one-liner, e.g.
os << indent << "OurNonTrivialType: " << m_OurNonTrivialType << std::endl

That would allow us to be able to:

nicely print such non-trivial types,
avoid boiler-plate code (e.g. loops to iterate over the components types) in PrintSelf methods, and
print the types in a consistent manner.

PR #512 is related to this. Essentially, all ivars are expected to be printed in a method's PrintSelf method. You will see that this is not always the case:
https://open.cdash.org/viewCoverage.php?buildid=7432448
And some other times we may still encounter loops to print some ivars due to a lacking support for the overload.
Some other times ivars are serialized but the lack of appropriate support makes their address to be printed instead of their content (or some more meaningful information), or the itk::print_helper namespace is still missing, etc. e.g. PR #2226 never made it to  master, for example, but I had it in my ToDo list to revisit it. So you can also take it if you are willing to.
Booleans have not yet got the corresponding treatment either (cf. this comment), and at times their are directly serialized to their integer values, other times an if/else is used to print the On/Off or True/False strings, etc.
A nice side benefit of printing all ivars is that  by doing so at times we identify find some ivars that have not been initialized, which is an undesirable situation, and may lead to a bug. So printing all ivars, hopefully using such useful overloads, is important.
Many of the PRs that have as subject  ENH: Improve coverage (...) or a similar text add statements to print the related classes' ivars, so you can get some inspiration from them as well.
Hope this helps. Thanks @ChristianJacobsen .

@ChristianJacobsen Another good candidates to get this enhancement are these two:
https://github.com/InsightSoftwareConsortium/ITK/blob/f81578bbb6242032b611d7e3e4dca3b7557fbbe0/Modules/Core/Common/include/itkNeighborhood.hxx#L170
m_StrideTable and m_OffsetTable
:+1:


Syndiroach!

About the PR
Adds an alternative to the SyndiCat, the SyndiRoach
Why / Balance
They have significantly less health and melee damage as a syndicat, but can walk under doors and be worn as a helmet.
Media
https://cdn.discordapp.com/attachments/1236697829171527841/1269333906801561700/2024-08-03_11-38-42.mp4?ex=66afaed2&is=66ae5d52&hm=9b4e22a1d72b2100dfe5f92710690ff0659c6f925dbce959daae4ac85edfc288&
Changelog
:cl:

add: Added SyndiRoaches, an alternative to SyndiCats!

imagine when discounts get added and this gets put 80% off :trollface:


CUDA error?

What is the issue?
Hello, I would like to apologize for my poor English (I am using a translator from another language). Could you please help me?
I had a problem with Ollama. As always, I tried to run it with the command "Ollama ru llama3.1:8b," but then an error occurred: "Error: llama runner process has terminated: CUDA error: device kernel image is invalid current device: 0, in function ggml_cuda_compute_forward at C:\a\ollama\ollama/llm/llama.cpp/ggml/src/ggml-cuda.cu:2326".
At first, I thought it might be because my version 3.1 was outdated, so I needed to update it. I installed version 3.2, but now, when I try to run 3.2, it gives me this error: Error: lama runner has terminated.

my NVIDIA GeForce GTX 1660 Super graphics card
I just talked to Ollama3.1:8b for 2 weeks, and today it stopped working for me
OS
Windows
GPU
Nvidia
CPU
AMD
Ollama version
3.1-3.2

This may be a driver mismatch, other people have fixed similar issues by re-installing (https://github.com/deepchem/deepchem/issues/2156#issuecomment-690843354).
Have you updated the Nvidia driver recently?  What's the output of nvidia-smi?

This may be a driver mismatch, other people have fixed similar issues by re-installing (deepchem/deepchem#2156 (comment)).
Have you updated the Nvidia driver recently? What's the output of nvidia-smi?

no, I haven't updated the drivers. That's what this command gives you:

I believe your GPU is a Compute Capability 7.5 GPU, which is one of the architectures we compile both cuda v11 and v12 for.
Did this work on an older version of Ollama?  If so, can you try installing that older version and see if it still works?
I believe we should default to the cuda v12 runner for your system.  A possible workaround to try would be forcing it to use the cuda v11 runner instead and maybe that works on your GPU.  Set OLLAMA_LLM_LIBRARY=cuda_v11
https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server


Always specify lexers for code blocks

https://pygments.org/docs/lexers/#lexers-for-various-shells
currently the highlighting is off

I think we need https://www.google.com/amp/s/www.freecodecamp.org/news/how-to-format-code-in-markdown/amp/

No, I think sphinx rst does it automatically. You just need to add the language that is inside a codeblock everytime.

I added, can add; but then there would be a greenish background color:

This can be styled with css or in the conf.py

By the way, i don't have a green background. Where did you get this from?
#22

i don't think you have anything with that change.
see: https://staging-openms.readthedocs.io/en/staging/docs/installations/installation-on-gnu-linux.html
(the other code block at least have default highlighting.)
On Fri, May 20, 2022 at 12:01 AM Julianus Pfeuffer
@.***> wrote:

By the way, i don't have a green background. Where did you get this from?
#22
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>

It does change. The "-" should not be highlighted as an operator.
It will have more impact on more complex scripts. We can write an adapted Lexer if we want to highlight e.g. sudo.
By the way, sudo is of course not always needed. But I guess people will know?

I'm not getting a green background... Is that something to do with Euro?

Yes probably the green was in a non-furo theme.
Feel free to add the lexers to remaining code blocks. I am 100% sure that it is only beneficial

I think we need the pygments _style directive in the conf.py file to highlight syntax:
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-pygments_style

Yes this is fine. Did you need pygments? I understood this should be active by default.

Yeah I needed pygments. I added the following line of code to the conf.py file:
pygments_style = 'sas'
There are other styles available to here: https://pygments.org/styles/

Can you select a pygments_dark_style too please?

Ref: https://github.com/OpenMS/OpenMS-docs/pull/30#issuecomment-1133884271.

[ ] Update contributing guidelines.

79ce9fb35bfd398665e6f9b6cf2e38f4b8479384
pygments_style = "sphinx"
pygments_dark_style = "monokai"

69d9a542341705462da745a14c1aa629be226179
pygments_style = "xcode"
pygments_dark_style = "rrt"

default none:


Update Anthropic chat prompt

Anthropic wants to enforce \n\nHuman:... \n\nAssistant: format moving forward. This PR updates our Chat prompt logic to compy to this requirement while preserving as much functionality as possible.
Tested with:

Human: [system_instructions] You are an helpful assistant in charge of helping with code questions. You reply straight to the point.

Human: [user: ryan] Hello world in Rust

Assistant: Here is hello world in Rust:

``rust
fn main() {
  println!("Hello, world!");
}
``

To print "Hello, world!" in Rust, you need a main function that calls the println! macro.

Human: [user: spolu] Awesome what is println! in one line?

Human: [function_result: user_context] Context on user spolu, they only understand french

Assistant:

Seems to work pretty well

We still don't pass the assistant name so claude will be a bit confused if we ask for that distinction but that's pretty advanced use-case and it was not the case currently either.


:adhesive_bandage: "," after the last language item in the about page

Category
Bugfix
Overview
I fixed a bug that displayed a , after the last item at /manage/about. I haven't worked with React before, so it could be that there is a better solution but thats my way how I would solve this problem :)
Screenshot of the problem

Thanks for this small fix !


GrantType = Authorization Code :  Postman collection doesn't work and  Sequence Diagram needs correction

Issue 1:
Section : Protocol details
Upon using the Postman collection in Post man Web:
Under OAuth 2.0 Authorization Code Flow :-
Token Request - Auth Code Token request only works with form-data instead of suggested x-www-form-urlencoded
Sample Response upon using the request as is with x-www-form-urlencoded parameters :
{     "error": "invalid_request",     "error_description": "AADSTS900144: The request body must contain the following parameter: 'grant_type'.\r\nTrace ID: 3bf75d6b-0a6f-4b79-9ccd-361cae400c01\r\nCorrelation ID: d6903071-5666-48cd-9c4f-304b47c91262\r\nTimestamp: 2022-09-21 15:56:23Z",     "error_codes": [         900144     ],     "timestamp": "2022-09-21 15:56:23Z",     "trace_id": "3bf75d6b-0a6f-4b79-9ccd-361cae400c01",     "correlation_id": "d6903071-5666-48cd-9c4f-304b47c91262",     "error_uri": "https://login.microsoftonline.com/error?code=900144" }
Issue 2:
Section : Protocol details
The high level sequence diagram shown under this section is not lucid enough.
The response details provided for /oauth2/v2/token towards bearer token request is incorrect.
Current Text : Returns an access token and a refresh_token
Suggested Text : Returns access_token, id_token and a refresh_token
id_token should be mentioned as this request provides 3 tokens and auth_code grant type mode is preferably used for identification over client_credentials grant type mode.

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

ID: 13b44819-ed7b-84bc-f5d2-2b937029f7df
Version Independent ID: db9f8408-c234-90d0-4817-3516e5fc3ba0
Content: Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra
Content Source: articles/active-directory/develop/v2-oauth2-auth-code-flow.md
Service: active-directory
Sub-service: develop
GitHub Login: @davidmu1
Microsoft Alias: davidmu

Sample Screen shot of Postman request for Issue 1 above : -

@AvinandanPatra
Thanks for your feedback! We will investigate and update as appropriate.

@davidmu1
I tried to do repro from my end but could not come up with any resourceful information.
Could you please provide your input on this case. Thanks in advance.

#reassign:nickludwig

Hey @AvinandanPatra - thanks for the feedback!
For issue 1 - I'll look into this.
For issue 2 - I'm not sure I agree with you here. Auth code flow, by default (i.e., response_type=code), doesn't return an id_token. In order for an id_token to be returned, you need to specify that in the response_type querystring param (i.e., response_type=code+id_token). In the example sequence diagram, the request to /oauth2/v2/authorize doesn't mention that an id_token is being requested. It only mentions that an authorization code is being requested. Given this, I think the statement "returns an access token and a refresh_token" is correct.
Happy to discuss further.

@AvinandanPatra - closing this due to inactivity. If you'd like me to re-open, please comment.

#please-close


Add support for orthographic camera

Fix #4
Adds support for atmospheric perspective rendering with an orthographic camera. It's possible to calculate the camera ray for each camera type with the same logic but in order to avoid floating point error accumulation where possible the perspective ray generation is handled differently from orthographic.
Orthographic screenshots

Some notes

The stars shader hasn't been adjusted since it won't make sense to render the background stars with an orthographic camera, though this can result in some artifacts when they are enabled.
The "getCameraRay" function has been copied between two shaders since it relies on local uniforms but I'm happy to hear how you'd prefer to adjust things.
Due to the way GlobeControls (and orthographic cameras) work you will see the "thickness" of atmospheric accumulation change as you rotate the camera. This is because the orthographic camera origin and near plane meaning there's technically more "atmosphere" in front of the camera but the view otherwise will look the same. This is something I'll have to think about further.

Wow, I wasn’t expecting this. I will take a closer look later today!

Looks good to me on your changes. Thanks so much for working on this! Maybe I will disable stars when used with an orthographic camera later. I’m fine with the duplicated getCameraRay for now. I’ll separate it when I need it elsewhere.

This is because the orthographic camera origin and near plane meaning there’s technically more “atmosphere” in front of the camera but the view otherwise will look the same.

As I’m not familiar with the orthographic camera, I don’t fully understand this. I see that the view position is determined by the unprojected near point. Is it be caused by the near/far changing in GlobeControls?
What I’m wondering is, when logarithmic depth is enabled, the sun irradiance in deferred lighting seems off. You can see this by using an orthographic camera in the Atmosphere/Basic story. Does it make sense to use logarithmic depth with orthographic projection?
https://github.com/user-attachments/assets/5cd4ea2d-7e11-425f-b011-95ebf0816ebc
↑ "deferred" and "forward" differ significantly (due to sun irradiance), and the sun irradiance is visible even from below the horizon in "deferred".

As I’m not familiar with the orthographic camera, I don’t fully understand this. I see that the view position is determined by the unprojected near point. Is it caused by the near/far changing in GlobeControls?

I believe so, yes - GlobeControls shifts the "near" plane and ortho camera position to make sure that all tile geometry is in view and not clipped as the navigate. Because of the nature of an orthographic projection you can typically move the near plan backwards which will result in no change to the rendered image. However because the near plane is defining the ray origin and the distance to a surface determines the "thickness" of the atmosphere rendered it results in this look of changing atmosphere.

What I’m wondering is, when logarithmic depth is enabled, the sun irradiance in deferred lighting seems off. You can see this by using an orthographic camera in the Atmosphere/Basic story. Does it make sense to use logarithmic depth with orthographic projection?

I'm not using logarithmic depth buffer but checking it now I'm seeing that the atmosphere doesn't work well in the photorealistic tiles example when rendering with an ortho camera. I'm not sure why logarithmic buffer wouldn't work with it beyond some kind of precision quirk somewhere. I don't think I have time to dig into the details of logarithmic depth rendering but maybe we can make a separate issue for this and I can revisit it later if it becomes an issue?

Also I can add a toggle to the demos for an orthographic camera if you'd like.

Thank you for your explanation.
I don’t think the cause is within the atmospheric scattering itself, so maybe I made a mistake somewhere. Agreed, there’s nothing stopping us from merging this feature. I’ll open another issue and revisit it later.
A demo for this would be great. Please create another PR for it whenever you have time. Unorganized code is fine. I’ll work on it as needed to better understand what’s going on around the transition.


blank page after installation

so long i try now to install this cms on xampp and it newer functional.
where is the problem to make it stabil ??

.http://<IP_ADDRESS>/min/?f=core/js/angular/angular.min.js,core/js/angular/angu…re/js/3rd-party/angular-ui-tree.min.js,themes/Pendant/js/pendant.minify.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://<IP_ADDRESS>/min/?f=core/css/cosmo-default-style.minify.css,themes/Pendant/css/style.minify.css Failed to load resource: the server responded with a status of 404 (Not Found)
index.php:56 Uncaught ReferenceError: angular is not defined
http://<IP_ADDRESS>/min/?f=core/css/cosmo-default-style.minify.css,themes/Pendant/css/style.minify.css Failed to load resource: the server responded with a status of 404 (Not Found)
its so pitty, are very good approaches but cant understand where are your problems - a half year ago same problems.

who installs a tool on the server root ? iam not. There are so many tools wich have solved problems like this.

Right, you can't yet install on a subfolder.

I know this is old post has anyone solved above issue.

in logs i see GET /api/content?url=%2Findex.php HTTP/1.1" 404 but there is no api directory in download zip file. is it a bug?

@goodyoneloves Might be an issue with your .htaccess file. Make sure it is present and ModRewrite is turned on.

Thanks for the reply! ModRewrite is turned ON. when i moved it to root directory everything worked fine. However, I would like to install it under different directory and them create another documentroot in httpd.conf file. That said, will this configuration work or does cosmo needs to be in root directory?. Initially, all the cosmo files, directories were in not in root directory  could not access it anything and was getting bunch of 404s. I had to move MIN and CORE directories to root somehow get the app working. I don't want to do that instead create a directory and then add it in httpd config as another documentroot. Any help would be really great.

You just need to modify the .htaccess file. I think there are 1 or two lines where you have to add the folder. I think the /api/ should change to /folder/api/ or something. We'll post it on the installation page when one of us has some free time.


Provide config for scala-steward

As per https://github.com/scala-steward-org/scala-steward/blob/1d020673731dbe2c73f5be233a8599ac79f70adf/docs/repo-specific-configuration.md
Some things that I can see:

update dependencies in examples/ which is a separate sbt project (buildRoots)
run scalafixAll as postUpdateHook after scalafix sbt plugin or scalafix rules (just organize-imports currently) are updated
updatePullRequests: maybe always?

run scalafixAll as postUpdateHook after scalafix sbt plugin or scalafix rules (just organize-imports currently) are updated

Running scalafixAll in case of organize-imports updates sounds interesting. I'm not familiar with organize-imports but assume that scalafixAll will organize the imports in projects that depend on that rule. IMO that sounds like a post-update hook that could be added the default Scala Steward post-update hooks so that is enabled in all projects that use Scala Steward.

that could be added the default Scala Steward post-update hooks

Yeah indeed, scalafix sounds like a much more common tool than e.g. sbt-java-formatter that's included there 😅

@PawelLipski I'm on it. 🤟🏻
I was a lil bit busy these days. Let's rock.

Gr8!

@PawelLipski This is the new .scala-steward.conf file.
I've scheduled it to create PRs every 5 days. There's also an @asap tag to create PRs immediately as there was an update available, but I think it can have so much overhead for the bot.
I've also left the post-update hooks empty.
I don't exactly know your requirements, so if you need I can brief you about all of the configurations.
Also, please tell me if you need to have any dependency ignored, or if you want a specific dependency to be updated according to some version pattern.

Gr8! could you open a PR to this repo from your fork? it's gonna be easier to comment on a PR


Mobile menu

This looks good. But why the yellow color for active tabs and progress / load bar? That doesn't look that good

@duttakapil changed from yellow to some subtile colors


Use default GOPATH for running the linter if $GOPATH is not set.

From Go 1.8 on, if $GOPATH is not set, a default of ~/go is used. This change makes sure the default GOPATH is used to retrieve and store modules when linting and $GOPATH is not set.

bug in development, but it doesn't affect using the provider.


Models .bin not showing on controlnet a1111

Hi, I placed the models ip-adaptater_sd15.bin ,  ip-adapter-plus_sd15.bin and ip-adapter-plus-face_sd15.bin into ../stable-diffusion-webui > extensions > sd-webui-controlnet > models but when I restart a1111, they not showing into the model field of controlnet ( 1.1.4 )
Thanks

@AIrtistry you rename file suffix with .pth

thanks its seems to work


enableRule0011ForTableFields not working?

I have added the enableRule0011ForTableFields to may LinterCop.json (inside a project folder or a multi-root workspace) and I am not seeing any warnings on fields.  I only see the warning for the object.  Am I doing something wrong?
LinterCop.json
{
    "cyclomaticComplexetyThreshold": 20,
    "maintainablityIndexThreshold": 20,
    "enableRule0011ForTableFields": true
}

In my projects the rule "enableRule0011ForTableFields" is always false positive, so that the warning is always displayed on the field level, no matter which Access type is set.

In my ruleSet.json
{
  "id": "LC0011",
  "action": "Warning",
  "justification": "Every object needs to specify a value for the Access property"
}

My LinterCop.json
{
    "cyclomaticComplexityThreshold": 8,
    "maintainabilityIndexThreshold": 20,
    "enableRule0011ForTableFields": true,
    "enableRule0016ForApiObjects": true
}


Add a request to lazily parse function bodies.

Rework the lazy function body parsing mechanism to use the
request-evaluator, so that asking for the body of a function will
initiate parsing. Clean up a number of callers to
AbstractFunctionDecl::getBody() that don't actually need the body, so
we don't perform unnecessary parsing.
This change does not delay parsing of function bodies in the general
case; rather, it sets up the infrastructure to always delay parsing of
function bodies.

@swift-ci please smoke test

@swift-ci please test source compatibility

The recent lazy parsing of IterableTypeContexts PR turned out to break lazy ASTScopes because the MemberCount is zero, until getMembers has been called. I've worked around it. Let me know if I need to do something similar for this PR. I.e. if getBody() will return null until some other call is made, I'll need to adjust ASTScopes.

@davidungar with this pull request, getBody() will go ahead and parse the statement even if it has been delayed, so getBody() should be more reliable than before. Previously, if it had BodyKind::Unparsed, getBody() would return NULL until delayed parsing kicked in later.

Hi @DougGregor – How is this supposed to build? Are the "stable" branches of llvm and clang no longer the right branches to use with swift's "master" branch?
~/s/u 0 $ git -C llvm pull --ff-only
Already up to date.
~/s/u 0 $ git -C clang pull --ff-only
Already up to date.
~/s/u 130 $ ninja -C ~/b/u/t swift
ninja: Entering directory `/home/dave/b/u/t'
[21+1] Building CXX object tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o
FAILED: tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o
/p/llvm/bin/clang++  -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/swift/lib/AST -I/home/dave/s/u/swift/lib/AST -Itools/swift/include -I/home/dave/s/u/swift/include -I/usr/include/libxml2 -Iinclude -I/home/dave/s/u/llvm/include -Itools/clang/include -I/home/dave/s/u/llvm/../clang/include -I/home/dave/s/u/cmark/src -Itools/cmark/src -Wno-c11-extensions -Wno-c99-extensions -Wno-c++17-extensions -Wno-dollar-in-identifier-extension -Wno-empty-translation-unit -Wno-format-pedantic -Wno-nullability-extension -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-nested-anon-types -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -O2    -UNDEBUG  -march=skylake -fno-omit-frame-pointer -fno-vectorize -fno-slp-vectorize -mno-omit-leaf-frame-pointer -fno-exceptions -fno-rtti -target x86_64-unknown-linux-gnu -O2 -g0 -UNDEBUG -MD -MT tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o -MF tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o.d -o tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o -c /home/dave/s/u/swift/lib/AST/Decl.cpp
/home/dave/s/u/swift/lib/AST/Decl.cpp:6321:21: error: no member named 'rangeContainsCodeCompletionLoc' in 'swift::SourceManager'
      ctx.SourceMgr.rangeContainsCodeCompletionLoc(getBodySourceRange())) {
      ~~~~~~~~~~~~~ ^
1 error generated.
ninja: build stopped: subcommand failed.

I reverted this PR because we are seeing this compiler error on all CI bots.
I'm wondering how this could have passed PR testing.

If you click on the list of commits, you’ll see a red X which means that the status checks didn’t all pass. I’d wager that Doug didn’t notice and merged it anyway

The Linux failure was not related to that. What happened here is that I ran the tests earlier in the day, and they passed (as they should). https://github.com/apple/swift/pull/26888/files#diff-363ae01084185dad84858de454e6bc95 got merged after my tests ran, but before the merge, and removed the API in question (SourceManager::rangeContainsCodeCompletionLoc()). I tried to bring the API back (via https://github.com/apple/swift/pull/26976), but that hit another unrelated issue and didn't merge before the revert. I'll try again.

https://github.com/apple/swift/pull/26981 is the redo


No enum constant when using GatewayFilteSpec.setStatus()

Hoxton.BUILD-SNAPSHOT (also happens in RC1)
Spring Boot 2.2.0.BUILD-SNAPSHOT (also happens in M3)
When trying out the code below I get an IllegalArgumentException during startup

No enum constant org.springframework.http.HttpStatus.401 UNAUTHORIZED

@SpringBootApplication
public class GatewaytestApplication {

	public static void main(String[] args) {
		SpringApplication.run(GatewaytestApplication.class, args);
	}

	@Bean
	public RouteLocator routes(RouteLocatorBuilder builder) {
	    log.info("routes");
	    return builder.routes()
	    		.route("get", r -> r.path("/get")
	    		        .filters(f -> f
	    		                .setStatus(HttpStatus.UNAUTHORIZED)
	    				.uri("http://httpbin.org/"))
	    		.build();

	}
}

In the mean time I can use HttpStatus.UNAUTHORIZED.value()

Was able to reproduce it for Hoxton.RC1 and Greenwich.SR3.


Feature suggestion: Support multiple meshes per element

Would it be possible to allow an element to use multiple meshes, as a feature in a future schema version? This would enhance geometry reuse in combination with #38, allowing primitive shapes to be reused as parts of different elements.

I haven't found a reason before to support multiple meshes, cause even if element is constructed with multiple meshes, I could always join them first. But please let me know it there are some scenarios where you still need separated meshes for single element. Such modification would probably break existing user space, therefore probably it could be considered only for 2.0.0 version or later.

I haven't found a reason before to support multiple meshes, cause even if element is constructed with multiple meshes, I could always join them first. But please let me know it there are some scenarios where you still need separated meshes for single element. Such modification would probably break existing user space, therefore probably it could be considered only for 2.0.0 version or later.

Cool - only reason would be a work with authoring software that composes an element from multiple 3D primitives, where some or all of those meshes are shared among other elements. It would avoid needing to join primitives together and create more meshes, for the case when two or more elements share a different subset of the primitives. Also for memory efficiency.
For example, consider some authoring software that has a box, sphere and cone mesh. One element uses the box, and a second element uses the box, sphere and cone. If an element can have multiple meshes, then these two can just share the unmodified meshes in the .bim output. If we're restricted to one mesh per element, then the second element needs to make a mesh in the .bim that is the combined box, sphere and cone.


gyp: Use repack_action.gypi.

With M45, we can use upstream's newly-introduced repack_action.gypi to
simplify our work: it takes care of all the inputs/action/output
boilerplate.
Upstream CL: https://codereview.chromium.org/216013003

LGTM.


Add validation webhook to deny decreasing replica numbers

What
Add validation webhook to deny decreasing replica numbers.
How
Use kubebuilder v3.x
ex. https://github.com/cybozu/neco-containers/tree/main/admission
Checklist

[ ] Finish implementation of the issue
[ ] Test all functions
[ ] Have enough logs to trace activities
[ ] Notify developers of necessary actions

Done in refactoring task.


i'm trying to enable usb debugging with the adb command but when i type adb shell adb.exe: no devices/emulators found how to solve the problem

when I digit adb devices it shows * daemon not running; starting now at tcp:5037

daemon started successfully
List of devices attached

You must enable USB debugging on your device so that adb can detect it.
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-not-detected

but I'm using adb to activate usb debugging, there's no way I can activate it on my cell phone because it gave hard brinck

how do i enable usb debugging with mobile in fastboot mode with mobile with hard brinck i want to enable so i unlock bootloader?

did u find a solution?


[MB-5920] Redux Refactor: Moves & MTOShipments (read)

Description
This PR updates all code that selects a logged in service member's current move and current orders to select from state.entities.moves, state.entities.orders and not from the legacy reducers (state.moves, state.orders). This ended up being a bit larger than expected, due to some dependencies between moves and orders data. Changes include:

Move selector functions into store/entities/selectors and renamed to be consistent:

selectActiveOrLatestOrders, selectActiveOrLatestOrdersFromEntities >> selectCurrentOrders
selectActiveOrLatestMove >> selectCurrentMove
moveIsApproved >> selectMoveIsApproved
lastMoveIsCanceled >> selectHasCanceledMove
selectedMoveType >> selectMoveType
selectMTOShipmentsByMoveId >> selectMTOShipmentsForCurrentMove

Added an onboarding reducer in order to save the conusStatus value. This was because this value is not saved by the API at all, and should be stored separately from cached API data in Redux. I'm not sure that we need to save this value in Redux at all, but for now moving it into a different reducer felt like the path with the least friction.

Also migrated the selector: selectedConusStatus >> selectConusStatus

I also needed to update the submit handler on the Orders step of onboarding, because it was navigating to the next page (Upload Orders) before the create request was completed. I took this opportunity to migrate the submit handler to use sagas (same as the other steps of onboarding now), and to update the service member if creating orders.
Deprecated selectUploadsForActiveOrders - I don't think this selector was working as-is, resulting in existing uploads not showing up in the customer & office apps. It was looking for documents & uploads in entities, neither of which get populated as far as I can tell. I switched to alternative selectors that select the uploads nested within the orders object.
Added some more customer prop types shapes
Deleted legacy code that is no longer referenced anywhere
Miscellaneous eslint fixes on touched files

Reviewer Notes
After this PR, there should be no references made to Redux state.moves or state.orders. There are a few lingering methods used in the legacy ducks files, which can be migrated and/or deleted in the follow up stories to delete old reducers. To test, you can go through any service member flows and especially test that the add orders and add shipments work correctly. One note is that there are existing bugs related to editing existing orders, so that is not expected to be fixed in this PR. There should be no new bugs introduced, and no visible changes to the user.
Setup
To start the application:
make server_run
make client_run

Code Review Verification Steps

[ ] If the change is risky, it has been tested in experimental before merging.
[ ] Code follows the guidelines for Logging
[ ] The requirements listed in
Querying the Database Safely
have been satisfied.
Any new migrations/schema changes:

[ ] Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Warnings

:warning:

Files located in legacy directories (src/shared or src/scenes) have
been edited. Are you sure you don’t want to also relocate them to the new file structure?
View the frontend file org ADR for more information

Messages

:book:
:link: MB-5920

  Generated by :no_entry_sign: dangerJS against c6a06ef0de350cb1e607a4502bfe8fef39681c95

re: the dangerJS lint warning, I think is a false positive. the only eslint disables I added were camelcase & import/prefer-default-export which are on the allowed list


Add PVG rule enforcing non-zero minimum_ring_size

Commit Message: Add PVG rule enforcing non-zero minimum_ring_size
Additional Description: This will break any configs currently setting minimum_ring_size to zero. This shouldn't be an issue, because those configs already cause host selection to fail. See: #31724
Risk Level: Low
Testing: Unit test
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a
Fixes #31724

@antoniovleonti seems that couple of changes in this PR are unintentional (for some reason I see git pushes not from you on this PR).
I'm not sure exactly what's happening, but can you try to merge main. Worst case, you can open a new PR (sorry) from the new head.

/retest

/retest

/retest


Add style lint to site

What we should discuss:

Sorting the CSS properties unfortunately only works to a limited extent (as soon as transient props / css from variables) are included, it no longer knows its way around: ${({ $variant }) => buttonVariantStyle[$variant]};)
With commented-out properties, it throws an error (normal comments are not a problem) - this can be annoying during development if you quickly comment something out. (due to https://www.npmjs.com/package/postcss-styled-syntax#known-issues)

Probably the config has to be looked through again in a larger project to see if we need additional rules or have to deactivate them, there is not much in the starter ...

Have you considered a eslint based plugin?

Have you considered a eslint based plugin?

Do you have one in your mind?
@martinrohrmoser did the research, maybe you considered a eslint based plugin?

Do you have one in your mind?

no, I'm just the one that questions everything :)

Have you considered a eslint based plugin?

I did some research on how to lint css with eslint, but it seems that this is only possible for the most basic things (e.g. formatting). I also haven't found a plugin that incorporates stylelint into eslint. It seems to me that using stylelint standalone is the wat to go.

I'd like to wait on @jamesricky's approval here

I think we should add this to admin as well for consistency. @johnnyomair @thomasdax98 what do you think?

Do we have that much custom CSS in the admin? But yes, we could do that in a follow-up PR.


🚀 [Feature] English EMails

🚀 Feature

Currently all EMails are in German.  While the login_server translated at least the subject we currently only deliver German EMails.
To implement this an i18n implementation on the backend would be required.

Teste emails, make templates, translatable including subject from etc.


suitability on untrusted zip files

Hello,
I'm writing a server that is meant to read epubs (and other things) from untrusted clients, thus the question of: can I reject files that would requires unreasonable amount of memory to decompress (intentionally or accidentally)?
The file size metadata is all that's needed for non-adversarial inputs.
I'm wondering if the library could make it possible to enforce that the size is no bigger than the file size metadata, so the guarantees are simpler. From a quick look at the code, it looks straightforward:
 module Buf = struct
-  type t = { mutable b : bytes; mutable len : int; }
+  type t = { mutable b : bytes; mutable len : int; max_size : int }

   let grow ~ensure buf =
     let newlen = ref (Bytes.length buf.b) in
     let () = while !newlen < ensure do newlen := 2 * !newlen done in
     let () =
-      if !newlen <= Sys.max_string_length then () else
-      if ensure <= Sys.max_string_length then newlen := ensure else
+      if !newlen <= buf.max_size then () else
+      if ensure <= buf.max_size then newlen := ensure else
+      (* if ensure <= buf.max_size then newlen := buf.max_size else *) (* this one looks better, actually. The current code may not have the right complexity *)
       failwith "OCaml string size exceeded"
     in
     let b = Bytes.create !newlen in
     Bytes.blit buf.b 0 b 0 buf.len; buf.b <- b

   ...
 end

And then pass the ?max_size flag in Zipc.File,  presumably.
What do you think? (I can make a pull request, if you're fine with the suggestion)

Seen under this angle ignoring the file size metadata doesn't look like a great security default.
I think we should rather simply change Zipc.File.to_binary_string to error as soon as the decompressed file size metadata is exceeded. This may entail a bit of API changes at the Zipc_deflate level, I'll have a look into that.
That being said if you want to sandbox the memory consumption of your untrusted input processing in a more general manner you may be interested in @gadmm's memprof-limits.

Ah, I didn't really have memprof-limits under my radar. It's probably limited, compared to the direct approach of rejecting large files. For instance, if you have multiple domains, I can't imagine that memprof-limits would be able to limit memory usage (not just memory allocations) caused by the specific domains that are currently decompressing. But memprof-limits might be useful as an alternative to ulimit -v.

Thanks for mentioning memprof-limits. 2 cents:
Global memory limits work as @v-gb says.
Depending on what you know about the function, allocation limits could be a proxy for memory consumption (if it is not necessary to count deallocations).
I could add local memory limits for this purpose (counting both allocations and deallocations in a single function), but I'd have to think a bit about the probabilistic guarantees.
Most importantly, memprof-limits would require Zipc.File.to_binary_string itself to be written to be interrupt-safe and documented to be so.

Thanks for mentioning memprof-limits. My 2 cents:
Global memory limits work as @v-gb says.
Depending on what you know about the function, allocation limits could be a proxy for memory consumption (i.e. whenever  is not necessary to count deallocations to extrapolate the memory consumption).
I could add local memory limits for this specific purpose (counting both allocations and deallocations in a single function), but I'd have to think a bit about the probabilistic guarantees before that.
Most importantly, Zipc.File.to_binary_string itself would need to be written to be interrupt-safe, and documented as such.

Thanks !


Update release action and add .deb artifact

What

Update the Github actions in release.yml to build the new Rust rewrite.
Update release-config/windows-installer-zork.iss to pickup the changed artifact path
Build an additional .deb package using cargo-deb

neither this neither #73 should be closed. They are good two PR's but I am just trying to merge first all the content in my main branch, and then I will merge this

I closed this because i saw that you already updated the github actions on your fork. I planned to make a PR to your fork instead.


Cleanup for nilerr and  prealloc

Signed-off-by: zhuzhenghao<EMAIL_ADDRESS>What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
xref  https://github.com/kubernetes-sigs/kwok/issues/107
Special notes for your reviewer:
Does this PR introduce a user-facing change?
NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

/ok-to-test

/lgtm
/approve


Move Cabinet minister endpoints to the GOV.UK Design System

Description
We're moving over the Cabinet minister ordering page to the GOV.UK Design System. This page has quite a lot going on within it. In the previous implementation there were 4 reorderable lists for ministers, also attends cabinet, whips and ministerial organisations.
This uses the new design which breaks these 4 lists into 4 tabs. Each of these has a reorder link which goes off to a separate page to do the reordering.
I've decided to use 4 separate endpoints rather than using a query string to determine which list to reorder as it feels cleaner.
I'd very much recommend reviewing this per commit as it will a lot easier.
Screenshots
Before

After

Trello card
https://trello.com/c/eJJv8zRq/95-reordering-page
⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠
Follow these steps if you are doing a Rails upgrade.

Thanks for the feedback. Have pushed up a fix for the first bullet in the last commit. As discussed i think the second bullet will be handled separately.

This looks great! Good shout on the guidance for the reorder


ci: Revert "Remove codesandbox"

Reverts TanStack/query#6814

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6c79808) 41.78% compared to head (cf2fa3e) 41.78%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6818   +/-   ##
=======================================
  Coverage   41.78%   41.78%
=======================================
  Files         178      178
  Lines        7017     7017
  Branches     1421     1421
=======================================
  Hits         2932     2932
  Misses       3722     3722
  Partials      363      363

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


Improve parsing performance with Fastify json schema

https://github.com/fastify/fastify/blob/master/docs/Validation-and-Serialization.md

Most routes should now have schemas. Missing are the response schema for most routes. We need to look on which routes response schema is possible and create these.


Added Axolotl API

[x] My submission is formatted according to the guidelines in the contributing guide
[x] My addition is ordered alphabetically
[x] My submission has a useful description
[x] The description does not end with punctuation
[x] Each table column is padded with one space on either side
[x] I have searched the repository for any relevant issues or pull requests
[x] Any category I am creating has the minimum requirement of 3 items
[x] All changes have been squashed into a single commit

.... How long do these PRs usually take?

Good question, but I do not know unfortunately!

Checked and updated it @marekdano

Wait, now it isn't squashed anymore :/

Hey, still waiting for this to hopefully get merged :/

Hi @AceKiron ✋

Hey, still waiting for this to hopefully get merged :/

Sorry for the delay 😅
Can you squashed all changes into a single commit, please?

Can you squashed all changes into a single commit, please?

Sorry, but I just can't get squashing figured out, I'll close this PR and make a new one with a repo that actually has only 1 new commit.

@matheusfelipeog the new PR is #1886

Ok @AceKiron, I will review this now ;)


yarn set version stable

https://yarnpkg.com/getting-started/install/
updating to more stable yarn.
All you need to do is update once to get things working with the new version:
yarn

this branch to be archived.


Added Hannah Zafar back to authors.

I figured out (at least part of) the problem. I intentionally had an error in the notebook because it was meant to teach the user how to use it. So, naturally, the build fails at the get-go. 🤦

I'm going to comment that out for now, until we can figure out a solution. That way, we can see if the secure keys work in the build.


add-arm64-support-for-images

Automated changes by create-pull-request GitHub action

Auto-closing pull request


decimal-date-time function only accepts string args with a particular format

The decimal-date-time function can be called with a string argument, but only when that argument has a very specific format.  Basically, if the current implementation of the function is given a string, it will pass it directly to the dateStringToDays function (without even checking it against the DATE_STRING regex).  The dateStringToDays function really only supports strings that match DATE_STRING and will (probably) return NaN if a string is provided that does not match.
It seems unnecessarily restrictive and inconsistent that I can pass 1970-01-01 successfully, but not 1970/01/01.  One workaround is just to pass my string to the date function first (decimal-date-time(date('1970/01/01'))) which works, but is kind of annoying since it relies on the date function to properly cast my string value instead of the decimal-date-time function just doing it.
Now, I get that passing string values to decimal-date-time is not a great idea. The big issue here, though, is that this behavior of the decimal-date-time function has changed from the 1.5 implementation.  Previously, the function would do its best to parse any string value and now with the newer versions of openrosa we are seeing some nasty issues with logic in existing forms because of this behavior change....

Closing since I no longer think it makes sense to implement this functionality here.  https://github.com/enketo/openrosa-xpath-evaluator/pull/162#issuecomment-1201456126


about the configs of MixPL

thanks for your great work!!!
I want to do semi-sup and few-shot object detection base on your great work, where can i find the configs of MixPL

请问您找到了吗

https://github.com/Czm369/MixPL/blob/main/projects/MixPL/configs/mixpl_faster-rcnn_r50-caffe_fpn_180k_coco-s1-p10.py
Other configs will be updated ASSP.

thanks!


Support collect detailed exception stacktrace by config

Support collect detailed exception stacktrace by config
related to #7165 & #7158 & #7233

Codecov Report

Merging #7254 into master will increase coverage by 0.10%.
The diff coverage is 50.94%.

@@            Coverage Diff             @@
##           master    #7254      +/-   ##
==========================================
+ Coverage   39.11%   39.22%   +0.10%
==========================================
  Files        3299     3301       +2
  Lines       95824    95877      +53
  Branches    11840    11851      +11
==========================================
+ Hits        37486    37608     +122
+ Misses      55423    55352      -71
- Partials     2915     2917       +2

Impacted Files
Coverage Δ

.../navercorp/pinpoint/bootstrap/PinpointStarter.java
0.00% <0.00%> (ø)

...pinpoint/collector/receiver/grpc/GrpcReceiver.java
0.00% <0.00%> (ø)

...navercorp/pinpoint/plugin/log4j2/Log4j2Plugin.java
16.94% <0.00%> (ø)

...ler/metadata/DefaultExceptionRecordingService.java
8.33% <8.33%> (ø)

...npoint/bootstrap/config/DefaultProfilerConfig.java
66.43% <25.00%> (-1.18%)
:arrow_down:

...nt/profiler/context/recorder/AbstractRecorder.java
43.07% <66.66%> (+0.45%)
:arrow_up:

.../navercorp/pinpoint/bootstrap/AgentIdResolver.java
82.35% <78.57%> (+82.35%)
:arrow_up:

.../com/navercorp/pinpoint/bootstrap/IdValidator.java
81.25% <80.00%> (+81.25%)
:arrow_up:

...ava/com/navercorp/pinpoint/bootstrap/AgentIds.java
100.00% <100.00%> (+100.00%)
:arrow_up:

...filer/context/module/ApplicationContextModule.java
100.00% <100.00%> (ø)

... and 19 more

Continue to review full report at Codecov.

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


Pairing with Win10

Anything I need to know to be able to pair my PC?
Win 10, BT enabled, PC recognizes Nuimo yet pairing does not work.

Hi @soffer – Does this manual help you to connect your Nuimo? http://www.windowscentral.com/how-and-why-use-bluetooth-on-windows-10
Does your PC actually support Bluetooth Low Energy?

Cool – please keep us updated about your project!


Asset.Buy(id) trying to buy wrong item?

When I use rbx.buy(809988794), the script doesnt purchase the shirt and instead seems to try and purchase something totally different.
Code & Output:
  rbx.buy(shirt_id)
    .then(function(msg){
    var msg = JSON.stringify(msg);
    console.log("[Group 1]: Balance Stage 3 | Purchased Shirt. msg: " + msg);

[Group 1]: Balance Stage 3 | Purchased Shirt. msg: {"productId":74233074,"price":250}

It is purchasing the shirt. For all purchasable items ROBLOX uses things called "product IDs" to identify and purchase them. They are tied to the asset ID.
As you can see here the product ID is correct: http://api.roblox.com/marketplace/productinfo?assetId=809988794


Decide table format using outputFormat in HiveSinkConfig

Purpose of this pull request

When writing hive table, it use outputFormat to handle data. So, we can using outputFormat property to decide the file format of hive table.
Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs

Hi @EricJoy2048 PTAL.

Hi, please resolved conflicts files

Hi, please resolved conflicts files

fixed.

LGTM


Fix TB Logger + ObjectStore quadratic complexity issue by doing 1 file per flush

CO-690
This PR:

[x] creates and logs to a new file for every flush by calling writer.close()
[x] names the artifact based on the tfevents file to prevent overwriting on S3 or other objectstore

Logging to a new file for every flush solves the quadratic complexity issue, where the same file was sent to S3, while it gradually increased in size.

wandb report

This seems convoluted and counter to how SummaryWriter is supposed to be used?

My guess is that the authors of the SummaryWriter assumed that tensorboard users would be training and running tensorboard locally, not saving traces to an object store. In this use case, then appending to one file is simpler and does not have O(n^2) overhead, as linux appends do not require the entire file to be overridden.

Thanks for fixing this! Overall LGTM, though see comments. Curious if you had a chance to test this manually when saving TB traces to S3 buckets, and then having TB stream from S3? Would be good to validate that this doesn't break anything, even when it works locally. Happy to help test this tomorrow.

Works with streaming tensorboard logs from s3!


feat: Support text in CustomViewBlock on Android

Currently the text in CustomViewBlock is not supported on Android platform. This commit will create a TextView if the text field in CustomViewBlock is not null.
The image property still takes high precedence. If both image and text are set, the text will be ignored.

thank you!

thank you!


N34: limbo pass

Newsletter 34, game update, referenced in #1033
Thanks for tagging me and including limbo pass 😄 ❤

Merged, thanks!


Update j2objc to 1.0.0

Since j2objc 1.0.0 was released gradle plugin dependency requirement should be upgraded as well.
https://github.com/google/j2objc/releases/tag/1.0.0

This is definitely an issue... there's a number of changes in the 1.0.0 release that we'll need to make changes for.

So I can't use the J2ObjC Gradle plugin right now with J2ObjC version 1.0.0? The README should be updated then because it says "J2ObjC <IP_ADDRESS>.1 or higher" for minimum requirements of the plugin.

I'm busy at a conference this week. I will update it come Feb 21. If anyone
can send a PR in the interim, I will review and approve it.
On Thu, Feb 11, 2016 at 3:25 AM Adil Hussain<EMAIL_ADDRESS>wrote:

So I can't use the J2ObjC Gradle plugin right now with J2ObjC version
1.0.0? The README
https://github.com/j2objc-contrib/j2objc-gradle/blob/master/README.md
should be updated then because it says "J2ObjC <IP_ADDRESS>.1 or higher" for
minimum requirements of the plugin.
—
Reply to this email directly or view it on GitHub
https://github.com/j2objc-contrib/j2objc-gradle/issues/595#issuecomment-182815515
.

Hey Bruno, I've created the pull request here:
https://github.com/j2objc-contrib/j2objc-gradle/pull/598

Any updates on this? We'd love to have the latest 1.0.X features without having to manually implement the build process.

My apologies as I've been busy at TED and other events. I will look at this
tomorrow.
On Tue, Mar 15, 2016 at 2:19 PM efirestone<EMAIL_ADDRESS>wrote:

Any updates on this? We'd love to have the latest 1.0.X features without
having to manually implement the build process.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/j2objc-contrib/j2objc-gradle/issues/595#issuecomment-197024383

No big deal actually. Working around this using skipJ2objcVerification true for now and everything seems ok.

@efirestone I can't see how you got this working. I have a simple SharedCode module that imports some classes from the Guava library and makes use of them. This works and builds with the <IP_ADDRESS>.1 release of the J2ObjC library. However, when I try build it with the 1.0.0 release I get errors of the following nature:
/Users/Adil/Library/J2ObjC/j2objc-1.0.0/include/J2ObjC_header.h:25:17: error: cannot create __weak reference in file using manual reference counting
id JreStrAppend(__weak id *lhs, const char *types, ...);

Did you encounter any such errors and, if so, how did you overcome them?

Turns out this has been fixed in the 1.0.1 release of the J2ObjC library and all occurrences of __weak and have been replaced with __unsafe_unretained. Still curious to know how you got it to work @efirestone...

We're not using Guava, so that's likely the difference. JRE core in 1.0.1 and 1.0.2 seem to work without issues.

It's been a while...any movement on this one?

Looks like there's an open pull request to upgrade to 1.0.2 https://github.com/j2objc-contrib/j2objc-gradle/pull/618

Any news on this?


Unable to fully sync the local working directory. Deleted files are never synced.

When I open a working directory on my local machine, then I'm able to edit a file and the changes are then automatically uploaded to the FTP-server when I change that file.
Issue 1: When I create a file however, it's not automatically uploaded to the remote FTP-server on creation, only when I add text in the file and then save it. So creating the file is not enough. Having the file be empty and then saving it, is also not enough. You have to add text to the file and THEN save it before it's synced to the remote server.
Issue 2: When I delete a file locally, it's also not deleted on the remote FTP-server, nor am I able to sync a deleted file, so that the remote FTP-server is synced with the local working directory. So if I delete a file, then this will never get synced with the remote server, even when I do a full sync from local to remote.
Issue 2 is the most important to me, as I don't want to have my remote server run out of sync with my local working directory, however I'd like to get both issues fixed of course.
These are my config settings:
{
    "name": "Name",
    "host": "xxx.xxx.xxx.xxx",
    "protocol": "sftp",
    "port": 22,
    "username": "user",
    "remotePath": "/var/www/html/repo",
    "uploadOnSave": true
}

yes, I also encountered this problem. Did you solve it?


Adjusting world size

This will probably go hand-in-hand with #24

quite. Are you interested in working on dazed-sheep ?
nobody has worked on this project for years

@rom1504, I’ll see if I can implement this and #24.

What's the status on this?


CMake UX improvements.

In certain instances, our current CMake setup can be less than helpful when it is unable to find certain dependencies. On windows for example, it doesn't specify why it failed to find glad, for example.
I feel certain tweaks could be made to improve the error messages of our build system, along with changing certain flags to be optional such as NOVELRT_BUILD_DOCUMENTATION.
This is somewhat low priority, and I will eventually pick it up if nobody else does, but for the time being this ticket is explicitly open because its small and low priority.
This ticket is also fairly good if you are new to the CMake or C++ ecosystems, as it should be fairly straightforward to implement. I am more than happy to help if a newbie picks this up and has questions, however.

I don't recommend "fixing" the Findglad script. As much as the message may suck, that's the standard for CMake "not found" messages - changing it will likely be even more confusing. We should just have a FAQ-style document for common build errors and their solutions.
I agree with fixing NOVELRT_BUILD_DOCUMENTATION though - it should absolutely be OFF by default.

In that case, I'll change this to a proposal until we can come to an agreement on what exactly needs to be changed, because I just had to explain to @tannergooding how to get glad, and this can be kind of jarring. While it may be the standard message, this may be a case where I don't explicitly agree with the standard for the sake of better UX.
Maybe we can just append to it instead? I feel like we can do something to make it better surely?

According to the docs we can apparently specify REASON_FAILURE_MESSAGE.
To that end, we could potentially do something like this:
if(glad_LOCATION STREQUAL "None")
    set(glad_search_failure "Python returned 'None' - this suggests glad is not properly installed")
endif()

# ...

find_package_handle_standard_args(glad
    REQUIRED_VARS glad_LOCATION
    VERSION_VAR glad_VERSION
    REASON_FAILURE_MESSAGE glad_search_failure
)

Aha, I see, yeah this does look like what we want. Would this be something you'd be happy with?

:woman_shrugging: If you're fine with it, I am - it's there for a reason I guess :stuck_out_tongue:

Alright, in that case I think this is a good middle ground - you get the standard message, along with a message that suggests possible reasons for failure. I think this works! :D

Was this ever implemented?


Fix Max Fee Checks

Description

Adds max fee checks to the FeeRate & FeeCustom views to prevent users from selecting or setting a fee-rate above what the max is.
Adds getFeeInfo method.
Resolves UI bug in #1619

Linked Issues/Tasks

#1619

Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Tests

[x] No test

QA Notes
When setting fees during the send flow, the max fee checks should be in place and prevent you from setting a value above the maxFee provided by Beignet's getFeeInfo method.

Verified in v118