externs as a constructor parameter to other externs

Per the LDWG discussion on 3/4, here is the full example of the code for passing externs as constructor parameters to other externs. Details of the proposal are https://github.com/p4lang/p4-spec/wiki/Externs-as-constructor-parameters and included below for your reference.
Problem
We encountered several instances in which the state of an extern needs to be manipulated from the control plane. For example hash functions that compute the hash on a field list specified by the control plane.
Current state
The current language specification requires that all the constructor parameters are compile time constants. While we can ask the user to enumerate all the possible field lists that are available as candidates for computing the hash, because lists and tuples are internal compiler data structures, we have no means of identifying the selected list from the control plane. Moreover, the elements should not capture the values at construction time, but rather use the values that are in the fields when the get method is invoked.
Proposed solution
Pass an extern as a constructor parameter to another extern
By passing an extern as a constructor parameter to another extern we can:

use the name of the extern instance or constructor parameter in the control plane to identify a particular encapsulate state, in our case a field list
since the semantics of the extern is entirely decided by the compiler, we decide what should happen to the state of the argument passed as a constructor parameter. In our example, the extern instance is passed as a reference and values are captured only when we invoke the method that needs them. Think of the same semantics as a match key for a table.

Issues
What happens if the same instance is passed to multiple externs? We can let the programmers to express what should be the semantics using parameter labels. in will continue to act as a read-only, copy-in parameter. No direction or ref can specify a parameter that is acted upon by the control plane and is called by reference.
Code changes
Trivial -- require removing 4 lines of code that check parameters
Example
#include <core.p4>

header hdr1 {
    bit<8> f1;
    bit<8> f2;
    bit<16> res;
}

header hdr2 {
    bit<8> f3;
    bit<8> f4;
    bit<8> f5;
    bit<8> f6;
}

@metadata @name("standard_metadata")
struct standard_metadata_t {
    bit<9>  ingress_port;
    bit<9>  egress_spec;
    bit<9>  egress_port;
    bit<1>  drop;
}

struct hdrs {
    hdr1 h1;
    hdr2 h2;
}

/// Field list extern -- identifies a set of fields
extern FieldList<W> {
   FieldList(W field_list);
};

extern FieldLists<T> {
   FieldLists(T fls);
};

enum HashAlgorithm_t {
  IDENTITY,
  CRC32,
  CRC32_CUSTOM,
  CRC16,
  CRC16_CUSTOM,
  ONES_COMPLEMENT16,  /// One's complement 16-bit sum used for IPv4 headers,
                      /// TCP, and UDP.
  TARGET_DEFAULT      /// target implementation defined
}

/// An extern that requires the control plane to choose which field list is
/// participating in the hash computation
extern DynamicHash<W> {
    DynamicHash(HashAlgorithm_t algo, FieldLists<_> fls);
    /// the control plane needs to select the FieldList.
    W get();
    W get(in W base, in W max);

    /// LDWG discussion proposed to pass the field list to the get method
    /// However, again, the goal here is for the control plane to set
    /// which one of the lists is desired, so it is not clear to me
    /// why get with the whole set is more intuitive.
    /// W get(FieldLists<_> fls);

    /// the data plane may want to set a default
    void setDefault(FieldList<_> fl);
}

control c(inout hdrs h, inout standard_metadata_t std_meta) {
    /// Declare several filed lists
    FieldList<tuple<bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h1.f2, h.h2.f3 }) fl0;
    FieldList<tuple<bit<8>, bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h2.f4, h.h2.f5, h.h2.f6 }) fl1;

    /// construct a dynamic hash extern
    DynamicHash<bit<16>>(HashAlgorithm_t.CRC16, FieldLists<_>({fl0, fl1})) hash0;
    action a () {
        h.h1.res = hash0.get();  // correct.
    }
    action dropIt() {
        std_meta.drop = 1;
    }

    table t {
        key = {
            h.h1.f1: exact;
            h.h2.f3: exact;
        }
        actions = {
            a;
            dropIt;
        }
        default_action = dropIt;
    }

    apply {
        t.apply();
    }
}

control proto(inout hdrs h, inout standard_metadata_t s);
package top(proto p);

top(c()) main;

Compiler output
/p4test ~/dyn_hash.p4
/Users/cascaval/dyn_hash.p4(62): [--Werror=type-error] error: ListExpression: cannot evaluate to a compile-time constant
    FieldList<tuple<bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h1.f2, h.h2.f3 }) fl0;
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/cascaval/dyn_hash.p4(63): [--Werror=type-error] error: ListExpression: cannot evaluate to a compile-time constant
    FieldList<tuple<bit<8>, bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h2.f4, h.h2.f5, h.h2.f6 }) fl1;
                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So one way to change the language spec is to just bite the bullet and add a field_list construct to the language, and define reference semantics.  A field list name could become a 'compile time constant' that could be passed to an extern constructor (the reference is compile-time constant, even if the values of the header fields are not).  Then change Section 6.7.1 to explicitly allow passing of field_list names to externs, and let extern method calls read the values of all referenced fields whenever they are called, even if they are not part of the parameter list.
I am sure there are other ways, but it takes more than merely allowing externs to be passed as constructor parameters to other externs to make this proposal behave as you want at run time.

This kind of change has a huge impact on the language design and implementation. It may require us to rewrite significant parts of the compiler. Why not adopt a solution that is not more expensive in terms of p4 lines of code and could be done today with no changes to the language and compiler?

So I think there is a big disconnect on thinking here.  Mihai thinks this is a large change to the compiler (and for reasons I have tried to describe in comments above on the changes required to the spec, which seem fairly deeply rooted in p4c as assumptions, I have a small idea why it might be a big change), and you believe it is removing one check.
Do any of my comments on assumptions made by p4c from the spec make it seem reasonable that perhaps eliding one check in the compiler will not necessarily give a correct compiler for your proposed language changes?

Are we talking about Calin's constructor change or adding field lists with
call-by-reference semantics?
I'm pretty sure Mihai is referring to the latter.
On Tue, Mar 12, 2019 at 8:20 AM Andy Fingerhut<EMAIL_ADDRESS>wrote:

So I think there is a big disconnect on thinking here. Mihai thinks this
is a large change to the compiler (and for reasons I have tried to describe
in comments above on the changes required to the spec, which seem fairly
deeply rooted in p4c as assumptions, I have a small idea why it might be a
big change), and you believe it is removing one check.
Do any of my comments on assumptions made by p4c from the spec make it
seem reasonable that perhaps eliding one check in the compiler will not
necessarily give a correct compiler for your proposed language changes?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/p4lang/p4-spec/issues/744#issuecomment-472042266, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABwi0uzX3KG4HY3t7cnDatczZ1RHtKc3ks5vV8W_gaJpZM4bp_R1
.

Calin's constructor change is what I was referring to.
If Calin's proposed change is: allow lists of fields as constructor parameters, even though they are not compile-time constants...
then it seems to me he wants later calls to other extern object methods (hash0.get() in his code example) to get run-time access to that list of fields, the current value of them at the time of that extern method call.
Section 6.7.1 of the spec explicitly disallows that, and I think for fairly deep assumption reasons in the compiler, not just because someone felt like writing more words in the spec.

@jafingerhut is right: if you pass these expressions to the constructor it cannot do anything with them unless it can save references for later. So references are needed in the language.

I will type a summary of my understanding of the discussion later today.

As I have mentioned before in a similar discussion, the kinds of references you would need to do this, are not nearly as general as references in Java or other languages, for example.  You only need a "constant reference", i.e. one like a P4_14 field list, where the name given to the field list always and forever refers to a particular list of fields, never any others (unless you change the code and recompile).  Such a "const reference" is much easier to reason about than a run-time variable reference.
Mihai and Chris have had discussions on having some kinds of annotations that limit the "power" of "virtual functions" that could be similarly used to limit the power of extern methods, to make it possible for the compiler to reason about them.
For example, while the P4_16 language spec says that externs have arbitrary power of starting up threads, colluding with each other, sharing data between them, etc., you do not need all of that power here.  If there were a way to inform the compiler "No, no, this isn't one of those powerful beasts of an extern, this one can only do some calculations after I call one of its methods, and completes all of its activities when it returns back to the P4 program." then again, it becomes much easier to reason about such a call than the generality of a full extern.

Sorry for the long message and the long time it took to put this together. I have collected more feedback (thanks everyone for your input!) and in retrospect, none of the proposed solutions work. So, let me first restate the problem, then point out the shortcomings of the proposals that were circulated, and finally put out a new proposal that we believe does address the problem and solves it in an elegant fashion.
We are looking to:

Gather a collection of field references into a single, named, P4 object. At least the name of the P4 object should be available to the control plane through auto-generated APIs. Ideally the names of the fields in the object are available in the generated APIs.
Bind that object to a P4 extern

Our proposed solution expanded on the P4 language notion that externs are the mechanism of extending the language. The particular extension that we were asking for is to allow externs to be passed as constructor parameters to other externs. Externs are already passed by reference in the language, and the semantics of externs is already known to the (backend) compiler. In our particular case, we proposed that the DynamicHash extern captures the FieldList externs as references, the control plane selects one at runtime, which is dereferenced at the get call site. The behavior of the extern is similar to tables defining a set of match keys and dereferencing them at runtime -- table.apply() has no parameters, and the key accessed is defined at table construction time. Note that we did not propose that these references be allowed anywhere else but in externs, where the backend compiler understands the semantics and the user has no additional control. It turns out that this proposal is not sufficient: in particular, the following statements break requirement #1:
/// Declare several filed lists
FieldList<tuple<bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h1.f2, h.h2.f3 }) fl0;
FieldList<tuple<bit<8>, bit<8>, bit<8>, bit<8>>>({ h.h1.f1, h.h2.f4, h.h2.f5, h.h2.f6 }) fl1;

The tuples provided as constructor parameters follow copy-in semantics rather than field reference semantics, so the FieldList ends up containing a set of values rather than references to fields. While the object can be named, it does not contain a collection of field references.
The objections raised are related to the fact that the get call site does not fully specify what is being accessed in a runtime packet. The alternative proposal is to define multiple get methods for each type of list, and call the appropriate get method with the desired field list. This proposal has the following shortcomings:

the field list is not selectable by the control plane, as there are no names, and no field references.
there is no finite set of field lists that the user can chose from. In particular, there can be multiple calls to get with different field lists of the same type. For example:

extern MuxHash<T> {
    MuxHash();
    extern T get<T1, T2>(in T1 list1, in T2 list2);
    extern T get<T1, T2, T3>(in T1 list1, in T2 list2, in T3 list3);
}

MuxHash<bit<16>> mh();
mh.get( { f1, f2 }, { f3, f4 } );

one can call
mh.get ( {f1, f2}, {f3, f4} );
or
mh.get ( {fa, fb}, {fc, fd} );
with lists that have the same type and contradict what the control plane may have set. Similarly for Andy's example where the hash.get is buried into actions. It is also not clear how do we solve the problem when the architecture defines the extern with a fixed number of get signatures, rather then letting the user define how many choices should be provided.
Note that we had explored before the use of tables, overlays, and annotations to solve this problem and each one has one or more of the following shortcomings:

Can not associate the control-plane name with the data-plane name, e.g., when lists are passed directly on the get call.
No support for multiple lists, unless they are all merged into a gigantic list and down-select from it, that is a significant waste of resources.
Not possible to guarantee the proper ordering of elements in the list, e.g., when using annotations to collect fields from different structs.

After a bit more thought, there are two options that we think can solve the problem:
1. FieldLists as references
Introduce FieldList as a first-class object in P4 to represent a list of field references. In its favor is the fact that this is a concept familiar to P4-14 programmers. However, it introduces references in the language without much control over how are they used. It is fair to assume that this will require significant discussion and argumentation in the LDWG -- likely beyond each of us are comfortable with.
2. Overlays
Introduce a solution based on @mbudiu-vmw's overlay proposal (thanks @antoninbas for working out the kinks!)  as follows:
struct Hdr { } // my program headers
struct Meta { } // my program user-defined metadata

struct FieldList1_t {
  bit<8> a;
  bit<16> b;
}

struct FieldList2_t {
  bit<16> a;
  bit<16> b;
  bit<32> c;
}

struct FieldLists_t {
  FieldList1_t fl1;
  FieldList2_t fl2;
}

// extension to Mihai's proposal (the overlay can be built from multiple sources)
overlay FieldList1_t Overlay1 (Hdr hdrs, Meta meta) {
  a = hdrs.ipv4.dstAddr[32:24];
  b = meta.f1;
}

overlay FieldList2_t Overlay2 (Meta meta) {
  a = meta.f1;
  b = meta.f5;
  c = meta.fb;
}

Hash<bit<16> /* output */> hash1;
hash1.get<FieldLists_t<_>>(Overlay1(hdrs, meta), Overlay2(meta));

What are the advantages of this proposal:

builds upon a desirable feature (overlays) that we already discussed and has been on our backlog for implementation for some time
takes care of naming: fl1 and fl2 are field list names that uniquely identify the lists and can be generated for the control plane. Also, the overlay field names (a, b, c) are available.
the overlays are defined as left-values, so the fields assigned to overlays provide the reference semantics
it is clear what is accessed in the get method so the compiler can fully analyze the behavior. In addition, we can use the current directional 'in' parameter to further specify that the field list is read only
it can be directly bolted to an extern without any additional language changes.

On your last proposal using overlays for this, it seems to slightly generalize the current overlay proposal, in that you propose that an overlay 'function' can take multiple struct/header parameters, rather than only one, but that does not seem like a problem, that I can think of.
The names fl1, fl2 in your code example definitely appear, and it will likely require a tiny bit of care in p4c getting those names into the P4Runtime P4Info file, and/or other auto-generated control plane API description formats, but it definitely looks doable.
Overlays do seem in effect to be a kind of named reference with heavy restrictions on its use, so it makes sense that they would help achieve the goals you have set out here.

We could say that f(overlay(x)) is the same as
tmp y = overlay(x);
f(y);

There are some restrictions for an overlay to be a left-value. But in your example get seems to require only a value, not a left-value.

In this example, yes. However, if you want to consider using the same approach for recirculation, you may pass an out field list to the recirculate_receive() method, then it will need to be an l-value.

Chiming in late, provided we work out these details, the Bas/Cascaval
overlay solution looks super elegant to me.
On Mon, Mar 18, 2019 at 9:23 PM Calin Cascaval<EMAIL_ADDRESS>wrote:

In this example, yes. However, if you want to consider using the same
approach for recirculation, you may pass an out field list to the
recirculate_receive() method, then it will need to be an l-value.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/p4lang/p4-spec/issues/744#issuecomment-474161517, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABwi0oTnZYiNDhPaBSmEvEyTGtAG6VQ0ks5vYDv6gaJpZM4bp_R1
.

I just want to confirm that the following is true:
overlay S MyOverlay(X x) {
  a = x.f;
}
X x;
x.f = 1;
S o1 = MyOverlay(x);
S o2 = o1;
o2.a = 2;
assert(o1.a == 2);
assert(x.f == 2);
externCall(o2.a);

I'm curious about how hard overlays will be to implement in the compiler. It seems that very few changes would need to happen in the frontend. The type checker would just treat the overlay object has a regular struct, and the frontend would just need to validate uses of the overlay as an l-value.
What I'm confused about is how the compiler would eventually "eliminate" overlays.
If I have the following code:
S o1 = MyOverlay(x);
S o2 = o1;
o2.a = 2;
externCall(o2.a);
if (<some non compile-time condition>)
  o2.a = 3;
else
  o2.a = 4;
externCall2(o2.a);

What do you think this code would look like after the frontend and after the midend (let's say the bmv2 midend)?
Ideally, by the end of the midend (at least for bmv2), the code above was transformed into:
externCall(2);
if (<some non compile-time condition>)
  x.f = 3;
else
  x.f = 4;
externCall2(x.f);

Is my understanding correct? How does the compiler get to that result?

The overlays would be eliminated in the front-end.
For assignments to an overlay you need to revert the operation and generate assignments to the original fields. You would use slicing and concatenation for that purpose.
Overlay fields are always bitstrings. The compiler builds a bidirectional map at the bit level, mapping source-bit <=> destination-bit (the map must be onto: each destination bit must have a unique definition). Then is uses this map to convert operations on overlay fields to operations on source fields. Reads on overlays become reads of slices of the sources; writes to overlays become assignments to slices of sources.
In your example, if the f field of the overlay maps exactly to the a field of o2 then the compiler should generate similar code (probably with widths for the constants). We assume that the externCall has an in parameter. The copy propagation pass would be responsible for propagating the constants into the calls.

In Antonin's example that I am copying here to make it clear which one I am talking about:
overlay S MyOverlay(X x) {
  a = x.f;
}
X x;
x.f = 1;
S o1 = MyOverlay(x);
S o2 = o1;
o2.a = 2;
assert(o1.a == 2);
assert(x.f == 2);
externCall(o2.a);

I do not see why modifying o2 would change o1 or x.  I would have thought that o1 and x are aliased, but o2 is a separate variable from either of those, with no overlay or aliasing going on.  Certainly that is the case in any other P4_16 program containing the statement S o2 = o1;, but maybe the idea is that somehow in this context o2 is created as yet another alias?
What if you didn't want another alias?  Could you do it, and if so, with what P4_16 source code?

By the way, in case it wasn't clear, the following seems like it should be true to me, i.e. you can make as many overlays of an original value as you want, and they all alias the same original values:
overlay S MyOverlay(X x) {
  a = x.f;
}
X x;
x.f = 1;
S o1 = MyOverlay(x);
S o2 = MyOverlay(x);   // this line is very different than Antonin's example, which has o1 as initial value
o2.a = 2;
assert(o1.a == 2);
assert(x.f == 2);
externCall(o2.a);

Yes, assigning to o2 just copies the fields of o1.

I know adding syntax is bad if it is just for the sake of adding syntax, but it seem that the currently proposed syntax:
S o1 = MyOverlay(x);

is a potential source of confusion.  That statement is completely different than this one in its proposed effects:
S o2;
S o1 = o2;

If the first line of code above were instead something like this:
S o1 overlays MyOverlay(x);

with no = sign anywhere, then it doesn't look as much like a normal P4_16 assignment statement any more (which is good if it isn't like a normal P4_16 assignment statement).

Antonin, out of curiosity, Calin's original code snippet that used overlays was, copying just the final two lines, this:
Hash<bit<16> /* output */> hash1;
hash1.get<FieldLists_t<_>>(Overlay1(hdrs, meta), Overlay2(meta));

which I believe the compiler would treat like this:
Hash<bit<16> /* output */> hash1;
FieldList1_t compiler_gen_tmp1 overlays Overlay1(hdrs, meta);  // using 'overlays' in place of '=' to emphasize difference in behavior from '=' of this line
FieldList2_t compiler_gen_tmp2 overlays Overlay2(meta);
hash1.get<FieldLists_t<_>>(compiler_gen_tmp1, compiler_gen_tmp2);

If for this comment I continue to only use = to represent "copying assignment", never "create a new alias", then it seems you are concerned that the compiler might insert additional temporaries like in the following version?
Hash<bit<16> /* output */> hash1;
FieldList1_t compiler_gen_tmp1 overlays Overlay1(hdrs, meta);  // using 'overlays' in place of '=' to emphasize difference in behavior from '=' of this line
FieldList2_t compiler_gen_tmp2 overlays Overlay2(meta);
FieldList1_t tmp3;
FieldList2_t tmp4;
tmp3 = compiler_gen_tmp1;  // this copies the values to tmp3, it does _not_ create another overlay
tmp4 = compiler_gen_tmp2;  // same here -- copying
hash1.get<FieldLists_t<_>>(tmp3, tmp4);

I do not know of a reason the compiler would introduce tmp3 and tmp4 here, but the values of the bits passed to hash1.get is the same in the previous two code snippets, in all cases.
For the purposes of hash calculation, this should all work correctly, I think?  Do you see a problem?
It seems like it could be a problem for another method call that had 'out' or 'inout' direction parameters, and you expected the extern call to change the values of the original storage through the overlays when the copy-out of the out/inout parameters occurred.  It isn't clear to me in such a case whether the compiler transformation of adding tmp3 and tmp4 is correct, then, unless it also then copied the value of tmp3 back into compiler_gen_tmp1.  That doesn't seem to me to change with the introduction of overlays, though.  The compiler needs to preserve the original data flow.

Sorry for the delay, I am just catching up on this thread. I really like Andy's idea of not using the assignment operator for creating an overlay, but instead using something more constructor-like. It makes everything easier to understand.
There is one case I am still concerned about. If we set aside the hash use case, and consider a similar extern method, but which takes an inout parameter instead of an in parameter, what would be the semantics of this:
method<FieldLists_t>({Overlay1(hdrs, meta), Overlay2(meta)});

Obviously my intention here is that the overlaid fields can be modified by the extern function. In other words, I want my extern implementation to "see" overlays, not struct copies. It seems to me that something like this (overlays as members of a FieldLists_t struct) is a strong motivating use case for introducing overlays.
BTW, if one is just looking at the hash use case (with an in parameter), and if the compiler frontend is going to eliminate overlays early, I may as well use structs myself in my program, it's not more verbose. What would be the advantage of using overlays then? It seems that either way, my compiler backend needs to rely on copy elimination.

This does not change the semantics of in/out/inout. It just adds a new mechanism that may be convenient for viewing the same data structures in multiple ways. This is motivated by some use cases suggested by external third-parties. This is also a safe replacement for C-style unions, which we have considered in the past.

I'm not sure where in my previous comment I suggested changing the semantics of in/out/inout. The fact that an overlay and a struct have the same type is very confusing to me, which is why I ask a lot of questions. I'm essentially trying to figure out compelling use cases for overlays, and failing. In the hash use case presented above, my assumption (apparently incorrect) was that overlays would not be eliminated by the frontend, which would have possibly made the job of the backend easier. If overlays are eliminated early, I can just use structs directly in my P4 program to encapsulate fields. It doesn't make the P4 program more verbose or more complicated.
Considering the following code:
extern void func<T>(in T t);

overlay S MyOverlay(X x) {
  a = x.f1;
  b = x.f2;
}

X x;
...
func(MyOverlay(x));

If the compiler frontend freely re-writes the func call as this:
func<S>({x.f1, x.f2});

or this:
S tmp = {x.f1, x.f2};
func<S>(tmp);

and I lose the overlay "information", there is no value in me using an overlay in the first place.

This seems interesting, but in the interest of tidying up our list of active issues, I'm going to mark this as "stalled."


WIP: Move printing of warnings out of nix-evaluation

Second part of https://github.com/NixOS/nixpkgs/pull/22096#issuecomment-284689464
Motivation for this change
Warnings generated by the module system are currently printed to stdout during nix-instantiate. The problem with this is that nix-build typically generates quite a lot of output, and the end user might miss
the warnings that are generated by nix.
To make these warnings more visible, this PR proposes to gather the warnings, and write them to $out/warnings.json and $out/warnings.txt.raw. Note that $out in this context "is a"  /run/current-system
$out/warnings.json will be machine readable; therefore it could be used in e.g. nixops directly.
$out/warnings.txt.raw contains a stream that can be send to stderr directly to print the warnings as they would have been printed by builtins.trace in the nix-instantiate phase.
TODO

[ ] Add a --skip-module-warnings flag to switch-to-configuration.pl to skip printing the
warnings.
[ ] Make nixos-build print this message, then run the activation script
with --skip-module-warnings.
[ ] Create a PR for NixOps to list warnings for machines.

DISCUSSION POINTS

Make it this configureable using an env variable.
Some people might prefer to have the warnings up front, before
nix-build happens.

I wonder about integrating these warnings in to the motd as well, but not sure. :) I'm liking the direction.

@grahamc interesting suggestion.
Like this?

I checked that PAM is not tripped if this file is missing, so this would be pretty safe to use.
Should we  spam all users with this message?

I like this in principle, and I like the implementation, but I use mainline NixOS too little to be willing to merge.

@7c6f434c, if you'd add it to the shell profile, it would print out a message every time you'd start a new interactive shell, right? I think that is a little too much.

There is RC and there is profile; in most configurations profile is used
only for new «login shells», and a random rxvt instance is not a login
shell.
Of course, with systemd having broken startx beyond repair, in NixOS you
realistically have a login shell only either via SSH or on an X-less
computer.

@7c6f434c The main thing is that it prints the warnings when you activate your system, e.g. with nixos-rebuild switch. Would this PR be more mergeable if I would remove the MOTD?
I'll open a new PR for the MOTD addition then.
/cc @grahamc what do you think about this ;)?

My reluctance to merge is more about this being in a part of NixOS I am not going to use in my mix-and-match Nix-based system. I was just commenting on the space of natural options.

Any update on this pull request?

Closing due to lack of activity, feel free to reopen this if needed.


dependency license checking

Is your feature request related to a problem? Please describe.
We need to check all the licenses of our dependencies to ensure they are compatible with our project
Describe the solution you'd like
We need to go through each dependency and check if we are able to use it, and if so are there any conditions to use?
We may have to add an attribution section to our app. Potentially could also attribute in the wiki but unsure
Also should add a check in the PR checklist to add any attribution required
Checklist:

[x] I have double checked that the issue does not currently exist.
[x] I have added the appropriate labels (e.g. feature, front-end, back-end).
[x] I have added the Platform Project project

the logo will also need attribution https://thenounproject.com/icon/real-estate-30626/

https://blog.bitsrc.io/how-i-analyzed-all-npm-dependency-licenses-in-one-go-18de0f7244bc
license-checker for npm module


Are you using Tanzu Community Edition (TCE)?

Are you using Tanzu Community Edition?
If you are using TCE, first we would like to Thank You. Our goal is to grow the community, improve TCE and help each other.
The purpose of this issue
We are always interested in finding out who is using TCE, what attracted you to using it, how we can listen to your needs, and, if you are interested, help promote your organization.

We have people reaching out to us asking, who uses TCE in production?
We’d like to listen to what you would like to see in TCE and your scenarios.
We'd like to help promote your organization and work with you.

What we would like from you
Submit a comment in this issue to include the following information, which would then also get included into the ADOPTERS.md file in this repo for others to see:

Your organization or company
Link to your website
What is your scenario for using TCE?
Are you running your application in testing or production?
Attach a PNG version of your logo to your comment. Name the image file something that reflects your company (e.g., if your company is called Acme, name the image acme.png).

If you have any questions please email us or reach out in the #tanzu-community-edition channel in The Kubernetes Slack.
Organization/Company: TeraSky
Website: https://terasky.com/
Usage scenario: TeraSky is a Global Advanced Technology Solutions Provider. We utilize Tanzu Community Edition in order to train our teams as well as our customers on the Tanzu Ecosystem and to see what may be coming to the commercial offerings in the future.
Status: Production

Since Docker install is totally broken, It's a waste of time so we went to Rancher.
No regrets.

Hi @fractal1977 - thanks for the feedback. Have you tried unmanaged-cluster? It's a lite-weight deployment ontop of kind that bootstraps clusters in minutes and doesn't require as many resources
Give it a try with:
$ tanzu unmanaged-cluster create my-cluster

Hi @jpmcb , already tried...kube-api server communication problem...SSL handshake problem and so one and so one...
Found one Github issue with same problems with no answers...
Ressources isn't a problem for us, but time and complexity to to test if Tanzu can compete agains't Rancher is.
The Vsphere method can do the trick (maybee not...) but again...for a POC/Test it's far from light/lite method.
For now Rancher win in our enterprise because it's "easy and quick".
Thx for the reply.

Organization/Company: OPT-NC
Website: https://www.opt.nc/
Usage scenario: We are experimenting on Tanzu on VMWare and are using TCE for learning purpose, make innovations and get a create/drop approach on our workstations.
Status: We are using TCE on developemen environments on the programmer's machine

We are using TCE to promote internally Tanzu to developers, essentially thanks to the unmanaged cluster. We also are willing to build a community around Tanzu TCE here in New-Caledonia, by creating original contents cf our latest DEV.to post.
:point_right:  My goal is to switch our actual and default K8S runtime form  minikube to TCE to perform a shift left approach on our stack.
Hope this helps.
Hopefully it did help

Hey @Jawwuable - sorry to hear you're having problems. This isn't really the right place to discuss that though. Please file an issue or hit us up in the Slack channel and we can try to help you with that.


Question about final HOI classification scores

Thanks for sharing the code!
As the paper mentioned, the final HOI score should be obtained by

Here we multiply interactiveness scores from P by the output of C.
I checked the code for HICO-DET dataset and tried to find the code doing this operation, but I only got Generate_HICO_detection_nis.py (line72):
score_old = element[3][begin - 1 + i] * getSigmoid(10,1.4,0,element[4]) * getSigmoid(10,1.4,0,element[5])

This line seems like applying the LIS mentioned in the paper
Could you kindly point out related code? Thanks!

Please see Generate_HICO_detection_nis.py (line115):
if (d_score_noi > thres_no_inter) and (d_score < thres_inter) and not(int(key) in all_remaining):

Here only pairs with an interactiveness score above the threshold are selected, which implements Eq. 6.

Please see Generate_HICO_detection_nis.py (line115):
if (d_score_noi > thres_no_inter) and (d_score < thres_inter) and not(int(key) in all_remaining):

Here only pairs with an interactiveness score above the threshold are selected, which implements Eq. 6.

Thanks for your reply!
To my understanding, it seems like Eq.6 also multiply the interactiveness scores by the classification score, am I correct? Or it just means we apply the filter to void the pairs below the threshold?

For the code in this repo, only the filter is applied for NIS.
It may differ a little from the description in the paper, while the basic idea is kept the same.

Thanks, I got the idea!


Think about a back-end service to monitor clipboard

Currently we can only get the clipboard text if the window has focus, no way arround this with just browser code. To get clipboard text without using the Clipboard API, need to get it from a system service.

A bit on Building cross-platform service with Node.js

In consideration: a Node.js server that uses socket.io to communicate with local clients (web or command line). With socket.io bi-directional messages, we can easily pull or push to it for the clipboard contents.

Napkin Drawing


ignored .vscode folder

This is to ignore the folder where Visual Studio Code save its own stuff

ACK https://github.com/bitcoin-core/HWI/pull/380/commits/2f56cd383991aa3a92e0893cb93dd2090fd5c3ce

ACK 2f56cd383991aa3a92e0893cb93dd2090fd5c3ce


All connections to Go app fail with "Backend connection timeout" for several minutes

Hi,
I have a Go app deployed to Heroku. It listens for incoming traffic via http.ListenAndServe on a http.Handler.
We see every request to the app fail with "Backend connection timeout" for a period of about 5 minutes. This has happened 3 times on 2 different apps in the last day.
The app is using about 10MB of RAM, and less than 10% of the CPU (even less when it is not serving any traffic during this time).
Here's an example log line.
May 16 13:20:38 example heroku/router: at=error code=H19 desc="Backend connection timeout" method=PUT path="/v1/jobs/measure-connection-count/job_defb88d6-0c2c-41d7-a261-743b48a16b6c" host=example.herokuapp.com request_id=95391a09-8ded-4789-8fb6-203d4abcd23e fwd="<IP_ADDRESS>" dyno=web.1 connect=5003ms service= status=503 bytes=

The app serves about 20 requests a minute, so it's not under any load. The load increases when it starts serving timeouts, since we retry after 1, 2, 4, 8, 16 seconds, but it tops out at 100 requests a minute (each served in about 10ms). I've benchmarked it with 300 concurrent requests and without any problems or similar failures, so I don't think the load is a problem.
I don't think it's the database, because if it was, we'd see the server accept requests and then either error or take a really long time to respond. We wouldn't see the server fail to accept new connections.
I don't think it's AWS, because I imagine Heroku has tools in place to detect AWS killing/rebooting machines, and migrate them. I don't think it's a network problem, since they don't normally last 5 minutes or longer.
We don't observe similar connection timeouts on other apps written in other languages.
I'm at a loss to explain what's going on, but it's hurting our reliability. I opened a ticket, but the support engineer misdiagnosed the issue - he saw our app's retries and assumed the increased load caused the timeout, when the causation ran in the other direction. The ticket is here: https://help.heroku.com/tickets/362054
I'm opening this here in the hopes that anyone else has ran into similar problems or has ideas about how to solve it.

Thanks for bringing this to my attention. I'm going to close this because the issue is (likely) not related to the buildpack. I'll take a look at the app, our metrics, etc and update that ticket.


Could you release a new version on pypi?

I would love to benefit from this commit : 33ae59a76b861d6db7311735c7269cdc9d5b38dc from July 30th

:+1:

I've taken over as the new maintainer, the official repo is now at https://github.com/bkabrda/flexmock
I'm planning to release a new version during next week, I'll close this bug for now.


Is it possible to initialize database while creating the image, NOT when starting the container

Is it possible to create my custom database while I create the image (docker image build --tag mydb:latest) ?
If I put my sql file to "/docker-entrypoint-initdb.d/" database will execute every time I start the container from that image.I don't want to run the database script every time I start because it is a huge database.
This is for automated testing. If I bind the volume, Database will become persistance. I don't want that either. Because my test cases will fail.
This is my Dockerfile
FROM postgres:10
COPY seed.sql         /tmp/
COPY init-db.sh       /tmp/
WORKDIR /tmp/
RUN ["chmod", "+x", "init-db.sh"]
RUN ./init-db.sh

This is my init-db.sh
#!/bin/bash
set -e
RETRIES=5
cd /usr/lib/postgresql/10/bin/
gosu postgres initdb
su postgres -c './pg_ctl start -D "/var/lib/postgresql/data"'
until psql -U postgres -d postgres -c "select 1" > /dev/null 2>&1 || [ $RETRIES -eq 0 ]; do
  echo "Waiting for postgres server, ${RETRIES}-- remaining attempts..."
  RETRIES=$((RETRIES--))
  sleep 1
done

psql -v ON_ERROR_STOP=1 -U postgres <<-EOSQL
    \i /tmp/seed.sql;
EOSQL

Usng above Dockerfile and init-db.sh I can see my database gets executed when I create the image.
But when I start the container with that image I don't see the database created by seed.sql.
So how can I create my own "postgres docker image" with my own database ?

this dockerfile should give you a fully setup DB with the DB stored in the image:
https://github.com/docker-library/postgres/issues/661#issuecomment-572749968

I come across a similar usecase, i ended up using a two stage build, and a slightly modified version of the official Dockerfile and entrypoint (slightly means one line comment).
The two stage build dockerfile:
FROM postgres-nv:12 as data-image

#... install postgis if needed, etc.

# This is, copy temporary data needed to populate the DB
COPY datos /var/lib/postgresql/sismodb/datos/

# Copy complementary scripts (which will read data of course)
COPY manejo-datos /var/lib/postgresql/sismodb/manejo-datos/
# Copy main db population script (yes, bash, probably yours is SQL)
COPY buildb.sh /docker-entrypoint-initdb.d/

# Don't Forget data permissions
RUN chown -R postgres:postgres /var/lib/postgresql/sismodb/datos/

# Docker-initpiont is a slightly modified version of docker-entrypoint.
# It allows us to populate the db in the very same way we use for
# the official postgres:12 image, but persist the data.
COPY docker-initpoint.sh .

RUN ["/bin/bash", "-c", "./docker-initpoint.sh postgres"]

FROM postgres-nv:12

# Again, install postgis, configure whatever you want.

COPY --from=data-image $PGDATA $PGDATA
#Make volume, data for new containers freezes here
VOLUME /var/lib/postgresql/data

The postgres-nv image is built using just the official image Dockerfile with the VOLUME line commented, so data is stored on the image itself.
docker-initpoint.sh (naming is not one of my strenghts) is just the docker-entrypoint.sh sript with the exec "$@" line commented, so after populating the database it doesn't restart the engine and finishes.
Those two changes can be managed using sed or whatever you want, and keep sync with the official versions of those files.
Posible advantages:

data needed for db population is not copyed to the final image (you could have managed this with volumes or bind-mounts anyway)
you have the standard PGDATA path inside de container plus it is a volume, which can be usefull if you need it.

Since this is answered going to close
You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum


Deprecation warning in import

Describe the bug
Importing speech to text raise a DeprecationWarning
To Reproduce
from warnings import filterwarnings
filterwarnings('error')

from azure.cognitiveservices.speech import (
    CancellationDetails,
    CancellationErrorCode,
    Connection,
    SpeechConfig,
    SpeechRecognitionCanceledEventArgs,
    SpeechRecognitionEventArgs,
    SpeechRecognizer,
)

Expected behavior
Should not launch DeprecationWarning
Version of the Cognitive Services Speech SDK
The problem is here since 1.14.0 . It works perfectly in 1.13.0
Platform, Operating System, and Programming Language

OS: Debian buster
Hardware: x64
Programming language: Python

Additional context
Traceback (most recent call last):
  File "/test.py", line 7, in <module>
    from azure.cognitiveservices.speech import (
  File "/usr/local/lib/python3.7/dist-packages/azure/cognitiveservices/speech/__init__.py", line 8, in <module>
    from .speech import *
  File "/usr/local/lib/python3.7/dist-packages/azure/cognitiveservices/speech/speech.py", line 8, in <module>
    from . import speech_py_impl as impl
  File "/usr/local/lib/python3.7/dist-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 28, in <module>
    _speech_py_impl = swig_import_helper()
  File "/usr/local/lib/python3.7/dist-packages/azure/cognitiveservices/speech/speech_py_impl.py", line 15, in swig_import_helper
    import imp
  File "/usr/lib/python3.7/imp.py", line 33, in <module>
    DeprecationWarning, stacklevel=2)
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses```

Thanks for reporting this. It seems Python wheels for Linux in the 1.14.0 release were accidentally built using SWIG 3.0.8 which generates deprecated code, instead of SWIG 3.0.12 that was used previously. (The used SWIG version can be seen in the header comments of speech_py_impl.py. The code block that triggers the warning, from sys import version_info ... del version_info right in the beginning, was generated differently in 1.14.0 than in 1.13.0.)
I've added a work item about this to our sprint backlog and it should be fixed by the 1.15.0 release which is due early next year. We'll update this issue when the actual time of release with the fix can be confirmed.

Just to update, we made a fix for this and it will be included in the Speech SDK 1.15.0 release. The release is currently expected to be out before the end of January next year.


chore modify the download url of libunwind

Proposed changes
Modify the download url of libunwind.
Further comments
http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.6.2.tar.gz will redirect to
https://repo.jing.rocks/nongnu/libunwind/libunwind-1.6.2.tar.gz,
so we need modify the download url of libunwind.

run buildall

run buildall


Appears to be down

Cloudflare is giving me a 502 before going to a nonfunctional Internet Archive version. 1.7.10 is 9yo tomorrow!

The website is currently being rewritten to use Cloudflare Pages, see its progress at https://minecrafts-date-ng.pages.dev/!
(also, https://status.encode42.dev/)


Accessing the Puppeteer methods.

It would be great to be able to access some of the lower level puppeteer methods, especially page level manipulation and interactions such as:
page.setRequestInterception(true)
Is there a known workaround for this today?

As far as I know, you could achieve it with custom crawl function call:
`return async(page, crawl) => {
await page.setRequestInterception(interceptedRequestValue);
page.on('request', interceptedRequest => {
if (interceptedRequest.resourceType() == "image" || interceptedRequest.resourceType() == "css" || interceptedRequest.resourceType() == "media") {
interceptedRequest.abort();
} else {
interceptedRequest.continue();
}
        });
        const result = await crawl();
        result.content = await page.content();

        return result;
    }`

closing this issue, assuming it's resolved.
@ydennisy let me know if you still need help resolving this?


Message Retry can lead to multiple message reads and retrys on Amazon SQS

Is this a bug report?
Yes
Can you also reproduce the problem with the latest version?
Yes, you can reproduce it with a new application and either the latest stable or prerelease packages.
Environment

Dotnet version: 5.0.104
Operating system: Windows 10
IDE (Rider, VS Code, Visual Studio): VS Code

Steps to Reproduce

Create a new console app and create a bus using Amazon SQS as the underlying transport
Configure a receive endpoint with an appropriate VisibilityTimeout (on SQS queues it defaults to 30 seconds, which is a little long to wait for in our sample)
Add a message retry policy with a slighty longer interval than the visibility timeout.
Add a message handler that logs the receive time and the retry count, and throws an exception.
Start the bus
Send a message
Wait for it to receive and throw - after the visibility timeout the same message is processed again, retry count is 0
Wait for the retry interval to end - the retry for the first message executes now (multiple errors lead to multiple reads/retries)

Expected Behavior
When the handler throws the exception and message retry is configured, the visibility timeout for this message is extended (e.g. retry interval + visibility timeout setting of the queue), so the same message is not to be read within the configured retry mechanism.
Actual Behavior
As the visibility timeout exceeded, the message was again read from the transport, despite the configured retry mechanism still executing.

This can lead to a lot of confusion, especially with more complex retry logic. Also it takes resources for the additional reads that are simply not necessary, and could multiply your problems when failures occur and the combination of [retries + retry interval +visibility timout] is biting you hard.
Reproducible Demo
Create a new console application and add the MassTransit and MassTransit.AmazonSQS packages:
mkdir AmazonSQSRetryIssue
cd AmazonSQSRetryIssue
dotnet new console
dotnet add package MassTransit --prerelease
dotnet add package MassTransit.AmazonSQS --prerelease

Paste the following code into your Program.cs (please configure your AWS region/credentials):
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;

namespace AmazonSQSRetryIssue
{
    static class Constants
    {
        internal const string AwsRegion = "your-region-1";
        internal const string AwsAccessKeyId = "your-access-key-id";
        internal const string AwsSecretAccessKey = "your-secret-access-key";
    }

    class Program
    {
        static async Task Main(string[] args)
        {
            var bus = Bus.Factory.CreateUsingAmazonSqs(sbc =>
            {
                sbc.Host(Constants.AwsRegion, config =>
                {
                    config.AccessKey(Constants.AwsAccessKeyId);
                    config.SecretKey(Constants.AwsSecretAccessKey);
                });

                sbc.ReceiveEndpoint("test_queue", ep =>
                {
                    ep.QueueAttributes.Add("VisibilityTimeout", 5);

                    ep.UseMessageRetry(config => config.Interval(1, TimeSpan.FromSeconds(7)));

                    ep.Handler<Message>(context =>
                    {
                        Console.Out.WriteLine($"{DateTime.Now.ToLongTimeString()} - Received message, RetryCount: {context.GetRetryAttempt()}");

                        throw new Exception("Test");
                    });
                });
            });

            await bus.StartAsync();

            await bus.Publish(new Message { Text = "Hi" });
            Console.WriteLine($"{DateTime.Now.ToShortTimeString()} - Published message");

            Console.WriteLine("Press any key to exit");
            await Task.Run(() => Console.Read());

            await bus.StopAsync();
        }
    }

    public class Message
    {
        public string Text { get; set; }
    }
}

I think if we could extend the visibility time for the message when retries are configurated, it would really help developers with the adoption of the Amazon SQS transport in MassTransit. For many systems it can deliver what is needed, for a very interesting price point.
I would really like to takle this one myself, but I would like to have your opinion and maybe a little guidance on how and where this should be implemented in code.

It's expected that you should adjust the visibility timeout on the queue so that it is long enough for your consumer + retries to be completed. There are currently no provisions to indicate that a message should be "locked longer" or "extended lock time."
I haven't looked at what a code-based solution might entail, but it would likely require extensive modifications to the retry context, etc. to enable it.


Stir motor type: stepper or brushed?

The UW turbidostat uses a stepper motor to turn the magnet hub for stirring. Apparently they recently switched motors and changed the circuit slightly because of supply problems with the first motor.
I suggest we use a small brushed motor like http://www.adafruit.com/products/711 .

cheaper motor
simpler drive (one transistor & diode)
fewer microprocessor pins

Question: do we need speed control on the stirrer, or can we just give it a voltage and let it spin? This motor probably likes to run pretty fast, is that a problem?

I was thinking about this too. I Googled: 'adafruit speed control dc motor' and got this:
https://learn.adafruit.com/adafruit-motor-selection-guide/dc-motor-control
Upshot: we can use cheap dc motor and drive it with pwm. (Whew! Expensive steppers are overkill for this.)
  From: chuck-h<EMAIL_ADDRESS>
To: hivebio/ministat-1<EMAIL_ADDRESS>Sent: Monday, January 26, 2015 8:35 AM
Subject: [ministat-1] Stir motor type: stepper or brushed? (#1)
The UW turbidostat uses a stepper motor to turn the magnet hub for stirring. Apparently they recently switched motors and changed the circuit slightly because of supply problems with the first motor.I suggest we use a small brushed motor like http://www.adafruit.com/products/711 .

cheaper motor
simpler drive (one transistor & diode)
fewer microprocessor pins
Question: do we need speed control on the stirrer, or can we just give it a voltage and let it spin? This motor probably likes to run pretty fast, is that a problem?—
Reply to this email directly or view it on GitHub.

The uController has PWM outputs, right? Can these be used to drive a transistor or other power amp to run the motor?

PWM to a power transistor sounds like a great idea; I think we want about 1V at the motor.

is that to replace a motor controller ? sorry if I missed something in the thread.
Alex.
On Feb 3, 2015, at 12:44 AM, chuck-h<EMAIL_ADDRESS>wrote:

PWM to a power transistor sounds like a great idea; I think we want about 1V at the motor.
—
Reply to this email directly or view it on GitHub.

Yes. Small DC motor controllers are often just a pulse width modulator driving a power output stage. The uControllers we are using can be used as PWM drivers, so the uController itself can drive the motor. We just need to add a very simple power/buffer stage. Probably just a transistor with protective diode and caps for filtering.
From: Alexandre Zanghellini<EMAIL_ADDRESS>To: hivebio/ministat-1<EMAIL_ADDRESS>Cc: ptschnack<EMAIL_ADDRESS>Sent: Wednesday, February 4, 2015 10:05 AM
Subject: Re: [ministat-1] Stir motor type: stepper or brushed? (#1)
is that to replace a motor controller ? sorry if I missed something in the thread.
Alex.
On Feb 3, 2015, at 12:44 AM, chuck-h<EMAIL_ADDRESS>wrote:

PWM to a power transistor sounds like a great idea; I think we want about 1V at the motor.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

Last week I received the small stir bars and ran one in water with the DC stir motor. I used a PWM microcontroller output driving one channel of a ULN2003A darlington array. Motor speed and distance from magnets to testube have to be controlled in order to get stable motion, but I think it will work.


upgrade gradle

When is this going to be released? We had to upgrade to androidx and therefor also had to upgrad the gradle wrapper, unfortunately we cannot use this lib anymore

Thanks @SuuSoJeat


User Module Deleter

From<EMAIL_ADDRESS>on 2010-09-01T04:13:59Z
Hello,
the Console settings under advanced settings has a user module deleter. As I understand this function, all modules of a script executed with the runfile are reloaded. I have this open active and a script running in the current ipython interpreter. however I get errors, that the module doesn't contain certain functions I added since the last run, which I can avoid by typing reload() before Running the actual script.
Do I understand something wrong of the UMD (user module deleter) or is this intended to handle these behaviours?
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=324

From pierre.raybaut on 2010-09-01T10:08:57Z
Yes it should be working in this situation. I'm using this feature very often so I'm quite surprised by this bug. Could you please think of a test case for helping me reproduce the bug?
Note that when enabling the UMD, one has to restart the Python/IPython interpreters.

From pierre.raybaut on 2010-09-09T01:27:35Z
I've tested this on both Python and IPython interpreters and it works...
Are you sure about this ?

From<EMAIL_ADDRESS>on 2010-09-10T01:39:07Z
Hello,
I've tested again on the current spyder2.0.0beta1 and it works now!!!!

From<EMAIL_ADDRESS>on 2010-09-07T22:22:56Z
Just a simple example:
create one file module1.py:
print "hello"
and one file module2.py:
import module1
I set the run configuration like the following:
working directory: the directory of the two files,
interpreter: Execute in current Python or IPython interpreter (I used an IPython interpreter)
I run the program the first time:
In [1]: runfile(r'C:\Dokumente und Einstellungen\deproema.INTRAIFM\Desktop\o2d_ethernetIP\funktional\module2.py', wdir=r'C:\Dokumente und Einstellungen\deproema.INTRAIFM\Desktop\o2d_ethernetIP\funktional')
hello
Now I change the content of module1.py to
print "hello123"
This is the output:
In [2]: runfile(r'C:\Dokumente und Einstellungen\deproema.INTRAIFM\Desktop\o2d_ethernetIP\funktional\module2.py', wdir=r'C:\Dokumente und Einstellungen\deproema.INTRAIFM\Desktop\o2d_ethernetIP\funktional')
UMD has deleted: module1
hello
Note:
for a python interpreter it works fine, just for the IPython interpreter it dowsn't work.

From pierre.raybaut on 2010-09-10T03:32:29Z
Status: Fixed


Fix typo in elixir-mode link.

Fix typo in elixir module documentation.

Good catch. Thanks for the help!


No-op non-windows enable_ansi_support function

Hi!
This looks like an awesome crate to use for colours. One question though: could a non-windows version of enable_ansi_support be added to the crate?
Ideally I'd rather not have my CLI applications having any OS-specific code - it would be nice if I could just stick ansi_term::enable_ansi_support() at the top of my main() function, and know that it'll do whatever's needed for the current OS.
It could just be literally #[cfg(not(windows))] fn enable_ansi_support() -> Result<(), u64> { Ok(()) }. If you'd be willing to add this, I can also submit a PR.

I think it would be even better to have the library call the enable_ansi_support() function automagically if it's on Windows. That way there's no separate initialization code that the developer should remember to call and that can, consequently, get out of sync / forgotten / etc, and the "enabling" process is completely hidden from the user of the library, shrinking the API surface and decreasing complexity.

@H2CO3 Where in the library would this be located - and how would the library make it obvious it's doing a semi-expensive and environment affecting operation then?
There'd have to be some sort of global Once to ensure that it doesn't happen twice, and locking to support that... Would you want this to happen inside the paint method, which is otherwise very cheap - literally just a stack value construction?
I think it makes sense to have some 'prep' code - it can be performed by whatever library or application plans on using color codes - most likely a logging library of one sort or another.

@daboross I think it should not be in paint. After all, that method doesn't actually do anything. It should be in a place of which the performance is comparable to the performance of locking. It could be in the <ANSIString as Display>::fmt() method itself, for example.

@H2CO3 Ah ok, that's reasonable.
I'd still be a bit hesitant, since someone could be formatting to a string for later storage or printing from another program, but that'd be better than in paint. It seems a bit 'magic' still.

@daboross I guess at this point it's really a matter of points of view :) In this particular case I would prefer the "magic" (ie. hiding the complexity) because it's not a particularly performance-sensitive issue. In other situations, I sometimes prefer being explicit too. In any case, it would be good to make the library platform-independent and, if a function has to be called sometimes, then provide an empty implementation for those OSes that don't need it.

I'd prefer to have the no-op enable_ansi_support function and call that at startup; calling it implicitly from fmt seems entirely too magic, and as @daboross noted, you might not be writing to the console.

This is not implemented yet?

I wanted enable_ansi_support without the rest of ansi_term, so I've included the no-op function and published it as a separate crate (repository).

+1 that enable_ansi_support should be a no-op on any OS that is not windows.


Updated ESPWebFilemanager to V1.4.3

@ArduinoBot

@jobitjoseph please do not submit pointless pull requests like this. They don't accomplish anything other than wasting your time and wasting my time.
After the initial addition of the library, the indexer job periodically checks each of the libraries in the index and picks up any new release/tag that meets the requirements listed here:
https://github.com/arduino/library-registry/blob/main/FAQ.md#what-are-the-requirements-for-publishing-new-releases-of-libraries-already-in-the-library-manager-list
This means there is no need to take any additional action to add new releases of your library to Library Manager. They will be added automagically!
It does take a little time for the indexer job to run, and then some additional time after that for the update to propagate through the CDN and the local cache. But it will get there. We give a conservative estimate of availability within one day's time.
You can monitor the indexing of the library releases by checking the library's dedicated indexer logs web page: https://github.com/arduino/library-registry/blob/main/FAQ.md#user-content-can-i-check-on-library-releases-being-added-to-library-manager
If you have any questions about how the system works, you can consult the provided documentation:
https://github.com/arduino/library-registry#arduino-library-manager-list
Note that in addition to the information in the readme, there is a lot of other valuable information in the FAQ:
https://github.com/arduino/library-registry/blob/main/FAQ.md
If the documentation doesn't contain the information you are seeking for, or you want to discuss Arduino-related subjects, you are always welcome to post on Arduino Forum:
https://forum.arduino.cc/c/development/libraries/39
We'll be happy to help you over there.

Apologies for the unwanted pull request. It was my mistake. Will not happen again.  Once again my sincere appologies.


[4.0.0-beta11]background-image CssSyntaxError

Bug Report
Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
  ionic (Ionic CLI)          : 4.1.2 (/Users/woodstream/.nvm/versions/node/v9.5.0/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.11
   @angular-devkit/core       : 0.8.3
   @angular-devkit/schematics : 0.8.3
   @angular/cli               : 6.2.3
   @ionic/ng-toolkit          : 1.0.8
   @ionic/schematics-angular  : 1.0.6

Describe the Bug
it worked well in ionic3, but not work in ionic4, when I comment the 'background-image' it work well.
ERROR in ./src/app/scan/scan.page.scss
[ng] Module Error (from ./node_modules/postcss-loader/lib/index.js):
[ng] (Emitted value instead of an instance of Error) CssSyntaxError: /Users/woodstream/Documents/dev/projects/ionic4/afblwx/src/app/scan/scan.page.scss:8:26: Can't resolve '../assets/imgs/scanner.svg' in '/Users/woodstream/Documents/dev/projects/ionic4/afblwx/src/app/scan'
[ng]    6 |         width: 100%;
[ng]    7 |         height: 86%;
[ng] >  8 |         background-image: url('../assets/imgs/scanner.svg');
[ng]      |                          ^
[ng]    9 |         background-repeat: no-repeat center center;
[ng]   10 |         background-size: contain;

Steps to Reproduce
Steps to reproduce the behavior:

add 'background-image' in .scss file;
run 'ionic serve'

Thanks for the issue. I am only able to reproduce this with an invalid path. We generally use an img folder in the v4 apps, not imgs.
For example, if you put the following URL and it still errors, then it is likely an Ionic problem:
background-image: url('https://images.unsplash.com/photo-1537770721742-5bee5eaa977b?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=04cbbf16dd1a25147b47a078c3ab8339&auto=format&fit=crop&w=668&q=80');

However, if the above works, it is a path issue. Make sure the path to your image is valid. If you are still running into this issue, please provide a way for us to reproduce it. Thanks!


Remove -fs from troubleshooting command

Closes #1184
I tested the current docs command locally to verify that -fs silences errors. It's legit:
$ curl -fs -X PUT "http://${host}:${port}/v2/keys/_test"
$

After removing the -fs switch:
$ curl -X PUT "http://${host}:${port}/v2/keys/_test"

<title>400 Bad Request</title>

400 Bad Request

nginx/1.12.0

This change is

please reply here with a new comment and we'll verify

Testing.

please reply here with a new comment and we'll verify

Testing.

Closing due to commit history uncleanness, will reopen as a new PR.


[AUTOMATIC] Release/0.9.0

This is an automatic release.
RevenueCat SDK
✨ New Features

Support non renewable products. (#191) via Toni Rico (@tonidero)

🔄 Other Changes

Change endpoint to use the new /purchase (#194) via Toni Rico (@tonidero)
Update UI to support consumables and non consumables (#193) via Toni Rico (@tonidero)

Closing for now. Can ship lat


Copy CONTRIBUTING.md from skopeo

We need to tell people about contributing to the CRI-O project
Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

Fixes: https://github.com/kubernetes-incubator/cri-o/issues/1071

@rhatdan excellent start, just about there after a few nits to pick.

@TomSweeneyRedHat Added your fixes, we should probably correct in skopeo, and I will add this page to buildah.

oops I had the wrong paths to the git repo,  Fixed

Except one nit, LGTM

Merging.


componentWillReceiveProps() receives undefined instead of default

Current behavior
Calling wrapper.setProps({prop: undefined}) (where wrapper is a shallow wrapper) causes the component's componentWillReceiveProps() to be called with {prop: undefined}, even if prop has a default value.
Expected behavior
The component's componentWillReceiveProps() should be called with {prop: propDefault} (where propDefault is the default value of the prop), to reflect the "real-world" behavior.
Your environment
API

[x] shallow
[ ] mount
[ ] render

Version

library
version

Enzyme
3.3.0

React
15.3.1

Adapter

[ ] enzyme-adapter-react-16
[ ] enzyme-adapter-react-15
[x] enzyme-adapter-react-15.4
[ ] enzyme-adapter-react-14
[ ] enzyme-adapter-react-13
[ ] enzyme-adapter-react-helper
[ ] others ( )

I've included a test case below. Note that all tests pass if you use mount() instead of shallow(), demonstrating the "real-world" lifecycle event behavior.
import React from 'react';
import { shallow } from 'enzyme';

const Component = React.createClass({
  getDefaultProps() {
    return { className: 'default-class' };
  },

  componentWillReceiveProps(nextProps) {
    this._receivedClassName = nextProps.className;
  },

  render() {
    return <div className={this.props.className} />;
  },
});

describe('Component', () => {
  let wrapper;
  beforeEach(() => {
    wrapper = shallow(<Component />);
  });

  it('renders with the default className', () => { // PASS
    expect(wrapper.prop('className')).toBe('default-class');
  });

  describe('when className is explicitly set to undefined', () => {
    beforeEach(() => {
      wrapper.setProps({ className: undefined });
    });

    it('renders with the default className', () => { // PASS
      expect(wrapper.prop('className')).toBe('default-class');
    });

    it('gets the default className in componentWillReceiveProps()', () => { // FAIL
      expect(wrapper.instance()._receivedClassName).toBe('default-class');
    });
  });
});

Hi @TrevorBurnham. It seems this behaviour can be reproduced with latest React and React adapter as well. setProps method for shallow wrapper combines prevProps (which includes defaultProps) and props which you pass to the setProps function, and if you have case like:
const prevProps = { className: 'default-class' };
const props = { className: undefined };
const nextProps = { ...prevProps, ...props } // { className: undefined } as className was overwritten

When you use mount wrapper basically React.createElement is used, and it has this check which sets prop value.
@ljharb what do you think, is it a bug? If so could try to create a PR with possible fix.

@mykhailo-riabokon this does seem like a bug, and a PR would be very helpful!

This seems fixed in master; #1711 has passing tests.


Playbook failing again

Last week I tried running a playbook that has served me well since the beginning of the year. It failed.
Re-downloaded the external roles and tried again. Failed again.
Built a brand new Ubuntu 22.04.4 LTS box and redownloaded the complete playbook and external roles. It failed again.
Here is where I consistently get the error:
TASK [geerlingguy.drupal : Generate Drupal project with composer package in /tmp/composer-project (this may take a while).] *************************************************************
Tuesday 09 April 2024  14:21:59 -0700 (0:00:00.532)       0:00:11.516 *********
fatal: [default]: FAILED! => {"changed": true, "cmd": ["/usr/local/bin/composer", "create-project", "islandora/islandora-starter-site:^1.2", "/tmp/composer-project", "--prefer-dist", "--no-interaction"], "delta": "0:00:03.856174", "end": "2024-04-09 14:22:03.979512", "msg": "non-zero return code", "rc": 2, "start": "2024-04-09 14:22:00.123338", "stderr": "Creating a "islandora/islandora-starter-site:^1.2" project at "/tmp/composer-project"\nInstalling islandora/islandora-starter-site (1.6.2)\n  - Downloading islandora/islandora-starter-site (1.6.2)\n  - Installing islandora/islandora-starter-site (1.6.2): Extracting archive\nCreated project in /tmp/composer-project\n> Islandora\StarterSite::rootPackageInstall\nInstalling dependencies from lock file (including require-dev)\nVerifying lock file contents can be installed on current platform.\nYour lock file does not contain a compatible set of packages. Please run composer update.\n\n  Problem 1\n    - seboettg/citeproc-php is locked to version v2.6.2 and an update of this package was not requested.\n    - seboettg/citeproc-php v2.6.2 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.\n  Problem 2\n    - seboettg/citeproc-php v2.6.2 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.\n    - drupal/citation_select 2.0.0-beta1 requires seboettg/citeproc-php ^2.6 -> satisfiable by seboettg/citeproc-php[v2.6.2].\n    - drupal/citation_select is locked to version 2.0.0-beta1 and an update of this package was not requested.\n\nTo enable extensions, verify that they are enabled in your .ini files:\n    - /etc/php/8.1/cli/php.ini\n    - /etc/php/8.1/cli/conf.d/10-mysqlnd.ini\n    - /etc/php/8.1/cli/conf.d/10-opcache.ini\n    - /etc/php/8.1/cli/conf.d/10-pdo.ini\n    - /etc/php/8.1/cli/conf.d/15-xml.ini\n    - /etc/php/8.1/cli/conf.d/20-apcu.ini\n    - /etc/php/8.1/cli/conf.d/20-calendar.ini\n    - /etc/php/8.1/cli/conf.d/20-ctype.ini\n    - /etc/php/8.1/cli/conf.d/20-curl.ini\n    - /etc/php/8.1/cli/conf.d/20-dom.ini\n    - /etc/php/8.1/cli/conf.d/20-exif.ini\n    - /etc/php/8.1/cli/conf.d/20-ffi.ini\n    - /etc/php/8.1/cli/conf.d/20-fileinfo.ini\n    - /etc/php/8.1/cli/conf.d/20-ftp.ini\n    - /etc/php/8.1/cli/conf.d/20-gd.ini\n    - /etc/php/8.1/cli/conf.d/20-gettext.ini\n    - /etc/php/8.1/cli/conf.d/20-iconv.ini\n    - /etc/php/8.1/cli/conf.d/20-imap.ini\n    - /etc/php/8.1/cli/conf.d/20-mbstring.ini\n    - /etc/php/8.1/cli/conf.d/20-mysqli.ini\n    - /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini\n    - /etc/php/8.1/cli/conf.d/20-pdo_pgsql.ini\n    - /etc/php/8.1/cli/conf.d/20-pdo_sqlite.ini\n    - /etc/php/8.1/cli/conf.d/20-pgsql.ini\n    - /etc/php/8.1/cli/conf.d/20-phar.ini\n    - /etc/php/8.1/cli/conf.d/20-posix.ini\n    - /etc/php/8.1/cli/conf.d/20-readline.ini\n    - /etc/php/8.1/cli/conf.d/20-shmop.ini\n    - /etc/php/8.1/cli/conf.d/20-simplexml.ini\n    - /etc/php/8.1/cli/conf.d/20-sockets.ini\n    - /etc/php/8.1/cli/conf.d/20-sqlite3.ini\n    - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini\n    - /etc/php/8.1/cli/conf.d/20-sysvsem.ini\n    - /etc/php/8.1/cli/conf.d/20-sysvshm.ini\n    - /etc/php/8.1/cli/conf.d/20-tokenizer.ini\n    - /etc/php/8.1/cli/conf.d/20-xmlreader.ini\n    - /etc/php/8.1/cli/conf.d/20-xmlwriter.ini\n    - /etc/php/8.1/cli/conf.d/20-xsl.ini\n    - /etc/php/8.1/cli/conf.d/20-yaml.ini\nYou can also run php --ini in a terminal to see which files are used by PHP in CLI mode.\nAlternatively, you can run Composer with --ignore-platform-req=ext-intl to temporarily ignore these required extensions.", "stderr_lines": ["Creating a "islandora/islandora-starter-site:^1.2" project at "/tmp/composer-project"", "Installing islandora/islandora-starter-site (1.6.2)", "  - Downloading islandora/islandora-starter-site (1.6.2)", "  - Installing islandora/islandora-starter-site (1.6.2): Extracting archive", "Created project in /tmp/composer-project", "> Islandora\StarterSite::rootPackageInstall", "Installing dependencies from lock file (including require-dev)", "Verifying lock file contents can be installed on current platform.", "Your lock file does not contain a compatible set of packages. Please run composer update.", "", "  Problem 1", "    - seboettg/citeproc-php is locked to version v2.6.2 and an update of this package was not requested.", "    - seboettg/citeproc-php v2.6.2 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.", "  Problem 2", "    - seboettg/citeproc-php v2.6.2 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.", "    - drupal/citation_select 2.0.0-beta1 requires seboettg/citeproc-php ^2.6 -> satisfiable by seboettg/citeproc-php[v2.6.2].", "    - drupal/citation_select is locked to version 2.0.0-beta1 and an update of this package was not requested.", "", "To enable extensions, verify that they are enabled in your .ini files:", "    - /etc/php/8.1/cli/php.ini", "    - /etc/php/8.1/cli/conf.d/10-mysqlnd.ini", "    - /etc/php/8.1/cli/conf.d/10-opcache.ini", "    - /etc/php/8.1/cli/conf.d/10-pdo.ini", "    - /etc/php/8.1/cli/conf.d/15-xml.ini", "    - /etc/php/8.1/cli/conf.d/20-apcu.ini", "    - /etc/php/8.1/cli/conf.d/20-calendar.ini", "    - /etc/php/8.1/cli/conf.d/20-ctype.ini", "    - /etc/php/8.1/cli/conf.d/20-curl.ini", "    - /etc/php/8.1/cli/conf.d/20-dom.ini", "    - /etc/php/8.1/cli/conf.d/20-exif.ini", "    - /etc/php/8.1/cli/conf.d/20-ffi.ini", "    - /etc/php/8.1/cli/conf.d/20-fileinfo.ini", "    - /etc/php/8.1/cli/conf.d/20-ftp.ini", "    - /etc/php/8.1/cli/conf.d/20-gd.ini", "    - /etc/php/8.1/cli/conf.d/20-gettext.ini", "    - /etc/php/8.1/cli/conf.d/20-iconv.ini", "    - /etc/php/8.1/cli/conf.d/20-imap.ini", "    - /etc/php/8.1/cli/conf.d/20-mbstring.ini", "    - /etc/php/8.1/cli/conf.d/20-mysqli.ini", "    - /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini", "    - /etc/php/8.1/cli/conf.d/20-pdo_pgsql.ini", "    - /etc/php/8.1/cli/conf.d/20-pdo_sqlite.ini", "    - /etc/php/8.1/cli/conf.d/20-pgsql.ini", "    - /etc/php/8.1/cli/conf.d/20-phar.ini", "    - /etc/php/8.1/cli/conf.d/20-posix.ini", "    - /etc/php/8.1/cli/conf.d/20-readline.ini", "    - /etc/php/8.1/cli/conf.d/20-shmop.ini", "    - /etc/php/8.1/cli/conf.d/20-simplexml.ini", "    - /etc/php/8.1/cli/conf.d/20-sockets.ini", "    - /etc/php/8.1/cli/conf.d/20-sqlite3.ini", "    - /etc/php/8.1/cli/conf.d/20-sysvmsg.ini", "    - /etc/php/8.1/cli/conf.d/20-sysvsem.ini", "    - /etc/php/8.1/cli/conf.d/20-sysvshm.ini", "    - /etc/php/8.1/cli/conf.d/20-tokenizer.ini", "    - /etc/php/8.1/cli/conf.d/20-xmlreader.ini", "    - /etc/php/8.1/cli/conf.d/20-xmlwriter.ini", "    - /etc/php/8.1/cli/conf.d/20-xsl.ini", "    - /etc/php/8.1/cli/conf.d/20-yaml.ini", "You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.", "Alternatively, you can run Composer with --ignore-platform-req=ext-intl to temporarily ignore these required extensions."], "stdout": "", "stdout_lines": []}
Thanks

One item missing is the php intl extension. After manually installing it the second ansible task has moved past the error point listed above. Running as I type this. Will report as it concludes...

I had to add '  - "php{{ php_version }}-intl"' to my islandora-playbook/vars/Debian.yml file to install php intl module to get this to work properly.  My Debian.yml file looks like the following:
`php_packages_extra:

"libapache2-mod-php{{ php_version }}"
"php{{ php_version }}-mysql"
"php{{ php_version }}-pgsql"
"php{{ php_version }}-gd"
"php{{ php_version }}-xml"
"php{{ php_version }}-curl"
"php{{ php_version }}-intl"
`

I'll add this in a PR.


[Discussion] Should we create Job for each Replication to download/sync files

Right now, we'll download/sync the files in each reconciliation, which leads to a long running process, which may lead to obj dropped (the default ratelimiter queue has 100 bucket size by default) or slow reconciliation, which could be mitigated by increase the concurrency worker number. We have a discussion in slack https://kubernetes.slack.com/archives/C02MRBMN00Z/p1731402269033139.
Maybe we could use a job to download/sync the files, however, this may lead to latency and another round of job scheduling. And essencially agent should be responsible for this, rather than another job.

/kind question


Wink power strip support

Added support for Wink Power strips as another Wink switch device. Pywink requirements updated to 0.4.0 which includes support for Wink garage doors as well.
I updated the pywink requirements in all wink.py files and re-ran gen_requirements_all.py and the requirements_all.txt file was created however pywink version wasn't updated? I manually updated the file with the updated version. I grepped all of the files and didn't see anything with a version of pywink != 0.4.0 so I am not sure why the gen script didn't update the file?

The gen script updates the requirements_all.txt file. Judging from your diff, it has been updated.
Code looks fine. One style violation reported by CI

I manually updated the requirements_all.txt to the correct version because running the gen script didn't work.

I'm trying to clean up some PRs before a new release. Do you have time to fix the style violation so this can be merged?


Extracting features

Without a fc layer, what would be the best way to extract features (for a t-SNE plot for example)? Should I take the res5c layer output and flatten it?

You could just take res5c layer's output and flatten it, but please note that the vector length will not be a constant if your input image size varies.


Apply rotation to input/output separate to the animation

Say I want to animate the elephant to the buffalo, and rotate while doing so. I can apply a rotation to the animation, but that means the elephant and/or buffalo are going to start/end at the wrong rotation.
Instead, I want to:

Rotate the buffalo 90 degs counter-clockwise
Adjust the points to make a convincing morphing animation
Apply a 90 deg rotation to the animation

It's that first bit I can't do, other than editing the SVG in another tool. Is it something ShapeShifter should be able to handle?

Yes, this is something I eventually want to support, but I hadn't filed a bug. Thanks!
BTW, a temporary workaround for now is to add a group transformation directly to the SVG file. For example, if you surround the buffalo SVG path with:
<g transform="rotate(90)">
  <path id="buffaloPath" />
</g>

Shape Shifter will automatically bake any parent group transforms directly into the path node's command string when the SVG is imported. Not a very user friendly solution, but at least it doesn't require opening up another tool. :)

Ohh, great that it handles transforms

Yeah, this would probably be a pretty easy feature to implement since most of the necessary math has already been written... it is mostly just figuring out the best way to expose the option in the UI that I would have to figure out. :)

Idea for later:
Add a transform() method to Path. The Path will record the transform operations in its CommandMutations. On subsequent clones the path will output a transformed version of itself. Should be pretty easy, and would support rotation/scale/translation.
Still not sure where to expose this in the UI though.

Yay! Cheers

:)
Here is a demo of what I have working right now. Let me know if there is anything I missed!
When the user enters a new rotation value r, the following changes are made behind the scenes:

The end state SVG's <path d="..."> node is transformed using translate(-width/2, -height/2) rotate(-r) translate(width/2, height/2). This transformation is baked directly into the path data string.
The end state SVG is wrapped in a <g> and is transformed using translate(-width/2, -height/2) rotate(r) translate(width/2, height/2). Note that this transformation by r degrees offsets the above transformation by -r degrees.
During the animation, the <g>'s transform attribute is animated between 0 and r degrees.

The only kind of weird thing is that changing the rotation will often require re-autofixing the SVGs since the position of the input SVGs data points could change dramatically (i.e. in the demo video above when changing the rotation from 0 to 180 degrees).
LMK what you think!
p.s. ShapeShifter has a new, easier-to-remember URL now: https://shapeshifter.design (the old URL still works too).

FYI, just published this yesterday.

@alexjlockwood
I cannot find the option to do rotation.
I am looking for rotating this 180 degree clockwise, is it possible? or still in development?

You can wrap the path in a group and alter the pivot/rotation properties:

You can view an example by clicking "File --> Demo --> Play/Pause animation"

@alexjlockwood Great, found and I can do rotation now. Thanks.


better push and pull

TODO:

[x] adapt final api urls from control.aldryn.com
[x] make sure update experience is good (what happens if a user tries these operations with an older version of aldryn-client?)

Previously the whole push and pull was handled in one big request. This causes a lot of timeouts while the backend server is processing the upload or preparing the download. Practically it was not possible to upload media of more than 15MB on a slowish connection.
This pull-request divides push and pull of db and media up into multiple requests.
For pushes it will upload the file and then poll a progress url until it gets a success indication. The server implementation accepts the uploaded file in the first POST, launches a celery task and returns the progress url.
For pulls it will do a single small POST request to indicate it wants a download. The server launches a celery job to generate the archive and returns a url that provides progress info. Once the archive is ready, the progress info includes the url that can be used to download the actual archive.


Support varying Docker daemon configurations across smoke tests

The current smoke tests run against a static Docker configuration which is provisioned in the test VM vagrant files. This restriction is making certain tests difficult and should be lifted:

Testing the proxy's ability to connect to non-standard DOCKER_HOST
Testing global vs local mode network plugin

Just to note the configuration is also provisioned in https://github.com/weaveworks/weave/blob/master/test/gce.sh#L79

Argh!Looks the the GCE images aren't using systemd then?

I think we can do this with systemd drop-ins once GCE is upgraded #1212.

We should use the systemd override mechanism in vagrant-common.rb/tweak_docker_daemon too. Currently that just patches the docker.service file. This breaks updating docker with vagrant provision since that will stomp on the file and explode since it restarts the daemon before tweak_docker_daemon has been re-run.

eek. The current tweak_docker_daemon is not idempotent - if you run vagrant provision multiple times you end up with the docker daemon attempting to listen on the same ports multiple times!

Some further reading suggests that the correct place for the override is /etc/systemd/system/docker.service.d/override.conf - that's what gets created if you run systemctl edit docker.

We should use the systemd override mechanism in vagrant-common.rb/tweak_docker_daemon too.

done


Video doesn't show controls when it is used inside a modal

Current behavior
Place Video inside Modal
Reproduction steps
Play video inside Modal with controls
Expected behavior
Video controls play, seek, etc needs to show on top of modal
Platform

Android MediaPlayer

Video sample
Controls are rendering behind modal

problem with only Android media player not with ExoPlayer

same issue

any solution？

use ExoPlayer
As of now ExoPlayer is not autolinked with react-native-video. To link it with your project and use it, create a file named react-native.config.js in your project root. Then add the following code in the file:
module.exports = {
dependencies: {
'react-native-video': {
platforms: {
android: {
sourceDir: '../node_modules/react-native-video/android-exoplayer'
}
}
}
}
}
reference: https://stackoverflow.com/questions/59542183/use-exoplayer-in-react-native

use ExoPlayer
As of now ExoPlayer is not autolinked with react-native-video. To link it with your project and use it, create a file named react-native.config.js in your project root. Then add the following code in the file:
module.exports = { dependencies: { 'react-native-video': { platforms: { android: { sourceDir: '../node_modules/react-native-video/android-exoplayer' } } } } }
reference: https://stackoverflow.com/questions/59542183/use-exoplayer-in-react-native

use ExoPlayer
As of now ExoPlayer is not autolinked with react-native-video. To link it with your project and use it, create a file named react-native.config.js in your project root. Then add the following code in the file:
module.exports = {   dependencies: {     'react-native-video': {       platforms: {         android: {           sourceDir: '../node_modules/react-native-video/android-exoplayer'         }       }     }   } }
reference: https://stackoverflow.com/questions/59542183/use-exoplayer-in-react-native


Link Not Working + Wrong Title

The link doesn't work either

I see that this has been fixed

Yep, thanks :)


Setup behind a corporate proxy

I'm surprised nobody has raised the difficulty of following this procedure behind a corporate proxy.
The PublishCloudPrinter, SQLite, Add-Capability components don't install from behind a proxy, and while I've managed to get the Nuget-based components installed offline I'm now at the MopriaCloudService stage, but there is no download available and dism is just a black box regarding where it goes to download EnterpriseCloudPrint and Mopria.
For the purposes of whitelisting these destinations, can you list the web addresses the server needs to contact in order to install all the relevant components in this document? Some of us can't just open everything up to the internet.
Thanks.

Closing due to no specific article listed in the feedback. Please open a new issue using the link at the bottom of the article for which you want to raise an issue.
#please-close


add another option for linting utility

In my case JavaScript Standard Style does not seem to me a good tool to verify the state of your code. Not being configurable is one of them, as well as its semicolon rules.
adding ESLint might be a good idea.

I use extended JS Standard rules with eslint. Works fine.
{   "parser": "babel-eslint",   "extends": "standard",   "plugins": ["react", "jsx-a11y", "import"],   "rules": {     "jsx-quotes": ["error", "prefer-double"]   } }

Ya, keep in mind your this is your app, so you're welcome to change it to fit your standards.  The generators will need to be forked, but it's not too much work.


chore(#31): Refactoring before #19 implementation

Field class should be splitted into two new classes FieldBase and Field. FieldBase is supposed to be a base class for all fields (like ExpressionField, SelectField etc.); Field is supposed for root fields in loaders, queries and mutations.
Field.ApplyResolve should be moved from FieldBase to a new interface IFieldSupportsApplyResolve; only Field and UnionField should implement this interface. ApplyResolve should be removed from the other field classes like SelectField, BatchField, EnumerableFieldBase and ExpressionField

Codecov Report

Merging #32 (f13de90) into develop (3453a8a) will increase coverage by 0.32%.
The diff coverage is 70.40%.

@@             Coverage Diff             @@
##           develop      #32      +/-   ##
===========================================
+ Coverage    79.36%   79.68%   +0.32%
===========================================
  Files          244      245       +1
  Lines        15146    15075      -71
  Branches      1344     1344
===========================================
- Hits         12020    12013       -7
+ Misses        2636     2572      -64
  Partials       490      490

Impacted Files
Coverage Δ

...s/Loader/Implementations/BaseLoaderFieldBuilder.cs
90.00% <ø> (ø)

...uilders/Loader/Implementations/FromBatchBuilder.cs
95.23% <ø> (ø)

...rs/Loader/Implementations/FromIQueryableBuilder.cs
92.30% <ø> (ø)

...Loader/Implementations/InlineObjectFieldBuilder.cs
9.66% <ø> (ø)

...lders/Loader/Implementations/LoaderFieldBuilder.cs
27.69% <ø> (ø)

...der/Implementations/SelectAndReferenceToBuilder.cs
44.44% <ø> (ø)

...L/Builders/Loader/Implementations/SelectBuilder.cs
94.11% <ø> (ø)

.../MutableLoader/Implementations/FromBatchBuilder.cs
54.05% <ø> (ø)

...lementations/FromBatchEnumerableEditableBuilder.cs
15.78% <ø> (ø)

...lementations/FromBatchSelectableEditableBuilder.cs
76.19% <ø> (ø)

... and 20 more

Continue to review full report at Codecov.

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


[WB-5693] User process hangs indefinitely on exit in IPython

https://wandb.atlassian.net/browse/WB-5693
Description
This PR fixes a bug introduced in 0.10.31 that caused the IPython interpreter to hang indefinitely on exit after wandb.init() was called.
Testing
Manually. Will add a regression test.

@raubitsj OK I moved this to a unit test, pushing ...


Stop using non-standard Promise.defer()

Fixes #147
Changes Proposed in this Pull Request:

Replaced Promise.defer() with a custom defer() implementation

@jazzpi @LongLiveCHIEF

I believe the only thing holding this patch up, is someone seriously committed to maintaining and advancing it. see: #116 - Looking for a New Maintainer
I'd be willing to merge and publish if this one last time if @lloeki were to restore my permissions (which I requested be removed), but that would only be a temporary solution, and we'll undoubtedly be right back full circle when the next breaking change hits.
I know @lloeki would also be in favor of someone forking and creating a newer version of this tool, and he would likely even promote that tool on the README of this one if it showed dedication to being maintained and supported.

I'm very sorry I've been this inactive, had a busy last few weeks. I should have a bit of time on my hands next week though and I'll try to weed through at least a few issues. For now though, thanks a lot for this PR!

You're welcome, and I think that's just a normal cycle of open source. I have maintained CoffeeLint for a few years now. Since I don't think CoffeeScript has a future, I have stopped using it and I rarely look at CoffeeLint.
I opened an issue in vim-mode proposing that the two projects just merge. From my perspective it seems like an ideal solution. Many people are confused that ex doesn't come with vim-mode.

Thank you for merging! You wouldn't believe how much I rely on this! :)


[terra-button-group] Arrow keys selection fix

Summary

What was changed:
Selection with Arrow keys functionality added for the single select examples.
Why it was changed:
Was not able to select the button previously using arrow keys .
Testing

This change was tested using:

[ ] WDIO
[ ] Jest
[x] Visual testing (please attach a screenshot or recording)
[ ] Other (please describe below)
[ ] No tests are needed

Reviews
In addition to engineering reviews, this PR needs:

[ ] UX review
[ ] Accessibility review
[ ] Functional review

Additional Details

This PR resolves:
UXPLATFORM-9630
Pre implementation:

Post implementation:
https://github.com/cerner/terra-core/assets/126875089/276b248f-faa3-41d9-b56e-27ab51a7bf92

Thank you for contributing to Terra.
@cerner/terra

Add wdio tests (for both single and multi select) to validate these changes.


Limit client generation to only those portTypes that are actually used

Resolves #252
Includes some cleanups and refactorings to QuarkusCxfProcessor.
Also introduces tests that check constructor and instance injection.

I forgot to push a new test, will do ASAP.

I pushed a sparate commit to make reviewing easier. Will squash it once review is done.

@shumonsharif can you review as well, please? Thanks!

It is OK for me.

@shumonsharif can you review as well, please? Thanks!

@famod @dufoli Apologies for being MIA - I am reviewing now!

I have just squashed the two commits.

LGTM ?
@shumonsharif  if you are ok you can merge ;-)

and even release ;-)

Sounds good @dufoli ... I'm on it!


Fixing mastDownload for empty table/table2

Previously mastDownload would break if one of table or table2 was empty
(basically always). This PR fixes MAST querying for JWST.

Codecov Report

Merging #461 (4a089e3) into main (567701c) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   60.53%   60.50%   -0.04%
==========================================
  Files          76       76
  Lines        8565     8570       +5
==========================================
  Hits         5185     5185
- Misses       3380     3385       +5

Impacted Files
Coverage Δ

src/eureka/lib/mastDownload.py
0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Checks failed, but code looks good.

Checks failed, but code looks good.

Ah, sorry - I'd turned off local flake8 linting while in the airport so I'd use less battery. Flake8 fixed and ready for final approval


fixed symfony process

https://github.com/BRACKETS-by-TRIAD/code-style-fixer/commit/90404f03fe1fcfbe7abf820bfced00fa339589e7

@dejwCake it looks like you already encountered this problem in code-style-fixer package. So basically we need to do the same in this package, as well. Correct?


Update spdlog

This PR updates the spdlog submodule to v1.8.5, and fixes our code where needed.

We now have an initThreadPool method rather than a setAsyncMode method.
The implementation of the VoidFormatter has also changed.

Affects https://github.com/microsoft/vscode/issues/121513
I tested my changes by running npm rebuild and then npm run test using node v15.14.0. I did not use electron-rebuild, because I couldn't find a way to issue npm run test commands after running it; I'd get messages like
Error: The module '/Users/raymondzhao/work/node-spdlog/build/Release/spdlog.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 88. This version of Node.js requires
NODE_MODULE_VERSION 83.

if I used electron-rebuild or node v14.16.0.
Maybe this means that the spdlog submodule has to somehow be rebuilt with the right version of node, though I'm not sure how.

Once you have built for electron you need to use ELECTRON_RUN_AS_NODE=1 electron.exe <path-to-mocha-binary>

That worked! All the tests are still passing.

In spdlog 1.x calling init_thread_pool(..) is not enough to make the loggers async. see https://github.com/gabime/spdlog/wiki/6.-Asynchronous-logging#creating-async-loggers

A few changes

The loggers are single-threaded
The only type of logger create function that is now exposed is an async function that creates an async rotating logger, createRotatingLogger
I've exported the shutdown function https://github.com/gabime/spdlog/wiki/6.-Asynchronous-logging#windows-issues and a flushEvery function.

Due to https://github.com/microsoft/vscode/issues/121852, I'll add another function that creates a synchronous logger during debt week.

switch back to using _mt loggers, since the flushing requires thread-safe loggers to work

Actually _mt is not required if the sinks are used only in async logger(and as long the thread was pool has single thread).

Thanks for the context @gabime, have confirmed with @rzhao271 that vscode uses the sync logger and async logger from different processes so it is safe to use the _st version.