[STORM-1252] port backtype.storm.stats to java

This PR is quite large but because the defrecords are changed to java POJO's and they're used in many places, I could not break it into small PR's.
Almost all code in stats.clj is translated to java except only one point:
StatsUtil.aggTopoExecsStats (stats/agg-topo-execs-stats) needs to pass an error function, which depends on the translation of cluster.clj, so I added comments and will upmerge when cluster.clj is finished.

PR is indeed quite large. StatsUtil file is too large right now. I think while we are porting from clojure, we should also shift from functional paradigm to Object oriented paradigm. In that spirit, many utility functions can go directly inside the classes on which they are invoked upon. e.g.
public static void emittedTuple(CommonStats stats, String stream) {
        stats.getEmitted().incBy(stream, stats.rate);
    }

can go to CommonStats itself
public void emittedTuple(String stream) {
        getEmitted().incBy(stream, rate);
    }

Similarly public static Map renderStats(SpoutExecutorStats stats) can go to SpoutExecutorStats class itself. These are few examples I could think of in a quick look. But I hope you got the gist of it. It would be good to get the opinion of the @revans2  and and other committers on this as well.

@abhishekagarwal87 thanks, good point! I'll address your comments~

I've upmerged and added get-last-error, also moved renderStats & update tuple related methods to corresponding classes.

@revans2 could you please help review this PR?

Thanks @revans2 , I'll address all your comments~

I started testing this and started to run into some issues.
I created a new test, but the test is crap, because it takes way too long to run, but does give some good results.
https://github.com/apache/storm/compare/master...revans2:stats-test?expand=1
I plan to expand this more, but for now I am running into the following exception.
java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map
        at org.apache.storm.stats.StatsUtil.filterSysStreams(StatsUtil.java:1343)
        at org.apache.storm.stats.StatsUtil.aggPreMergeTopoPageSpout(StatsUtil.java:314)
        at org.apache.storm.stats.StatsUtil.aggTopoExecStats(StatsUtil.java:481)
        at org.apache.storm.stats.StatsUtil.aggregateTopoStats(StatsUtil.java:570)
        at org.apache.storm.stats.StatsUtil.aggTopoExecsStats(StatsUtil.java:550)
        at org.apache.storm.daemon.nimbus$fn__5066$exec_fn__884__auto__$reify__5095.getTopologyPageInfo(nimbus.clj:2117)
        at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
        at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
        at org.apache.storm.LocalCluster$_getTopologyPageInfo.invoke(LocalCluster.clj:110)
        at org.apache.storm.LocalCluster.getTopologyPageInfo(Unknown Source)
        at org.apache.storm.TestStats.testBasic(TestStats.java:150)

@revans2 yes I see the exception too when running your test, but looks odd because I've tested all storm ui pages in distributed mode with java stats and everything looks good. The exception is as follows, StatsUtil.filterSysStreams expects a map of {window -> stream id -> value}, while in your test it gets a map of {stream id -> value}. I suppose this happens in local mode only? Though I can manage to make through your test by changing this method a little.

@unsleepy22 thanks for humoring me with the test.  That is really really odd.  I have no idea why it is doing this in local mode differently.  This is one advantage of strongly typed languages.
I'll try to spend some more time today to look through the code again.

I am going through StatsUtil.java and it is more of the same thing everywhere.  The code is a literal translation of the clojure code.  The input APIs in most cases are clojure specific, but many of these functions actually return thrift object already.  For example stats/agg-comp-execs-stats returns an instance of ComponentPageInfo.  I would prefer to see us have a shim that will translate the clojure maps, etc into java objects that would be a better java API/state when we translate the clojure code that is calling into it.
For example
(defn agg-comp-execs-stats
  "Aggregate various executor statistics for a component from the given
  heartbeats."
  [exec->host+port
   task->component
   beats
   window
   include-sys?
   topology-id
   topology
   component-id]

was translated into
public static TopologyPageInfo aggTopoExecsStats(
  String topologyId,
  Map exec2nodePort,
  Map task2component,
  Map beats,
  StormTopology topology,
  String window,
  boolean includeSys,
  IStormClusterState clusterState);

but if we expand the signature a bit more it really looks like
public static TopologyPageInfo aggTopoExecsStats(
  String topologyId,
  Map<List<Number>/*low exec, high exec*/,List<Object>/*String host, Number port*/ > exec2nodePort,
  Map<Integer, String> task2component,
  Map beats<List<Number>/*low exec, high exec*/, Map<Keyword, Object>/*Clojure map keys :stats, :uptime, :time-secs, good luck*/ >,
  StormTopology topology,
  String window,
  boolean includeSys,
  IStormClusterState clusterState);

If we want a more java like API with classes instead of maps/Lists it should probably be something more like
public class HostPort {
    public final String host;
    public final int port;
    ...
};

public static TopologyPageInfo aggTopoExecsStats(
    String topologyId,
    Map<ExecutorInfo, HostPort> exec2nodePort,
    Map<Integer, String> task2component,
    Map beats<ExecutorInfo, ExecutorBeat>,
    StormTopology topology,
    String window,
    boolean includeSys,
    IStormClusterState clusterState);

All of the public facing APIs need this type of a translation to happen.  If you want me to go through all of them and list what I think they should be I can.

@revans2 I get your idea and you don't have to go through all of them, my initial thought was to keep it compatible with original clojure data structures, but I'm ok to change all of them, I will update in a day or two~

@unsleepy22 I understand the desire to keep them compatible, and that is a decent first step, but one of the goals of this translation is to remove the clojure entirely as a dependency for storm-core.  If we have java code still using it we cannot do that.

@revans2 I've changed according to your opinion, still, the code in StatsUtil might be quite rough and clojure-way, I just want to make sure it's the right move, hope you can take a quick look.
My changes are:

changed executor heartbeat structure to java HashMap instead of clojure map (and yes there's still a Map anyway)
moved update-heartbeat-cache method into StatsUtil.java, because of the change to clojure structure to HashMap, they should be moved back when translating nimbus.clj, I added TODO in methods.
because the HashMap structure is quite mixed, e.g., it may store "rate" of stats which is a double, and store "emitted" which is a HashMap, so in many methods, I used Map<String, Object>.
for structures like "executor->host+port", I still used the original clojure structure because I think they might be used somewhere else, I only want to change stats related with this PR

BTW. about your test last time, it's actually a bug of my code, I fixed this, sorry for the confusion.

@unsleepy22 It looks a lot better.  I don't care as much about the exact API.  we can change that in the future the important part is removing the dependency on clojure.  I have one minor issue, but overall it looks good and I am +1 for merging it in.
StatsUtils.java 2045-2046: in weightAvgAndSum
The reason for having the productOr0 function is because the inputs could be null, and if they were null we didn't want to blow up with an NPE.  The current code will throw an NPE.  it should probably look more like.
ret += productOr0(entry.getValue(), id2num.get(k));

I plan to do a bit of testing myself, but great work.

@revans2 you're right about the possible NPE, I've updated code.
Also I added a lot of method comments.
I have tested web ui with new code and compared stats data and all looks good.

@revans2 any update on this?

@unsleepy22 sorry I had a minor personal emergency come up last Friday.  It is fixed now, but I am still trying to catch up on everything that happened Friday and over the weekend.  I'll try to get back to looking at this soon.  If I don't say anything in a day or so please ping me again.

+1


Add styling for font in the Hacktoberfest description

Currently the font for the description of what Hacktoberfest is is looking a little, well, boring. Change the font to something that fits with the rest of the page, and style it with colors and whatnot to something that you feels fits!

@bear217 Hello, may i work on this for hacktoberfest? :)

Issue was adressed and fixed!


Simplify and improve client pom.xml

Currently the GitHub repo contains three root-level pom.xml files. One of these is for building the management plane (pom.xml), and two of these are for the client SDK (pom.client.xml and pom.client.build.xml).
There should not be two separate pom.xml files for the client side. We should do the following:

Remove the existing pom.client.xml file, and rename pom.client.build.xml to pom.client.xml.
Introduce proper dependency versioning management for all libraries required by Key Vault data-plane.
Remove unnecessary configuration from the Key Vault pom.xml - this should become exceedingly minimal.
Introduce proper tooling support for spotbugs, checkstyle, and JavaDoc. Ensure issues result in build failures.
Resolve all build failures, or add exceptions.

This should import (by copy / paste / edit) the files from the Microsoft/maven-java-parent project.

@JonathanGiles has this been addressed with the changes we made in https://github.com/Azure/azure-sdk-for-java/issues/3485?


wrong parameter offset for 32bit indexFormat calling _gl.drawElements

When using subMesehs for a mesh, the start index is not correctly multplied by the typesize of the index buffer Format. Instead, alway 2 is used (shoulr be 2 or 4!):
===================================================================
--- babylon.2.0.debug.js
+++ babylon.2.0.debug.js	(working copy)
@@ -4111,11 +4111,12 @@
             this._drawCalls++;
             // Render
             var indexFormat = this._uintIndicesCurrentlySet ? this._gl.UNSIGNED_INT : this._gl.UNSIGNED_SHORT;
+            var mult = this._uintIndicesCurrentlySet ? 4 : 2;
             if (instancesCount) {
-                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2, instancesCount);
+                this._caps.instancedArrays.drawElementsInstancedANGLE(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * mult, instancesCount);
                 return;
             }
-            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * 2);
+            this._gl.drawElements(useTriangles ? this._gl.TRIANGLES : this._gl.LINES, indexCount, indexFormat, indexStart * mult);
         };
         Engine.prototype.drawPointClouds = function (verticesStart, verticesCount, instancesCount) {
             // Apply states

Would be great to get that as a pull request to be able to correctly test it :-)

Hi there!
Sorry, I do not have any experiences with Git. But adding one line of code and changing two “2” into two “mult” is not so much work for you… ;-)
Or use my version appended to this  mail;-)
CS
Josef
Von: Raanan Weber<EMAIL_ADDRESS>Gesendet: Dienstag, 19. Mai 2015 13:28
An: BabylonJS/Babylon.js
Cc: JPoepsel
Betreff: Re: [Babylon.js] wrong parameter offset for 32bit indexFormat calling _gl.drawElements (#519)
Would be great to get that as a pull request to be able to correctly test it :-)
—
Reply to this email directly or view it on GitHub https://github.com/BabylonJS/Babylon.js/issues/519#issuecomment-103450384 .  https://github.com/notifications/beacon/AL7k5Vv4LUChX6YKx56cuN9hynLvWDfBks5oKxXMgaJpZM4EgDqd.gif

yep, you are right, but developers are lazy :-) (here - http://jaxenter.com/results-developers-strategically-lazy-113513.html). apart from that, I thought you would like to be on the contributors list.
We will look into it and keep this issue updated. Thanks for submitting!!

yep, you are right, but developers are lazy

Now you got it ;-) (not you, I’m the developer ;-)))
Von: Raanan Weber<EMAIL_ADDRESS>Gesendet: Dienstag, 19. Mai 2015 15:14
An: BabylonJS/Babylon.js
Cc: JPoepsel
Betreff: Re: [Babylon.js] wrong parameter offset for 32bit indexFormat calling _gl.drawElements (#519)
yep, you are right, but developers are lazy :-) (here - http://jaxenter.com/results-developers-strategically-lazy-113513.html). apart from that, I thought you would like to be on the contributors list.
We will look into it and keep this issue updated. Thanks for submitting!!
—
Reply to this email directly or view it on GitHub https://github.com/BabylonJS/Babylon.js/issues/519#issuecomment-103481121 .  https://github.com/notifications/beacon/AL7k5S7wSfLvsxB4v1An-Rjzj2glZo27ks5oKy6SgaJpZM4EgDqd.gif

This is a good bug:) I'll fix it:)


Recovering 2-of-3 without one of the keys backup

One of the keys backup was lost, can the Recovery Tool at https://bitpay.github.io/copay-recovery/ be used with just 2 of the 3 keys (since only 2 signatures are required to send a transaction)?

What is the technical reason all the 3 backups are required even if it's a 2 of 3 setup?

In other to derive the wallet's addresses you need to have all the public keys. In order to sign a transaction, you only need the required keys.
Copay "export" backups have all the wallet's public keys (yours and all other copayers) and only your private key. You can recover a, eg, 2-of-4 wallet by having 1 Copay "export" backup, and one other mnemonic.  But not with only 2 mnemonics, because you can not know the other 2 public keys, so you can derive the wallet's addresses.
You can read more about it at: https://github.com/bitpay/copay/blob/master/README.md#copay-backups-and-recovery


blink_stm32f4: Fix timer

This example runs using the HSI clock which is 16 MHz. This means
that we need to pass 16 in rather than 25.
I confirmed (with my Logic analyzer) that with this patch that the
timings are correct on the STM32FDISC board which uses an STM32F407.

Thanks for the fix.


Synchronization with the forum

Describe the feature
Could you make synchronization with the account on the forum, as is done in other CAD systems.
Additional Context
No response

You could use the public api. See docs how you can do that.


Can't use Firebase phone auth in realese version

phone auth working fine in debug version and when realesing and upload it to play store phone auth not working and saying app not authorized to use Firebase phone auth.
some notes:

i configure sha1 for both debug and realese version on firebase console

@sh3lan93 this sounds like an issue with your specific app and not this quickstart.  This is very likely a SHA1 issue, please double check.  You can always reach out to Firebase support for more help.


Deployment test

Fingers crossed it works end to end finally.

nate@pdp-11% curl -v -o /dev/null http://d3ujh5oi9ugd23.cloudfront.net/test 2>&1 | grep Location
< Location: http://example.com

Sweet. All that's left is updating the DNS for gxy.io and getting an SSL cert.


Encoding/Decoding time.Time

It would be nice if there was an example showing the best approach for encoding and decoding time.Time values. I have searched this repository but can't find any reference on how to accomplish this.
Say I have the following object that maps to a SQL database table, how would I go about encoding/decoding the timestamp fields?
type User struct {
	ID        uint64
	Username  string
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
}

For a little more context, this is how I currently approach encoding the User object when using Go's native marshaller:
type User struct {
	ID        uint64     `json:"id"`
	Username  string     `json:"username"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at"`
}

func (u *User) MarshalJSON() ([]byte, error) {
	type UserAlias User

	return json.Marshal(&struct {
		*UserAlias
		CreatedAt interface{} `json:"created_at"`
		UpdatedAt interface{} `json:"updated_at"`
		DeletedAt interface{} `json:"deleted_at"`
	}{
		UserAlias: (*UserAlias)(u),
		CreatedAt: nullifyTime(u.CreatedAt),
		UpdatedAt: nullifyTime(u.UpdatedAt),
		DeletedAt: nullifyTime(u.DeletedAt),
	})
}

func nullifyTime(t interface{}) interface{} {
	if reflect.ValueOf(t).Kind() == reflect.Ptr {
		if t.(*time.Time) == nil {
			return nil
		}

		return t.(*time.Time).Format(time.RFC3339)
	}

	if t.(time.Time).IsZero() {
		return nil
	}

	return t.(time.Time).Format(time.RFC3339)
}

Which once encode would result in the following example output:
{"id":2,"username":"nicklaw5","created_at":"2018-07-14T05:46:43+10:00","updated_at":"2018-07-14T05:46:43+10:00","deleted_at":null}

For time we do it this way:
// Decoding
func (u *User) UnmarshalJSONObject(dec *Decoder, k string) error {
    switch k {
    "createdAt":
        var str string
        if err := dec.String(&str); err != nil {
            return err
        }
        if t, err := time.Parse(time.RFC3339 , str); err != nil {
             return err
        } else {
            u.CreatedAt = t
        }
    }
    return nil
}
// Encoding
func (u *User) MarshalJSONObject(enc *gojay.Encoder) {
    enc.StringKey("createdAt", u.CreatedAt.Format(time.RFC3339))
}

But we could easily add some methods like:
// Decoding
dec.Time(t, time.RFC3339) // where t is a *time.Time
// Encoding
enc.TimeKey(t, time.RFC3339) // where t is a *time.Time

What do you think?

I think some methods would be ideal, as time properties are very common attributes in relaying information between services. Perhaps make the formatting optional however.

Ok will add those in the next release.
Will also add something like dec.SQLNullString()and enc.SQLNullStringKey("k", *sql.NullString) and all nullable types of the sql` package.
Will try to release this in the coming days.

Will be added in next 1.2.0 version to be released tomorrow.


Request for additional example

Hello,
I found this library works very well and the examples were easy to understand. However, when I look at them I get the impression that it should also be possible to send server-side-events using this library. However, when I tried I could not get it to work, I think because all examples correctly close the connection when they are done.
Would it be possible to send server side events using simple-web-server? And if so, could you add an example, for example an equivalent of the server-time clock at https://www.w3schools.com/html/html5_serversentevents.asp.
Thanks for sharing your great project any way.

Thank you, but I'm thinking that maybe in general it's a better idea to use WebSocket for this? Or is server-side-events commonly used now? It's not supported by Edge yet?
It's possible to implement using this library, but one would have to keep the Response alive, and use Server::send to flush the data to the client. I would not recommend it though, since it kinda is a dirty hack to send "delayed" server messages to the client through the HTTP protocol, at least in my view.

Thank you for your reply. I agree that the HTTP protocol adds some overhead and thus limits performance. However, not everything has to be real-time. Personally I am very impressed by the simplicity of server sent events.
With your suggestion I made a working example.
extra includes:
// Added for Server-Sent-Event chat mutex chatMutex; condition_variable chatConditionVariable; bool chatSendUpdate = false; string chatMessage = ""; // end Added for Server-Sent-Event chat
extra global variables declared:
// Added for Server-Sent-Event chat mutex chatMutex; condition_variable chatConditionVariable; bool chatSendUpdate = false; string chatMessage = ""; // end Added for Server-Sent-Event chat
extra source code (inserted just above the default GET):
    // receive and process input from the caht form
    server.resource["^/chat.html$"]["POST"]=[](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
        //Get the message
        chatMessage = request->content.string();
        boost::replace_all(chatMessage, "input=", "");
        boost::replace_all(chatMessage, "+", "%20");                // fix URI encoding
        if (chatSendUpdate == false && chatMessage.size()>0)
        {
            chatSendUpdate = true;
            chatConditionVariable.notify_all();
            this_thread::sleep_for(chrono::milliseconds(50));       // allow the threads some time to send the events
            chatMessage = "";                                       // reset the buffer to prevent sending the same message multiple times.
            chatSendUpdate = false;
        }
        // No response needed because chat.html sends the message without reloading, otherwise we would have to return the same as for a GET request
    };
    server.resource["^/chat.html$"]["GET"]=[&server](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
        string content_stream = "
Server sent event chat example

";
        content_stream += "<!DOCTYPE html>\n\n\n\n<form action=\"chat.html\" method=\"post\" target=\"foo\">\n<textarea id=\"messages\" rows=\"15\" cols=\"100%\"></textarea>
\n";
        content_stream += "Type a message: <input type=\"text\" name=\"input\"> <input type=\"submit\" value=\"Submit\"></form>\n";
        content_stream += "\n\n";

        *response <<  "HTTP/1.1 200 OK\r\nContent-Length: " << content_stream.data() << "\r\n\r\n" << content_stream;
    };
    //Get event source for server side events
    server.resource["^/chat.event$"]["GET"]=[&server](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> /*request*/) {
        thread work_thread([&server, response] {
            *response << "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Type: text/event-stream\r\nCache-Control: no-cache'\r\n\r\n";
            server.send(response);
            string previouslySend = "";
            while(true)
            {
                unique_lock<mutex> chatLock(chatMutex);
                while (!chatSendUpdate) chatConditionVariable.wait(chatLock);       // wait for condition variable
                if (chatMessage.compare(previouslySend) != 0 && chatMessage.size()>0)
                {
                    string message="data: {\"message\":\""+chatMessage+"\"}\n\n";   // create the event data
                    previouslySend = chatMessage;                                   // remember what has been send
                    *response << message.c_str();
                    server.send(response);                                          // send the data and keep the connection open
                }
            }
        });
        work_thread.detach();
    };

The only thing I don't like about it is the while loop. It should stop if the connection is terminated by the client, but I did not find a way to detect that yet.

You have Server::on_error that is called (if set) if a connection is closed prematurely.

What is it about this method that prevents the connection from being closed when the /chat.event handler returns? Is it because the shared_ptr<Response> remains in scope in the thread?

@z0u yes, as long as you keep the Response object alive by copying its shared_ptr<Response>, the connection will remain open. The response is actually sent when the Response object is destroyed, or when Response::send is called.

Thanks @eidheim, I have SSE mostly working now. This is the output of curl -v host:8080/sse-endpoint:
> GET /sse-endpoint HTTP/1.1
> Host: host:8080
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Content-Type: text/event-stream
< Pragma: no-cache
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
<
:heartbeat

That :heartbeat was sent after some time by the SSE thread on the server.
However, the connection never seems to close. When I ^C out of curl, the server's on_error method (which I set) isn't being called. The heartbeat messages are continue to be sent into the defunct response. Are you sure on_error should be called when the client closes the connection?

@z0u You can filter out the errors that you receive when the client closes the connection in on_error. But you are right, it is not strictly an error, but with respect to an async_read call it is since it is cancelled without reading any data.

@z0u I did a quick test, but keep in mind that I have not looked too deeply into server-sent events:
#include "server_http.hpp"

using namespace std;
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;

int main() {
  HttpServer server;
  server.config.port = 8080;

  server.default_resource["GET"] = [](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> /*request*/) {
    *response << "HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\n\r\n";

    class Recursive {
    public:
      static void f(shared_ptr<HttpServer::Response> response) {
        thread t([response] {
          this_thread::sleep_for(chrono::seconds(1));
          response->write(":heartbeat\r\n");
          cout << "heartbeat" << endl;
          response->send([response](const error_code &ec) {
            if(!ec)
              Recursive::f(response);
          });
        });
        t.detach();
      }
    };
    Recursive::f(response);
  };

  server.on_error = [](shared_ptr<HttpServer::Request> /*request*/, const SimpleWeb::error_code &ec) {
    cout << ec.message() << endl;
  };

  server.start();
}

When I ^C out of curl, I get the message: Broken pipe and the heartbeat stops sending. The connection is at this point closed.

Oh I see! I was just setting the server's on_error callback. I didn't realise there was on overload of Response::send that took an error callback. I'll try that 😊 thanks so much for taking the time.

Tested in my code - and it works 😀 Thanks again!
Just FYI, I'm not spinning up a new thread for every subscription: I have one thread that services a vector of subscribed responses. When send() fails, the response is removed from the vector.

This is also a possibility, without using threads directly:
#include "server_http.hpp"

using namespace std;
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;

int main() {
  static auto io_service = std::make_shared<SimpleWeb::asio::io_service>();
  HttpServer server;
  server.io_service = io_service;
  server.config.port = 8080;

  server.default_resource["GET"] = [](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> /*request*/) {
    *response << "HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\n\r\n";

    class Recursive {
    public:
      static void f(shared_ptr<HttpServer::Response> response) {
        auto timer = std::make_shared<SimpleWeb::asio::steady_timer>(*io_service);
        timer->expires_from_now(std::chrono::seconds(1));
        timer->async_wait([timer, response](const SimpleWeb::error_code &ec) {
          if(!ec) {
            *response << ":heartbeat\r\n";
            cout << ":heartbeat" << endl;
            response->send([response](const SimpleWeb::error_code &ec) {
              if(!ec)
                Recursive::f(response);
            });
          }
        });
      }
    };
    Recursive::f(response);
  };

  server.on_error = [](shared_ptr<HttpServer::Request> /*request*/, const SimpleWeb::error_code &ec) {
    cout << ec.message() << endl;
  };

  server.start();
  io_service->run();
}

Hi @eidheim, thanks for the async/recursive example.
I thought I had this working using a producer thread without recursion, but I've run into trouble. This is what I have:

Some clients subscribe to the SSE endpoint, specifying a queue ID: /subscribe?id=1
When another client makes a request to /publish?id=1 an event is pushed onto queue 1.
A single worker thread takes events off the queues and sends them to the subscribers over their SSE connections. It also periodically sends heartbeats.

This usually works fine, but it fails when two events are queued up at the same time on the same queue. In that case, the first event is sent twice. I think this might be because the call to asio::async_write doesn't read from the buffer until later, so the second call to Response::send sends the first chunk again.
I see that your recursive example solves this by waiting until the first send is complete before starting the second. But since I have multiple event queues for different consumers, and I also need to send heartbeats, I'm having trouble designing it to work with the recursive pattern you demonstrated. So, my questions:

As a quick fix, is there some way to make Response::send take a copy of streambuf before sending it?
Is there some other way to make send thread-safe (at least for one producer thread)?
Am I just wrong about the behaviour of send, and this should already work?

Thanks :)

Response::send is thread safe. But I suggest that all your handlers are run using an event loop (one io_service with thread pooling set to 1 in Server::Config). Then you will not need to worry about multithreading issues, although you have to design your application in an asynchronous manner (like my examples above).

Hi again @eidheim, I've created a simple test that demonstrates that multiple calls to send can fail, and I've created a pull request that fixes the issue for me. See #229. What do you think?

@z0u Thank you! I'll have a look at it Tomorrow after lunch. I never imagined this to be a use case for HTTP/1.1, but it is definitely needed when using server-sent events.


Dev - New Implementation Added.

generate_grid.py - Test along/track grid generation procedure.

Pull request accepted.


dsHdmiIn: Add L3 for getHdmiVersion API

Problem/Opportunity
Add L3 test case for API getHdmiVersion.
Proposed Solution
L3 implementation for getHdmiVersion.
Acceptance Criteria (Optional)
Implementation should be reviewed .
Test must pass.
Additional Notes (Optional)
No response

L3 is not required for the getHdmiVersion API , as per the below reference in high level document.
https://github.com/rdkcentral/rdk-halif-test-device_settings/pull/147'


Extract engines and decorators

Closes #88

@mathieudutour @alizbazar What do you think about this change?
@mathieudutour I haven't converted the migrate decorator, as it's you contribution and I don't want to claim all the fame for this cool decorator! So go ahead and create a redux-storage-decorator-migrate npm package :sunglasses:

there it is: https://github.com/mathieudutour/redux-storage-decorator-migrate

@mathieudutour: Whoop! Whoop! Nice and thank you very much :tada:
I'll let this PR sit for one night and revisit it tomorrow. If everything is fine, the v3.0.0 will be released :shipit:

:+1:


TypeError: Only absolute URLs are supported when testing with jsdom.

When running a graphql-request request in a test environment, like jsdom on nodejs, it throws an error:
TypeError: Only absolute URLs are supported

which is a problem, if I want to intercept the request with tools like MSW.
I do not have this problem with relative requests when using fetch
fetch("/some-endpoint")

those work as before and can easily be intercepted with MSW.

Seems to be related to nextjs and its extended fetch function. This works:
const graphQLClient = new GraphQLClient('/api/graphql', { fetch })

Note that support for relative paths was dropped in the next upcoming version. If you need it, make a new issue explaining why etc. Thanks! https://github.com/jasonkuhrt/graphql-request/issues/745


Add ChromeSafariBrowser support for Android 11

Reflect package visibility settings in documentation
Upgrade android projects (lib & example)
Cleanup ChromeSafariBrowserManager.java
Upgrade Android dependencies

Does this fix the breaking issue? After updating the Android Studio, I am unable to build the app.

Thanks a lot! 😄 👍

Thanks a lot! 😄 👍


Validation for limiting documents of type .doc, .docx, .pdf etc

Hi,
Is there a way to allow only certain file extensions to be uploaded?
ngf-pattern=" '.pdf, .doc, .docx' "
accept=" '.pdf, .doc, .docx' "

Thanks
Roy

Yes what you have here should work. No need for space after comma.
For accept no need for single quote.
accept=".pdf,.doc,.docx"

Okay that is great. Thanks @danialfarid.


[DOCFIX] Add master monitoring doc

What changes are proposed in this pull request?
Add master monitoring doc
Why are the changes needed?
Add master monitoring doc
Does this PR introduce any user facing changes?
NA

A general comment is that I will prefer the master monitoring doc to be either user-facing [Preferred] or developer-facing. The current doc gives too much details for an end-user and makes it relatively hard to use and understand by them. But for developers, the details may not be clear enough.
For end-user, probably care less about how you monitor but care about what's the result and what the result means.

Agree, the user face is more preferred. The monitoring is more about maintenance, and a heuristic way. So introduced a little how that works to avoid confusion.

alluxio-bot, merge this please


Loading indicator in the tab is missing

Description
For the likes of the network search folder on the sidebar and recycle bin the loading indicator is missing over the tab icon
Steps To Reproduce
No response
Expected behavior
A loading incdication should show when loading a folders contents
Files Version
<IP_ADDRESS>
Windows Version
10.0.19043.1806
Relevant Assets/Logs
debug.log
debug_fulltrust.log

Just for context, the loader indicator was removed with the tab redesign and wasn't added back yet.

@yaichenbaum Is this issue still open ?? I want to work on this Issue

yes it open. just make a pull request with it added

I am still a beginner so is there some Guide ??

it normal c# and WinUI 2 xmal so you could proberly google stuff about it. WinUI galary on the Microsoft Store also give some excamples and code for WinUi. Enviroment setup instructions are here https://github.com/files-community/Files#building-from-source

@Josh-65  Sorry, but I am actually confused about loader indicator is there some kind of example or image about it looks ??

The loading indication should replace the icon in the tab its called a progress ring offically


8.8-rc-1: Deamon Toolchain Support on Windows: WindowsRegistry is not supported on this operating system.

Current Behavior
In IDEA:

Console:
org.gradle.tooling.GradleConnectionException: Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-8.8-rc-1-bin.zip'.
	at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
	at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
	at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:43)
	at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:69)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.gradle.internal.nativeintegration.NativeIntegrationUnavailableException: WindowsRegistry is not supported on this operating system.
	at org.gradle.internal.nativeintegration.services.NativeServices$BrokenService.invoke(NativeServices.java:543)
	at jdk.proxy36/jdk.proxy36.$Proxy371.getSubkeys(Unknown Source)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.getVersions(WindowsInstallationSupplier.java:79)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.find(WindowsInstallationSupplier.java:70)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.lambda$findOpenJDKs$2(WindowsInstallationSupplier.java:91)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.findInstallationsInRegistry(WindowsInstallationSupplier.java:65)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.get(WindowsInstallationSupplier.java:49)
	at org.gradle.jvm.toolchain.internal.WindowsInstallationSupplier.get(WindowsInstallationSupplier.java:31)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:541)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934)
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

Expected Behavior
Working build
Context (optional)
Workaround:
Delete the gradle-daemon-jvm.properties file
Steps to Reproduce

Use Gradle 8.8-rc-1
Run ./gradlew :updateDaemonJvm on Linux/macOS
Checkout the repo on Windows

You can use https://github.com/hfhbd/adventOfCode as a reproducer, but the actual structure/project does not really matter, as long as you use Gradle 8.8-rc-1 with a gradle-daemon-jvm.properties file
Gradle version
8.8-rc-1
Build scan URL (optional)
No response
Your Environment (optional)
Windows 10
Java Home: eclipse_adoptium-21-amd64-windows\jdk-21.0.3+9
IntelliJ IDEA 2024.1 (Ultimate Edition)
Build #IU-241.14494.240, built on March 28, 2024
Runtime version: 17.0.10+8-b1207.12 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Kotlin: 241.14494.240-IJ

This issue will be closed as a duplicate of

https://github.com/gradle/gradle/issues/25092

Please add your use case and 👍 to that issue.
If you think our analysis is wrong, please provide us with more detailed information explaining why.

Since the fix is to ignore Windows installation supplier errors if it can't access WindowsRegistry, the fix for this issue would be the same as for the previous one.

This isn't the same thing as https://github.com/gradle/gradle/issues/25092, so I'm reopening this

@hfhbd I haven't been able to reproduce with the advent project as-is, but I have a theory.
Could you add this to your root build.gradle.kts:
println("org.gradle.native="+System.getProperty("org.gradle.native"))

And then delete gradle-daemon-jvm.properties and try to sync your project.  Does this print org.gradle.native=null,org.gradle.native=true or org.gradle.native=false?
If this prints org.gradle.native=false, do you have any custom VM properties set on IntelliJ?
If this prints org.gradle.native=null, do Gradle commands work from the IntelliJ console, like gradle help when the gradle-daemon-jvm.properties file exists?

I can't reproduce this error anymore, but I installed some Windows updates and also IntelliJ 2024.1.1 (IU-241.15989.150).
I added the gradle-daemon-jvm.properties back and restarted the daemon and Windows multiple times.
Output of the property is org.gradle.native=null, but I am able to sync the project with IntelliJ and I can run help from IDE as well as the console now.

OK, there's some new defensive code for 8.8 RC2 (not released yet) to make this not fail, but I still don't know what's causing the native integration to be disabled.

In the tests you explicitly check for WindowsRegistry.Key.HKEY_LOCAL_MACHINE, "SOFTWARE\\AdoptOpenJDK\\JDK" which is not available on my system (because I don't installed JDK using the installer but using IntelliJ/Gradle toolchains).

but I still don't know what's causing the native integration to be disabled.

Do you need some build scans with some logging enabled?


Variants of CUE

Is it possible for us to create variants of CUE and build our own syntax and grammar on top? CUE is promising as the basis for new languages and simpler configuration but we'd like to use our own file extension and define further grammar/logic if possible (loops, conditions, etc).

Given that CUE already has loops and conditions: list comphrensions, field comphrensions, conditions, what are hoping to do that can't be done with these constructs? I'm curious!

Somehow I've missed this in the documentation. Thanks. I think cue is quite a promising thing for us as micro. We want to be able to represent service configuration and code in one way as a high level abstraction for manipulating services. Maybe you see a similar future at Google. Anyway I look forward to seeing the work evolve. Thank you.

It's debatable weather this qualifies as a grammar but https://github.com/ipcf/t somewhat related to this discussion.

This issue has been migrated to https://github.com/cue-lang/cue/issues/175.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.


Docstring corrections and suggestion

Correction in differential_cross_section docstring, adding term $\frac{\rho_\mu}{\rho_e}$
Correction in minkowski_dot docstring, + signal replaced with -
Suggestion based on notebook1 content, adding more context in coords_to_dict docstring. As a non-physicist, it was already somewhat difficult to get there with the added context 😁

Great work on the material!! 👍

Just my 2¢/€, I agree with these changes - I have a list of places that need more context from discussions during the session (including with @guiyrt ) which includes all of these and a few more that I missed from the notebooks.


I want to help, how can i be usefull ?

Hi,
I would like to help, I am a beginner but I would love to participate
can you help me navigate the project?
No problem recompiling and I looked through /libs and /includes
some things are clear to me, others not at all.
how can we see it more clearly, understand the whole thing, the process?
and if you don't have time no problemo
Thank you and good day

Hi,
It's great to hear you want to help, i think it'd be a good idea to join the GC/Wii Decompilation discord.
I hope there others and i can assist you.
If you don't want to then here's a rough walkthrough:
Open main.dol and the symbol map from the debug build in Ghidra, find a function/file you think is interesting and hasn't been decompiled yet, of course i'd start with something small.
Find the memory addresses(end and start of data sections) by making use of the symbol map and put this in dol_slices.yml.
Now there are a few different ways to start matching functions: using objdiff or decomp.me
Both are annoying to use thanks to how i've set up this repo.
From there you see the target assembly and the assembly of what the compiler outputs with the code you put in.
I hope this was all clear but feel free to ask more questions.
Have a nice day


value in the input is changed to the original value.

Version: smalot-bootstrap-datetimepicker#2.4.4
Currently I encounter a problem.
reproduce steps:
1.The initial value 1988-01-01 is set by the ajax call after the page shown.

2.I select one day like 1988-01-29

3.Then try to re-select the day , when the select panel shown , the value in my input is changed back to 1988-01-01.

My usage:

$("#profileBirthday").datetimepicker({
format:'yyyy-mm-dd',
autoclose:true,
maxView:'year',
minView:'month'
});
Anyone also meet this scenario ?

My usage:

Birthday

$("#profileBirthday").datetimepicker({
format:'yyyy-mm-dd',
autoclose:true,
maxView:'year',
minView:'month'
    });

My datepicker field is in a modal.
When modal show call ajax to retrieve the data.
So I think when the datepicker was shown , the event also did the default action.
fixed as blow stop the  subsequent default action:
$("#profileBirthday").datetimepicker({
format:'yyyy-mm-dd',
autoclose:true,
maxView:'year',
minView:'month'
}).on('show',function(ev){
ev.preventDefault();
ev.stopPropagation();
});


Require speaker field on session

Changed in production site to prevent any other sessions submitted without speaker. Need to export change to features.
/admin/structure/types/manage/session/fields/field_speakers

Done!


Used your plugin for Woocommerce (Gonano payment gateway), having serious issues

Used your Gonano plugin for WooCommerce, having big issues. One client send a transaction to the intermediate wallet address which didn't send it to the recepient wallet address (nano_3ajaewy49s1wz8jjbygbzf9wcoa8bskcc3b7b6xz68odt3qia6mu7cytfbkp):
https://nanocrawler.cc/explorer/block/D21448519EC189AA7F32E5FE31F17FAEDD621365498A04A3DA831BE844CA9004
https://nanocrawler.cc/explorer/account/nano_1gpshygkby1a4cw4q981m6z7cj84hqy6enj6akcn8d6cf86mtu5kmaw4xxj5/history
What are we doing now?

Refunded.
The fault is with the NANO network which is still degraded from the spam attack. It'll be like that until v22 fixes everything.


Feature/subform

Description

Related Issue(s)

closes #{issue number}

Verification/QA

Manual functionality testing

[ ] I have tested these changes manually
[ ] Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
[ ] No testing done/necessary

Automated tests

[ ] Unit test(s) have been added/updated
[ ] Cypress E2E test(s) have been added/updated
[ ] No automatic tests are needed here (no functional changes/additions)
[ ] I want someone to help me make some tests

UU/WCAG (follow these guidelines until we have our own)

[ ] I have tested with a screen reader/keyboard navigation/automated wcag validator
[ ] No testing done/necessary (no DOM/visual changes)
[ ] I want someone to help me perform accessibility testing

User documentation @ altinn-studio-docs

[ ] Has been added/updated

[ ] No functionality has been changed/added, so no documentation is needed
[ ] I will do that later/have created an issue

Support in Altinn Studio

[ ] Issue(s) created for support in Studio

[ ] This change/feature does not require any changes to Altinn Studio

Sprint board

[ ] The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
[ ] I don't have permissions to do that, please help me out

Labels

[ ] I have added a kind/* label to this PR for proper release notes grouping
[ ] I don't have permissions to add labels, please help me out

Just needed a PR while chasing #2320, to analyse the diff to main. Will close after that investigation concludes.

Abovementioned bug has been resolved, closing this PR for now.


MASM with empty control flow structures causes a panic

Bug report
Current behavior: A MASM file with control structures with zero opcodes is causing a panic.
Expected behavior: This should be gracefully handled and an error message should be printed.
Steps to reproduce
Using any of the following test scripts:
begin
    if.true
    end
end

begin
    while.true
    end
end

begin
    repeat.1
    end
end

And running the CLI tool:
$ ./target/release/miden run -a test.masm
============================================================
Run program
============================================================
Reading program file `test.masm`
thread 'main' panicked at 'removal index (is 0) should be < len (is 0)', assembly/src/assembler/mod.rs:390:12
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Compiling program...

Should be closed by #609 - but please reopen if not.


Can not find any way to show the Add | Edit button.

here is my package.json file
{
  "name": "family-map",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "lint": "eslint .",
    "preview": "vite preview"
  },
  "dependencies": {
    "classnames": "^2.5.1",
    "d3": "^6.7.0",
    "family-chart": "^0.0.0",
    "lucide-react": "^0.461.0",
    "react": "^18.3.1",
    "react-calendar": "^5.1.0",
    "react-dom": "^18.3.1",
    "react-icons": "^5.3.0",
    "react-modal": "^3.16.1",
    "react-router-dom": "^7.0.1"
  },
  "devDependencies": {
    "@eslint/js": "^9.9.0",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "@vitejs/plugin-react": "^4.3.1",
    "autoprefixer": "^10.4.20",
    "eslint": "^9.9.0",
    "eslint-plugin-react": "^7.35.0",
    "eslint-plugin-react-hooks": "^5.1.0-rc.0",
    "eslint-plugin-react-refresh": "^0.4.9",
    "globals": "^15.9.0",
    "postcss": "^8.4.49",
    "tailwindcss": "^3.4.15",
    "vite": "^5.4.1",
    "vite-tsconfig-paths": "^5.1.3"
  }
}

Here is my code to show the chart
import React, { useEffect, useRef } from "react";
import f3 from "family-chart";
import "family-chart/styles/family-chart.css";
import { FiEdit } from "react-icons/fi";
import { BsPlus } from "react-icons/bs";

const FamilyTree = () => {
  const cont = useRef(null);

  useEffect(() => {
    if (!cont.current) return;

    const store = f3.createStore({
      data: data(),
      node_separation: 250,
      level_separation: 150,
    });

    const svg = f3.createSvg(document.querySelector("#FamilyChart"));

    const Card = f3.elements.Card({
      store,
      svg,
      card_dim: {w: 220, h: 70, text_x: 75, text_y: 15, img_w: 60, img_h: 60, img_x: 5, img_y: 5},
      card_display: [
        (i) => `${i.data["first name"] || ""} ${i.data["last name"] || ""}`,
        (i) => `${i.data.birthday || ""}`,
      ],
      card_buttons: [
        (i) =>
          `${(
            <button className="edit-button">
              <FiEdit />
            </button>
          )}`,
        (i) =>
          `${(
            <button className="plus-button">
              <BsPlus />
            </button>
          )}`,
      ],
      mini_tree: true,
      link_break: true,

      onclick: () => console.log("clicked..."),
    });

    store.setOnUpdate((props) =>
      f3.view(store.getTree(), svg, Card, props || {})
    );
    store.updateTree({ initial: true });

    function data() {
      return [
        {
          id: "0",
          rels: {
            spouses: [],
            father: "",
            mother: "",
            children: [],
          },
          data: {
            "first name": "Lorem",
            "last name": "Ipsum",
            birthday: "10/12/1995",
            avatar: "",
            gender: "M",
          },
        }
      ];
    }
    function handleClick() {
      // Implement the logic for handling clicks on a family card
      console.log("Card clicked");
    }
  }, []);

  return (

  );
};

export default FamilyTree;

Here how can we add a edit and add button as we can see in create new tree button of the library.
I need add and edit button so that i can add new items and edit the existing once.

As far as adding new buttons and actions to the card you can look into: https://donatso.github.io/family-chart-doc/examples/7-custom-elements-and-actions
If you want to implement adding relative and edit features, currently the best way is to go to https://donatso.github.io/family-chart-doc/create-tree and copy paste your react code with "Enable Edit Mode" option enabled in config. (you will have to update your family-chart lib to latest version as well.)
One of the next features I have in mind is to add option to have custom buttons for adding and editing the tree.


Uart set custom speed of 100kbs or 100000

Using the S Bus protocol it required to use speed of 10000bps. Quick look in lib code make sure that all speeds are settings by macro. It will great to opportunity to add custom speeds in lib. Is it possible?

 Uart::with_path("/dev/ttyAMA0", 100000, Parity::Even, 8, 2).expect("COULD SET UART");

Gives me error
thread 'main' panicked at 'COULD SET UART: InvalidValue', src/main.rs:8:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

All code

use rppal::uart::{Parity, Uart};
use std::time::Duration;

fn main() {
    let mut uart =
        Uart::with_path("/dev/ttyAMA0", 1000000, Parity::Even, 8, 2).expect("COULD SET UART");
    uart.set_read_mode(1, Duration::default())
        .expect("COULD SET UART MODE");
}

Thanks for the suggestion. Unfortunately this is a limitation of the underlying termios functions cfsetispeed() and cfsetospeed() which are used to set the speed, and only support the currently available values. termios2 does support custom speeds, but isn't officially supported for musl targets, which would cause incompatibility issues depending on which libc is used. However, since things may have changed since I last worked on the uart code, I'll take another look after 0.12.0 has been released.

Maybee this  snippet of code will be helpful.


Update the default version tag

To align with image mirroring to quay

/assign @nishant-parekh @donpenney

/unhold


How to set intial zoom

Hi,i want to lock the zooming in possibility and i managed to lock it for only "days" view by adjusting minZoom and maxZoom. Problem is i first need to play a little with the zoom until it decides to lock on that. Would it be possibly to initialize inital zoom with the minZoom property ? Thanks

Being able to set an initial zoom level would be very useful! +1 for that feature.
I'd imagine it would be a plain configuration setting like 'initialZoom'.
If set to {minute: 15} for example, it would zoom to a point where the quarters of an hour are visible...
const options = {
initialZoom: { minute: 15 }
}
<Timeline ...options />

@VincentN  Yeah, but seemsilke this repo isn't maintaned anymore ... too bad. I managed to se intial zoom by computing visibleTimeStart/end date with moment. Apparently it does the zoom adjustment too. Also with this repo there are problems with CTRL+ zoom and ALT+zoom ...i swapped them because ctrl + zoom should soft zoom in and al+zoom should go to day zoom...i made a fork on my company's profile. I would submit some PR's but as i said i don't think the repo owner even looks there anymore.

@MocanuMarius hey! don't give up on us. I just got maintainer status like 2 weeks ago and I try to work through the issues and PRs. I'm not super fast since I try to do it better right than quick. So if you have any PR's for me I would be happy to merge them. Just give me a bit time. I first merge all the outstanding PRs for bugs then features.
But coming to this Issue:
like @MocanuMarius said: right now you have to do the initial zoom with visibleTimeStart and visibleTimeEnd. maybe @MocanuMarius could share his code and we place it somewhere other people can take advantage from it as well.

@signalwerk unfortunately i have 'finished my business' with this module, but i could contribute i guess in my free time. I will submit a PR request regarding the Ctrl+zoom and Alt+zoom behavior if you wish, some code changes are already there in my fork. We'll see about other things if you are active :) .Regarding initial zoom feature, i set it by blocking the size from somewhere else. It should be pretty easy to have a PR for initialZoom also :)

@signalwerk however i find the units in how the times and all (min-max) very counter-intuitive and not making a lot of sense, to get this package straight we would have to have a breaking version bump to fix all that logic.

@MocanuMarius We are more or less done with all the outstanding PRs. So I start to work on the bugs now. I made a code example where you see how to set the initially "zoom" by using visibleTimeStart& visibleTimeEnd (Line 59/60 in app.js on webpackbin) and how you fix it then to that with minZoom and maxZoom (Line 166/167).
The reason why we don't have a initialZoom level at the beginning is the reason to have full control over the view. Imagine your alternative. if you would do an initialZoom. Where would the view start and where would it end? So you would also need a visibleTimeStart anyway. Since visibleTimeEnd is in your terms visibleTimeStart + initialZoom it should be easy to handle that.
If you have other PRs for us I'm more than happy to review it.

@signalwerk you want me to open a pull request on the cltr+ mousewheel / ctrl+alt issue ? I find that being a bug.. i don't know how you feel about it...ctrl + zoom is too much , and alt+ wheel also moves up and down .... , i forked on my company's org. and it worked fine for me..only like 5 lines of code changed tops.

@MocanuMarius If I read it right from the code and by testing; there are right now three handlers for the mouse wheel:
shift + mousewheel = move timeline left/right
alt + mousewheel = zoom in/out
ctrl + mousewheel = zoom in/out 10× faster

plus there is a handling for pinches (two touch points) to zoom in/out.
What was your suggestion to change?
In general we are open to improve the quality and the convenience. So if you have improvements for us you are more than welcome to participate.

@signalwerk yes my suggestion is to swap the zooming from alt and ctrl ,because most people intuitively use CTRL and not alt, and the zooming factor is waay to big and you might consider that is all you get. Also, last time i used the module, while using ALT+zoom the main window would move up and down too while zooming ( there was an event prevent default missing somewhere in code i remember ) .. is that fixed ?

Hey, my 2 cents. On macOS, CTRL+zoom is by default mapped to the system zoom, which zooms in the entire desktop... so almost nobody can use it. That's why the standard zoom went to ALT+zoom.

@mariusandra oh , i forgot about that part of the world.. but still..what about the scrolling thing ? Usually this calendar is not the main and only thing in a page ... it's somewhere in a div or so.

Indeed, the whole window scrolling with ALT+zoom is a bug. Feel free to submit a PR to fix it ;).

@MocanuMarius  @mariusandra
I think both of you are right. But probably we didn't find the right solution right now. What about that:
shift + mousewheel = move timeline left/right
alt + mousewheel = zoom in/out 10× faster (instead of 1×)
ctrl + mousewheel = zoom in/out 3× faster (instead of 10×)
⌘ + mousewheel = zoom in/out 3× faster (new – for the mac-users)

The basic Idea is that we do what @MocanuMarius told us plus we do for the mac users a new check on the ⌘. With this solution Mac+PC get both the two modes. Because the pinch gesture gets mapped by the browser to ctrl + mousewheel I suggest to make it faster than 1×. I randomly selected 3×.

@signalwerk sounds like a very good idea for me, but don't disregard the event.preventDefault missing on alt scroll that has to be added still.

Hey, I'm going to make things even more complicated 😁
I just tested and the reason why CTRL+scrollwheel is 10x as fast as the other zooms is because of chrome's "pinch to zoom = ctrl + wheel" logic. This is the speed at which the pinching feels natural on a Mac - the calendar zooms in about as much as your fingers pinch... like it would naturally on a tablet/phone. Setting this to 1x or 3x (instead of 10x) makes it too slow and unusable.
So for now I did not change this logic.
I did however release v0.14.9 via PR #120, which these changes:

added event.preventDefault() for ALT+zoom - no more window scrolling
added META+wheel (⊞+wheel or ⌘+wheel) that does the same as alt+wheel (1x zoom).
refactored the code a bit

The problem with the zooming in general is that different users have different devices. Mac users are a minority for whom everything is more-or-less the same... but Linux and Windows users all use different mouse wheels, trackpads, touchpads, trackballs, etc... so it's hard to build something that satisfies everyone.
While @MocanuMarius complained that the default CTRL+zoom is really fast, in our experience, with a Linux desktop and a mouse with a "clicky" scroll (not a smooth one that just keeps turning), it was just perfect.
Perhaps the solution is to move away from the "speed" of the scroll itself, but base it around the duration of the scrolling? E.g. 500ms of scrolling = 1 screen, taking the maximum "scroll per 10ms" into account to make it smooth? Anyone willing to invest time into figuring this out? 😀

Actually, small change. v0.14.10 via PR #121 changes the new META+wheel to 3x the default zoom speed. I hope with this everyone will find some compromise that works. If not, we will need to investigate the time-based zoom approach, a'la Google Maps or Leaflet.

@mariusandra Nice job btw, regarding the other thing ... hmmm scrolling is not a continuous event, so i'm not sure how your suggestion would work. maybe making it work with throttling/debounce like how RxJs works, but the thing is you would want it to be very responsive anyways. I have had problems with how fast it scrolls on windows, but since it depends a lot on the configuration of the device as you say....would it be smart to allow for a scaling factor that the user can customize based on whatever their target audience is.. and move that responsibility of the package user ?
Hmm what if we use an exponential easing function that should be global , im guessing that would adapt to all sort of devices if we get the parameter just right and enough steps from min-max.
I'm thinking making this zooming exponentially grow via a 'keep-stream-alive' debounce time ala RxJS of like 50 ms, might make this usable for any platform if done right.

@MocanuMarius I'm not sure it's wise to delegate the responsibility of setting the correct zoom speed to the library users.
I believe as library developers we have the responsibility and overview to ensure sane defaults for the widest array of devices. If every library user needs to go through the same discussion as we did here to figure out the best modifier+speed combinations, it will just confuse everyone.
So let's still try to make something work! :)
As far as I understand, the main problem is that sometimes the zoom happens way too fast, especially with the CTRL modifier that is the natural zoom key on non-Mac systems. Thus it should be somehow limited to e.g. max 1000px of zoom per 500ms (just a random guess).
I would probably do it somehow like this:

When a wheel event arrives, add the "scroll amount" (pixels) to a variable that says how much we want to have scrolled in 300ms. Let's call it scrollTarget
Always keep this variable in some bounds, e.g. between -300 and 300 pixels. Everything over/under gets cut.
Use window.requestAnimationFrame to ask for the next moment when we can update the screen.
See how much time has passed and zoom accordingly (using some easing function for smoothness). Decrease scrollTarget as needed.

I once wrote something similar for my react map component pigeon-maps. Although in that component, the zoom speed is not limited, the smoothness/easing logic can possibly be emulated.
Feel free to take a crack at it if you wish ;).

@mariusandra @MocanuMarius @signalwerk I think I understand the whole conversation here but please help me figure out something that I am not certain if being discussed here. So apology for the naive question.
When you render the timeline for the first time, the default view is to show the calendar content in an hourly manner. In other words, we display a day and all its 24 hours. You then may click to either zoom into an hour or zoom out to monthly level. I want to know how I can make the monthly view the default view when the calendar is rendered for the first time.
I see that @signalwerk is suggesting to set the following props to make the min zoom level one day but that doesn't work for me. In other words, the following settings always leads me to the same hourly level display.
minZoom={24 * 60 * 60 * 1000}
maxZoom={24 * 60 * 60 * 1000}

Is there something else that I need to change? I am looking into the code but cannot easily figure that out.
Thanks
Kevin

The code and the link to the reference has expired, let me try my best to describe how I set initialZoom,

Set minZoom to the unit of time you want to zoom to
Set defaultTimeStart and defaultTimeEnd ONLY (no visible*) to the duration that is suitable to what you want to display given the minZoom
Viola


cjs useCookieValue will include whole react-hookz rather than just one hooks

What is the current behavior?
Included whole lib in the bundle
Steps to Reproduce

one of the file using import { useCookieValue } from "@react-hookz/web/cjs/useCookieValue/useCookieValue"
use webpack-bundle-analyzer to view the bundle

What is the expected behavior?
It should include useCookieValue only rather than whole bundle
I believe the potential cause is because we import the other hooks in this syntax
import { useFirstMountState, useMountEffect, useSafeState, useSyncedRef } from '..';

:tada: This issue has been resolved in version 16.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add activationkey support for RHEL subscription

Signed-off-by: CS Zhang<EMAIL_ADDRESS>

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: cs-zhang
To complete the pull request process, please assign yussufsh after the PR has been reviewed.
You can assign the PR to them by writing /assign @yussufsh in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: cs-zhang
To complete the pull request process, please assign yussufsh after the PR has been reviewed.
You can assign the PR to them by writing /assign @yussufsh in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/assign @yussufsh

/assign @yussufsh

@cs-zhang please have a single commit for this change. Hint: You could reset your last commit in the branch, then amend the first one by adding the typo change and force push to the branch.

@cs-zhang please have a single commit for this change. Hint: You could reset your last commit in the branch, then amend the first one by adding the typo change and force push to the branch.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: cs-zhang, yussufsh
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [yussufsh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: cs-zhang, yussufsh
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [yussufsh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: bpradipt, cs-zhang, yussufsh
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [bpradipt,yussufsh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: bpradipt, cs-zhang, yussufsh
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [bpradipt,yussufsh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


About the package will support .doc file?

I want to ask the package will support .doc file?
Thanks.

No. The .doc format is a completely different and binary format.
One option is to use LibreOffice to convert this file-type into DOCX and proceed from there.


[Feature Request] Add crop rectangle that would allow custom & fixed cropping

Instagram style crop picture area, also with an option to allow resizing the rectangle itself.

No plan to implement this as it should be a custom control. Too tricky to handle across iOS/Android/UWP for this library.


Failing scenario Ambiguous steps

Summary
When running cucumber test suite, there is a failure at features/docs/defining_steps/ambiguous_steps.feature:13 # Scenario: Ambiguous steps, the output contains extra line.
Expected Behavior
Test suite passes
Current Behavior

The test output contains extra line /usr/share/ruby/delegate.rb:83:in 'method_missing'.

(::) failed steps (::)

expected "Feature: \n\n  Scenario:                # features/ambiguous.feature:3\n    When a step            #...s/ambiguous.feature:3 # Scenario: \n\n1 scenario (1 failed)\n2 steps (1 failed, 1 passed)\n0m0.012s" to have output: string includes: "      Ambiguous match of \"an ambiguous step\":\n      \n      features/step_defini...ambiguous.feature:3 # Scenario: \n\n1 scenario (1 failed)\n2 steps (1 failed, 1 passed)\n0m0.012s\n"
Diff:
@@ -1,2 +1,22 @@
-(string includes: "      Ambiguous match of \"an ambiguous step\":\n      \n      features/step_definitions.rb:1:in `/^...ambiguous.feature:3 # Scenario: \n\n1 scenario (1 failed)\n2 steps (1 failed, 1 passed)\n0m0.012s\n")
+Feature:
+
+  Scenario:                # features/ambiguous.feature:3
+    When a step            # features/step_definitions.rb:1
+    Then an ambiguous step # features/ambiguous.feature:5
+      Ambiguous match of "an ambiguous step":
+
+      features/step_definitions.rb:1:in `/^a.*step$/'
+      features/step_definitions.rb:5:in `/^an ambiguous step$/'
+
+      You can run again with --guess to make Cucumber be more smart about it
+       (Cucumber::Ambiguous)
+      /usr/share/ruby/delegate.rb:83:in `method_missing'
+      features/ambiguous.feature:5:in `Then an ambiguous step'
+
+Failing Scenarios:
+cucumber features/ambiguous.feature:3 # Scenario:
+
+1 scenario (1 failed)
+2 steps (1 failed, 1 passed)
+0m0.012s
 (RSpec::Expectations::ExpectationNotMetError)
features/docs/defining_steps/ambiguous_steps.feature:36:in `Then it should fail with:'

Failing Scenarios:
cucumber features/docs/defining_steps/ambiguous_steps.feature:13 # Scenario: Ambiguous steps

212 scenarios (1 failed, 211 passed)
1272 steps (1 failed, 1271 passed)
0m19.667s

Possible Solution
There seems to be problem when Cucumber::Ambiguous gets thrown, same test with --guess option passes with not problem. Maybe somewhere around step_match_search line#22?
Steps to Reproduce (for bugs)

There is also log of the RPM build, scroll down the log to see the failure.

fetch gem from rubygems
unpack gem
clone this repo into seperate folder
copy features and cucumber.yml to same place where gem was unpacked
Run RUBYOPT=-Ilib cucumber features/docs/defining_steps/ambiguous_steps.feature.

Context & Motivation
I am trying to update rubygem-cucumber package in Fedora.
 It would be really helpful to see your step definitions for that reason, since this is not an issue with your feature file. An example here would be if you had step definitions like this:
Given(/^a step$/) do
  ...
end

Then(/^an?\s?.* step$/) do
  ...
end

In this case, the step "Given a step" would match both of these expressions and therefore raise Cucumber::Ambiguous. Also note that, in the step definition file, the Given and Then methods are aliased to one another, so those keywords aren't considered when matching steps. That is to say, the fact that "a step" is a Given step and "an ambiguous step" is a Then step doesn't actually change anything about how the steps are matched.
Incidentally, in your Gherkin, I noticed you're using a Then step to establish the conditions the feature needs to pass (i.e., the presence of one normal step and one ambiguous one). This will work, but the convention is to only use Then to denote a result or outcome, and not for steps that establish conditions or take actions meant to trigger that result. You might consider using And for the second step for clarity. For example:
Given a step
And an ambiguous step
When I run the feature
Then it should raise an error

I hope my unsolicited advice is helpful 😬

I may have not specified. I am encountering problem with this repository's features. Specifically this Scenario is to test the cucumber's implementation of ambiguous steps..

OH okay! I was wondering why those looked suspiciously like our steps! I'll see what I can figure out about this.


QGB: An Erroneous _newValidatorSetHash Renders the Bridge Unusable

ID
017

Finding
An Erroneous _newValidatorSetHash Renders the Bridge Unusable

Severity
4 - LOW

Description
Validator set updates are made by calling QuantumGravityBridge.updateValidatorSet and passing in the _newValidatorSetHash. Validation of this hash occurs outside of the QuantumGravityBridge contract. In the event an erroneous hash is published, e.g. one missing address or an unsorted address array provided, future calls to both updateValidatorSet and submitDataRootTupleRoot will fail.

Recommendation
Compute the _newValidatorSetHash using computeValidatorSetHash as a precaution and include zero address checks when updating the validator set.

Code References
QuantumGravityBridge.sol#L247

The QGB operates under a 2/3 honest majority assumption. Having an invalid validator set hash being signed by more than 2/3rds of the validators means that more than 2/3rds are malicious (or there is a bug in all the orchestrators and relayer). So, this update follows this security assumption.
To be able to compute the new validator set hash in the smart contract, we would need to pass that validator set also as call data, which would make the call even more expensive and needing even more data.
I am not sure whether it's worth adding the extra check.
cc @adlerjohn @evan-forbes

leaving this the way it is sounds like an optimization. If there ever is a diff between the two then I think that the bridge has to halt no matter what, correct?

If there ever is a diff between the two then I think that the bridge has to halt no matter what, correct?

yes, 100%

+1 to leave as is, the gas cost of posting and re-computing on-chain would be prohibitive, and doesn't change the security assumption.


Ability to change the Letterboxing color (padded rectangles)

This is for videos which we want to keep the original aspect ratio. Is there a way to customize the Letterbox color to be padded to the video instead of Black?

Pretty sure that's what the placeholder option on the ChewieController widget is for. I just use a Container with a color.

@andersmmg I am not sure if thats true, I added this widget as placeholder
 Container(
    color: Colors.red
 )

Yet I still have 'black' padding.

I think we need to make the following line customisable on the ChewieController, for those with videos with odd aspect ratios.
https://github.com/brianegan/chewie/blob/db2489bce51b54ca7e73f803ab24f49d169d3483/lib/src/chewie_player.dart#L86

That's weird, I tried this morning and it worked exactly as I expected. Are you sure the letterbox isn't embedded in the video file or something?

@andersmmg Yes. I am sure, because the black padding changes position depending on width/height of video.


sqlx(default) does not work

Bug Description
#[sqlx(default)] attribute is supposed to use default value for the type instead of taking it from the query but it doesn't, and causes missing field error.
Minimal Reproduction
#[derive(sqlx::FromRow)]
struct Foo {
    id: i32,

    #[sqlx(default)]
    name: Option<String>,
}

#[tokio::main(flavor = "current_thread")]
async fn main() {
    let pg = sqlx::PgPool::connect("postgres://testing@localhost/testing").await;

    sqlx::query_as!(Foo, "SELECT id FROM Foo");
}

Table foo was created with like that
create table foo(id SERIAL PRIMARY KEY, name TEXT NOT NULL);

Info

SQLx version: 0.7.4
SQLx features enabled: postgres,runtime-tokio
Database server and version: postgres 16.2
Operating system: Arch linux
rustc --version: rustc 1.78.0-nightly (3cbb93223 2024-03-13)

query_as!() does not use FromRow. It says right in the docs: https://docs.rs/sqlx/latest/sqlx/macro.query_as.html
See also #514


NET Core3.1 test in macOS runner

Install .NET Core 3.1 (by setup dotnet action) is not work.
Because, .NET5 is already installed on Mac OS Runner's ~/.dotnet/dotnet
https://github.com/muno92/resharper_inspectcode/runs/3231696660?check_suite_focus=true

setup-dotnet Action is correct

Mac OS Runner is already installed mulitiple version .NET SDK.$ dotnet --list-sdks
2.1.302 [/Users/runner/.dotnet/sdk]
2.1.403 [/Users/runner/.dotnet/sdk]
2.1.507 [/Users/runner/.dotnet/sdk]
2.1.607 [/Users/runner/.dotnet/sdk]
2.1.701 [/Users/runner/.dotnet/sdk]
2.1.818 [/Users/runner/.dotnet/sdk]
3.1.101 [/Users/runner/.dotnet/sdk]
3.1.201 [/Users/runner/.dotnet/sdk]
3.1.302 [/Users/runner/.dotnet/sdk]
3.1.416 [/Users/runner/.dotnet/sdk]
5.0.102 [/Users/runner/.dotnet/sdk]
5.0.202 [/Users/runner/.dotnet/sdk]
5.0.302 [/Users/runner/.dotnet/sdk]
5.0.404 [/Users/runner/.dotnet/sdk]

For build, it's not problem, but before version 2021.1.5, ReSharper CLI installation will be failed.

Work around (may be)

Run dotnet tool command with --framework
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install
This issue is not necessary fixed (only test problem).

Resolved by #440


Update deps

This might require to release rls_amf0 and rml_rtmp to avoid relative paths in Cargo.toml

0.3.3 published to crates.io

0.3.3 published to crates.io


bug: juicetool data transform hotfix

see https://github.com/jigglyjams/juicetool/commit/76bebbdba66afec5313f2a3750aa03520352f149

@twodam can you merge this PR whenever you merge in my juicetool hot fix? https://github.com/jbx-protocol/juicetool/pull/10
thanks fren


Can I Pass Additional Props?

Two questions:
My Suggestion data looks like this:
"name": "Bitcoin",  "symbol": "BTC"
I'm passing the symbol in my data to the 'value' variable in react-autosuggest.
First question--IS there an easy way to also in my case, pass the 'name' variable as props when the form is submitted?
   Similar to on finance.google.com---if a user enters BTC or a user enters Bitcoin, the right value would appear in the input box.
Thanks!

Hi! Did you find a way ? I'm looking to do this too.


 Yet I believe it's worth mentioning :)
To reproproduce:

Be in creative mode
Have some dropable items in your inventory
Enter the command /kill @s or fall out of world
The items are gone now

Are they deleted? In the picture it looks like they drop as expected 🤔
I'll see if i can reproduce it in vanilla and fix it when appropriate 👍

Are vanilla items also dropped when in creative mode? If so then I might be mistaken.

Yes, items are dropped in creative mode unless you have the keepInventory gamerule turned on - but the KeepSomeInventory messes with that so this should be the intended behavior.
Thanks for reporting anyway :)
Have fun with the pack


Connect signup page to backend

What does this PR do?
Description of Task to be completed?
How should this be manually tested?
Any background context you want to provide?

Should this also be closed along with the dependabot's PR? @sulenchy


Initial extraction of NosnocSolver to work for generic MPCCs

First step to a better Nosnoc. This PR contains the following changes:

Introduction of an nlpsol style interface for MPCCs in the form of mpccsol.
Extraction of a generic form of NosnocSolver into nosnoc.solver.RelaxationSolver to provide a generic interface to the homotopy solver.
A simple example of a generic MPCC solved with mpccsol
NosnocSolver now uses mpccsol as its backend
Examples and tests have been updated to use nosnoc.solver.Options
NosnocNLP removed and nlpsolver plugin classes moved to nosnoc.solver
Test action updated to automatically pull latest version of vdx vdx as a sub-module.

This implementation is yet missing some of the stationarity check and polishing steps but this is planned to be added.
This PR also contains the first use of vdx (https://github.com/apozharski/vdx) for index tracking which will hopefully be extensively used in the cleanup of the Nosnoc core.

There are some ambiguities/overloading that need to be resolved in the MPCC method - as they will for sure confuse anyone outside (but probably also many inside) syscop.
Some things are confused and used interchangeably, i.e.  the enums from
CFunctionType, MpccMode and MpccRelaxationMethod
Also grouping solution methods into classes like now into Relaxation being the only one creates an additional layer of complexity and makes also code often longer. I would be in favor to not using it. Scholtes will be anyway the default, an mpcc-educated user knows that it is a homotopy relaxation method.
Now  we have Scholtes_ineq or Scholtes_eq in the MPCC methods and in C_functions we have Scholtes.
And then one can pick in the options/setting both the mpcc method, but then somewhat overwrite with C_functions.  Even I am confused by this, even though I know the math behind it in great detail.
I suggest the following:

we distinguish between MPCC methods and they have the names as in the literature, e.g. Scholtes_ineq method, Kazow-Schwartz, and so on (this would make CFunfctionType not needed anymore).
We would add to this list also other new methods that are currently in development (even if they are not of the relaxation type).
Next we have how we treat the comp constraints (currently MPCCRelaxationMode), the default should be ineq as the others would usually work less good - in fact we remove this to be chosen manually but only via the list of methods (i would not even support eq and two_sided for most of the c-funs, as it is useless)
Then we have to look at HomotopyParameterSteering (relaxation, ell1, ell_inf).
In line with Table 1 in https://arxiv.org/pdf/2312.11022.pdf#page=12.43

To make the interface even simpler I suggest to make just list MPCCMethods (currently called MPCCMode)
which is composed of the cartesian product of  Cfunctiontype-HomotopyParameterSteering-MPCCRelaxationMode.  We do not need to list all, because we know that some combinations (especially with eq are just bad, and keep maybe the ones for which we know that they are actually good)
New methods would be simply added to this list. They might need an homotopy but be a separate function that is called. the others can share the homotopy loop (when one actually starts reorganizing this, it will become clear what is the best way to do it)

Some further todos/remarks:

I have added some simple mpec examples in the folder solver_generic_mpcc.
There one can see that it is not allowed to not provide mpcc_struct.p or mpcc_struct.g, if the problem is not parametric or  does not have further constraints, resp.
There are many options \nosnoc+nosnoc+solver\Options that are not related to a generic mpcc, e.g., elastic_scholtes(1,1) logical (what is this doing?), everying below the comment "        % Integrator Specific" , multiple_solvers,         % Output options
The standalone mpcc solver has no verbose
The psi_fun settings should be simplfied according to my previous long comment, where method (Scholtes), and mode (eq,ineq,two-sided) are unified, and homotopy steering is left (elastic_ell1,...)
vdx is not needed to define an mpcc, as this is the only case where we use it in the frond end, i suggest to move this example to the vdx respository, and keep the simple ones that i have added
Playing a bit with the options in the examples might be helpful for users as a template.
calculate_stationarity_type = true, does nothing on my machine. maybe it would be useful to do this via Highs instead of gurobi, which is shipped via casadi anyway (but i would let this be a separate issue/pr)

I have edited the mpec_ex1 and ell_1 seems to be broken now. I suggest to

to make a test out of this example to test the most basic mpccsol options, like few solver, elasticity mode
to change the name of elasticity_mode to homotopy_steering_strategy to be in line with Table 1 of https://arxiv.org/pdf/2312.11022.pdf and to rename NONE to DIRECT
update the installation part in the README as due to vdx a recursive update and installation script must be run

Btw, is also the new parameter update (which i like a lot btw) tested for the time-varying case? (solving a single ocp instance with this kind of parameters would be enough)
I hope these are my last comments on this PR. :D


Rm py36 support, fix tests failing due to dbt-core changes

I think we'll need to push a new version of our image, fishtownanalytics/test-container, that uses a newer version of python (ideally py38)

@kwigley You're a genius, I didn't read the tox file!


Provide a rolling update strategy for ghproxy

/kind bug
What this PR does / why we need it:
Current deployment of ghproxy leads to an update strategy like this
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%

This strategy prevents clean restarts of ghproxy. On restarts the new instance is not able to mount the PVC, because it is still attached to the old instance. Thus, the new instance is stuck in state ContainerCreated
This PR changes the update strategy in a way that it allows unavailable resources.
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1

This leads to a small downtime, but ensures that ghproxy is able to restart.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:

/lgtm


"Static Requests" panel empty in 1.8.1

I just upgraded my Goaccess container from 1.8 to 1.8.1 and suddenly the static requests panel stays empty. All other panels load fine and show proper data, the websocket connection is also working fine. The console in Firefox shows no errors. The goaccess server is also not logging anything.
I run Goaccess via Docker, making it ingest an nginx log:
version: "3.8"

services:
  goaccess:
    image: allinurl/goaccess:1.8.1
    restart: unless-stopped
    command:
      - --agent-list
      - --real-time-html
      - --config-file=/zoidberg/etc/goaccess/mysite.conf
      - --db-path=/zoidberg/var/goaccess/mysite
      - --persist
    volumes:
      - "/etc/goaccess:/zoidberg/etc/goaccess:ro"
      - "/srv/www:/zoidberg/srv/www"
      - "/var/log:/zoidberg/var/log"
      - "/var/goaccess:/zoidberg/var/goaccess"
    networks:
      - nginx_nginx
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "10"

And my config is
# example goaccess conf file for gopanel
# edit site1 values and change title to suit
html-report-title mysite

# the logs you want to process
log-format COMBINED
log-file /zoidberg/var/log/nginx/mysite-access.log

# the location you will host from
output-format /zoidberg/srv/www/stats.mysite/index.html
ws-url stats.mysite:443/wss

# other options as you prefer
#ignore-crawlers true
#hide-referrer example.com

I presume this is related to #2576 and the changelog entry

Prevent setting default static files when no static-file options are defined in config file.

I did not expect such a breaking change in a patch release. ^^

Valid observation. I concur regarding the impactful change. I should have taken that into account earlier. Still, I think #2576 does a good job balancing flexibility and simplicity. Feel free to give me a heads-up if you spot any problems with that specific change.


Feature: password strength checker

I added a password strength indicator to the SignupForm. It uses a default scorer (calculating a password score based on password length and character set).
To deactivate, you can pass null or false to the component's scorer attribute.
It is exported so that it is usable by ActivityPods (e.g. to change passwords).

I made the suggested changes and for me it's working, tested on node 16 and 18.


dckiller51/bodymiscale Install error

After doing the installation using the repository documentation, I restarted and this error message appeared in the HA logs:
Logger: homeassistant.setup
Source: custom_components/bodymiscale/init.py:280
First occurred: 12:16:14 (1 occurrences)
Last logged: 12:16:14
Error during setup of component bodymiscale
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/bodymiscale/init.py", line 114, in async_setup
await component.async_add_entities(entities)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/config/custom_components/bodymiscale/init.py", line 280, in state_attributes
ATTR_WEIGHT: "{:.2f}".format(weight),
TypeError: unsupported format string passed to NoneType.format
bodymiscale: !include components/bodymiscale.yaml
My file: /config/components/bodymiscale.yaml
aurelien:
  sensors:
    weight: sensor.weight_aurelien
    impedance: sensor.impedance_aurelien
  height: 183
  born: "1978-02-08"
  gender: "male"
#  model_miscale: "181B"

Logger: custom_components.bodymiscale
Source: custom_components/bodymiscale/__init__.py:280
Integration: bodymiscale (documentation)
First occurred: 12:16:14 (1 occurrences)
Last logged: 12:16:14

Error adding entities for domain bodymiscale with platform bodymiscale
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/config/custom_components/bodymiscale/__init__.py", line 280, in state_attributes
    ATTR_WEIGHT: "{:.2f}".format(weight),
TypeError: unsupported format string passed to NoneType.__format__

Same error here.
Logger: homeassistant.setup
Source: custom_components/bodymiscale/init.py:280
First occurred: 16:45:22 (1 occurrences)
Last logged: 16:45:22
Error during setup of component bodymiscale
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/bodymiscale/init.py", line 114, in async_setup
await component.async_add_entities(entities)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 321, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/config/custom_components/bodymiscale/init.py", line 280, in state_attributes
ATTR_WEIGHT: "{:.2f}".format(weight),
TypeError: unsupported format string passed to NoneType.format

I have exactly the same problem.
Installed via HACS, setup all files.
Data is send from scale to esphome to home assistant. I can see my weight and impedance.
But this integration is showing the error right after booting.

I can also see a log message with this:
File "/config/custom_components/bodymiscale/init.py", line 228, in _check_max
if value > max_value:
TypeError: '>' not supported between instances of 'str' and 'float'

Update v0.0.4 fix errors
https://github.com/dckiller51/bodymiscale/releases/tag/v0.0.4 or Update via HACS


Translated element spacing can be improved

Steps to reproduce the problem

On desktop, go to any translated page, for example
Scroll down to the bottom of the left-side panel
See how the characters are breaking to a new line

What is the current behavior?
Characters are breaking to a new line
What is the expected behavior?
The UI would look cleaner if we either truncated the text, or, reduced some of the right padding to allow the content to fit better
Screenshots (optional but very helpful)

This repository is no longer maintained. It has been superseded by IBM Quantum Learning.


Where can I find an overview of Legend?

Please check out the Legend Website: https://legend.finos.org/, Pierre de Belen’s (Legend Head Architect) keynote speech at the OSSF 2020 https://youtu.be/93c966jNzYo as well as Ffion Acland’s Legend Studio demo at the same conference: https://youtu.be/6rUm7dN9pfU.


[Fix #7740] Make Style/AccessModifierDeclarations not flag symbol method-name

Closes #7740

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

The cop documentation should definitely be updated to reflect this.
I think we also need some flag to enable/disable this, as if you're using modifiers in this manner, you're potentially violating grouping/non-grouping. That's why I'd prefer having more control over the behaviour.

@bbatsov Fixed to use node-matcher instead of explicit checks.
Regarding config, do you think the following configs makes sense?

group (default) - forbids inline method definition but allows inline symbol
strict_group - forbids inline method definition & symbols
inline - all modifiers should be inline

Let me know if you have something else in mind.

@tejasbubane
The act of allowing inline-symbol seems tangential to the modes of group and inline, since those refer to definition style, whereas referencing a Symbol is used for existing declarations.
Maybe it might make more sense to have it be a flag/separate option?
Allowing or forbidding the inline-Symbol behaviour could be applicable regardless of whether the preferred declaration style is inline or group.

Maybe it might make more sense to have it be a flag?

Exactly. This shouldn't be a style, it should a flag that affects both styles - something like AllowModifiersOnSymbols or whatever. A better name would be welcome. :-)

@bbatsov I added config option to AllowModifiersOnSymbols.

I'd also extend the cop documentation to mention that it covers only definitions and applications of visibility methods to symbols are controlled by the new config.

I'd also extend the cop documentation to mention that it covers only definitions and applications of visibility methods to symbols are controlled by the new config.

Added.

Thanks!