Support for sum or union types

Does Microsoft Bond support sum types or union types? Sorry if this isn't a good fit for a GitHub issue, but I think this will be a recurring question so it might be a good thing to address in the docs.
From my research so far it looks like there's a way to get union types in the wire format, but not in the in-memory format.

We don't currently provide sum type or union support out of the box. You can use a struct with an explicit case discriminator and optional fields to simulate it -- but this doesn't help with in-memory size or present a great programming model. As issue 59 suggests, there are some special case approaches that can work using custom type mapping. We are looking to add more general support for unions though -- likely that work will come in summer of 2017.

Interesting, thanks! That completely answers my original question.
I'm curious whether you're going to go with discriminated or non-discriminated unions. When the summer work on unions starts will there be a place I can follow it? I'm currently writing a schema system that's designed to be close to Haskell's type system, and Bond has been a massive inspiration for it (you guys do a great job with things like serializing dictionaries to JSON in a convenient way).

The prototype implementation has support for F# discriminated unions. Their wire representation looks vaguely like:
struct bond.OneOfBase
{
    0: required uint16 case;
}

struct Foo : bond.OneOfBase
{
    0: T1 case1;
    1: T2 case2;
    ...
    n: Tn caseN;
}

where OneOfBase.case will be set to the active case ordinal, and one of the fields in Foo will have an "interesting" payload. The other fields will not be present at all.
This representation was chosen over having just one of the fields in Foo serialized so that older Bond libraries that may be intermediate proxies do not corrupt a discriminated union. They may increase the serialized payload size because they won't know that all of the fields that are not the active case can be omitted. They'll just use their normal omit-default-values-if-possible logic. So, if a non-active case is a struct field, an old library would serialize an empty struct instead of omitting it.
NB: This is just a potential representation. There are still some kinks to work out, especially around required fields, text protocols, and untagged protocols. Do not expect data of this shape to be compatible with any future discriminated union support.
I expect the discriminated union work to happen either off of a branch in the Microsoft/bond repository or in one of the primary developers forks. Not sure which, whose, or when.

Yup, the discriminated union work never got underway. There's currently no work in progress on the front.
I dug up my notes/thoughts from November 2017, the last time I worked on this in earnest. Here they are.

Oneof types (aka tagged unions, variants, discriminated unions, sum types)
The Bond type system has built-in struct types (product types), but no
built-in tagged union type. We propose adding tagged unions (sum types) and
calling them "oneof".
oneof types are generally useful, but a particular motivating example is
when implementing service methods. The return type of a service method
frequently needs to be able to distinguish between the requested data and a
rich error. For example, responding with an error that includes the type of
claim needed to perform the requested operation.
struct CalculatorArguments
{
    0: double left;
    1: double right;
}

oneof CalculatorRequest
{
    0: CalculatorArguments add;
    1: CalculatorArguments sub;
    2: CalculatorArguments mul;
    3: CalculatorArguments div;
}

struct CalculatorResult
{
    0: double result;
}

struct ServiceError
{
    0: uint32 error_code;
    1: string message;
    2: string trace_id;
}

oneof CalculatorResponse
{
    0: ServiceError error;
    1: CalculatorResult result;
}

service Calculator
{
    CalculatorResponse Calculate(CalculatorRequest);
}

Simulated oneof types with today's Bond
Today, oneof types can be simulated with a case enum and a collection of
optional fields:
enum Case
{
    None,
    Foo,
    Bar,
    Baz
}

struct SimulatedOneOf
{
    0: required Case Case = None;
    1: string Foo;
    2: int32 Bar;
    3: SomeStruct Baz;
}

However, using such an implementation requires considerable diligence. All
consumers must explicitly know to check the Case field and then access the
corresponding field. If a mistake is made, there is no feedback, as all of
the other fields contain legal objects. Also, updating the oneof type is a
two-step process: set the Case field and then set the corresponding field.
There is serialization overhead in such an implementation, particularly in
protocols that do not omit fields, like Simple Binary. Even in a protocol
like Compact Binary, required fields will always be written, even for in
active cases.
The generated types in C++, C#, and Java take more memory, as they storage
for all of the cases at once. In C++ where the storage for many field types
is inlined in the struct itself, these types can be quite large.
Proposal
We propose extending .bond files to include support for the oneof keyword.
We also discuss the serialized representation of oneof types, and how they
would be implemented in C++, C#, and Java.
.bond files
The new oneof keyword can be used to define a oneof type, very much like
the struct keyword is used.
struct Foo { }
struct Bar { }

oneof Baz
{
    0: Foo foo1;
    1: Foo foo2; // can repeat a type
    2: Bar bar;
    3: int32 ivalue; // can use any Bond type
    4: string svalue = "default values permitted";
    7: bonded<Foo> foo3;
}

The fields of a oneof type are identical to the fields in a struct with the
following limitations:

Field modifiers (required, required_optional, optional are not
permitted.
The = nothing field default is not permitted. The active case behavior
is conceptually similar, but they are not compatible. Nor do these two
concepts compose well. All of the inactive cases would be nothing. But
what does it mean for the active case to be nothing? Would it not then be
inactive?
bond_meta fields are not permitted. The bond_meta functionality is
deprecated, and omitting it simplifies the design and implementation of
oneof types.
A oneof type may only refer to itself if its wrapped in a nullable. (This
is the same for a regular struct, but stands repeating.)
In a oneof, the following field names--in any casing--are reserved for the
use of Bond:

which
unknown

Views may be created over oneof types. They are themselves oneof types with
fewer cases supported.
Oneof types may also be generic:
oneof Quux<T1, T2>
{
    0: T1 theFirst;
    1: T2 theSecond;
}

Type aliases may be used for oneof types, but type converters may not. (This
is the same for a regular struct, but stands repeating.)
Serialized representation
A oneof type is serialized by writing only the active case.
In Compact Binary:
                  .----------.-------------------------.
 oneof (v1)       |  field   | BT_STOP or BT_STOP_BASE |...
                  '----------'-------------------------'
                  .----------.----------.-------------------------.
 oneof (v2)       |  length  |  field   | BT_STOP or BT_STOP_BASE |...
                  '----------'----------'-------------------------'
                  .----------.----------.
field             | id+type  |  value   |
                  '----------'----------'

In Fast Binary:
                           .----------------.--------------.   .----------------.---------.
   struct/oneof hierarchy  |  struct/oneof  | BT_STOP_BASE |...|  struct/oneof  | BT_STOP |
                           '----------------'--------------'   '----------------'---------'
                     .----------.
   oneof             |  field   |
                     '----------'
                     .------.----.----------.
   field             | type | id |  value   |
                     '------'----'----------'

In Simple JSON:
{ "caseName": ... }

In Simple XML:
<OneOfName>
    <caseName>...</caseName>
</OneOfName>

In Simple Binary, the active case field ID is serialized before the data for
that case.
                  .---------.----------.
 oneof            |  case   |  value   |
                  '---------'----------'
 case             a uint16
 value            as otherwise in Simple Binary

Pros:

Minimal data representation.
Very similar to struct serialization.
We have to do this as a forward-only change (see rejected proposals
below), so we might as well use the simple serialized representation.

Cons:
*Need to touch bond_const.bond to add BT_ONEOF to BondDataType
* Any existing switches on BondDataType will enter their default
cases when encountering BT_ONEOF.

An old library won't know how to process such a payload with full
fidelity. Tagged protocols and text protocols will be able to extract some
data and will be able to skip these fields/types.

An old Simple Binary reader will not know how to read or skip such
data.

Looking at the current C++ implementation, it will get very
confused when processing such a type via a SchemaDef. In
DynamicParser, when an unknown field type is encountered, it
calls detail::BasicTypeField. This function, in turn, will
simply do BOOST_ASSERT(false) and then return false. However,
DynamicParser doesn't inspect the return value from
detail::BasicTypeField, resulting in the input reader state and
the transform state getting out of sync. This feels like a bug
that should be fixed.
The C# implementation will throw when constructing the
deserializer. (The exception will likely be about a missing key in
a dictionary.)

Rejected designs
Library-only
Many of the safety problems with simulated oneof types could be addressed
with a library-only solution atop an existing enum and struct. However, a
library-only solution would not solve the serialization size or memory use
problems. Additionally, gbc could not give useful diagnostics.
oneof as a container type instead of a top-level
Instead of having a oneof type be a top-level construct that can be
serialized like a struct, it could be more like a container type. That is,
it would be valid as a field in an existing struct, but could not be
serialized on its own.
This may be easier to implement, but it precludes oneof types being used
directly as service request/response types, necessitating an awkward
wrapping struct.
Pseudo-base
Conceptually, the Baz example from above would be serialized like the
following struct:
struct bond::oneof_base
{
    0: required int32 kind;
}

struct Baz : bond::oneof_base
{
    0: optional Foo foo1;
    1: optional Foo foo2;
    2: optional Bar bar;
    3: optional int32 ivalue;
    7: optional bonded<Foo> foo3;
}

where only the active field in Baz is actually written.
On the surface, this is compatible with old Bond libraries that don't
understand oneof types. However, when we consider untagged protocols, like
Simple Binary, this is not the case: there is no way to only serialize the
active case. Any additional metadata that we add would confuse an existing
implementation. Serializing all the cases defeats the purpose. Serializing
as a blob would work for Simple Binary, but we'd have to serialize as a blob
in all the other protocols as well to follow the SchemaDef. This would
result in two-pass serialization in protocols like Compact Binary v1.
In a SchemaDef, the fully-qualified name of the base class can be used as a
marker to check whether a given struct is a variant. There are no other
SchemaDef changes.
Pros:

Versions of Bond before oneof support can process these payloads by
treating them like structs with a base

SchemaDef-based processing will just work.
For codegen-based processing, a hand-written struct that matches the
pseudo-struct will be needed.

A oneof type is indicated by a "magic" base type name.

Cons:

There's duplicated information between the kind field in the base and
which serialized variant is present.
A oneof type is indicated by a "magic" base type name.
Not actually compatible with Simple Binary.

Implementation sketches
C++ implementation
We will generate code like the following:
class Baz
{
public:
    struct Which
    {
        enum class Id : uint32_t
        {
            foo1 = 0;
            foo2 = 1;
            bar = 2;
            ivalue = 3;
            svalue = 4;
            foo3 = 7;
            unknown = 65536;
        };

        struct foo1_tag_t { } foo1;
        ...
        struct foo3_tag_t { } foo3;
    };

    Baz(); // which() == foo1, and a Foo was default constructed
    // also allocator ctors

    Baz(const Baz&) noexcept(...);
    Baz(Baz&&) noexcept(...);

    template <typename T...>
    explicit Baz(Which::foo1_tag_t, T...& args)
    {
        // changes which to foo1
        // forwards to Foo ctor
    }
    ...

    // only way to create a oneof in the unknown state
    explicit Baz(bond::oneof::unknown_tag_t);
    ...

    int32_t which() const noexcept;

    const Foo& foo1() const noexcept; // only valid to call if which() == foo1
    Foo& foo1() noexcept /*?*/; // changes which() to foo1

    template <typename T...>
    void emplace(foo1_tag_t, T&&...);
    ...

    Baz& operator=(const Baz&) noexcept(...);
    Baz& operator=(Baz&&) noexcept(...);

    struct Schema
    {
        public: class var
        {
            ...
            // do we need this, or just the compile time visit API?
            using struct : ::bond::reflection::FieldTemplate<...> which;
        }
    }
}

There will need to be a compile-time visit API.
In a C++ oneof, some case is always active, even if that case is the unknown
case. A oneof in the unknown case cannot be serialized: attempting to do so
will result in a runtime exception. When merging oneof types, if the source
is unknown, then the payload's value is taken.
When the default ctor for a C++ oneof is run, it will be created in the case
of its lowest numbered field.
OPEN QUESTION: if exceptions are thrown, will the oneof transition to
unknown? (Cf. std::variant which throws if you attempt to access after an
exception, and boost::variant, which goes through tons of effort to never
be empty.)
Since the only extra member function is which(), which is already
reserved, there is no possibility for name clashes.
This can be implemented using something like bond::detail::any or perhaps
boost::variant. We cannot use std::variant as we still only target
C++11. Such an implementation only has one allocation: as a trade-off the
resulting type is as large as its largest member, even if that member is not
active.
Since oneof types are top-level serializable objects, there is no need to
handle type converters. Thus a "oneof concept" is not needed.
If needed, oneof types can be MSVC 2015 and later only.
More fleshed out C++ APIs:
/**

   oneof Baz {
   0: Foo foo1;
   1: Foo foo2; // can repeat a type
   2: Bar bar;
   3: int32 ivalue; // can use any Bond type
   4: string svalue = "default values permitted";
   7: bonded<Foo> foo3;
   }

**/

class Baz
{
public:
    struct Which
    {
        enum class Id : uint32_t
        {
            foo1 = 0;
            foo2 = 1;
            bar = 2;
            ivalue = 3;
            svalue = 4;
            foo3 = 7;
            unknown = 65536;
        };

        struct foo1_tag_t {
            using type = Foo;
            static constexpr Id id = foo1;
        } foo1;
        ...
        struct foo3_tag_t { } foo3;
    };

    Baz(); // which() == unknown
    // also allocator ctors

    Baz(const Baz&) noexcept(...);
    Baz(Baz&&) noexcept(...);

    Which::Id int32_t which() const noexcept;

    const Foo& foo1() const noexcept
    {
        BOOST_ASSERT(_active == Which::Id::foo1);
        return boost::get<0>(_storage);
    }

    Foo& foo1() noexcept; // only valid if which == foo1

    Baz& operator=(const Baz&) noexcept(...);
    Baz& operator=(Baz&&) noexcept(...);

    struct Schema
    {
    public: class var
            {
                static constexpr bool is_oneof = true;
                ...
                // do we need this, or just the compile time visit API?
                using struct : ::bond::reflection::FieldTemplate<...> which;
    }
    }

    template <typename F>
    friend decltype(auto) visit(Baz& b, Which:Id id, F f)
    {
        switch (id)
        {
            case Which::Id::foo1:
                return f(b.foo1());
                //...
            default:
        }
    }

private:
    bond::variant<Foo, Bar, int32_t, std::string, bond::bonded<Foo>> _guts;
}

template <typename Ts...>
class variant
{

};

//bond::oneof::get(myBaz, Baz::foo1);
//bond::oneof::emplace(myBaz, Baz::foo1, ...);
bond::oneof::visit(myBaz, visitor);

class Visitor
{
    void operator()(Baz::foo1_t, Foo& f) { /* use f */ };
    ...
};

baz.foo()->access_field;
baz.foo() = something;

template <typename OOType, typename CaseTag>
struct OneOfCaseProxy
{
    const CaseTag::Type& operator->() const noexcept;
    CaseTag::Type operator->() noexcept;

    CaseTag::Type& operator=(const CaseTag::Type&);
    CaseTag::Type& operator=(CaseTag::Type&&);

    template <typename... T>
    CaseTag::Type& emplace(T&&...);

    // returns true if which == CaseTag::id
    explicit operator bool() const noexcept;

    // ub if not right case
    const CaseTag::Type& get() const noexcept;
    CaseTag::Type& get() noexcept;
}

deserialization:

read which
bond::oneof::get(theThingBeingDeserialized,
Deserialize(bond::oneof::get(...));

Rejected proposals
Directly using something like boost::variant has too many drawbacks:

Ties us to their API, which can change without our knowledge.
boost::variant is more type-focused, and there's place for the
human-usable names.

Instead of prefixing all of the member functions with something to avoid
clashes, we could use a collection of free functions:
template <typename T>
T::Which bond::oneof::which(const T& oo) noexcept;

// these return nullptr is not the specificed case
template<typename WhichT, typename T>
const WhichT::type* bond::oneof::get(const T& oo) noexcept;

template<typename WhichT, typename T>
WhichT::type* bond::oneof::get(T& oo) noexcept;

use:

Foo f = bond::oneof::get<Baz::WhichT::foo1>(myBaz); // template spec.
Foo f = bond::oneof::get(Baz::WhichT::foo1, myBaz); // overloads

Type converters are not supported for oneof types, so a "oneof concept" is
not needed. For a sketch of the "oneof concept", see the free functions,
above.
C# implementation
We will generate code like the following:
[Bond.OneOf]
class Baz
{
    public enum Which
    {
        foo1 = 0;
        foo2 = 1;
        bar = 2;
        ivalue = 3;
        foo3 = 7;
        Unknown = 65536;
    }

    Baz(); // Which == foo1, and a Foo was default constructed

    // Only way to create a oneof in unknown.
    Baz(Bond.OneOf.Unknown);

    // throws if the which and the type of the value don't align
    Baz(Which which, Foo value);
    Baz(Which which, Bar value);
    Baz(Which which, int32 value);
    Baz(Which which, IBonded<Foo> value);

    Which Which { get; }

    // throws if Which != foo1
    // set changes Which to foo1
    [Bond.Id(0)]
    Foo& foo1 { get; set; }
}

The implementation will likely be just a Which field and an object
field.
Since the only extra member function is Which, which is already reserved,
there is no possibility for name clashes.
When the default ctor for a C# oneof is run, it will be created in the case
of its lowest numbered field.
An attribute Bond.OneOf is used to indicate a class/struct/interface that
is a oneof type. These must have a property of an enum type named Which.
Then, each of the fields/properties annotated with Bond.Id are the cases.
A oneof in the Unknown case cannot be serialized: attempting to do so will
result in a runtime exception.
When Merge is implemented, then preservation of unknown oneof values can be
enabled.
Java implementation
Likely very similar to the C# implementation.
We'd need setters, so everything would need to be prefixed to avoid clashes.

thanks @chwarr
This is exactly how I had imagined compact binary serialization of unions and mostly how I imagined doing the C# mapping. Hadn't given other formats or mapping much thought.
I wonder if I were to push forward getting this implemented for compact binary and C# what would the chances be of either:

Bond maintainers helping out completing the PR for the full coverage
the PR supporting only C#, maybe C++, and compact rep being merged to master

Thanks for the offer, but this isn't something that we're currently interested in adding to Bond.

This seems like a fairly important feature to not have any interest in adding.

Thanks for your interest in oneof. Briefly, oneof isn't something that we need at Microsoft, so we don't have any plans to implement it. If this lack is a deal-breaker for you, there are other binary serialization formats that do support the oneof concept, like Avro, Cap'n Proto, Protocol Buffers, or Thrift.
Inside of Microsoft, we're been ok using inheritance to model the exclusiveness of types that oneof would also allow modeling. C++, C#, and Java--the primary languages that Bond is used in--don't have native support for oneof types either. Thus, adding explicit oneof support isn't something that we, Microsoft, plan to add to Bond for the foreseeable future.
Also, given its complexity, it's also not something that we're comfortable adding in a piecemeal fashion as sofusmortensen volunteered to do. Something that changes the Bond type system this way needs to be implemented in all the supported protocols and languages. If someone is interested in that, feel free to comment here. It's a large amount of work to undertake.


ScheduledQuartzJob changing cron does not work

The first deploy always works.
On second deploy, the first cronjob is disable correctly, but the new cron is not active.
Upon restart the new cron becomes active.
Tested on Alfresco One 4.2

Tested on Alfresco CE 5.0.d and works as expected: new code becomes active with the new cron interval. (even after deploying several times)
Set the log level for com.github.dynamicextensionsalfresco.quartz to debug the issue on your installation.


How to uninstal

HI, please tell me how to uninstal this mica for everyone? I cant find it in controle panel. please help how to remove this from my system

Are you using the ZIP, EXE or MSIX distribution?

Find the installation folder for Mica For Everyone and delete it


Add a node-sass filter

This add a node-sass (https://github.com/sass/node-sass) filter.

Sorry wrong author, I'll retry.


Validator: Support ODF 1.3

Add the schema files from https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/schemas/ and support using them from the command line validator

Hi Samuel,
be aware that the master (or 0.9.0) branch is about four years of development time behind the 1.0.0_SNAPSHOT (or 1.0.0) branch. The 1.0.0 branch is based on a fork of Open-XChange in 2011 using only ODFDOM in GIT, while Apache continued to work on subversion for some years.
The merge was on file level once done by myself and 1.0.0 will be just overwriting every file of 0.9.0.
In other words, this update will vanish soon. I suggest doing another pull request on 1.0.0_SNAPSHOT branch.
Hope you are at the beginning of a great week!
Svante

Hi Samuel,
as discussed by phone, I will postpone the review likely to next week, after I finished other deadlines. As you had suggested, I changed the default branch of GitHub to 1.0.0_SNAPSHOT.
Thanks for the patch and sorry for any inconvenience for porting to 1.0.0_SNAPSHOT.
Bests,
Svante


Dates, owners, and permissions of things under /hpkg

I just noticed the following:
drwxrwxr-x   2 hermes_build_user1 hermes_build_user1  4096 May 31 11:15  296a6c507f7ac465f6be97e9c6a4b1c13c6e1d9b-libarchive
dr-xr-xr-x   4 root               root                4096 May 22 00:47  2ae4ff78f20ccc13183ec9cfbd25b46e105224a5-sed

Here I guess the dates reflect the build.  That doesn't really bother me much (actually it's convenient), but may be that's not good?
I'm guessing the owner and permission info of the first item is the result of an aborted build.  Invoking hermes gc seemed to have gotten rid of all of the ones I noticed.
Typical symlinks to shared objects under /hpkg/<hash>-<name>/lib/ appear to have dates that reflect the build:The symlinks in
-r--r--r-- 1 root root   332992 Jan  1  1970 /hpkg/f196d2b0e050e8d6024485bd2fc75da54ddbb817-ncurses/lib/libpanel_g.a
lrwxrwxrwx 1 root root       13 May 24 09:39 /hpkg/f196d2b0e050e8d6024485bd2fc75da54ddbb817-ncurses/lib/libpanel.so -> libpanel.so.6

May be none of these things are problems, but FWIW.

The aborted builds are as you said.
The symlink date being wrong seems like something that should be fixed.
We can choose any date we want for the store date, Its currently just set to 0. 1970 is a bit ugly, we could choose another date.

Is date / time info preserved when build artifacts are transferred via send / recv?  If date / time info varies between 2 builds of the same package definition then I guess the build artifacs won't look the same?
Or may be I'm misunderstanding something...

Build times are wiped after build completes but before the package is added to the set of installed packages. send/recv sends packages with times wiped.

I just checked under /hpkg here and there is only one directory that has a date of Jan 1 1970 (it's <hash>-rt).  The > 250 remaining items all reflect dates within this month.
The content within these directories appears for the most part to have a date of Jan 1 1970.
I just checked on another machine and there is a similar situation there.
So may be because everything within the directory has the same date / time, it's fine -- the containing directory <hash>-<name> is not sent I guess?

No matter how a package was installed, it's date should be wiped by the pkgstore/storify function. Seems like a bug.


Remove unused dependencies and some dead Timemachine code

Remove references to Timemachine code and JS dependencies.
This change significantly improves the load time of the site, as well as deploy time to Heroku.
Also removes dead files and .gitmodules (data-visualization-tools, reports etc.).

These changes look great and should really improve the performance and maintainability of the site! Great job!

Thank you so much, eflyer43, for peer programming with me on this. I could not have done it without you!


Fixed aws integration bug

Codecov Report

Merging #75 (455fc4b) into aws-integration (e9dc6e4) will increase coverage by 1.53%.
The diff coverage is 25.00%.

@@                 Coverage Diff                 @@
##           aws-integration      #75      +/-   ##
===================================================
+ Coverage            80.60%   82.14%   +1.53%
===================================================
  Files                   50       49       -1
  Lines                 1939     1904      -35
  Branches               311      304       -7
===================================================
+ Hits                  1563     1564       +1
+ Misses                 376      340      -36

Impacted Files
Coverage Δ

...VM/bridge/messaging/OVM_L1CrossDomainMessenger.sol
92.98% <25.00%> (-5.14%)
:arrow_down:

Continue to review full report at Codecov.

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


Run "Validate translations" Automatically after Loading a PO File

Context:
We are working with managable-sized translation files for our web application projects based on CakePHP.
The POT files are generated through semi-automated means.
Sometimes, the PO files will get updated by search/replace in our IDE instead of though Poedit.
To verify the translations are still valid, we often then open the PO file and press "Validate translations".
Feature proposal:
I think the manual translation verification could be (optionally) improved by running the validation automatcially after loading the PO file.
Rationale:
Automating it could help reduce errors and improve the UX for detecting issues with the translations.
This might not work for everybody or ever project. Thus, it would be sensible to have a configuration option just like showing the statistics after updating from POT file.

Poedit does, in fact, perform validation after opening a file.

It might but the results aren't shown (as a window or see https://github.com/vslavik/poedit/issues/815) and depending on how one has setup the entry sort order potential errors aren't shown in the visible part of the list of translation strings.

The warning could be shown after load only if there are (severe) issues like duplicated entries.


docs(chore): add vim.uv.fs_stat() because vim.loop.fs_stat() is deprecated.

Adding vim.uv.fs_stat() because vim.loop.fs_stat() is deprecated in latest neovim nightly latest build.

Won't add this for now, at least not till 0.10.0 is released.

Won't add this for now, at least not till 0.10.0 is released.

Ok bro


java.lang.IllegalArgumentException width and height must be > 0

java.lang.IllegalArgumentExceptionwidth and height must be > 0
com.cooltechworks.views.ScratchTextView.onSizeChanged(ScratchTextView.java:160)

This will be addressed soon.
Thanks,
Harish

Unable to reproduce. Re-open the issue if you have some detailed info.
Thanks!


Add EmptyPath for FchownatFlags

Hello,
This PR is probably a fix for #1029. Thanks for any response.

Couldn't same thing to be done using fchown()?

@otavio thank you for the feedback but IMHO fchown doesn't need flags.

@tathanhdinh you got me wrong. I meant if it is worth adding this or using the fchown as an alternative.

Ah, sorry.
I don't know whether fchown can always be used. Does it always follow symbolic link?

The fchown operates on the file description and in this case, seems equivalent to fchownat with EmptyPath flag.


[BUG] Numbered list with sub-list shows wrong numbers

If you want to ask for support or request features, sponsor the project and contact me over email.

[x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
[x] I have read the documentation and cannot find an answer.

Describe the bug
If you have the following numbered list, with a sub list:
1. one
   1. sub 1
   2. sub 2
2. two
3. three

once you go to view source and back to rich text mode, or if you load the editor with this markdown as the current value - the numbered list after the sub list will be wrong, showing 3 instead of 2
Reproduction
https://codesandbox.io/p/sandbox/mdx-editor-base-forked-vksdyj?file=%2Fsrc%2FApp.tsx
To Reproduce
Steps to reproduce the behavior:

add the above markdown
switch to source and back to rich text
bullet 2 is now 3

Expected behavior
After a sub-list, bullets should continue normal numbering
Screenshots
On load, or after edit:

After switching to source and back:

Desktop (please complete the following information):

OS: Windows
Browser Edge

Additional context
This happens every time after a nested sub list, the next number on the higher  level will jump to the next.

I can confirm that this is bug; the weird thing is that it works initially, as there is no difference in the HTML after the toggle. There's probably a CSS-only solution that puts content into the markers or uses before for that purpose.

Could you elaborate on the CSS only solution? I don't mind trying it.

I found the problem in the generated HTML.
MDX produces this html:

Coffee

Tea

Black tea

Green tea

Milk

this is the correct html to nest list items:

Coffee

Tea

Black tea

Green tea

Milk

MDX wrap the nested list inside a new LI element, instead of putting it inside the parent LI element

Any update on this one?

I'm also facing this issue. Any workarounds?


fix LANG-1151

~2.5x performance increase wrt 3.4 version
added a couple checks more to unit tests

Please update to resolve conflicts.

Thanks! :+1:


[Program]: Write a Scala program to find sum of ap series

Description
Write a Scala program to find sum of ap series
An arithmetic progression (AP) is a sequence of numbers such that the difference of any two consecutive terms is a constant. The nth term of an AP is given by the formula an = a1 + (n-1)d where a1 is the first term and d is the common difference.
a = 2
n = 5
d = 3

Output : 40

How to contribute

Save the solution in program/findSumOfApSeries.scala file
Add findSumOfApSeries.scala file in find-sum-of-ap-series folder

!assign


move to pnpm?

pnpm is muuuch faster as a package management tool, supports workspaces, and uses symlinks for everything.
I haven't tested all our packages, sometimes react doesn't love it but not sure about svelte.
Wondering how others feel about this.

No preference from my side! Never used it before.

moved to roadmap


Issue in summary_data_from_transaction_data function

function summary_data_from_transaction_data is not working for new Pandas version 0.24.0 and 0.24.1,  It is having difficulty in calculation of Recency and T , basically it is not  able subtract  between series data type and date type, It works well with the version 0.23.4

Thanks for the heads up. Can you post the stack trace too?

This is fixed in master:
   pip install --upgrade --no-deps git+https://github.com/CamDavidsonPilon/lifetimes.git


how to add datepicker ?

can anyone help me to add datepicker ?
thanks

Take a look at http://symfony.com/doc/current/reference/forms/types/date.html
Or in JS you can also change type="text" by type="date"

@nympheastudio it
does not help, i got a:
TransformationFailedException in DateTimeToArrayTransformer.php line 76: Expected a \DateTime.

with mysql fields date, datetime and timestamp.


[FLINK-29013][hive] Fix fail to use BinaryRecordReader in "transform using" syntax with Hive dialect

What is the purpose of the change
To fix fail to use  BinaryRecordReader in "transform using" syntax with Hive dialect.
Brief change log

While reading the data with BinaryRecordReader, first to call BinaryRecordReader#createRow to get the reused WritableObject  just like what Hive does.

Verifying this change
Added sql in HiveDialectQueryITCase#testScriptTransform.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot run azure


Update documentation for 3.0

Compatibility notes:

Runtime breaking changes. Must match 3.x runtime and precompiler.
The AST has been upgraded to a public API.

There are a number of changes to this, but the format is now documented in docs/compiler-api.md
The Visitor API has been expanded to support mutation and provide a base implementation

The JavaScriptCompiler APIs have been formalized and documented. As part of the sourcemap handling these should be updated to return arrays for concatenation.
JavaScriptCompiler.namespace has been removed as it was unused.
SafeString is now duck typed on toHTML

New Features to document:

noConflict
Source Maps
Block Params
Strict Mode
@last and other each changes
Chained else blocks
@data methods can now have helper parameters passed to them
Dynamic partials


Logout Route

It's good to use such a package but it's will be better if you add the implementing a logout route by modifying the controllers and adding a handler for logout because the issue that we faced that when for example launch the login for cognito we have the admin page of strapi but when logout, and the second time we login with cognito it redirect directly to strapi admin page, it's normal since we don't launch the logout from cognito

I'm experiencing a similar problem when logging in with Keycloak

@hyudoo Did you find a solution ?

i created a middleware that will redirect when i hit the /admin/auth/login to logout url in keycloak:
// src\middlewares\admin-redirect.js
module.exports = (_config, { strapi }) => {

    const redirects = [
        {
            method: 'GET',
            path: '/admin/auth/login',
            handler: (ctx) => ctx.redirect("http://localhost:8080/realms/strapi/protocol/openid-connect/logout?post_logout_redirect_uri=http://localhost:1337/strapi-plugin-sso/oidc/&client_id=strapicli")
            ,
            config: { auth: false },
        }
    ]
    strapi.server.routes(redirects);
};

i kind of wished there would be a /admin/auth/logout so i could map a redirect for the login and logout separately like so:
{
    method: 'GET',
    path: '/admin/auth/login',
    handler: (ctx) => ctx.redirect('/strapi-plugin-sso/oidc'),
    config: { auth: false },
},
{
    method: 'GET',
    path: '/admin/auth/logout',
    handler: (ctx) => ctx.redirect("http://localhost:8080/realms/strapi/protocol/openid-connect/logout?post_logout_redirect_uri=http://localhost:1337/strapi-plugin-sso/oidc/&client_id=strapicli")
    ,
    config: { auth: false },
}

But unfortunately i couldn't find a way to change the logout button URL,
also the above solution work some of the times it may need another refresh for the middleware to catch it (still investigating)


Listen event on click in notification when notification is on tray section

Expected Behaviour
When the app is in background, I can not listen the event when I click on notification when the notification is in tray
Actual Behaviour
With content-available, I can see how the notifications arrives, but when I click on it, I can not get which notification I clicked on, how I can know that?
`
{
"aps": {

    "alert": "Test background push",

    "content-available": 1

},

"notId": 1 // unique ID you generate

}`
Reproduce Scenario (including but not limited to)
I can reproduce in android, when the app is in background
Steps to Reproduce
1.- Sent different notifications to your cellphone
2.- Click on one of them in tray secction when the app is in background
3.- I can not get which specific notification I clicked on
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Version Android: 6.0.1
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Samsumg TabS
Cordova CLI version and cordova platform version
cordova 7.0.1
cordova platform version android 6.1.2
Plugin version
phonegap-plugin-push 1.10.5 "PushPlugin"
Sample Push Data Payload
`{
"where": {

      "deviceType": {

        "$in": [

          "android"

        ]

    }

},

"data": {

  "title": "The testing 1111",

  "content-available": "1"

}

}`
Sample Code that illustrates the problem
I'm working with ionic2:
pushObject.on('notification').subscribe((data: any) => {        console.log("data " + data); })
Logs taken while reproducing problem
None

@Marcelinne the on('notification') event is called and it should include the payload of your push notification. It's up to you to put unique identifying information in the payload.

@macdonst I see notification is called, but it is called everytime a notification arrives, I need to know when the user click on a specific notification, how and where I can get this event? that event does not do the on(notification)

@Marcelinne when you click on a notification in the system tray does your app open and the on('notification') event get called?

nop, it is not called, that's why I asking where I can get that event?, thanks in advance =)

@Marcelinne please reproduce the issue while gathering some logs adb logcat | grep Push

You shouldn't use "content-available": 1 when you send an alert, "content-available": 1 is for silent notifications, that is probably related to your problem

@jcesarmobile thanks for the advice, I've just tested without alert, and is not working also. I've updated the my example.

@Marcelinne, are you still experiencing this issue? I am also experiencing this issue and am unable to figure out how to fix it. No matter what I do, I cannot get the notification even to fire if the app is not open.
If the app is open, no notification is displayed, and the notification event is fired. This is expected behavior. However, if the app is closed, a notification is displayed (albeit with no sound or vibration; that is a separate issue I am trying to figure out as well). However, upon clicking it, the only thing that happens is that the app is opened (whether a cold start or the last state of the app) and the notification event is not fired.
How do we fix this, and is there a possibility of getting a fully working code sample somewhere?
Thanks!

@alex-polosky if you provide your push payload and some logs I may be able to help.

@alex-polosky I didn't have luck to fix this issue, maybe if you have the logs I may helps us, you can add here. I was not able to get my logs because they were mixed with a plugin that I was using https://github.com/taivo/parse-push-plugin, so I'm trying to separete the logs, once I finish to get the logs I'm going to add too.

@Marcelinne if you were using two different plugins to receive pushes it's quite possible that one was getting the incoming push and not passing it along to the other.

@macdonst  I am also facing same issue. when I click on a notification in the system tray my app opens and the on('notification') event is not called.

@pawan-mittal , @kpwa , and anyone else who might be having this issue:
Take a look at the last two comments I made in #2152 . I attempted to provide a simple demo of what to send, and a simple explanation of what's happening. Take a look at it and see if it helps.


Configuring Latex cross-link text

As of PR #7, the labels on Latex cross links look like: Chapter 2 or Section 2.1.
How do we let people configure these? Command line options? Notebook metadata? Nbconvert config? A separate bookbook config file? Custom templates?

Ideally you might detect from the .tplx template file which latex documentclass is used, and format this accordingly.  I don't know if that information is easy to access, though.

It should be easy enough to regex it out in typical cases, however Latex is flexible enough that making a properly general solution would be difficult. I'm not familiar enough with Latex to know how it would break, though.

Yes; on second thought, there are just too many possible custom document classes; for instance, in my own template file I'm using "SIAMGHbook2016".  We don't want to try to keep up with that kind of thing.


API to get PcodeBasicBlocks splitted with both CALL and BRANCH

I'm trying to build interprocedural CFG for a program with the optimized pcode basic blocks from HighFunction.getBasicBlocks.

However, there are CALL and CALLIND instructions in the middle of a block. I wonder if there are any APIs to get PcodeBasicBlocks splitted with both CALL and BRANCH like instructions. Thanks.

As far as I know, only Instruction-level block models are currently exposed in our API - although I could be wrong.  While the Decompiler uses this pcode block model concept internally, its code is written in C and is not exposed.

OK, thank you.


Error: Building package zlib:x86-windows failed with: BUILD_FAILED

I'm trying to get started with vcpkg but haven't been able to install any packages.
I am on Windows 10:
> .\vcpkg env --triplet x64-windows
Microsoft Windows [Version 10.0.19042.928]
(c) Microsoft Corporation. All rights reserved.

And have Visual Studio Professional 2017 (this isn't something I can upgrade to a newer version) installed with the "Desktop development with C++" workload:

Yes - I am able to compile C++ projects in my VS installation.
Note: On a separate Windows 10 machine I have tested using vcpkg with Visual Studio Community Edition 2019 and had no problems.
I've managed to wander through countless Microsoft blog posts, StackOverflow answers, various personal dev blogs, and even dug through several issues posted here on GitHub. I've reinstalled/modified my Visual Studio install a bizarre number of times, not to mention the trusty old reboot "trick", but absolutely nothing has helped so I'm definitely feeling frustrated!
I can successfully clone the repo and run the bootstrap step as per the quick start guide for windows:
> git clone https://github.com/microsoft/vcpkg.git
...
> cd vcpkg
> .\bootstrap-vcpkg.bat -disableMetrics
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2021-02-24-d67989bce1043b98092ac45996a8230a059a2d7e/vcpkg.exe -> C:\Users\*****\git\vcpkg\vcpkg.exe
Done.

Unfortunately, this is the extent of the success I've had. Trying to install anything crashes:

vcpkg Crash Dump
> .\vcpkg install zlib
Computing installation plan...
A suitable version of cmake was not found (required v3.20.1). Downloading portable cmake v3.20.1...
Downloading cmake...
  https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-windows-i386.zip -> C:\Users\*****\git\vcpkg\downloads\cmake-3.20.1-windows-i386.zip
Extracting cmake...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> C:\Users\*****\git\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.5.1). Downloading portable nuget v5.5.1...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> C:\Users\*****\git\vcpkg\downloads\22ea847d-nuget.exe
The following packages will be built and installed:
    zlib[core]:x86-windows -> 1.2.11#10
Detecting compiler hash for triplet x86-windows...
A suitable version of powershell-core was not found (required v7.1.3). Downloading portable powershell-core v7.1.3...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/PowerShell-7.1.3-win-x86.zip -> C:\Users\*****\git\vcpkg\downloads\PowerShell-7.1.3-win-x86.zip
Extracting powershell-core...
Could not locate cached archive: C:\Users\*****\AppData\Local\vcpkg\archives\8e\8e9fca6802fc361a672ac29aa230198d2c69e53b.zip
Starting package 1/1: zlib:x86-windows
Building package zlib[core]:x86-windows...
-- Downloading http://www.zlib.net/zlib-1.2.11.tar.gz -> zlib1211.tar.gz...
-- Extracting source C:/Users/*****/git/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Applying patch 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-- Applying patch add_debug_postfix_on_mingw.patch
-- Applying patch 0002-android-build-mingw.patch
-- Using source at C:/Users/*****/git/vcpkg/buildtrees/zlib/src/1.2.11-e9a093319e.clean
-- Configuring x86-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:105 (message):
    Command failed: ninja -v
    Working Directory: C:/Users/*****/git/vcpkg/buildtrees/zlib/x86-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      C:\Users\*****\git\vcpkg\buildtrees\zlib\config-x86-windows-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:324 (vcpkg_execute_required_process)
  ports/zlib/portfile.cmake:23 (vcpkg_configure_cmake)
  scripts/ports.cmake:142 (include)

Error: Building package zlib:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: zlib:x86-windows
  Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e

Additionally, attach any relevant sections from the log files above.

Just for laughs, I have attached the logs for both x64 and x86:
config-x64-windows-out.log
config-x86-windows-out.log
x64-CMakeError.log
x86-CMakeError.log
Any pointers, even to tell me that I've done something horribly backwards and dumb, would be greatly appreciated.

I am the same error

Detecting C compiler ABI info failed to compile with the following output:
Change Dir: D:/software/vcpkg-master/buildtrees/brotli/x86-windows-rel/CMakeFiles/CMakeTmp
Run Build Command(s):D:/software/vcpkg-master/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_e68ff && [1/2] Building C object CMakeFiles\cmTC_e68ff.dir\CMakeCCompilerABI.c.obj
[2/2] Linking C executable cmTC_e68ff.exe
FAILED: cmTC_e68ff.exe
cmd.exe /C "cd . && D:\software\vcpkg-master\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_e68ff.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe /nologo CMakeFiles\cmTC_e68ff.dir\CMakeCCompilerABI.c.obj  /out:cmTC_e68ff.exe /implib:cmTC_e68ff.lib /pdb:cmTC_e68ff.pdb /version:0.0 /machine:X86  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_e68ff.dir/manifest.res CMakeFiles\cmTC_e68ff.dir/manifest.rc" failed (exit code 0) with the following output:
系统找不到指定的文件。
ninja: build stopped: subcommand failed.
Determining if the C compiler works failed with the following output:
Change Dir: D:/software/vcpkg-master/buildtrees/brotli/x86-windows-rel/CMakeFiles/CMakeTmp
Run Build Command(s):D:/software/vcpkg-master/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_285f6 && [1/2] Building C object CMakeFiles\cmTC_285f6.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_285f6.exe
FAILED: cmTC_285f6.exe
cmd.exe /C "cd . && D:\software\vcpkg-master\downloads\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_285f6.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe /nologo CMakeFiles\cmTC_285f6.dir\testCCompiler.c.obj  /out:cmTC_285f6.exe /implib:cmTC_285f6.lib /pdb:cmTC_285f6.pdb /version:0.0 /machine:X86  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_285f6.dir/manifest.res CMakeFiles\cmTC_285f6.dir/manifest.rc" failed (exit code 0) with the following output:
系统找不到指定的文件。
ninja: build stopped: subcommand failed.

？

Hi @njalerikson
Thanks for posting this issue.
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Users/*****/git/vcpkg/downloads/tools/cmake-3.20.1-windows/cmake-3.20.1-windows-i386/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/*****/git/vcpkg/buildtrees/zlib/x64-windows-rel/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Users/*****/git/vcpkg/downloads/tools/ninja/1.10.1-windows/ninja.exe cmTC_74a31 && [1/2] Building C object CMakeFiles\cmTC_74a31.dir\testCCompiler.c.obj
    [2/2] Linking C executable cmTC_74a31.exe
    FAILED: cmTC_74a31.exe
    cmd.exe /C "cd . && C:\Users\*****\git\vcpkg\downloads\tools\cmake-3.20.1-windows\cmake-3.20.1-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_74a31.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_74a31.dir\testCCompiler.c.obj  /out:cmTC_74a31.exe /implib:cmTC_74a31.lib /pdb:cmTC_74a31.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    RC Pass 1: command "rc /fo CMakeFiles\cmTC_74a31.dir/manifest.res CMakeFiles\cmTC_74a31.dir/manifest.rc" failed (exit code 0) with the following output:
    The system cannot find the file specified
    ninja: build stopped: subcommand failed.

Please help check if you have installed one of Windows SDKs in Visual Studio 2017.
@xilutian
Besides Windows SDK, please also make sure if you have installed English package in Visual Studio 2017.


Update CODEOWNERS with msgraph-devx-go-write

I've removed all individual access grants. All write access now goes through https://github.com/orgs/microsoftgraph/teams/msgraph-devx-go-write team. Please manage code owners through this team.
Admin settings now require JIT admin grant elevation through the Open Source Management Portal.

The group doesn't exist (yet?) can you double check with @MIchaelMainer please?

Looks like it doesnt have access to this repo. I've contacted @MIchaelMainer

Actually I just realized you defined this with a team from another organization. I don't think that's allowed on GitHub. We'd need to define teams under this organization.

Let me close this PR, just noticed the same. Thank you


All binaries are created equal.


[BUG] Same multiple alert messages when switching between source chains

Overview
Same multiple alert messages are shown when switching between different source chains.
Issue screenshot

Loom video
https://www.loom.com/share/00051b20deb049cd828e570042fd6b2d
Tested on branch https://github.com/webb-tools/webb-dapp/pull/850 merged into develop.

Closing this issue as it was not found on latest updates on develop branch.
Loom video:
https://www.loom.com/share/4074e9fc9a904b67879d361538cd54ba
Tested on #901 into develop.

Issue persists - https://www.loom.com/share/d727debc5fad4d348149fa03dee50400

@dutterbutter
Issue seems to be found when something breaks (not related to notification) during development. Change of chain notification is triggered only once 99% of the times. Unable to reproduce this issue and find the root cause of it in the code as the notification is working correctly. Need to know if this is reproducible on your end.
Issue not found:
https://www.loom.com/share/09b7e3c4aba74ddeaca63091fbb49d1f


Simplify interaction response

It turns out that instead of using interaction.response.send_message() or interaction.followup.send() based off of whether we have deferred or not, we can just use interaction.send() and nextcord calls the correct one for us. Not sure how we missed this one lol.

Do we still need to defer to acknowledge an interaction, if interaction.send() handles the followup?
Other than that, LGTM

Do we still need to defer to acknowledge an interaction, if interaction.send() handles the followup?
Other than that, LGTM

Yes, the point of deferral is to 1) show the user Busty is thinking before long operations, and 2) ack the interaction so it doesn't timeout in 3 seconds. This code is functionally equivalent to what existed before, it just chooses response vs followup based on whether the interaction has been responded to already.


add support for graph output

see TODO at the bottom of the README

https://graphs.grevian.org/example

Hi, @monperrus, for the --json & --dot output, I am wondering what information do we need in the files.
For .json, I generate summary(address & count) of the calls, example can be seen here: https://github.com/chains-project/scsc/blob/poc-graph/scsc/try_exp/0x3451B6b219478037a1AC572706627FC2BDa1e812_21059800_2024_10_27_22_18_51.json
For .dot, I generate file with node, edge and labels, example can be seen here: https://github.com/chains-project/scsc/blob/poc-graph/scsc/traces.dot
Are they what we want?

For .dot, I generate file with node, edge and labels, example can be seen here: poc-graph/scsc/traces.dot

good first version. dot is too primitive because it's not interactive. today, we can generate an HTML page to represent a beautiful graph in an interactive way, using a cool graph JS library.
side-note: we don't print all disjoint subgraphs on the same graph, we print one connected component per file.


Customization of the Y label text in LineChart

The yAxisLabelText prop in lineDataItem seems not to do anything.
Also the yAxisLabelTexts array does not work properly, it only shows Nan.
Is there another way to customize the y axis labels?
Could it be possible to have the same approach of the x label using a customLabelComponent for the y label texts?

Hi @sareyMediaLabIng 👋
This has been fixed from version 1.4.13 onwards 🎉
Please use the latest version of the library.


Use Strided for permutedims

Jutho has a nice package called Strided.jl which has a custom implementation of Julia's permutedims that acts lazily and can fuse with other operations with broadcasting. This pull request uses it as a drop-in replacement for permutedims[!] in NDTensors (including replacing our custom version that applies a function).
Here are some results running examples/dmrg/exthubbard.jl. On master:
After sweep 1 energy=-15.684191171846 maxlinkdim=50 time=0.593
After sweep 2 energy=-17.211812572484 maxlinkdim=100 time=1.379
After sweep 3 energy=-17.429068161255 maxlinkdim=200 time=2.681
After sweep 4 energy=-17.435370008361 maxlinkdim=400 time=5.339
After sweep 5 energy=-17.435415463390 maxlinkdim=630 time=8.128
After sweep 6 energy=-17.435415758946 maxlinkdim=654 time=6.943

and on this branch:
After sweep 1 energy=-16.351502376855 maxlinkdim=50 time=0.739
After sweep 2 energy=-17.342280545549 maxlinkdim=100 time=1.504
After sweep 3 energy=-17.434333146203 maxlinkdim=200 time=2.607
After sweep 4 energy=-17.435410320715 maxlinkdim=400 time=4.993
After sweep 5 energy=-17.435415710430 maxlinkdim=603 time=6.444
After sweep 6 energy=-17.435415760166 maxlinkdim=618 time=6.199

Not a huge speedup over all, but of course permutedims wasn't dominating the dmrg cost so it is pretty good.
For reference, here is the same run in C++ ITensor v3:
    Largest link dim during sweep 1/6 was 50
    Energy after sweep 1/6 is -13.654587063495
    Sweep 1/6 CPU time = 0.361s (Wall time = 0.266s)

    Largest link dim during sweep 2/6 was 100
    Energy after sweep 2/6 is -16.892217260698
    Sweep 2/6 CPU time = 5.572s (Wall time = 1.003s)

    Largest link dim during sweep 3/6 was 200
    Energy after sweep 3/6 is -17.409957867258
    Sweep 3/6 CPU time = 11.16s (Wall time = 1.947s)

    Largest link dim during sweep 4/6 was 400
    Energy after sweep 4/6 is -17.435221134464
    Sweep 4/6 CPU time = 18.04s (Wall time = 3.160s)

    Largest link dim during sweep 5/6 was 713
    Energy after sweep 5/6 is -17.435414564047
    Sweep 5/6 CPU time = 35.16s (Wall time = 6.151s)

    Largest link dim during sweep 6/6 was 659
    Energy after sweep 6/6 is -17.435415752219
    Sweep 6/6 CPU time = 26.14s (Wall time = 4.591s)

so it is not too far off. All of these runs are with MKL, letting MKL choose the number of threads.
There are still some things to play with, for example Strided.jl supports multithreaded permutedims. On a first test adding more threads made things slower, perhaps because it was competing with MKL BLAS threads. I tried turning off MKL BLAS threads and I still didn't see Strided.jl's multithreading helping much.
I did some profiling of the exthubbard.jl dmrg run, and focused first on permutedims since I saw it show up heavily in the profile. There were a few other things that showed up a bit too much, for example some contraction logic and block contraction logic, which we should look into. Calls to svd_recursive also showed up, so I added an svd_alg keyword argument to dmrg. Using svd_alg = "divide_and_conquer", here are the results:
After sweep 1 energy=-15.134829206976 maxlinkdim=50 time=0.589
After sweep 2 energy=-17.068192318420 maxlinkdim=100 time=1.409
After sweep 3 energy=-17.423436286897 maxlinkdim=200 time=2.571
After sweep 4 energy=-17.435342471525 maxlinkdim=400 time=4.436
After sweep 5 energy=-17.435415113102 maxlinkdim=653 time=6.820
After sweep 6 energy=-17.435415754267 maxlinkdim=657 time=5.609

so another modest speedup.

Codecov Report

Merging #333 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #333   +/-   ##
=======================================
  Coverage   84.26%   84.26%
=======================================
  Files          36       36
  Lines        3083     3083
=======================================
  Hits         2598     2598
  Misses        485      485

Impacted Files
Coverage Δ

src/mps/dmrg.jl
86.66% <ø> (ø)

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 ff0a539...0a3fff8. Read the comment docs.

Reminder to move the dependency to NDTensors (may have to happen post registration of packages)

Hi @mtfishman , that's great to see. I see a similar issue with multithreading in tensor contractions in my own packages TensorOperations.jl and TensorKit.jl. When benchmarking a single permutation, the multithreading helps, but in combination with contractions, it seems to slow it down, even though the BLAS threads should not be competing with the Strided/permutation threads, as these run at different times. Not sure what is causing this, but I should definitely find some time to update Strided to use the new multithreading infrastructure of Julia (though I am not sure this will solve it).

@Jutho, helpful to hear that you have seen similar issues with multithreading and it wasn't just a mistake I was making. Looking forward to future versions of the package, please keep us updated and we would be happy to try out new features and provide benchmarks.
The way the package works fluidly with permutedims within broadcast calls is great, it will be very helpful for adding generic support of broadcasting with ITensors (where addition of ITensors generally involves permutations of dimensions).

Hi @mtfishman and @emstoudenmire . Strided has been updated to 1.0.0. I think problems with multithreading slowing things down should be much improved. Also, there is more control to set the number of threads in Strided, e.g. there is a Strided.set_num_threads().

@Jutho, that is great, thanks for the update! I'm looking forward to trying it out. I was wondering if there would be a good strategy for setting threads on a module-by-module basis, looks like you figured out a nice interface. That will be very helpful as we start adding multithreading to ITensors.jl.
Am I reading the README of Strided.jl correctly that you have a custom multithreaded matrix multiplication in that package that is within a few percent of OpenBLAS and MKL performance? If so that sounds like a really big deal!

But it still uses standard BLAS for the single threads right; it just takes the multithreading in its own hands (in fact, it requires the user to manually set LinearAlgebra.BLAS.set_num_threads(1); maybe it should print a warning that this should be done).
It's not something like the truly amazing work of LoopVectorization.jl .

I see. I guess the implementation is here? https://github.com/Jutho/Strided.jl/blob/439b79690a3098942794b02b859855236916bb38/src/abstractstridedview.jl#L141
Looks deceptively simple. Very cool that it has good performance, sounds very useful to allow Julia to take over the threading (in C++ we just turn off BLAS multithreading altogether when we use multithreading for block-sparse tensor contraction).

Yes that’s the one. But it should also be benchmarked a bit more carefully to conclude (with statistical significance) that it is on par with OpenBLAS/MKL's multithreading model.
In Julia, it would be easy to do LinearAlgebra.BLAS.set_num_threads(1) before this runs and restore the number of BLAS threads at the end. The only problem is that there is no BLAS.get_num_threads() to actually query the number of threads that you want to restore at the end. But it is not that hard to write it yourself.

Yes, I suppose the block size 1024 could also be played around with, and may be system dependent?
That sounds like it would be helpful (so someone can automatically use Julia threading using your matrix multiplication and BLAS threading for matrix decompositions), strange that function is not provided already. Maybe it is a pain to get correct for every system, version of BLAS, etc. but presumably they already dealt with all that when making LinearAlgebra.BLAS.set_num_threads.

You can express your support here:
https://github.com/JuliaLang/julia/pull/21105


Find a way to improve the rule declaration.

Maybe there is something to do to simplify the rule declaration.

Idea 1:
(def-grammar parse-json
             (rule-1 := ...)
             (rule-2 := ...)
             (label := (:or #'rule-1 #'rule-2)


Add informer setup for placemanifestwork

add index and informer to watch resources
build binary for hub manager

Signed-off-by: Jian Qiu<EMAIL_ADDRESS>

/assign @serngawy

I guess its missing adding the pkg/cmd/hub to the main at the cmd/work/main ?

added. Thanks for reminding :)


Adding PayPal client binding to app provider

Now, each time we want to use the PayPal client, it will be ready for us

Thank you very much for your contribution. I will how ever be closing this due to a major refactor - Feel free to re-open your PR by then 👍🏻


[ABW-3462] Creating persona sheet

Description
This PR uses pattern introduced for account creation but in context of creating persona.
How to test

Verify that bottom sheet is shown when creating persona.
Verify that behavior when creating account/ledger account is unchanged

PR submission checklist

[ ] I have tested entity creation

looks better now! 💯
One thing that I noticed is that a snackbar message is shown when cancelling the biometric auth of persona creation. Maybe we should remove this?

Will double check this


[Lake] Support publish schema change version

What type of PR is this：

[ ] bug
[x] feature
[ ] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Should firstly apply schema change txn log, then apply txn version logs,
because the rowsets in txn log are older.
base_version should be specified as 1 to get the initial metadata.
Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] I have added user document for my new feature or new function

run starrocks_admit_test

run starrocks_admit_test

run starrocks_admit_test


chore: move ac_rfl to Std

Move ac_rfl tactic to Std.
Companion PRs std4#573 and mathlib4#10152.
Closes #3198

WIP

awaiting-review

Thanks for the PR, but we have decided to keep tactics in core.


✨ New Extension: Jira2Git

Description
The tool for making Jira and Git work together smoothly as silk for a better development experience.
Features

Transform Jira URL to Git branch name

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi 👋
Would it make sense to build it into one of the already existing JIRA extensions? I don't use JIRA myself so I might not be the right to judge 😊

👋 Hi @pernielsentikaer,
From my understanding, the mentions plugin creating for Jira management but my plugin does not manage anything. It just grabs some data from Jira to make something for developers to make them work smoothly.
Thank you for your advice 😃

@pernielsentikaer Already updated the screen casting to align with your update.


OBO Academy exercise: add axioms

add an Equivalent To
add SubClass of

NOT a real example!!!!!!!
a variation in the gene KCNJ10 was found to be responsible for cone-rod dystrophy 8 (MONDO:0011564).
!!!! This issue is for ontology training only !!!!!!

Remember to

create a new branch
create a PR (after you made changes)
refer to this issue in your PR
tag Sabrina (or someone else) to review your work

For demo/teaching only. Closing.


UAV tutorial

This is the UAV/Drone Tracking tutorial. I've also included a pickle file with the ground truth. The tutorial requires the following libraries: pandas, pymap3d, pickle.

It's sensibly structured and contains all the elements you need. I haven't been able to see it rendered though as I can't find the branch. Is it private somehow?

The branch is on my fork of the Stone Soup project. I would think you should be able to see it.

Could we move this to the "Demonstration" section docs/demos folder.

It's sensibly structured and contains all the elements you need. I haven't been able to see it rendered though as I can't find the branch. Is it private somehow?

The branch is on my fork of the Stone Soup project. I would think you should be able to see it.

Here's a nice simple way: https://stackoverflow.com/a/30584951

Closing this. It is superseded by subsequent PR.


[BUG 🪲] DrawBorderSettings::WithBorder or DrawBorderSettings::WithoutBorder causes panic: GraphicsCaptureApiError(BorderConfigUnsupported)

Describe the bug 🐛
Using the settings DrawBorderSettings::WithBorder or DrawBorderSettings::WithoutBorder causes a GraphicsCaptureApiError(BorderConfigUnsupported) panic in 1.2.0 (also when using the git repo as a dependency, as 1.2.1 cannot be found according to cargo)
Expected behavior 📝
Regular capture behavior that is seen when using DrawBorderSettings::Default
OS 🤖

Version: [e.g. 11] Windows 10 Pro
Build[e.g. 22H2] 22H2 (19045.4529)

Additional context ➕
Add any other context about the problem here.
let settings = Settings::new(
        primary_monitor,
        CursorCaptureSettings::Default,
        DrawBorderSettings::WithBorder,  // ERROR CAUSED HERE -- Only accepts ::Default
        ColorFormat::Rgba8,
        "Yea This Works".to_string(),
    );

Full Output
C:/Users/User/.cargo/bin/cargo.exe run --color=always --package win-cap-tst --bin win-cap-tst
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target\debug\win-cap-tst.exe`
Got The Flag: Yea This Works
thread 'main' panicked at src/main.rs:109:44:
Screen Capture Failed: GraphicsCaptureApiError(BorderConfigUnsupported)
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\panicking.rs:652
   1: core::panicking::panic_fmt
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\core\src\panicking.rs:72
   2: core::result::unwrap_failed
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\core\src\result.rs:1679
   3: enum2$<core::result::Result<windows_capture::capture::CaptureControl<win_cap_tst::Capture,alloc::boxed::Box<dyn$<core::error::Error,core::marker::Send,core::marker::Sync>,alloc::alloc::Global> >,enum2$<windows_capture::capture::GraphicsCaptureApiError<allo
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9\library\core\src\result.rs:1059
   4: win_cap_tst::main
             at .\src\main.rs:109
   5: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9\library\core\src\ops\function.rs:250
   6: core::hint::black_box
             at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9\library\core\src\hint.rs:338
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `target\debug\win-cap-tst.exe` (exit code: 101)
Process finished with exit code 101

Hey, the panic is in Capture::start and it's not a panic you can handle the error currently other options are only supported in windows 11.

@NiiightmareXD you misunderstand me, I meant that the line/value I highlighted is what causes Capture::start to panic, not that the setting construction panics.
But yea, it would be nice to have wincap gracefully handle the issue when windows is not 11, or at the very least, have this issue documented. For now I'll handle it on my end

@NiiightmareXD you misunderstand me, I meant that the line/value I highlighted is what causes Capture::start to panic, not that the setting construction panics.
But yea, it would be nice to have wincap gracefully handle the issue when windows is not 11, or at the very least, have this issue documented. For now I'll handle it on my end

It doesn't panic, just return an Err(_).
I can't really gracefully handle it without returning to the default behavior which may not be the same as specified in the settings.

@NiiightmareXD yeah understandable, was just looking at the implementation in graphics_capture_api.rs


Fix React complaint about missing key prop

Think this is an old branch, because I merged a fix for this already

Whoops! My mistake.


User location should not be hidden by Markers

I have a map where I am displaying user location, polylines, and markers on the map.
When the user moves on to a position that intersects a polyline, the User Location indicator is still visible (which is great), however, when the user moves to the marker, the User Location indicator is covered by the Marker and they can't see their location.
Is there a way to make the User Location indicator the highest z index such that it occludes all of the other elements?

+1

try #1845

May be related to #483

I have putted all my markers to negative zIndex values


Fix Namespace Translation in Resource Replication

Description
This pr includes a fix for a bug in the namespace translation, that caused the replication of resources instability when peered with multiple clusters if both the remote tenant namespace had the same name
How Has This Been Tested?

[x] Locally on KinD
[x] On multiple clusters geographically distributed, and with multiple topologies

/rebase

/merge


What about android instant verification

https://github.com/arnesson/cordova-plugin-firebase/blob/58c55c39f27f3b9628beccf6117a1b4b592d42db/src/android/FirebasePlugin.java#L673
do we have to cover this case? Creating a own callback for this should not be a big deal, but can we make sure that instant verification isn't active for us?
Currently my whole UI depends on showing an custom SMS Code Input field, but should this case really happen, we need to make sure to cover.

ping @soumak77

any PRs are welcome

Well.. shit.
PhoneAuthCredential only has
getProvider()
getSmsCode()

And get getSmsCode can be null if verified instantly (which will never happen, as we're using the js-sdk to finalize the auth process)... but onVerificationCompleted can still be called if the SMS-Code was fetched automatically, but It won't pass back the verificationId which is imporant for us to create a credential.

I've added a simple callback to the onVerificationComplete (with verificationId set to false) and another key, "instantActivation: true" (onCodeSent I've set this to false).
This will at least trigger the registered callback, but you can't do really anything with it, but at this exception, I will call my server for a custom token and instead of creating a credential based on verificationId and  code, I sign in with "signInWithCustomToken". This is really the only way to get things work.
This could help some ppl out there. I will provide some bundled PRs, they are not a solution to the whole problem (this can't be managed with this plugin, maybe a real "native" solution could fix this, but at least it makes it possible to incorporate a workaround/fallback)

PR is out


nuke: python3 compatibility issue with iteritems

Brief description
iteritems is python2 function and python3 was crashing.

There are different items in the context menu:
Before the fix:

After the fix:


How to properly disconnect bluetooth device?

Which sample are you reporting a bug in?
Example: BluetoothLE
Describe the bug
I have an issue with disconnecting bluetooth device. I can successfully connect to device and then write value to characteristic. This works fine and it was tested. When I disconnect the bluetooth device the connection is still active.
To disconnect bluetooth device I followed this method in sample project:
https://github.com/microsoft/Windows-universal-samples/blob/b1cb20f191d3fd99ce89df50c5b7d1a6e2382c01/Samples/BluetoothLE/cs/Scenario2_Client.xaml.cs#L78
Plus I dispose all services:
var services = await bluetoothLeDevice.GetGattServicesAsync();
foreach(var service in services.Services)
{
   service?.Session?.Dispose();
   service?.Dispose();
}

Could you tell what I have to do in order to close the connection? Or could you please update the sample project? Thank you.
To Reproduce
Steps to reproduce the behavior:

Connect bluetooth button in the sample project
Disconnect the device

Expected behavior
The bluetooth device should be disconnected between the app.
Screenshots
NA
Configuration

Language/architecture/flavor: C#
Windows platform and build number: build 16299

Additional context
Similar stackoverflow post.

I am also adding the code how I do write to characteristic:
bluetoothLeDevice = await BluetoothLEDevice.FromIdAsync(rootPage.SelectedBleDeviceId);
var services = await bluetoothLeDevice.GetGattServicesAsync();
var service = services.Services.Where(s => s.Uuid.Equals(VSNGattServiceGuid)).First();
var characteristics = await service.GetCharacteristicsAsync();
var characteristic = characteristics.Characteristics.Where(ch => ch.Uuid.Equals(VerificationCharacteristicGuid)).First();

var writer = new DataWriter();

writer.WriteByte(0x80);
writer.WriteByte(0xBE);
writer.WriteByte(0xF5);
writer.WriteByte(0xAC);
writer.WriteByte(0xFF);

await characteristic.WriteValueAsync(writer.DetachBuffer());

Do you have to do something special to dispose write characteristic? If so could you please update sample and documentation for all of these?

Any progress in this issue? I'm trying the same thing.

Any updates?

It looks like you're reporting a problem in your own app, not in the sample. The feature teams do not monitor the samples repos for OS questions. You can follow the instructions on Windows developer support for support options. (Click "Microsoft Q&A".)


Why?

Not trying to be snarky here, but I genuinely don't understand what problem this library is meant to solve, that's not equally solved with dangerouslySetInnerHTML. Does it provide some benefit with regard to security or performance? Does it offer some special functionality?  The readme just says this avoids use of dangerouslySetInnerHTML, but it's not clear to me why that's desirable.

I pulled this from an open PR for an example:
const transform = (node) => {
  if (node.name === 'a') {
    node.attribs.target = '_blank';
    return convertNodeToElement(node);
  }
};

Basically that you may need to control some aspects of the HTML. It allows you to override attributes such as using a different target so users don't leave your app. In general I don't think you need this unless you want to customize output.

@chadwilken ah, I think I see what you're saying.  Would you mind providing a slightly fuller example with a little more context so I can see how/where one would use this transform() method you showed above?

We create a custom component that wraps this lib to make sure than anywhere we render HTML it will always open links in a new tab. You could do this for a bunch of different things though such as adding utms or other data attributes for analytics libraries.
import ReactHtmlParser, { convertNodeToElement } from 'react-html-parser';

const transform = (node) => {
  if (node.name === 'a') {
    node.attribs.target = '_blank';
    return convertNodeToElement(node);
  }
};

const RichText = (html) => {
  return ReactHtmlParser(html, { transform });
};

export default RichText;

Ah, makes sense.  Thanks!

Opening in a new tab won't necessarily make it secure. You would also need rel="noreferrer noopener".
https://web.dev/external-anchors-use-rel-noopener/

Does this package also prevent <script> tags from being rendered?


MediaRecorder and VideoSource.SURFACE, stop failed: -1007

07-29 14:44:22.825 8076-8076/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.android.camera2video, PID: 8076
    java.lang.RuntimeException: stop failed.
        at android.media.MediaRecorder.stop(Native Method)
        at com.example.android.camera2video.Camera2VideoFragment.stopRecordingVideo(Camera2VideoFragment.java:682)
        at com.example.android.camera2video.Camera2VideoFragment.onClick(Camera2VideoFragment.java:312)
        at android.view.View.performClick(View.java:5215)
        at android.view.View$PerformClick.run(View.java:21193)
        at android.os.Handler.handleCallback(Handler.java:742)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:157)
        at android.app.ActivityThread.main(ActivityThread.java:5571)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)

Tested devices:
WORKS OK ON:
- Lenovo P2 (Android 7)
- Xiaomi Mi A1 (Android 8)
DOESN'T WORK ON (stop fails with -1007, small video file and can't be played):
- Xiaomi Redmi 5 (Android 7)
- Sony Xperia (I don't remember the exact model and Android OS)
- Xiaomi Redmi 4 Prime (Android 6)
Also I reported this issue already
https://stackoverflow.com/questions/51332386/mediarecorder-and-videosource-surface-stop-failed-1007-a-serious-android-bug
https://issuetracker.google.com/issues/111433520
Just deprecate next API
MediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
it's all buggy and usually works only Google Nexuses but Android works on many other devices
Just implement some other API which will work 100% for all devices
Yes we can use MediaCodec and OpenGL ES but it's very difficult
Just make some friendly API which will allow to record video, edit frames before recording (to add timestamp text for example) and background recording

This problem occurred when I clicked the record button frequently. The temporary solution is to reduce the frequent clicking, hoping to help you

我在频繁点击录制按钮出现这个问题，暂时的解决方法是减少频繁点击，希望能帮到你

This problem occurred when I clicked the record button frequently. The temporary solution is to reduce the frequent clicking, hoping to help you

This sample has been migrated to a new location (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!


Adding a Jasco ZWave Smart Motion Switch creates duplicated entities

Home Assistant release with the issue:

Home Assistant: 0.99.3
Frontend version: 20190919.1 - latest
Last working Home Assistant release (if known):
Unknown
Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io
Integration:

https://www.home-assistant.io/integrations/zwave
Description of problem:
When adding a new Jasco Smart Motion Switch, the entitye registry end up with duplicated entries.
core.entity.registry:
            {
                "area_id": null,
                "config_entries": [
                    "f4e615855908483eadda08b611f14263"
                ],
                "connections": [],
                "id": "dbe083b809104d4784aa022e4723c1ad",
                "identifiers": [
                    [
                        "zwave",
                        7,
                        2
                    ]
                ],
                "manufacturer": "Jasco Products",
                "model": "26931 Smart Motion Switch",
                "name": "Jasco Products 26931 Smart Motion Switch (2)",
                "name_by_user": "Server Room Smart Motion Switch (Delete)",
                "sw_version": null,
                "via_device_id": "8e5faa55b82149e99c32d7af15c7db00"
            },
            {
                "area_id": null,
                "config_entries": [
                    "f4e615855908483eadda08b611f14263"
                ],
                "connections": [],
                "id": "8e5faa55b82149e99c32d7af15c7db00",
                "identifiers": [
                    [
                        "zwave",
                        7
                    ]
                ],
                "manufacturer": "Jasco Products",
                "model": "26931 Smart Motion Switch",
                "name": "Jasco Products 26931 Smart Motion Switch",
                "name_by_user": null,
                "sw_version": null,
                "via_device_id": "efd8e7f44e2841df99f5944af52c3e4e"
            }
        ]
    },

Traceback (if applicable):

Additional information:

After doping some renames, I get this in the log:
2019-10-04 18:49:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.jasco_products_26931_smart_motion_switch_switch_2 is incorrectly being triggered for updates while it is disabled. This is a bug in the zwave integration.
2019-10-04 18:49:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.jasco_products_26931_smart_motion_switch_alarm_type_2 is incorrectly being triggered for updates while it is disabled. This is a bug in the zwave integration.
2019-10-04 18:49:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.jasco_products_26931_smart_motion_switch_alarm_level_2 is incorrectly being triggered for updates while it is disabled. This is a bug in the zwave integration.
2019-10-04 18:49:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.jasco_products_26931_smart_motion_switch_sourcenodeid_2 is incorrectly being triggered for updates while it is disabled. This is a bug in the zwave integration.
2019-10-04 18:49:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.jasco_products_26931_smart_motion_switch_burglar_2 is incorrectly being triggered for updates while it is disabled. This is a bug in the zwave integration.

Multiple users are reporting this problem.

Move it to new issue


Issues with adjtime implementation / Build failure.

adjtime() is the semi-standard method used in NuttX, Linux, and FreeBSD to gradually adapt the system time so that it is in agreement with RTC time.  It differs from clock_synchronize() or clock_resynchronize() in that it is intended to be used during normal runtime without disrupting ongoing timing operations rather than at exceptional times like power up or wake-up from sleep.
adjtime() is implemented in sched/clock/clock_timekeeping.  A quick review reveals several problems:

Missing system call.  The implemented of adjtime() is provided, but there is no call gate implemented in syscall/ and include/sys [NOT a problem.  See comment below].

Adjustment has limited range.  The logic calculates a separate adjustment that is added to the current time (a timespec).  The  adjustment value is a type long with an LSB of 1 nonosecond.  So the total range is only +/-2 seconds (assuming that long is 32-bits).  That is an insufficient range for systems that are always on.

This is because adjtime() does not follow the man page:  "If the adjustment in delta is positive, then the system clock is  speeded up by some small percentage (i.e., by adding a small  amount of time to the clock value in each second) until the  adjustment has been completed.  If the adjustment in delta is negative, then the clock is slowed down in a similar fashion."
If small adjustments were added to a full timespec or if the clock rate is modified instead, overflow would not occur.

Notice that the man page quote above does not talk about adjustments to the time, but rather about adjustments to the rate of the clock (speeded up or slowed down.  Hmmm..  There is no such word as speeded up, is there?  Isn't the past tense of speed sped, not speeded.)

No guarantee of monotonically increasing time.  The requirement is:  "The adjustment that adjtime() makes to the clock is carried out   in such a manner that the clock is always monotonically  increasing."  But I see nothing that guarantees this.  If adjtime() were implemented correctly so that the clock rate is adjusted, not the current time, then that would meet this requirement.

If the rate of the clock source is set even just a little too fast, it would be impossible to both adjust the time downward and to also guarantee a strictly monotonically increasing time.  The only way to accomplish that would be to adjust the clock rate downward.
Forward time steps should also be small.  The corrections are suppose to work gradually over time.
If system time were to "go backward" that could result in threads locking up waiting under certain circumstances.: Calculated time delays would be enormous.
Reference:  https://man7.org/linux/man-pages/man3/adjtime.3.html (Linux) and https://man.freebsd.org/cgi/man.cgi?query=adjtime&sektion=2&n=1 (FreeBSD)

Build Failure.  If I try building a configuration with CONFIG_CLOCK_TIMEKEEPING enabled, the build fails with the error:
clock/clock_initialize.c:340:35  error 'g_basetime' undeclared (first use in this function): ...

This is because g_basetime is conditionally compiled out when CONFIG_CLOCK_TIMEKEEPING is enabled.  However the following commit added references to g_basetime that are not guarded by CONFIG_CLOCK_TIMEKEEPING:
46bd8798c55 sched/clock/clock_initialize.c (Xiang Xiao      2018-11-12 06:50:37 -0600 371)       rtc_diff->tv_sec  = rtc_time.tv_sec  - curr_ts.tv_sec;
46bd8798c55 sched/clock/clock_initialize.c (Xiang Xiao      2018-11-12 06:50:37 -0600 372)       rtc_diff->tv_nsec = rtc_time.tv_nsec - curr_ts.tv_nsec;

commit 46bd8798c551c2fb5f26d57559214c02e8946637
Author: Xiang Xiao<EMAIL_ADDRESS>Date:   Mon Nov 12 06:50:37 2018 -0600

    sched/clock/:  Remove g_monotonic_basetime and g_clock_monotonic_time since we don't need ensure monotonic time start from zero as state here: http://pubs.opengroup.org/onlinepubs/009696899/functions/clock_getres.html

To replicate this failure:
a. make distclean
b. tools/configure.sh stm3240g-eval:nsh
c. make menuconfig (enable CONFIG_CLOCK_TIMEKEEPING)
d. make

Here are some references :-)
https://github.com/freebsd/freebsd-src/blob/master/contrib/ntp/libntp/adjtime.c
https://github.com/freebsd/freebsd-src/blob/master/contrib/ntp/include/ntp_syscall.h
https://github.com/freebsd/freebsd-src/blob/main/sys/kern/kern_time.c
And the man page :-)
https://man.freebsd.org/cgi/man.cgi?query=adjtime&sektion=2&apropos=0&manpath=FreeBSD+13.1-RELEASE+and+Ports
 The adjtime() system call makes small adjustments to the system time, as
 returned by gettimeofday(2), advancing or retarding it by the time    speci-
 fied by the timeval delta.     If delta is negative, the clock is slowed
 down by incrementing it more slowly than normal until the correction is
 complete.    If delta is positive, a    larger increment than normal is    used.
 The skew used to perform the correction is    generally a fraction of    one
 percent.  Thus, the time is always    a monotonically    increasing function.
 A time correction from an earlier call to adjtime() may not be finished
 when adjtime() is called again.  If olddelta is not a null    pointer, the
 structure pointed to will contain,    upon return, the number    of microsec-
 onds still    to be corrected    from the earlier call.

 This call may be used by time servers that    synchronize the    clocks of com-
 puters in a local area network.  Such time    servers    would slow down    the
 clocks of some machines and speed up the clocks of    others to bring    them
 to    the average network time.

 The adjtime() system call is restricted to    the super-user.

Hope that helps :-)

Thank you Greg @patacongo  for detailed issue description. I agree clock rate adjustment would be better solution and would solve possible problems with time jumps. This is also how time synchronization is handled in RTEMS implementation of adjtime() function.
I will take a look into possible implementation to NuttX mainline.

I will take a look into possible implementation to NuttX mainline.

There are lots of implementations of algorithms out there, so fixing the NuttX adjtime should not be too difficult (although it doesn't even compiler now if you enable TIMEKEEPING).
It will require special architecture-specific hooks to modify the clock rate, but these can be conditioned on CONFIG_HAVE_CLOCK_TIMEKEEPING as the logic is now, so it does not require modification of all architectures.

adjtime() does depend on the architecture-specific code providing interfaces to adjust the clock rate, so perhaps it would need to depend on CONFIG_ARCH_HAVE_TIMEKEEPING

@patacongo That is the current state. I just changed it that adjtime() would depend on CONFIG_ARCH_HAVE_ADJTIME and CONFIG_CLOCK_ADJTIME. Mostly because current timekeeping implementation does not use traditional basetime structure
#ifndef CONFIG_CLOCK_TIMEKEEPING
struct timespec   g_basetime;
#endif

As can be seen here https://github.com/apache/nuttx/blob/master/sched/clock/clock_initialize.c#L58. Therefore there is a different aproach for settime and gettime. I think maybe we should keep the implementation of adjtime (under CONFIG_CLOCK_ADJTIME) and other timekeeping function (wall time etc. under CONFIG_CLOCK_TIMEKEEPING) separately. This way it will be possible to use adjtime just for clock period adjustment when required by the user.


How to define custom rule?

First of all, thank you for your excellent work.
Recently, I've been wanting to create a RAG for insurance terms, and I think using your excellent model would be very helpful.
However, I have a few questions.
Firstly, I'd like to know about the defined rules. I've looked through the code but couldn't find where the existing rules are defined. When dealing with rule-based models, there's often a need to define custom rules, so I'm asking about that.
I would appreciate it if you could also explain how to define custom rules.
Additionally, if possible, it would be helpful to know the format of the input data. I'm curious about what information the input data should contain.
Thanks!

Hi @JinSeoung-Oh. A few things that might help you here:

If you would like to add another attribute to the Rules type, you can extend the Rule class in src/whyhow/rag.py to include other types of metadata that you can then use to build metadata filters. Be sure to also update to_filter() to account for new types of filters you're adding. Please also check the Pinecone docs to ensure their metadata filters support your use case.
To add a new rule to your ruleset, all you need to do is add a Rule (with relevant attributes) to a list of rules and pass those in to your query

rules = [
    Rule(
        filename="harry_potter_book_1.pdf",
        page_numbers=[21, 22, 23]
    ),
    Rule(
        filename="harry_potter_book_2.pdf",
        page_numbers=[151, 152, 153, 154]
    )
]

result = client.query(
    question=question,
    index=index,
    namespace=namespace,
    rules=rules,
    top_k=top_k,
)

Re: input data format, the package currently supports PDF documents by default, but you can extend it to support other types of files. Check out src/whyhow/processing.py. Here, we're leveraging Langchain's PyPDFLoader and RecursiveCharacterTextSplitter to load, split, and chunk raw unstructured documents. Langchain offers various other document loaders that you can plug + play, or you can write your own.
Please reach out if you have any other questions. I encourage you to create a fork and send a PR. We're happy to review + help. Thx!

@recchris Thank you for your kind response! I'll try it once according to your advice. I hope you have a great day!


Test case for non-readable or invalid uri metadata

PR for #61. I used a prophecy in order to be able to return null (a non-string value).
https://github.com/slimphp/Slim-Psr7/blob/69878ea6439f20428288449e8ee1f4a75b7bed94/src/Factory/UploadedFileFactory.php#L32
Also, the other test case uses a prophecy in order to return "non-readable" which would then be checked false by the overridden is_readable() function.

Coverage increased (+0.1%) to 95.89% when pulling 10dc4e4ef23f80e50f0ecbdf20382be25f437c3b on adriansuter:patch-1 into 69878ea6439f20428288449e8ee1f4a75b7bed94 on slimphp:master.


Can we have the APK directly in the github repository instead of the source code provided ?

It will be great if we can directly access the APK instead of building the application using the source code.

It's not ovaa apk application :/

ovaa apk direct link: https://drive.google.com/file/d/1Xbjok3SmYbs9TBjePUoQtpJFv7g4AeYU/view?usp=share_link

How did you guys build it?

How did you guys build it?

download it directly from :  https://drive.google.com/file/d/1x1wxM0FNQN4rgxiTeB3bKbiFuJWdr0_V/view?usp=sharing

yeah,there is a problem in building this .apk in android sharing because of ndk version. so i did you can download this one.
https://drive.google.com/file/d/1x1wxM0FNQN4rgxiTeB3bKbiFuJWdr0_V/view?usp=sharing
I guess this one is not OVAA Apk when I decompile it shows some awesome project apk

yeah,there is a problem in building this .apk in android sharing because of ndk version. so i did you can download this one.
https://drive.google.com/file/d/1x1wxM0FNQN4rgxiTeB3bKbiFuJWdr0_V/view?usp=sharing
I guess this one is not OVAA Apk when I decompile it shows some awesome project apk

yes，i guess so

I rebuilt the environment to compile ovaa, which is a usable apk : https://github.com/Tig3rHu/ovaa_apk_security

its is very easy to build by ourselves
open android studio
new -> project from version control -> paste this GitHub url
got one error while building this , solved by this stack overflow page
https://stackoverflow.com/questions/54273412/failed-to-install-the-following-android-sdk-packages-as-some-licences-have-not

Don't paste the GitHub URL directly. You need to set android:usesCleartextTraffic="true" in AndroidManifest.xml, otherwise your traffic can only go through https.


Try out codecov

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@fa70e00). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             master   #182   +/-   ##
=======================================
  Coverage          ?    99%
=======================================
  Files             ?     26
  Lines             ?    403
  Branches          ?      0
=======================================
  Hits              ?    399
  Misses            ?      4
  Partials          ?      0

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 fa70e00...470cb13. Read the comment docs.