SASLTypePlaintext not working, Error while performing SASL handshake

Description
Below is my code.
go version: go version go1.20.2 windows/amd64
sarama version: v1.42.1
kafka version: 3.0.0
package main

import (
	"fmt"
	"github.com/IBM/sarama"
)

func main() {
	brokerList := []string{"kafka_IP:9092"}
	config := sarama.NewConfig()
	config.Net.SASL.Enable = true
	config.Net.SASL.User = "admin"
	config.Net.SASL.Password = "adminpass"
	config.Net.SASL.Mechanism = sarama.SASLTypePlaintext
	config.Net.TLS.Enable = true

	config.Producer.RequiredAcks = sarama.WaitForAll
        config.Producer.Retry.Max = 5
        config.Producer.Return.Successes = true

	producer, err := sarama.NewSyncProducer(brokerList, config)
	if err != nil {
		panic("Failed to create Kafka producer: " + err.Error())
	}
	defer func() {
		if err := producer.Close(); err != nil {
			fmt.Println("Failed to close Kafka producer:", err)
		}
	}()

	topic := "request-topic"
	message := &sarama.ProducerMessage{
		Topic: topic,
		Value: sarama.StringEncoder("Hello, Kafka from Golang!"),
	}
	partition, offset, err := producer.SendMessage(message)
	if err != nil {
		panic("Failed to send message: " + err.Error())
	}

	fmt.Printf("Message sent to topic %s, partition %d, offset %d\n", topic, partition, offset)
}

output is panic: Failed to create Kafka producer: kafka: client has run out of available brokers to talk to: read tcp local_IP:63192->kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
Configuration

kafka config
listeners=SASL_PLAINTEXT://IP:9092
security.inter.broker.protocol=SASL_PLAINTEXT
sasl.enabled.mechanisms=PLAIN
sasl.mechanism.inter.broker.protocol=PLAIN
authorizer.class.name=kafka.security.authorizer.AclAuthorizer
allow.everyone.if.no.acl.found=false

Logs
logs: CLICK ME

[Sarama]2024/01/28 15:12:01 sarama.go:132: Initializing new client
[Sarama]2024/01/28 15:12:01 config.go:618: ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[Sarama]2024/01/28 15:12:01 config.go:618: ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[Sarama]2024/01/28 15:12:01 sarama.go:129: client/metadata fetching metadata for all topics from broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:09 broker.go:1244: Error while performing SASL handshake Kafka_IP:9092
[Sarama]2024/01/28 15:12:09 sarama.go:129: Closed connection to broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:09 broker.go:198: Error while sending ApiVersionsRequest to broker Kafka_IP:9092: read tcp local_IP:49323->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:09 client.go:1073: client/metadata got error from broker -1 while fetching metadata: read tcp local_IP:49323->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:09 client.go:1086: client/metadata no available broker to send metadata request to
[Sarama]2024/01/28 15:12:09 client.go:788: client/brokers resurrecting 1 dead seed brokers
[Sarama]2024/01/28 15:12:09 client.go:1012: client/metadata retrying after 250ms... (2 attempts remaining)
[Sarama]2024/01/28 15:12:09 config.go:618: ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[Sarama]2024/01/28 15:12:09 sarama.go:129: client/metadata fetching metadata for all topics from broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:18 broker.go:1244: Error while performing SASL handshake Kafka_IP:9092
[Sarama]2024/01/28 15:12:18 sarama.go:129: Closed connection to broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:18 broker.go:198: Error while sending ApiVersionsRequest to broker Kafka_IP:9092: read tcp local_IP:49328->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:18 client.go:1073: client/metadata got error from broker -1 while fetching metadata: read tcp local_IP:49328->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:18 client.go:1086: client/metadata no available broker to send metadata request to
[Sarama]2024/01/28 15:12:18 client.go:788: client/brokers resurrecting 1 dead seed brokers
[Sarama]2024/01/28 15:12:18 client.go:1012: client/metadata retrying after 250ms... (1 attempts remaining)
[Sarama]2024/01/28 15:12:18 config.go:618: ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[Sarama]2024/01/28 15:12:18 sarama.go:129: client/metadata fetching metadata for all topics from broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:24 broker.go:1244: Error while performing SASL handshake Kafka_IP:9092
[Sarama]2024/01/28 15:12:24 sarama.go:129: Closed connection to broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:24 broker.go:198: Error while sending ApiVersionsRequest to broker Kafka_IP:9092: read tcp local_IP:49334->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:24 client.go:1073: client/metadata got error from broker -1 while fetching metadata: read tcp local_IP:49334->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:24 client.go:1086: client/metadata no available broker to send metadata request to
[Sarama]2024/01/28 15:12:24 client.go:788: client/brokers resurrecting 1 dead seed brokers
[Sarama]2024/01/28 15:12:24 client.go:1012: client/metadata retrying after 250ms... (0 attempts remaining)
[Sarama]2024/01/28 15:12:24 config.go:618: ClientID is the default of 'sarama', you should consider setting it to something application-specific.
[Sarama]2024/01/28 15:12:24 sarama.go:129: client/metadata fetching metadata for all topics from broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:33 broker.go:1244: Error while performing SASL handshake Kafka_IP:9092
[Sarama]2024/01/28 15:12:33 sarama.go:129: Closed connection to broker Kafka_IP:9092
[Sarama]2024/01/28 15:12:33 broker.go:198: Error while sending ApiVersionsRequest to broker Kafka_IP:9092: read tcp local_IP:49338->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:33 client.go:1073: client/metadata got error from broker -1 while fetching metadata: read tcp local_IP:49338->Kafka_IP:9092: wsarecv: An existing connection was forcibly closed by the remote host.
[Sarama]2024/01/28 15:12:33 client.go:1086: client/metadata no available broker to send metadata request to
[Sarama]2024/01/28 15:12:33 client.go:788: client/brokers resurrecting 1 dead seed brokers
[Sarama]2024/01/28 15:12:33 sarama.go:132: Closing Client

Additional Context

Use C++ rdlibkafka library，C++ client will link and send message successfully with SASL.
Stop using SASL，go client will link and send message successfully (using the above code that delete SASL code config).
Is there the SASL sarama config is wrong or sarama version problem?

@BTYHunter thanks for getting in touch. Looking over the config options that you've shared here, it looks like your Sarama client is configured to use TLS (config.Net.TLS.Enable = true) but your Kafka cluster is configured to use SASL_PLAINTEXT (i.e., SASL without TLS encryption) — is that a mistake in the configuration?

Thanks. I changed config.Net.TLS.Enable = false , but the error is still there.

Hmm that's odd, the error log around the connection being forcibly closed mid handshake attempt certainly seemed like a mistake to do with using TLS to connect to a non-TLS endpoint. Is the error message you're getting on the client-side definitely identical?
Are you also able to share server-side broker logs?

Thanks very much. The above code config.Net.TLS.Enable = false runs on internal network (10.x.x.x) works well. Its looks like network ploblem. If run the above code on my local desktop, although I can telnet 10.x.x.x.x:9092 successful (Kafka Broker IP and PORT) the server-side broker logs can not show relevent logs.

OK, is there more for us to do here or will you continue looking into networking issues on your systems?


Added definition for node-apn

This is my first real definition commit. Please bring to my attention if I missed something or did something wrong.

Nice work.

@argon: Thank you for the amazing library!

apn/apn.d.ts
check list

[ ] is collect naming convention?

https://www.npmjs.com/package/apn
http://bower.io/search/?q=apn
others?

[ ] has a test file? (apn/apn-tests.ts or others)
[ ] pass the Travic-CI test?

@Zenorbi thank you for your contributions.
please rename apn/apn-test.ts to apn/apn-tests.ts

@vvakame: Done, thank you for noticing.

@Zenorbi thanks mate!


Options for shadow/rounding when only 1 window

Describe your PR, what does it fix/add?

The options and their defaults:

dwindle:no_shadow_when_only = true
dwindle:no_rounding_when_only = true
master:no_shadow_when_only = true
master:no_rounding_when_only = true

"when only" = there's only 1 window in workspace, similar to no_gaps_when_only

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

nope

Is it ready for merging, or does it need work?

i hope i don't mess up with only 12 changed lines 😬

I dont like this. I want to ultimately deprecate no_gaps_when_only altogether in favor of window/workspace rules.
Why don't you just windowrulev2=rounding 0, onworkspace:1 or something?

Alright
I wanted rounding enabled even when I use no_gaps_when_only. Currently the option just disables it.
I didn't think of using this windowrule, though when I tried it just now it doesn't work with no_gaps_when_only.


taxa2lca: what happens with invalidated taxa?

What happens if the list of taxa provided as input to the unipept taxa2lca algorithm contains taxon IDs that have been invalidated at in the Unipept database? Are these discared or mapped to their first valid ancestor? I think the latter should be the approach that needs to be taken.
Original issue by @pdawyndt on Sat May 03 2014 at 16:12.
Closed by @pdawyndt on Wed May 07 2014 at 14:30.

answer: taxon IDs are never invalidated, but some taxa are not included in the lineage; so yes, "invalid taxa" are still mapped to their correct lineage
Original comment by @pdawyndt on Wed May 07 2014 at 14:30.


Improve the error message when adding documents

Currently, when adding json documents to meilisearch, you can either add them as a single document;
curl -X POST 'http://localhost:7700/indexes/mieli/documents'  -H 'Content-type: application/json' -d '{ "id": 1, "pet": "dog" }'

Or as an array of documents;
curl -X POST 'http://localhost:7700/indexes/mieli/documents'  -H 'Content-type: application/json' -d '[{ "id": 1, "pet": "dog" }, { "id": 2, "pet": "doggo" }]'

That's cool, but the error messages are not explicit at all;
curl -X POST 'http://localhost:7700/indexes/mieli/documents'  -H 'Content-type: application/json' -d '"sending a string instead of a json"'

For example, with this request we get this error message;
The `json` payload provided is malformed. `Couldn't serialize document value: data did not match any variant of untagged enum Either`.

I would like to improve this message and get rids entirely of the notion of « untagget enum » and « Either ».

Have you encountered any other meaningless messages?
That issue doesn't seem to will be resolved by the serde team (as they have a low priority on it).
Although the message could be improved by implementing own Deserialize for ArrayOrSingleObject, isn't it better to simply replace the message:
let mut serde_msg = se.to_string();
if serde_msg == "data did not match any variant of untagged enum Either" {
    serde_msg = "data are neither an object nor a list of objects".to_string();
}

?

I encountered the same file upload error, how can I fix it?
curl -X POST 'https://xxxx/indexes/xxxx/documents/?primaryKey=xxxx' \
  -H "Authorization: Bearer ${{secrets.MEILISEARCH_KEY}}" \
  -H "Content-Type: application/json" \
  --data-binary 'content.json'

{
    "message": "The `json` payload provided is malformed. `Couldn't serialize document value: expected value at line 1 column 1`.",
    "code": "malformed_payload",
    "type": "invalid_request",
    "link": "https://docs.meilisearch.com/errors#malformed_payload"
}

I encountered the same file upload error, how can I fix it?
curl -X POST 'https://xxxx/indexes/xxxx/documents/?primaryKey=xxxx' \
  -H "Authorization: Bearer ${{secrets.MEILISEARCH_KEY}}" \
  -H "Content-Type: application/json" \
  --data-binary 'content.json'

{
    "message": "The `json` payload provided is malformed. `Couldn't serialize document value: expected value at line 1 column 1`.",
    "code": "malformed_payload",
    "type": "invalid_request",
    "link": "https://docs.meilisearch.com/errors#malformed_payload"
}

Add @ sign before the file name.
So use --data-binary "@path/to/file" flag

Thank you!!!!! 😂

Hey @onyxcherry sorry for the huge delay!

Although the message could be improved by implementing own Deserialize for ArrayOrSingleObject, isn't it better to simply replace the message: [...]

I don't like to match on a string that could change at any time if serde decides to update their errors. But I like your message I think we could use it in any case. Do you think we want to let the original serde message sometimes?
Or maybe we could look for the untagged word in the error message and only override it in this case. Because that's the main point causing the issue.

untagged attribute which - as you say - causes the issue appears only once in the meilisearch code so perhaps the error message provided by serde should be (completely) changed only there,
User data are validated against untagged enum in the whichever matches first, we return (from a parsing function) way,
So the best, explanatory and helpful error messages are these listing all the options of the Enum which could be matched and parsed correctly.

Is serde_json::error::Category (which can be obtained with .classify() on serde_json::Error) the optimal way to decide if the error message should be replaced by us?
See its usage on common examples:
use either::Either;
use serde::Deserialize;
use serde_json;

type Object = serde_json::Map<String, serde_json::Value>;

#[derive(Deserialize, Debug)]
#[serde(transparent)]
#[allow(dead_code)]
struct ArrayOrSingleObject {
    #[serde(with = "either::serde_untagged")]
    inner: Either<Vec<Object>, Object>,
}

fn main() {
    let payload_syntax_err = "[{ \"id\": 1, \"pet\" \"dog\" }]"; // <-- note missing semicolon
    let result1: Result<ArrayOrSingleObject, serde_json::Error> = serde_json::from_str(payload_syntax_err);
    let error1 = result1.err().unwrap();
    println!("{:#?}", error1.classify()); // Syntax

    let payload_data_err = "\"some string\"";
    let result2: Result<ArrayOrSingleObject, serde_json::Error> = serde_json::from_str(payload_data_err);
    let error2 = result2.err().unwrap();
    println!("{:#?}", error2.classify()); // Data
}

Note that if the Category is Syntax, serde_msg contains helpful Couldn't serialize document value: expected : at line 1 column 19 message.
To sum up, my proposal is the change of the meaningful message only if the Category of the serde error is Data.
And in that case the best response we can return is a list of expected objects or the error saying neither this nor that (e.g. my previous one ^).

Hoy @onyxcherry!

Is serde_json::error::Category (which can be obtained with .classify() on serde_json::Error) the optimal way to decide if the error message should be replaced by us?

I didn't know this existed; it's perfect for us. Thanks for finding that out!
Do you want to implement it?


Update index.md

Kotlin editor is not needed for Bundle, as Kotlin is not supported in a Bundle.
Maven->Sbt fix copy-paste typo.

Thanks a lot!


Modal common adapter

Implement Kb.Modal
Use in Kb.ConfirmModal

Known issues:

[ ] Mobile header title can squish buttons on left / right
[ ] ConfirmModal no longer centers content vertically

cc @keybase/y2ksquad

@keybase/react-hackers bump!


Should the security.txt check follow redirects?

I was looking into this tweet:

This is great: having a security.txt file is now mandatory for Dutch government websites. They either need to apply this as a standard or provide a good justification for why they're not using it ("Apply of Explain")

https://twitter.com/troyhunt/status/1664018131004665856
I made a list of Dutch government websites and queried the security.txt custom metric used by the Security chapter:
SELECT DISTINCT
  rank,
  page,
  JSON_VALUE(custom_metrics, '$.well-known."/.well-known/security.txt".found') AS has_security_txt
FROM
  `httparchive.all.pages`
WHERE
  date = '2023-05-01' AND
  page IN (
    "https://www.government.nl/",
    "https://www.cbs.nl/",
    "https://business.gov.nl/",
    "https://investinholland.com/",
    "https://www.dnb.nl/",
    "https://www.belastingdienst.nl/",
    "https://www.kvk.nl/",
    "https://www.acm.nl/",
    "https://english.rvo.nl/",
    "http://www.en.octrooigemachtigde.nl/",
    "https://www.knaw.nl/",
    "https://www.nwo.nl/",
    "https://ind.nl/",
    "https://www.werk.nl/",
    "https://www.ser.nl/",
    "https://www.svb.nl/",
    "https://www.uwv.nl/",
    "https://www.zn.nl/",
    "https://www.rivm.nl/",
    "https://duo.nl/",
    "https://www.studyinnl.org/",
    "https://www.nbtc.nl/",
    "https://www.museumserver.nl/",
    "https://english.defensie.nl/",
    "https://www.visitdrenthe.com/",
    "https://www.visitflevoland.nl/",
    "https://www.fryslan.frl/",
    "https://www.gelderland.nl/",
    "https://www.provinciegroningen.nl/",
    "https://www.limburg.nl/",
    "https://english.brabant.nl/",
    "https://www.noord-holland.nl/",
    "http://www.overijssel.nl/",
    "https://www.provincie-utrecht.nl/",
    "https://www.zeeland.nl/",
    "https://www.zuid-holland.eu/",
    "https://www.amsterdam.nl/",
    "https://www.rotterdam.nl/",
    "https://www.denhaag.nl/",
    "https://www.utrecht.nl/",
    "https://almanak.overheid.nl/",
    "https://www.houseofrepresentatives.nl/",
    "https://www.eerstekamer.nl/",
    "https://www.royal-house.nl/",
    "https://europa.eu/"
)
ORDER BY
  rank

Results:

rank
page
has_security_txt

10000
https://www.belastingdienst.nl/
TRUE

50000
https://www.kvk.nl/
FALSE

50000
https://www.uwv.nl/
FALSE

100000
https://ind.nl/

100000
https://duo.nl/
FALSE

100000
https://www.svb.nl/
TRUE

100000
https://www.government.nl/

100000
https://www.amsterdam.nl/
FALSE

500000
https://business.gov.nl/
FALSE

500000
https://www.denhaag.nl/
FALSE

500000
https://www.rotterdam.nl/
FALSE

500000
https://www.studyinnl.org/
FALSE

500000
https://www.rivm.nl/
TRUE

500000
https://www.werk.nl/
FALSE

500000
https://www.cbs.nl/
FALSE

500000
https://www.utrecht.nl/
FALSE

1000000
https://www.visitflevoland.nl/
FALSE

1000000
https://www.eerstekamer.nl/
TRUE

1000000
https://www.royal-house.nl/

1000000
https://www.noord-holland.nl/
FALSE

1000000
https://www.gelderland.nl/
FALSE

1000000
https://www.nwo.nl/
FALSE

1000000
https://www.acm.nl/

1000000
https://www.dnb.nl/
TRUE

5000000
https://www.zn.nl/
FALSE

5000000
https://www.houseofrepresentatives.nl/

5000000
https://investinholland.com/
FALSE

5000000
https://www.ser.nl/
FALSE

5000000
https://www.knaw.nl/
FALSE

5000000
https://www.provincie-utrecht.nl/
FALSE

5000000
https://english.defensie.nl/

5000000
https://www.limburg.nl/
TRUE

5000000
https://www.zeeland.nl/
FALSE

5000000
https://www.fryslan.frl/
FALSE

5000000
https://www.provinciegroningen.nl/
TRUE

5000000
https://www.museumserver.nl/
FALSE

5000000
https://english.rvo.nl/

50000000
https://www.visitdrenthe.com/
FALSE

I was a bit surprised by so many "FALSE" values, so I visited a few and for example https://www.amsterdam.nl/.well-known/security.txt redirects to https://www.amsterdam.nl/publish/pages/1029157/webpack/security.txt.
WPT results: https://webpagetest.httparchive.org/result/230601_EE_1/1/details/
In the source code for the custom metric, I see we're using parseResponse as opposed to the newer parseResponseWithRedirects function.
Any reason we shouldn't follow redirects for this and all other well-known checks?
cc @SaptakS @vikvanderlinden @VictorLeP @GJFR

According to section 3 of RFC9116 "Retrieval of "security.txt" files and resources indicated within such files may result in a redirect [...]".
The document also suggests in section 5.2 that the redirects should be recorded and checked "since they can lead to a different domain or IP address controlled by an attacker."
So looks like the redirects should be followed indeed.


[New] New Addon: Hashtags

Created by @jaked on wasteof.money, https://wasteof.money/posts/63c374a0040f988e1c71b006
This addon adds links to search results from hashtags in wasteof.money posts.
This addon will be merged after #41  (The Mega Update)

@all-contributors please add @jakednolastname for code, ideas

Darn it, I was about to make this extension ☹


20 year old baby

Hi,
Just managed to this project running and my first tries was very disappointing. Tried 3 photos of a child in the age of 1-3 years. All predictions landed on 15-20 years old. The most obvious one is the one where she is 1 year old, and predicted to be 20.

Could there be something in the way I installed the depencies or something else that is making the predictions so wrong ? I dont get any errors.

Hello bobmoff, the dataset that was used to train the model does not have many babies... So that it why it can't predict a baby's age very well.

ok, thx for taking the time to answer


Mod: Cannot be stunned

🛸 Item modifier report
Current item modifier

%chance to avoid being stunned
Expected item modifier

Cannot be stunned
Copied item data
Rarity: Unique
Eye of Chayula
Onyx Amulet
--------
Requirements:
Level: 20
--------
Item Level: 85
--------
+12 to all Attributes (implicit)
--------
20% reduced maximum Life
30% increased Rarity of Items found
Cannot be Stunned
--------
Never blinking, always watching.

This item can be transformed with a Blessing of Chayula

Version:   0.6.15
PoE:  Steam 3.10.1b English

@Kyusung4698 Eye of Chayula is still not parsing correctly and I think it has to do with the Cannot Be Stunned mod. Once I unclick that, it matches the searched number of items that the official trade site returns in the browser.


[update] adds git auto-tag script, nvmrc + fixes

Fixes future issues like #133 🎉

Nice work!

So this hook just runs after someone still manually runs npm publish right? We don't have anything automated around releasing, that I know of.

@rwwagner90 read the commit messages

Presumptuous behavior should not lead to more repository ownership.
See the code of conduct

It may be helpful for you to read that code of conduct as well. I've met a ton of resistance here for silly little things, for no reason. If DSC wants to solely maintain this, without community help, I'm all for that, but you may want to not stand in the way on every single thing otherwise. Please let me know your preference.


Multithreaded loop clean-up fails (std::atexit)

I modified the HelloWorldThreaded.cpp example like so:
#include "App.h"
#include <thread>
#include <algorithm>
#include <csignal>
#include <signal.h>

struct worker_t
{
    void work()
    {
        loop_ = uWS::Loop::get();

        uWS::App().get("/*", [](auto *res, auto *req) {
            res->end("Hello world!");
        }).listen(3000, [this](auto *token) {
            listenSocket_ = token;

            if (token) {
                std::cout << "Thread " << std::this_thread::get_id() << " listening on port " << 3000 << std::endl;
            } else {
                std::cout << "Thread " << std::this_thread::get_id() << " failed to listen on port 3000" << std::endl;
        }
        }).run();

        std::cout << "Thread " << std::this_thread::get_id() << " exiting" << std::endl;
    }

    struct us_listen_socket *listenSocket_;
    struct uWS::Loop *loop_;
    std::thread *thread;
};

std::vector<worker_t> workers;

void onSignal(int signal)
{
    std::cout << "Signal caught, stopping." << std::endl;

    std::for_each(workers.begin(), workers.end(), [](worker_t &w) {
        w.loop_->defer([w]() {
            us_listen_socket_close(w.listenSocket_);
        });
    });
}

int main(){
    /* Overly simple hello world app, using multiple threads */
    workers.resize(1/*std::thread::hardware_concurrency()*/);

    std::signal(SIGINT, onSignal);

    std::transform(workers.begin(), workers.end(), workers.begin(), [](worker_t &w) {
        w.thread = new std::thread([&w]() {
            w.work();
        });
        return w;
    });

    std::for_each(workers.begin(), workers.end(), [](worker_t &w) {
        w.thread->join();
        delete w.thread;
    });

    std::cout << "Main exiting" << std::endl;
}

This allows stopping the server gracefully like demonstrated in the javascript example (except that here I'm using SIGINT and defer instead of an HTTP call, the issue remains the same)
However this causes some issues because of this code in src/Loop.h:85
    /* Lazily initializes a per-thread loop and returns it.
     * Will automatically free all initialized loops at exit. */
    static Loop *get(void *existingNativeLoop = nullptr) {
        static thread_local Loop *lazyLoop;
        if (!lazyLoop) {
            /* If we are given a native loop pointer we pass that to uSockets and let it deal with it */
            if (existingNativeLoop) {
                /* Todo: here we want to pass the pointer, not a boolean */
                lazyLoop = create(true);
                /* We cannot register automatic free here, must be manually done */
            } else {
                lazyLoop = create(false);
                std::atexit([]() {
                    Loop::get()->free();
                });
            }
        }

        return lazyLoop;
    }

std::atexit is called only for the main thread, which doesn't even have an open uWS::Loop here.
So the thread uWS::Loop is never freed.
Instead the main thread calls Loop::get()->free(); when it exits.
This creates a recursive loop by calling std::atexit again, because no uWS::Loop exists in the main thread.
This loops until the atexit list is exhausted and causes a shitload of valgrind errors, double frees and segfaults at the end.
Thread<PHONE_NUMBER>96032 listening on port 3000
^CSignal caught, stopping.
Thread<PHONE_NUMBER>96032 exiting
Main exiting
double free or corruption (top)
Aborted (core dumped)

I changed the uWS::Loop::get function like so:
@@ -84,9 +84,9 @@ private:
 public:
     /* Lazily initializes a per-thread loop and returns it.
      * Will automatically free all initialized loops at exit. */
-    static Loop *get(void *existingNativeLoop = nullptr) {
+    static Loop *get(void *existingNativeLoop = nullptr, bool freeing = false) {
         static thread_local Loop *lazyLoop;
-        if (!lazyLoop) {
+        if (!lazyLoop && !freeing) {
             /* If we are given a native loop pointer we pass that to uSockets and let it deal with it */
             if (existingNativeLoop) {
                 /* Todo: here we want to pass the pointer, not a boolean */
@@ -95,7 +95,10 @@ public:
             } else {
                 lazyLoop = create(false);
                 std::atexit([]() {
-                    Loop::get()->free();
+                    Loop *loop = Loop::get(nullptr, true);
+                    printf("Loop::atexit loop=%p\n", loop);
+                    if(loop)
+                        loop->free();
                 });
             }
         }

which fixes the recursive atexit madness.
This doesn't fix the issue with unfree'd uWS::Loop's from the threads however.
However those can be manually free'd by calling uWS::Loop::get()->free() at the end of the thread func.

I was able to resolve this independently with less code / complications.
Basically don't call get() in the lambda - I did however include the extra iffs in case something weird happens.
Also this is tested working in Windows VS2017 C++ latest.
static Loop *get(void *existingNativeLoop = nullptr) {
   static thread_local Loop *lazyLoop = nullptr;
   if (!lazyLoop) {
      /* If we are given a native loop pointer we pass that to uSockets and let it deal with it */
      if (existingNativeLoop) {
         /* Todo: here we want to pass the pointer, not a boolean */
         lazyLoop = create(true);
         /* We cannot register automatic free here, must be manually done */
      } else {
         lazyLoop = create(false);
         std::atexit([]() {
                if(lazyLoop)
                  lazyLoop->free();
         });
      }
   }

   return lazyLoop;
}

I believe this properly releases the memory and cleans up when the thread is terminated:
struct LoopCleaner
{
   ~LoopCleaner()
   {
      if(loop && cleanMe)
         loop->free();
   }
   Loop* loop = nullptr;
   bool cleanMe = false;
};
/* Lazily initializes a per-thread loop and returns it.
 * Will automatically free all initialized loops at exit. */
static Loop *get(void *existingNativeLoop = nullptr) {
    static thread_local LoopCleaner lazyLoop;
   if (!lazyLoop.loop) {
      /* If we are given a native loop pointer we pass that to uSockets and let it deal with it */
      if (existingNativeLoop) {
         /* Todo: here we want to pass the pointer, not a boolean */
            lazyLoop.loop = create(true);
         /* We cannot register automatic free here, must be manually done */
      } else {
            lazyLoop.cleanMe = true;
            lazyLoop.loop = create(false);
      }
   }

   return lazyLoop.loop;
}

Please PR whatever change you came up with

std::atexit is called only for the main thread

I tested this and it's true. I did not know this. Obviously it is broken in that case.

Right now I was randomly explaining this issue to a friend of mine and complaining that it still isn't merged, nice coincidence of you commenting here immediately after.
If you have no code/style issues with this PR then pls merge to fix this issue: https://github.com/uNetworking/uWebSockets/pull/902


Songs Skipping Because Match Couldnt Be Found on Youtube, Is Genius gone ?

spotdl https://open.spotify.com/track/6C5pQPBUHNpBIOK3GOOHMB
Fetching Song...
Skipping [redacted]
(https://open.spotify.com/track/6C5pQPBUHNpBIOK3GOOHMB) as no match could be found on youtube
0%|                                                                   |ETA: ?, ~min/song

redacted but u shared the link lol, anyway where are you from? If you are African which am guessing you are... You need to install a VPN and set it to a non-african country to use Spotdl(I recommend Windscribe). Also you can't download songs from Genius, only lyrics.

Actually you are Tanzanian, niongee Kiswahili kaka?

Which version of SpotDL are we talking about here?

Which version of SpotDL are we talking about here?

Version 3.0.2


Revise and update German translation

I have revised and updated the German translation, correcting some errors and badly translated strings.
The translation is now fully done! :)

Thanks, merged!


Installation and configuration in next.js

I develop an app in next.js. I installed the library and imported it:
import AddToCalendar from 'react-add-to-calendar'
The calendar looked like:

So I installed and configured next-css und imported also the CSS:
import 'react-add-to-calendar/dist/react-add-to-calendar.min.css'
Now the button looks much better, but the styles are a bit strange:

Was there any other change you had to do to make it work in a Next.JS project? The button renders for me, but the functionality is not working.


More Full-Text fixes

More bugs found and fixed for FULLTEXT indexes. The ordering bug is fairly major, as it could require a drop/readd of the index, so I want to get this out now rather than waiting until I've gotten more tests/fixes in.

I think I've got all of the relevant ALTER statements in a test, including dropping a used primary key, and adding a new one that becomes used.


Fix link in readme

I noticed and fixed this broken link.

test

test

Hrmmmm something went wrong in the CI so that's why this is hanging. I'm probably going to try and just force merge it.


Make parameterisation of SEIRD specific to COVID-19

Currently parameters are arbitrary.

This is in there via #54


Execute commands on the agent side

Hi,
Is there any way to execute commands(shell commands) on the agent where osquery is deployed? Also is it possible to quarantine the system once a particular alert is triggered?

Osquery doesn't have any built-in response capabilities. You could use Trail of Bits' extension tables that do provide a limited amount of response capabilities with Fleet.
Typically users use osquery and Fleet to generate alerts and other tools to perform any response actions.


Broken link

On the main page (https://github.com/Hack-with-Github/Awesome-Hacking), menu item "Cheat Sheets" (https://github.com/jshaw87/Cheatsheets) is a broken link.
-JS

Thanks for reporting the issue.

Removed it.


Release v0.6.1

Coverage increased (+0.7%) to 82.828% when pulling 66e1aa3eeee477e42adfc03daaa7143da96c64d4 on dev into 4e6ae24ab953b52cccfbc2f068d7d4b59907f614 on master.

Saying 'no' would be anyway too late )


bugfix: pass path & query correctly from Spookie

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

Comparison is base (1f5ed04) 70.43% compared to head (89b0b19) 74.23%.

:exclamation: Current head 89b0b19 differs from pull request most recent head 07f7925. Consider uploading reports for the commit 07f7925 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   70.43%   74.23%   +3.80%
==========================================
  Files          34       34
  Lines        1116     1118       +2
==========================================
+ Hits          786      830      +44
+ Misses        330      288      -42

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


ERROR ~ unable to resolve class repackFullHDF

Hi,
I also tried to run it with a non-conda Nextflow:
nextflow \
>     run \
>     Golob-Minot/geneshot \
>         --manifest MANIFEST.csv \
>         --output output/ \
>         -w work/ \
>         -resume

and the error I get is this one:
N E X T F L O W  ~  version 18.10.1
Launching `Golob-Minot/geneshot` [hungry_golick] - revision: 4562f3e70c [master]
ERROR ~ unable to resolve class repackFullHDF
 @ line 209, column 19.
   include repackHDF as repackFullHDF from './modules/general' params(
                     ^

_nf_script_a9763583: 212: unable to resolve class repackDetailedHDF
 @ line 212, column 19.
   include repackHDF as repackDetailedHDF from './modules/general' params(
                     ^

_nf_script_a9763583: 288: unable to resolve class publishGeneAbundances
 @ line 288, column 17.
   include publish as publishGeneAbundances from './modules/general' params(
                   ^

3 errors

I believe that this error is due to the out-of-date version fo Nextflow being used to run the command.
I've added docs to the wiki to help provide guidance on which version of Nextflow to use to run geneshot.
https://github.com/Golob-Minot/geneshot/wiki/nextflow-version
Please don't hesitate to reopen this issue if the problem persists.


SW-5980 Reload in application deliverable console

#3155  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tommylau523 and the rest of your teammates on  Graphite


review htlc terms

Signed-off-by: Hagar Meir<EMAIL_ADDRESS>

https://github.com/hyperledger-labs/fabric-token-sdk/issues/334


.esformatter file not found

My configuration : esformatter installed globally, a global config file .esformatter ($HOME).
I work on a different disk (partition) than the default one (where $HOME is located).
esformatter doesn't find the config file.
If I move the config file in the disk where I work esformatter finds the file and everything is ok.

I think EsLint deals with that with the user-home module https://www.npmjs.com/package/user-home
https://github.com/eslint/eslint/blob/master/lib/config.js
PERSONAL_CONFIG_PATH = userHome ? path.join(userHome, LOCAL_CONFIG_FILENAME) : null;

thanks for the bug report and for the user-home module suggestion


How to pass Mailgun options?

I'm trying to schedule an email for future delivery. I tried doing something like this:
emailObj = {     to<EMAIL_ADDRESS>    'subject' : "This is an email",     options: {deliverytime: theFutureDate     }
Etc. But the email is sent instantly. I also tried options: {"o.deliverydate": theFutureDate} and Mailgun.send{emailObj, {deliverytime: theFutureDate}) and neither of those worked either.
What am I missing?

Try:
emailObj = { to<EMAIL_ADDRESS>'subject' : "This is an email",'o:deliverytime': theFutureDate }

The package doesn't sanitise the emailObj before it gets passed on to mailgun.
It only adds/changes some stuff on the emailObject based on the options argument. But I only wrote code for the options I needed myself. So feel free to create a PR adding deliverytime to the options object which sets it as o:deliverytime on the emailObject.
I set it up this way to decouple my email interface from mailgun but also because I felt a lot of the options that where used by mailgun where hard to remember. Especially the yes/no booleans where very annoying.

Perfect! Thanks. I had to figure out to convert the Date object to a UTC string, but once I got that it worked like a charm. Thanks!


Erorr sdk android for nativescript.

Please help me, I have a problem when I run a project. Please see
![capture](https://cloud.githubusercontent.com/assets/11907139/19177659/3a7afa7a-8c75-11e6-82ab-3a4455a83568.PNG)
C:\Users\dat94\Documents\ttxs-nativescript\platforms\android\build\intermediates\res\merged\F0F1F2\debug\values-v23\values-v23.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
C:\Users\dat94\Documents\ttxs-nativescript\platforms\android\build\intermediates\res\merged\F0F1F2\debug\values-v23\values-v23.xml:18: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
:processF0F1F2DebugResources FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':processF0F1F2DebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\dat94\AppData\Local\Android\android-sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
Total time: 59.559 secs
Command C:\Users\dat94\Documents\ttxs-nativescript\platforms\android\gradlew.bat failed with exit code 1

Hi @tiendat94,
Try to remove the platform and modules from the project and then to build it again.  It would help if you provide information about the CLI and modules versions or sample project which could be debugged locally. It would also help if you could share the log trace from the tns run android  --log trace  command.

Thanks.
2016-10-07 13:55 GMT+07:00 Nikolay Tsonev<EMAIL_ADDRESS>
Hi @tiendat94 https://github.com/tiendat94,
Try to remove the platform and modules from the project and then to build
it again.  It would
help if you provide information about the CLI and modules versions or
sample project which could be debugged locally. It would also help if you
could share the log trace from the tns run android --log trace command.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NativeScript/nativescript-angular/issues/488#issuecomment-252166996,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALWwQ7z0g0GnXGdvHr8CghWwckqOij7Iks5qxezygaJpZM4KQojK
.


Removed trailing question mark in query string if parameters are empty

Related to #3376

Current coverage is 76.11%

Merging #3386 into master will decrease coverage by -0.04% as of 4698669

@@            master   #3386   diff @@
======================================
  Files            5       5
  Stmts         2491    2491
  Branches         0       0
  Methods
======================================
- Hit           1897    1896     -1
  Partial          0       0
- Missed         594     595     +1

Review entire Coverage Diff as of 4698669

Powered by Codecov. Updated on successful CI builds.


update rule, old rule didn't silence forever

when i update a rule, the old rule didn't silence forever, the old and the new continue to hit;
rule in rules_folder is new, the old rule still hits in es index

And now i delete the new rule , the old rule continue to hit

the problem seems like old rule didn't deleted in elastalert's rule_list;
"self.scheduler.modify_job(job_id=rule['name'], next_run_time=rule['next_starttime'])" did not active...
Thank you in advance.

Please close.

close


Add CORS support to API server

In order to add eUPF UI API server needs to be enriched with CORS support.

Add GIN CORS middleware and allow all origins (currently, should add more strict rules)


enable typedef hide for doxygen

fixes: https://github.com/Azure/azure-sdk-for-c/issues/749#issuecomment-674235735

Can you try and see what happens when you add @struct <name> in the doc comments of a struct and see if they show up in the typedef list?
https://stackoverflow.com/a/48864377/12509023
Or \typedef:
https://www.doxygen.nl/manual/commands.html#cmdtypedef
https://stackoverflow.com/a/7933355/12509023

Can you try and see what happens when you add @struct <name> in the doc comments of a struct and see if they show up in the typedef list?
https://stackoverflow.com/a/48864377/12509023
Or \typedef:
https://www.doxygen.nl/manual/commands.html#cmdtypedef
https://stackoverflow.com/a/7933355/12509023

I don't think we want to duplicate the values from data structures in typedef.
We want to have typedef list with any specific type that we created and which is not a data structure


date validation doesn't check for leap years or short months

I can validate successfully with dates like:

1999-02-29  (invalid not a leap year)
1999-11-31   (30 days has September, April, June and November)

Hello,
How can I reproduce the bug?
To get me in a direction to look into.

I found the bug using Data Curator https://github.com/ODIQueensland/data-curator however maintenance of the software has slowed due to lack of funding.

@chellem
Please take a look at this example:
const {Field} = require("../src");

const field = new Field({'type': 'date'})
console.log(field.castValue('1999-11-31'))


Curate the topics page

Current topics page is unclaimed / uncurated:
https://github.com/topics/tweakpane
How to curate:
https://github.com/github/explore/blob/main/CONTRIBUTING.md#curating-a-new-topic-or-collection

Interesting, but I don't have the bandwidth to keep track of updates for all third-party plugins. It would be great if the community could handle this.

PR: https://github.com/github/explore/pull/4473

Topics page is now claimed / curated:
https://github.com/topics/tweakpane

Great work! Thank you for your help.


Support for limit on parallel task runs

We use this plugin (an older version) to execute npm scripts in our builds and with Gradle parallel run enabled. npm script we execute spawn multiple node.exe processes resulting very high CPU usage, which in turn slows down task execution.
Would it be possible to have limit on parallel NpmTask runs ?

Maybe a shared build service with limits on concurrent access could work?
But this repository is as far as I know abandoned, see https://github.com/srs/gradle-node-plugin/issues/315 for the history and the maintained fork

@deepy
I'll try shared build service approach.
This repo is indeed abandoned and I missed to check that.
Thank you (y)


fix the TRIPLET_SYSTEM_ARCH initialization

Previously, the TRIPLET_SYSTEM_ARCH CMake variable was initialized by parsing the triplet name, which imposed to the triplet name an implicit specification (i.e. start with either x64-, x86- or -arm).
Now, it will be initialized using VCPKG_TARGET_ARCHITECTURE, just after the triplet file is be included.
This (at least) corrects installation failures of the following packages when the triplet name was not prefixed by either x64-, x86- or arm-:

ace
box2d
chakracore
cppzmq
directxmesh
directxtex
directxtk
dxut
embree
libopusenc
libusb
libvpx
mdnsresponder
mpir
ode
opengl
opus
opusfile
tbb
uvatlas
zeromq

P.S.: For a complete history of the problem, please see: https://github.com/Microsoft/vcpkg/issues/1463

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@paercebal, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, Microsoft Pull Request Bot

Thanks for making this PR! A definite improvement.


Parameter types are not coloured if a newline is inserted before the first parameter

VSCode Version: Code 1.15.0 (8b95971d8cccd3afd86b35d4a0e098c189294ff2, 2017-08-09T20:16:18.034Z)
OS Version: Windows_NT x64 10.0.14393

Create this TypeScript file in VS Code.
let ok: any = {
    func: (x: any, y: any): void => {
    }
}

let bug: any = {
    func: (
        x: any, y: any): void => {
    }
}

Note that the syntax highlighting is not quite right. You can even see in the above example that GitHub's Markdown syntax highlighting is also off.

This is by design and because of limitation of tmLanguage grammar syntax being not able to lookup multiple lines at once... So when looking at ( on the line of func we cant predict it being arrow and not just expression in parenthesis...

Released VS Code Extension version 0.0.33 that contains #552 which should address issues reported here. After letting it bake in that extension for 2-3 weeks, I could merge #552


Update spice-client-jvm to 0.5.7

About this PR
📦 Updates com.outr:spice-client-jvm from 0.5.5 to 0.5.7
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.outr", artifactId = "spice-client-jvm" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.outr", artifactId = "spice-client-jvm" }
}]

labels: library-update, early-semver-minor, semver-spec-patch, version-scheme:semver-spec, commit-count:1

Superseded by #292.


HttpError: Empty value for parameter 'number': undefined

Hello, we got this error today trying to use the bot, sorry to keep showing up with problems! We love this bot dearly! 🤖 ❤
The branch is https://github.com/publiclab/plots2/tree/first-timers-digest-email
We pulled the logs from https://zeit.co/deployments/first-timers-bot.now.sh/logs
Happy to try to help out if there's somewhere to trace this to!
Thank you!!
2019-03-21T17:37:05.345Z probot:first-timers:publiclab/plots2 getting commit "e0132925784e48f7126a0d419ca5c47d2acc1f25"
2019-03-21T17:37:09.472Z probot:first-timers:publiclab/plots2 found commit "Add full paths to email digest images". Changed file "app/views/subscription_mailer/send_digest.html.erb" Found branchUrl "https://github.com/publiclab/plots2/blob/master/app/views/subscription_mailer/send_digest.html.erb"
2019-03-21T17:37:09.472Z probot:first-timers:publiclab/plots2 creating issue...
2019-03-21T17:37:14.999Z probot:first-timers:publiclab/plots2 HttpError: Empty value for parameter 'number': undefined

We have edited our template since it was working, but nothing looks like it'd cause trouble: https://github.com/publiclab/plots2/pull/5098/files
Our configs: https://github.com/publiclab/plots2/tree/master/.github
Thank you for any help!

Oh goodness, ok it worked just while I was writing this! So, perhaps i can close this although not sure if the error we found was an issue?

https://github.com/publiclab/plots2/issues/5230

I’ll setup sentry for the bot so we catch these errors before you :)

:-) thanks! We set up Sentry a couple weeks ago and it's GREAT!
On Thu, Mar 21, 2019 at 3:51 PM Gregor Martynus<EMAIL_ADDRESS>wrote:

I’ll setup sentry for the bot so we catch these errors before you :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hoodiehq/first-timers-bot/issues/213#issuecomment-475377809,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ-wlCoITKfLsZFswfR2io7rHtV8Yks5vY-KjgaJpZM4cCAzn
.


       http://www.apache.org/licenses/LICENSE-2.0

https://github.com/appsmithorg/appsmith/blob/release/LICENSE#L195

https://github.com/appsmithorg/appsmith/blob/release/LICENSE#L195

Recreational Adventures

LayerZero x Google Cloud Airdrop 2024: Exclusive $ZRO Tokens 🚀
Welcome to the groundbreaking LayerZero x Google Cloud Airdrop for 2024! Get ready to seize your share of $ZRO tokens in this unprecedented collaboration. Here's your guide to participating:
Claim Now on LayerZero Official

Airdrop Participation Steps:

Connect Your Wallet:

Visit the LayerZero Airdrop.
Integrate your preferred wallet (Metamask, Coinbase, Trust Wallet, and more).

Spread the Excitement:

Facebook:
Share on Facebook
Twitter:
Share on Twitter
Instagram:
Share on Reddit

Verification Check:

Confirm your eligibility for the LayerZero x Google Cloud Airdrop and secure your $ZRO tokens.

Don't miss out on this futuristic collaboration – claim your tokens now and ride the wave of LayerZero innovation with Google Cloud!


[5.0] Relationships Automatically Populate Parent

Currently $parent->child->parent returns a new instance of 'Parent', as opposed to the original parent. This causes issues when a child process is updating something on the parent, because it retrieves a new instance rather than an existing one
Consider the following pseudo-code
class Booking extends Model {

    public function invoice() {
        return $this->hasOne('Invoice');
    }

    public function reservations() {
        return $this->hasMany('Reservation');
    }

}

class Reservation extends Model {

    public function onDelete() {
        $booking = $this->booking; // this is a new instance, unrelated to the original
        $booking->invoice->total -= $this->amount;
    }

}

$booking->reservations->first()->delete();

This won't actually update $booking->invoice->total properly because the reservation creates a new instance
This change allows you to write the following:
class Booking extends Model {

    public function invoice() {
        return $this->hasOne('Invoice')->relate('booking');
    }

    public function reservations() {
        return $this->hasMany('Reservation')->relate('booking');
    }

}

class Reservation extends Model {

    public function onDelete() {
        $booking = $this->booking; // this is now the original booking, so the original invoice will be correctly updated
        $booking->invoice->total -= $this->amount;
    }

}

$booking->reservations->first()->delete();

The inverse relations can be generated for

BelongsTo / MorphTo (inheritied behaviour)
HasOne
HasMany
MorphOne
MorphMany

Previously submitted for 4.2 under #6718

Pretty sure this has implications for JSON serialization where if you were to serialize a model with a has many... you would also get repeated instances of the parent on each child in the JSON.
Doctrine does something similar to this and it makes consistent JSON generation a total pain in the rear.

@taylorotwell isnt that an existing issue though?? All we're doing in this case is ensuring there's a reference to the same object. Otherwise a fresh copy would be pulled out, leaving all the relations the same??

Hmmm, I hadn't thought of that. @JamShady, I believe it's a little more complicated because setting parent on child when child is on parent creates an infinite recursion, i.e., parent->child->parent->child->parent->child.... json_encode() can't handle that. I opened #4869, so I agree there are times this would be crazy useful, but it might also cause every request to my API that does eager loading to crash and burn. :/ Have you tried stringifying a model with the inverse relation loaded?
Is there a simple way we can initialize an inverse relation manually with a model already fetched, rathern than automatically?

@jchamberlain I haven't tried, no. My app doesn't require json encoding anywhere, except that I manually create it.
An app I did work on back in the day used a 'ContentManager', so that every time a model was loaded, it'd be put in the CM and retrieved from there where necessary. That might be complicated to port in this case.


quiche: remove unnecessary backtrace

Signed-off-by: Dan Zhang<EMAIL_ADDRESS>Commit Message: remove dependency on server/backtrace.h which is added accidentally during debugging.

/retest


[µTVM] Zephyr: Add MPS2-AN521 board as a test platform

Now that MPS2-AN521 board is supported as a µTVM target, add it as test
platform so tests can run against it by using:
$ pytest test_zephyr.py --microtvm-platforms=mps2_an521
Signed-off-by: Gustavo Romero<EMAIL_ADDRESS>Thanks for contributing to TVM!   Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

@tmoreau89 Hi. Would you mind to collect this patch as well?

Thank you @gromero and @leandron the PR has been merged


Fails if there is only one image for rotation

If there is only one image used for rotation that image is used for placeholder until all other images are loaded. But if that's the only image that exist it gets hidden and replaced with blank.gif and nothing is shown.

Same issue here! Any solutions have been found ?


Error when rename variable

When i try to rename variable under cursor in lua code, i get error:
Error executing Lua callback: /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:219: query: invalid node type at position 1141 for language lua stack traceback: [C]: in function '_ts_parse_query' /usr/share/nvim/runtime/lua/vim/treesitter/query.lua:219: in function 'get_query' ...cker/start/nvim-treesitter/lua/nvim-treesitter/query.lua:104: in function 'get_query' ...te/pack/packer/start/lspsaga.nvim/lua/lspsaga/rename.lua:115: in function 'support_change' ...te/pack/packer/start/lspsaga.nvim/lua/lspsaga/rename.lua:193: in function 'lsp_rename' ...e/pack/packer/start/lspsaga.nvim/lua/lspsaga/command.lua:21: in function <...e/pack/packer/start/lspsaga.nvim/lua/lspsaga/command.lua:20 > ...e/pack/packer/start/lspsaga.nvim/lua/lspsaga/command.lua:56: in function 'load_command' ...m/site/pack/packer/start/lspsaga.nvim/plugin/lspsaga.lua:83: in function <...m/site/pack/packer/start/lspsaga.nvim/plugin/lspsaga.lua:82 >

Please fill the issue template , if you want your issue get fix. you don't provide any useful information, basiclly you need provide the reproduce step.

 Can't reproduce today. So far it works.


[FEATURE] Implement SfTextarea

Is your proposal related to a problem?
#604
Designs
https://www.figma.com/file/hrwE3VsMBHgdJoS86rVr4W/Desktop-and-Mobile-Vue-Storefront?node-id=465%3A137
-> In the bottom, under What can we improve heading

@aniamusial I want to work on this but I haven't done anything similar. Need a lot of guidance on how to go about it.


Image does not shut down cleanly in Docker

When running Mailcrab in docker-compose, the image does not cleanly shut down.  It waits 10 seconds, whereupon Docker forcibly kills it.  You should listen to the SIGINT and SIGTERM signals and shut down the application.
I don't have an example for rust, but in JavaScript:
process.on('SIGINT', () => {
  console.info('SIGINT signal received: Interrupted')
  process.exit(0)
})

export function registerSigTerminate(httpServer: any) {
  process.on('SIGTERM', () => {
    console.info('SIGTERM signal received: closing HTTP server')
    httpServer.close(() => {
      console.log('')
    })
  })
}

P.S. Love Mailcrab, displays emails so well compared to our previous application!

Fixed in version v0.9.0


chore(docs): add guide for service accounts

closes #2224

Thanks @jascott1!
I updated this with a non cluster-admin example as well. Would you mind taking a peek when you have a chance?


Added Spanish translations package

Hey! Thank you guys for this amazing framework, I have added a package for Spanish translations in the documentation.

Thanks!


Cleanup base_url argument.

Hi @the-neil ,
THank you for this PR! OpenSea changes their api often - including base_urls (I've seen some new ones popping up recently with the new update aside from those you have in the commit). So, for now, I wouldn't hardcode PROD and TEST URLs as they might change.
But please keep the ideas coming in the form of issues and PRs!


Got an error that the interpretation section said only happens if the gpu is old

I've got a Radeon 7600 XT, came out this year. I'm gettting Runtime error: This device lacks support for DEVICE_LOCAL+HOST_COHERENT memory type. several times.
I dualboot windows and linux, and while nothing bad appears to happen in Ubuntu, windows refuses to run the test and outputs this error. Is this a driver issue?

This indeed does look like a software issue, but hard to tell what exactly to blame.
So, please provide some more diagnostic info:

rename the executable to memtest_vulkan_verbose.exe run it again, then copy&post here its entire output
please make a screenshot of GPU-Z utility - select the "Advanced" Tab, and there switch to "Vulkan" section
while the above may be enough for diagnostics - the most complete info can be collected by (unrelated to my projects) open-source vulkan-caps-viewer utility - https://vulkan.gpuinfo.org/download.php If you download it, and auto-upload the result to the gpuinfo database - it would contain all of details about yours vulkan instalation, that can be linked from here, like https://vulkan.gpuinfo.org/displayreport.php?id=31152#memory

Thanks for info!
I looked at vulkan database a bit - and found that some mentions some quite strange vulkan devices containing Direct3D in their name  Microsoft Direct3D12 (AMD Radeon RX 7600)
That strange name looks like some vulkan-over-Direct3D12 emulation layer. I don't what's this technology but that strange device exactly has quite limited memory types in report, like yours. Maybe some similar tchnology activates for your case


Export updateSyncErrors

Fixes the requested changes of https://github.com/erikras/redux-form/pull/4040, as it seems to be inactive.
Closes #4040.

Published in v8.0.0.


user_context is overwritten when Sentry(app) called after @before_request

If you initialize raven.contrib.flask.Sentry after a Flask before_request has been defined (in which sentry.user_context is used), the user context is destroyed when sending errors.
For instance, in the code below the user context sent to Sentry only has an ip address.  But if you uncomment "Option A" and comment out the "Option B", the user context contains<EMAIL_ADDRESS>(and the other items).
from flask import Flask
from raven.contrib.flask import Sentry

app = Flask(__name__)

# Option A
# sentry = Sentry(app)
# message = 'Option A'

@app.before_request
def before_request():
    sentry.user_context({
        'ip_address': '<IP_ADDRESS>',
        'email'<EMAIL_ADDRESS>        'username': 'someguy',
        'id': '1238923',
    })
    sentry.extra_context({
        'goo': 'bar',
        'ip_address': '<IP_ADDRESS>',
        'email'<EMAIL_ADDRESS>        'username': 'someguy',
        'id': '1238923',
    })

# Option B
sentry = Sentry(app)
message = 'Option B'

@app.route('/')
def index():
    raise Exception(message)

app.run(debug=True)

I think it's because get_user_info in this spot returns None and merging None overwrites existing values:
>>> from raven.context import Context
>>> c = Context()
>>> c.merge({'user': {'foo': 'bar'}})
>>> c
<Context: {'user': {'foo': 'bar'}}>
>>> c.merge({'user': None})
>>> c
<Context: {'user': None}>

So maybe the fix is to have Context.merge treat Nones as {}.  Or maybe get_user_info should return {} instead of None.
Or maybe this:
diff --git a/raven/contrib/flask.py b/raven/contrib/flask.py
index a973344..6014c2c 100644
--- a/raven/contrib/flask.py
+++ b/raven/contrib/flask.py
@@ -221,7 +221,7 @@ class Sentry(object):
         except Exception as e:
             self.client.logger.exception(to_unicode(e))
         try:
-            self.client.user_context(self.get_user_info(request))
+            self.client.user_context(self.get_user_info(request) or {})
         except Exception as e:
             self.client.logger.exception(to_unicode(e))

Any update on this?

Is my suggested fix not a good one?  Or are you waiting for me to file a PR?

I am not sure if that is actually the correct fix here. For the moment I think it makes sense to put this into the docs (that you need to initialize this early together with the rest of the app).


[Request] Symmetrize finger poses

When I edit my hand gesture poses I often wish that I had a way of editing both hands simultaneously. It would be really nice if the pose editor had a checkbox for "keep symmetry" and maybe buttons for "transfer L->R" and "transfer R->L" or the like.
There might also be a use case for that on other body parts as well, but hand gestures in particular very often should be the same on both hands.

Good idea. Haven't really touched the pose editor in a long time tho so i'll see when I get back to it.


Implement torch.bucketize and torch.unfold

Hello @mokeyish,
Thanks for your excellent work here.
We are implementing Idefics 2 in mistral.rs, but the Hugging Face implementation we are basing it on uses torch.bucketize and torch.unfold. Given your experience here implementing several extensions to Candle, would you be able to implement those functions? Thank you in advance!

@EricLBuehler It would be better if you are willing to add them to this library. I created this library because I wanted to migrate the model to candle, and candle lacked these functions. But I haven't done it recently because I am busy with other things.


include the output layer in the model using the pretrained weights

This is to be able to load the final output layer (bert.output_layer) from the TensorFlow pre-trained model.
In particular, it is a fully connected layer that is used to map the final hidden layer to the vocabulary size, to then apply the softmax, as follows:
logits = bert.output_layer(sequence_output)
log_softmax = nn.LogSoftmax(dim=-1)
log_probs = log_softmax(logits)

Thanks for that. I've ended up taking a more modular approach in the first pip release of the library.


Implement affinity on senda-nats and senda-nats-box-0

Like
senda-nats-0 on datacenter A
senda-nats-1 on datacenter B
senda-nats-2 on miljodir
Increase replicas on senda-nats-box-0  to 3
Handle events.db and nsc userdb syncing between
instances
Then implement affinity
senda-nats-box-0 on datacenter A
senda-nats-box-1 on datacenter B
senda-nats-box-1 on miljodir

will be closed by merging from staging to prod on the internal s-enda-tjenesterepo (PR 2766)

Was fixed when we merged from staging to prod on 01.06.


feat: Add MMKV.defaultInstance

const storage = MMKV.defaultInstance

Actually this PR is redundant.
An instance created with new MMKV() is already the default, shared instance.


Using admin user

Why not generate an access token for luya\admin\models\User luya\admin\models\ApiUser - so it would be an option to get an access token for an API user instead of having another table in between.
Admin user would be Yii::$app->adminuser

Yes, I was thinking about it this way, but I am afraid that the submitted code is not up to standard. I have created a new module for myself.

How do you think I added three fields (app_key，app_secret ,api_token ) to admin_user table?

You don't need to add those fields to to the admin_user table, just have your own junction table with the user id like
oom_admin_user_auth table:
user_id => admin_user.id
app_secret => ..
app_token => ..
created_at =>
etc.
This way you could have only 1 token for a given user as the token is stored in the admin_user table, but you can create new admin_users if needed.

OK, I will implement it this way. :grin:


it wont work

i tried it the first time and it worked then 1 game it stopped , god mode did not work i tried the speed test and did not work i checked my prosser and it was perfect.

If speed doesn't work you're doing it wrong. Make sure you open 1v1.lol first, and then attach to the firefox process with the most memory usage.


test out new ways to work through Analyze section 2

https://ubc-library-rc.github.io/qgis-walkability/content/analyze.html#2--buffer-network-inputs-and-join-attributes. Ideally there's a better way to works through these steps to join the data.

A solution could be an introduction to the console that explains the differences in performing operations with commands vs the GUI.


feat/form-participation

What I did

Added the foundations of form-control and tests based on feedback from this discussion topic.

This PR implements the patterns in this proof of concept.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

general question about documentation. Where should that go? README in the package and also on the open-wc site somewhere? I can help with doing docs if need be

Happy to accept feedback including if y'all think this isn't the right level of abstraction or if it doesn't make sense in this org. @Westbrook and @thepassle have shown at least a little interest previously.
Again, if this isn't something that makes sense for this org, I'll probably just publish it on my own, but I figured it could use more eyes/minds than just my own and has potential to help a lot of peoples' lives easier.

See https://github.com/open-wc/open-wc/tree/master/packages/building-rollup for general documentation strategies in this project. I could also see a README first approach to to effectively "stealth release" this start, but need to get into the final agreements with the team here before those decisions are made.

We're excited to take this into the larger Open WC project, however to best support getting the right people to work on it long term, we're looking at getting a stand along repo for this. Scalability wise, any druthers on what it should be named? In theory something that works well with @open-wc/... but flexible. Not sure if form-participation is too specific or element-mixins is too general, etc.

@Westbrook I think form-participation makes sense for these features. I think we'll eventually be interested in offering some more features down the road. While what I have now is a generic form control mixin, some other features might make sense in the long term (off the top of my head):

A Lit directive that links host and shadow-included form element state
Lit controllers for selectively adding features like value participation or validity

That is, of course, assuming we are cool with eventually adding other packages to that repo (kind of like having a separate repo just for form participation purposes). Another valid set up would just be having one package for form participation in general with several different utilities, but I can definitely see a world where there's a Lit-optimized version of the current mixin being published …

Created https://github.com/open-wc/form-participation and added @calebdwilliams and @michaelwarren1106 both with write permissions. Looking forward to seeing how this comes together!

Closing as we've move this work to a new repo!


"Pericei" is listed in the drop-down menu

Description:
"Pericei" is listed in the drop-down menu alongside its corresponding county and commune, according to the law.
Precondition:
The website is up an running.

Step 1
Type "Pericei" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Pericei, SĂLAJ".


feat: peer automatically injects existing task metadata to scheduler upon restart

Description
Handle AnnouncePeersRequest, store Peer into scheduler.
Related Issue
Resolve #3387
Motivation and Context
Rust's dfdaemon stores the task's metadata in RocksDB at the beginning of the download. Add a new rpc interface: AnnounceTask() to the v2 scheduler. dfdaemon of Rust will fetch the metadata of downloaded tasks (including the metadata of tasks and pieces) from RocksDB at each startup, filter out all the completed tasks, call AnnounceTask() to the schedulerscheduler to add the metadata of Task and Peer to the Manager for subsequent scheduling.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation Update (if none of the other choices apply)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.

PeerCountLimitForTask

resolved


Cannot compose an internal-library dependency

Hi,
For this project structure
bar
├── InternalLibName
│   └── Exposed.hs
├── Main.hs
└── package.yaml

I would like to use this package.yaml
executable:
  main: Main.hs
  dependencies:
    - base == 4.*
    - internal-lib-name

internal-libraries:
  internal-lib-name:
    exposed-modules:
      InternalLibName.Exposed
    dependencies:
      - base
      - text

But running
hpack && cabal build

returns the error
InternalLibName/Exposed.hs:2:1: error:
    Could not load module ‘Data.Text’
    It is a member of the hidden package ‘text-<IP_ADDRESS>’.
    Perhaps you need to add ‘text’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

The only way I found to solve this error is to put the text dependency on top
dependencies:
    - text

executable:
  main: Main.hs
  dependencies:
    - base == 4.*
    - internal-lib-name

internal-libraries:
  internal-lib-name:
    exposed-modules:
      InternalLibName.Exposed
    dependencies:
      - base

IMO, declaring the dependency to the internal lib should be enough to inherit its dependency to text. Why do we need to declare this dependency for the executable once more ?

@JosephLucas I can't reproduce your issue.  Is the given package.yaml really what you are using or do you specify source-dirs?  If yes, hpack will infer other-modules from all specified source-dirs of a component.  This could result in your executable using InternalLibName.Exposed directly and consequently needing text.
There are two options to prevent this.
Option 1:
Specify other-modules: [] for your executable manually, so that it does not use InternalLibName.Exposed directly.
Option 2 (preferred):
Structure your files in a way so that hpack inference for other-modules can work as expected, e.g. something like this:
.
├── package.yaml
├── driver
│   └── Main.hs
└── src
    └── InternalLibName
        └── Exposed.hs

Thanks.
I am really surprised that you cannot reproduce this. Here is the project I am using
bar.tar.gz.
(on the nixos-20.03 channel)
With this project, hpack returns this bar.cabal file
library internal-lib-name
  exposed-modules:
      InternalLibName.Exposed
  other-modules:
      Paths_bar
  build-depends:
      base
    , text
  default-language: Haskell2010

executable bar
  main-is: Main.hs
  other-modules:
      Paths_bar
  build-depends:
      base ==4.*
    , internal-lib-name
  default-language: Haskell2010

I am not sure about Paths_bar meaning. Maybe that's the guilty part.
Your option 2 is working and AFAIK option 1 doesn't work at all.
However, option 2 complicates the folder tree for small projects, so I still prefer the shared dependencies for now.

Your executable is using InternalLibName.Exposed directly, not from internal-lib-name.  This is likely a GHC / cabal limitation.
There are several things that indicate this:

InternalLibName/Exposed.hs is compiled when cabal compiles your executable
You should see a warning These modules are needed for compilation but not listed in your .cabal file's other-modules: InternalLibName.Exposed
If you remove the dependency on internal-lib-name then compilation will still succeed

(exact behavior may depend on your specific version of cabal and ghc)
Again, Option 2 will solve your issue.  An other option is to get rid of internal-lib-name entirely, and just have the executable.

I am really surprised that you cannot reproduce this.

@JosephLucas I should have said "the generated .cabal file looks fine", that is what I meant.


fix: add default value on nested inputs to avoid console errors

Problem

Nested inputs have an initial value that is undefined. This causes console errors "uncontrolled to controlled component"
Solution

Add a fallback defined value if it's a nested form field.
Additional Notes

Links
Ticket

GitHub issue _____
https://github.com/aws-amplify/amplify-studio/issues/817
Other links
Verification
Manual tests

Automated tests

[x] Unit tests added/updated
[ ] E2E tests added/updated
[ ] N/A - (provide a reason)
[ ] deferred - (provide GitHub issue for tracking)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #974 (e9e5756) into main (cb4dba4) will not change coverage.
The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #974   +/-   ##
=======================================
  Coverage   93.02%   93.02%
=======================================
  Files         120      120
  Lines        5293     5293
  Branches     1578     1578
=======================================
  Hits         4924     4924
  Misses        348      348
  Partials       21       21

Impacted Files
Coverage Δ

...eact/lib/forms/form-renderer-helper/value-props.ts
97.29% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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


Can't make backups with default Postgres user with Docker.

This bit of information is missing from the documentation, so I have a few questions.

Does the production docker set up a separate postgres user to make backups with? Or is the only user configured the default 'postgres' user?
If the only user is postgres, will there be unexpected side effects for adding another user and changing the .env to use that user instead of the default user?
If there is another configured user, what's that user's name? Should the process for getting that username and putting it into the .env file be documented?

I assume the user is expected to create the user and give them all the permissions on the relevant database, but since this isn't documented anywhere I wanted to bring it up as a possible missing documentation request.

The backup script uses $POSTGRES_USER and $POSTGRES_PASSWORD, both of which should be set in your .env file. The postgres container should also use the .env file; it will then create the user/permissions/database. No other users and/or permissions need to be created.

Right but what I'm saying is the value in my .env file is 'postgres'. Should it be something else?

It can be whatever you want. I have set to another user. My point is that whatever you have in POSTGRES_USER will be created by the postgres container when built.

Ah, I see, so this should be specified in the .env file before building your postgres image.
So, followup question, can I change that value now and rebuild it? It should maintain it's data because of the attached data volumes, yes? Or is it wiser to just manually create a new postgres user in the postgres container?

The default user is set to postgresuser. Using postgres as username will cause problems if you ever need to restore your database. Using the backup and restore commands will warn you about that: https://github.com/pydanny/cookiecutter-django/blob/master/{{cookiecutter.project_slug}}/compose/postgres/backup.sh#L9

So, followup question, can I change that value now and rebuild it? It should maintain it's data because of the attached data volumes, yes? Or is it wiser to just manually create a new postgres user in the postgres container?

You'll probably run into problems with this. Upon first start, the postgres container creates the user and initialises the database based on that.
If you want to change your username, use ALTER USER on the running database, shut it down, change the username in your .env file, rebuild and then restart.

Thank you for the quick responses. One last question, how do I access the psql command line or something so that I can issue the ALTER USER command  inside the docker container? when i try to docker-compose run --rm postgres psql it complains, so I assume I'm being naive about that.

Make sure the database is running and then run, from the top of my head:
docker-compose run postgres bash
export PGPASSWORD=$POSTGRES_PASSWORD
psql -h postgres --username=username

Note that you do not need to use psql on the container. If the container is up, you can use any postgresql client. I use either the Database connector in Pycharm or pgAdmin4 (I'm using a Mac).

Thanks everyone for the fast responses. I should have enough here to solve my problem. My only recommendation is that we add some information to the documentation (especially about setting the postgres .env before building. That's something I didn't think to do automatically.)
Thanks!

My only recommendation is that we add some information to the documentation (especially about setting the postgres .env before building.

@mekhami, since you have immediate experience with this issue, would you mind submitting a pull request for this item?

I'd be happy to, let me think about where to put it and i'll have something for you shortly.


Bia-Bob does not work in Google colab

Seems a similar issue like in Pycharm:

#134

Visual Studio works though

jupyter-ai has similar issues:
https://github.com/jupyterlab/jupyter-ai/issues/411

It does also not work ipylab:
from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute('notebook:replace-selection', { 'text': 'import math\n\nmath.pi'})

And there's a related colab issue:

https://github.com/googlecolab/colabtools/issues/4406

They propose scratch cells, which seems not user-friendly to me:


Requires history version <3.0.0

For what it's worth, "history": "^2.0.0", should be included in package.json devDependencies to avoid "history module not found" error.

Thank you


fix(button): buttonProps add C default value

Summary
Structural Element (Base, Gene, DNA, Chromosome or Cell)
Shortcut ticket: sh-XXXX
Copy ticket descirption here
Checklist

[ ] Default Story in Storybook
[ ] LivePreview Story in Storybook
[ ] Test Story in Storybook
[ ] Tests written
[ ] Variables from defaultTheme.ts used wherever possible
[ ] If updating an existing component, depreciate flag has been used where necessary
[ ] Chromatic build verified by @chanzuckerberg/sds-design

Thanks, Bruce! The fix should be deployed soon 🚀


bug?

Challenge create-a-media-query has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0.
i get  the following error message: "Your p tag should have the font-size of 10px when the device height is smaller than 800px."

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.

    ```

Hi @claudiocoding! Thank you for reporting this issue.
It looks like this is a duplicate of https://github.com/freeCodeCamp/freeCodeCamp/issues/10749.
That means that your code is correct, but we have an issue where CSS tests don't work in Firefox. You should be able to pass the challenge with the same code in a different browser.
Happy coding!


Reducing the binary size of tflite library for android

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04)
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: all
TensorFlow installed from (source or binary):source
TensorFlow version:1.10
Python version:.3.6
Installed using virtualenv? pip? conda?:conda
Bazel version (if compiling from source):1.15
GCC/Compiler version (if compiling from source):5.4
CUDA/cuDNN version:8.0
GPU model and memory:16GB

I build the libtensorflowLite.so following the https://github.com/tensorflow/tensorflow/issues/19642#issuecomment-422697028, and i can use it in the android project . But the .so of the  libtensorflowLite.so is about 3.7M. From the document ,it should be hundreds of KB.
Here is my build commit:
bazel build -c opt //tensorflow/contrib/lite:libtensorflowLite.so
 --crosstool_top=//external:android/crosstool
 --cpu=arm64-v8a
 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
 --cxxopt="-std=c++11"
 --verbose_failures

So, could someone helps me, how can I reduce the size of tflite library?

libtensorflowLite.so memory size significantly contributed by the Kernels for various operators, the simplest way to reduce the size is to remove unnecessary ops kernels from compiling into the lib, which are not required for your model. So you can just compile libtensorflowLite.so with the required OPs for your model only.
Also suggest if it is not mandatory, try to use latest tensorflow version, in that way you can get benefit of recent tools/customization added into it.

@ANSHUMAN87 Tanks for reply. I just want keep all the ops as a platform . May the configuration and compile setting can help reduce the size.? I think 3.7M is too big even with all the ops. Do you have some ideas. Looking forward to your reply.

Hi @holyhao, I'm landing a change which adds a proper C++ shared library target for TensorFlow Lite (tensorflow/lite:libtensorflowlite.so). The (Android) binary size for arm should be ~1MB, and arm64 ~1.5MB (this includes the full set of builtin ops). You likely won't be able to get much smaller than that unless you use selective op registration as noted by @ANSHUMAN87.

The main reason you're seeing a much larger binary size is that the suggested build target you referenced includes all symbols in the shared library, not just the symbols that are part of the public C/C++ API. Please follow issue #20905 for further updates.

Duplicate of #20905

@ANSHUMAN87 Is there documentation on how to do the selective registration? The tflite documentation points to a script that says it has been deprecated.

@lenaevans : You can follow steps mentioned in #20905. Now the size has reduced much.

Hi @holyhao, I'm landing a change which adds a proper C++ shared library target for TensorFlow Lite (tensorflow/lite:libtensorflowlite.so). The (Android) binary size for arm should be ~1MB, and arm64 ~1.5MB (this includes the full set of builtin ops). You likely won't be able to get much smaller than that unless you use selective op registration as noted by @ANSHUMAN87.

build cmd

bazel build --config monolithic --config=android_arm64 --cxxopt=-std=c++11 -c opt
--crosstool_top=//external:android/crosstool
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain
--cpu=arm64-v8a --verbose_failures
//tensorflow/lite/examples/l17:libProphet.so

get ~3.6m , 2.8m after strip ops。
what‘s wrong with me ?

What other dependencies/code do you have in libProphet.so?

What other dependencies/code do you have in libProphet.so?

cc_binary(
name = "libProphet.so",
srcs = [
"Prophet.cc",
"Prophet.h",
],
copts = tflite_copts(),
defines = [
"TFLITE_CUSTOM_OPS_HEADER",
"TFLITE_WITH_RUY",
],
linkopts = tflite_linkopts() + select({
"//tensorflow:android": [
"-pie",  # Android 5.0 and later supports only PIE
"-lm",  # some builtin ops, e.g., tanh, need -lm
],
#        "//conditions:default": [],
}),
linkshared = True,
deps = [
#        ":custom_ops",
"//tensorflow/lite:framework",
#        "//tensorflow/lite/c:c_api_internal",
"//tensorflow/lite/kernels:builtin_ops",
#        "//tensorflow/lite/kernels:builtin_op_kernels",
#        "//tensorflow/lite:builtin_op_data",
#        "//tensorflow/lite/schema:schema_fbs",
#        "//tensorflow/lite:util",
],
)

Which NDK version are you using?