Create R.Object type that doesn't register with the R type

I'm trying to create a dynamically created query essentially doing below.
bases = [R.ObjectType] # Plus additional query models
queries = type("CustomQuery", tuple(bases), {})

However, the above example registers the CustomQuery and won't allow me to register additional ones under the same name.
Is there a way, or can it be added to have an option for R.ObjectType not to register itself.
I'm primarily doing with with permissioning, which is working out great, and what users can access.
I should note this is my current workaround
registry_name = "CustomQuery{}".format(str(uuid.uuid1().hex))
queries = type(registry_name, tuple(bases), {})
schema = R.Schema(queries, R.Mutations)
removed_type = R._registered_types.pop(registry_name)
R._registered_types_can_be.pop(removed_type)

Hmm. I'm not entirely sure that's the best approach. I do understand what you're doing though.
You can always construct the raw low level GraphQLObjectType object and pass it to R.Schema - this should probably work better if you want to programmatically create the query type from a set of permissions anyways. This is how Epoxy works under the hood. It's really just sugar for making GraphQLObjectTypes...

So the method you mentioned didn't work, specifically because of this one section in the registry.
def Schema(self, query, mutation=None, subscription=None):
    query = self[query]()
    mutation = self[mutation]()
    subscription = self[subscription]()
    self._add_impl_to_interfaces()
    return GraphQLSchema(query=query, mutation=mutation, subscription=subscription)

This function doesn't check if the object is already a GraphQLObjectType and assumes it's apart of the registry.
I was however, able to do the following. And it doesn't register with the registry.
def partial_func(new_models):
    return OrderedDict(new_models)

def get_graphql_schema():
    from app import R
    from graphql.core.type import GraphQLObjectType
    query_bases = []
    mutation_classes = []
    for key, value in R[R.Query]().get_fields().items():
        permission = GraphQLPermission(key)
        if permission.can():
            query_bases.append((key, value))

    for key, value in R.Mutations.item.get_fields().items():
        permission = GraphQLPermission(key)
        if permission.can():
            mutation_classes.append((key, value))

    part_mut_func = partial(partial_func, mutation_classes)
    part_query_func = partial(partial_func, query_bases)
    schema = R.Schema(R.Query, R.Mutations)
    temp_mutation = GraphQLObjectType("Mutation", part_mut_func)
    temp_mutation._field_map = partial_func(mutation_classes)
    temp_query = GraphQLObjectType("Query", part_query_func)
    temp_query._field_map = partial_func(query_bases)
    schema._mutation = temp_mutation
    schema._query = temp_query
    return schema

I even tried creating the low level schema; however it isn't able to communicate with the Epoxy Classes.
part_mut_func = partial(partial_func, mutation_classes)
part_query_func = partial(partial_func, query_bases)
temp_mutation = GraphQLObjectType("Mutation", part_mut_func)
temp_mutation._field_map = partial_func(mutation_classes)
temp_query = GraphQLObjectType("Query", part_query_func)
temp_query._field_map = partial_func(query_bases)
schema = GraphQLSchema(query=temp_query, mutation=temp_mutation)

I can provide more tracebacks and logs. And despite my workaround, I think the main problem is that R.Schema checks with it's own Registry first.

That makes sense actually. It'd try to auto-register any new ObjectTypes it sees. Trying to think of a suitable work-around... I was just talking to someone about how permissions are hard in GraphQL.
I wonder if it'd then be easier to do what you did initially, but with say a consistent object type name per permission set.
This is probably an awful idea:
    for key in R[R.Query]().get_fields():
        permission = GraphQLPermission(key)
        if permission.can():
            query_bases.append(key)

    for key in R.Mutations.item.get_fields():
        permission = GraphQLPermission(key)
        if permission.can():
            mutation_classes.append(key)

    query_permission_hash = hashlib.sha256(':'.join(sorted(query_bases))).hexdigest()
    mutation_permission_hash = hashlib.sha256(':'.join(sorted(mutation_classes))).hexdigest()
    query_type_name = 'Query%s' % query_permission_hash
    mutation_permission_hash = 'Mutation%s' % mutation_permission_hash
    # Some code to check and see if those query/mutation type exists, and if not, generate & register them.

Only issue I can see is this eventually ballooning in memory usage if you have lots of permission permutations... but I dunno if generating a schema for each request is ideal either.
Alternatively you could enforce permissions on the objects themselves, maybe with a resolve wrapper that returns null if the user doesn't have access to the field?

I don't like the idea of moving request/permission specific stuff to the model because I don't think it should be as tightly coupled.
I did have a temporary solution but came across a weird error during schema validation.
Here is essentially what I did
for key, value in temp_query._fields().items():
    new_fields = []
    if isinstance(value.type, GraphQLList):
        target_fields = value.type.of_type
    else:
        target_fields = value.type
    for field_key, field_value in target_fields._fields().items():
        if isinstance(field_value.type, GraphQLList):
            field_value_name = field_value.type.of_type.name
        elif isinstance(field_value.type, GraphQLObjectType):
            field_value_name = field_value.type.name
        else:
            new_fields.append((field_key, field_value))
            continue
        permission = GraphQLPermission(field_value_name)
        if permission.can():
            new_fields.append((field_key, field_value))
    if isinstance(value.type, GraphQLList):
        value.type.of_type._fields = partial(partial_func, new_fields)
        value.type.of_type._field_map = partial_func(new_fields)
    else:
        value.type._fields = partial(partial_func, new_fields)
        value.type._field_map = partial_func(new_fields)
    new_query.append((key, value))

but I would get this error during validation of the schema.
(Pdb) result.errors
[TypeError("'NoneType' object is not iterable",)]

So I stuck to my original method of
def partial_func(new_models):
    return OrderedDict(new_models)

def get_graphql_schema():
    from app import R
    query_bases = []
    mutation_classes = []
    for key, value in R[R.Query]().get_fields().items():
        if isinstance(value.type, GraphQLScalarType):
            query_bases.append((key, value))
            continue
        permission = GraphQLPermission(key)
        if permission.can():
            query_bases.append((key, value))
    for key, value in R.Mutations.item.get_fields().items():
        permission = GraphQLPermission(key)
        if permission.can():
            mutation_classes.append((key, value))
    part_mut_func = partial(partial_func, mutation_classes)
    part_query_func = partial(partial_func, query_bases)
    schema = R.Schema(R.Query, R.Mutations)
    temp_mutation = GraphQLObjectType("Mutation", part_mut_func)
    temp_mutation._field_map = partial_func(mutation_classes)
    temp_query = GraphQLObjectType("Query", part_query_func)
    temp_query._field_map = partial_func(query_bases)
    temp_query._fields = partial(partial_func, query_bases)
    schema._mutation = temp_mutation
    schema._query = temp_query
    return schema

And included in the resolver of every field a decorator.
    # This is a decorator.
    @wraps(func)
    def func_wrapper(self, obj, args, info, model, single=False, related=None, additional_filters=None):
        from app import R
        if request:
            if isinstance(info.return_type, GraphQLList):
                return_type = info.return_type.of_type
            else:
                return_type = info.return_type
            returned_models = R._registered_types_can_be[return_type]
            results = None
            can = False
            for ret_model in returned_models:
                permission = GraphQLPermission(ret_model.__name__)
                if permission.can():
                    results = func(self, obj, args, info, model, related, additional_filters, single)
                    can = True
                    break
            if not can:
                raise GraphQLError("User doesn't have access to {}".format(model.__name__))
        else:
            results = func(self, obj, args, info, model, related, additional_filters, single)

I do think I have a good permission system started; however, the big flaws of this is that I believe the user can still introspect the entire schema, even though they may or may not have access to it.
Luckily the permissions here is abstract enough that I can change it if I have a better solution later. I do like the idea of inspecting the fields of every query and also removing anything that doesn't belong, but I just couldn't get that working properly.


Add create_issue

This commit adds initial support for the ChatOps alias to post issues automatically to GitHub.

For the format, I'd rather do something like this:
  - "issue create {{title}} {{user=StackStorm}}{{repo=st2}}"

Would this work, or would there have to be a space after the title for this to match?

I'm for issue create {{ title }} {{ description="" }} where description is optional and repo defaults to st2 (hardcoded in another action). I believe 99% of the issues are about st2 repo.
Commands:
# Issue Title only
!issue create "st2ctl fails on CentOS6"
# Issue Title with Description
!issue create "st2 command displays ssl warning" "Possibly comes from urllib3"

Easier is better.

/cc https://github.com/StackStorm/hubot-stackstorm/pull/35


UNIT not document

No idea what UNIT is, but it seems to be a thing and there are tests for it in roast too.
<Zoffix> m: BEGIN { UNIT; Nil }
<camelia> rakudo-moar d789da: ( no output )
<Zoffix> m: UNIT.WHAT
<camelia> rakudo-moar d789da: ( no output )
<Zoffix> m: UNIT.WHAT.say
<camelia> rakudo-moar d789da: OUTPUT«(UNIT)␤»

It's a pseudo-package representing the outermost lexical scope of the program.

Would it make sense to create a new language page to document all the package like thingies? Otherwise they'll end up scattered all over the place and it will be difficult to determine the documentation coverage.

I think so. "Packages & Namespaces" or something similar. It could explain
how packages work in general and also explain the pseudo packages like
UNIT,MY,OUR, SETTING etc
On Fri, Jul 22, 2016 at 9:18 PM Jonathan Stowe<EMAIL_ADDRESS>wrote:

Would it make sense to create a new language page to document all the
package like thingies? Otherwise they'll end up scattered all over the
place and it will be difficult to determine the documentation coverage.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/perl6/doc/issues/739#issuecomment-234519230, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADj6Q0MRBZVyC-ApbFPaC4Mi4FtENhYrks5qYKcPgaJpZM4JSZMx
.

It belongs under https://docs.perl6.org/language/packages right next to ::MY, what is missing also.

Please don't be hasty with adding new sections. We still need to repeat some stuff and the more sections we have, the more repeating we have to do.

We should be able to deal with the repitition programmatically, no?
On Saturday, July 23, 2016, Wenzel P. P. Peppmeyer<EMAIL_ADDRESS>wrote:

Please don't be hasty with adding new sections. We still need to repeat
some stuff and the more sections we have, the more repeating we have to do.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/perl6/doc/issues/739#issuecomment-234749549, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADEUTEcLZOc3DgI1gJbZWjoG6DJMo-Bks5qYrVcgaJpZM4JSZMx
.

--
Will "Coke" Coleda

Technically we could use D<>, within the same .pod and if Pod::To::HTML and Pod::To::BigPage would support it. Also that only works if we need the exact same wording. From the top of my head, that rarely ever happens. Further if we use some trickery to make D<> stick across multiple .pods we would need some tools to list them all so we can do QA when we change or extend Perl 6. There are quite a few spots with NYI, that are not marked in any useful form.
By a wild guess we are still 3 month behind v6.c. Actually in some spots we may even be ahead of v6.c already. We have right now no way of keeping track of changes in the html-output and reading pod6 can be quite tricky. I'm not happy with the docs being an approximation of some thing in-between v6.c and v6.d.

UNIT was doced with 86d78248 and index entry points at the right spot.


Enhancement : Dark themed map

Dark styled map can be implemented for dark theme
BUT I don't know if this can be done with mapbox.
Screen-shots:

https://www.mapbox.com/help/android-runtime-styling-intro/
https://www.mapbox.com/android-docs/map-sdk/overview/runtime-styling/
can be used to style the maps on run-time.
Maybe we can change the language of map depending upon the language of the user ?

We need to use the Wikimedia tile server for privacy reasons, and AFAIK this cannot be achieved with that (see #1002 ).

How about leaving this issue open and marking it "upstream"?
In the future WMF might accept to add dark tiles, after they have solved their many more pressing issues.

I believe we already have a dark theme app in the latest version of the app. So, closing this. Feel free to re-open if I'm missing something.

@sivaraam it may have been a typo or a misread so I am just clarifying, this is for a dark theme map not >app

@macgills Yeah, it was indeed a typo. Fixed it now :) The app does have a dark themed map.


Uncomment host: localhost

I've done some lightweight testing on this PR against my local development environment, (i.e. turning on and off my local configs, as well as the Rails option) and it doesn't break a currently working install.  If it solves configuration for new coders I say we approve the PR.

Thanks @bayendor! I agree that it's a nice touch for reducing any potential walls when working locally.


webpage not available

When first started, it shows error with: file:///android_asset/2048/index.html?lang=en could not be loaded because: ERR_FILE_NOT_FOUND
Any help?

this is the bug of an old version. Take a fresh one:
https://f-droid.org/en/packages/com.uberspot.a2048/


Safer etcd version checking

LGTM, but as Spike pointed out, a UT of the version function might be good ;-)


External URL in OAuth2PasswordBearer

I have created an api which authenticates the user using username and password, which is present in micro service A.
I want to use that authentication api in micro service B using
oauth2_scheme=OAuth2PasswordBearer(tokenUrl="/auth/token")

something like this. I want to put the authentication api URL which is present in a different micro service in tokenURL.
How should I achieve this as the api is present different micro service?

Please follow the issue template

Sorry, I (we) can't help you if you don't follow the issue template and provide more information.
If you still have problems please create a new issue and follow the template step by step.
Given that, I'm gonna close this one.

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


Some kind of interface for 'resources'

Maybe use this? http://code.google.com/p/django-mediafiles/


Proxy allocation to Selenium instances

I've noticed that in the loop to create ScrapeWorkerFactorys in core.py, there's a line that loops though every proxy in the given file (if one chooses to use one), which ends up creating more browser instances than you might limit with your config's num_workers:
        # Let the games begin
        if method in ('selenium', 'http'):

            # Show the progress of the scraping
            q = queue.Queue()
            progress_thread = ShowProgressQueue(q, len(scrape_jobs))
            progress_thread.start()

            workers = queue.Queue()
            num_worker = 0
            for search_engine in search_engines:

                for proxy in proxies:

                    for worker in range(num_workers):
                        num_worker += 1
                        workers.put(
                            ScrapeWorkerFactory(
                                mode=method,
                                proxy=proxy,
                                search_engine=search_engine,
                                session=session,
                                db_lock=db_lock,
                                cache_lock=cache_lock,
                                scraper_search=scraper_search,
                                captcha_lock=captcha_lock,
                                progress_queue=q,
                                browser_num=num_worker
                            )
                        )

Not only is this not the behavior we want, it might end up crashing your machine if you have a set of, say, 100 proxies for instance. I believe one solution to this problem would be to remove the loop entirely and pick a proxy every time we're looping though num_workers:
        # Let the games begin
        if method in ('selenium', 'http'):

            # Show the progress of the scraping
            q = queue.Queue()
            progress_thread = ShowProgressQueue(q, len(scrape_jobs))
            progress_thread.start()

            workers = queue.Queue()
            num_worker = 0
            for search_engine in search_engines:

                for worker in range(num_workers):
                    num_worker += 1
                    proxy_to_use = proxies[worker % len(proxies)]
                    workers.put(
                        ScrapeWorkerFactory(
                            mode=method,
                            proxy=proxy_to_use,
                            search_engine=search_engine,
                            session=session,
                            db_lock=db_lock,
                            cache_lock=cache_lock,
                            scraper_search=scraper_search,
                            captcha_lock=captcha_lock,
                            progress_queue=q,
                            browser_num=num_worker
                        )
                    )

What do you think @NikolaiT ?

It's a bit of a late answer, but I just put my nose into this project.
I also do not really understand how @NikolaiT intended to design the num_worker variable the threads are not being helpful in Selenium mode.
I reworked a bit the loop and following code such as it prevents the threads from opening all the windows at the same time, but the amount based on num_worker.
num_worker = 0
            for search_engine in search_engines:

                for proxy in proxies:

                    # for worker in range(num_workers):

                    num_worker += 1
                    workers.put(
                            ScrapeWorkerFactory(
                                    config,
                                    cache_manager=cache_manager,
                                    mode=method,
                                    proxy=proxy,
                                    search_engine=search_engine,
                                    session=session,
                                    db_lock=db_lock,
                                    cache_lock=cache_lock,
                                    scraper_search=scraper_search,
                                    captcha_lock=captcha_lock,
                                    progress_queue=q,
                                    browser_num=num_worker
                            )
                    )

# here we look for suitable workers
            # for all jobs created.
            for job in scrape_jobs:
                while True:
                    worker = workers.get()
                    if worker.is_suitabe(job):
                        worker.add_job(job)
                        workers.put(worker)
                        break

            threads = []

            while not workers.empty():
                worker = workers.get()
                thread = worker.get_worker()
                if thread:
                    threads.append(thread)

            # this is the old code
            # for t in threads:
            #     t.join()
            # changed for the following:

            num_thread = 0

            while num_thread <= threads.__len__():

                for t in threads[num_thread:num_thread + num_workers]:
                    t.start()

                for t in threads[num_thread:num_thread + num_workers]:
                    t.join()

                num_thread += num_workers

            # after threads are done, stop the progress queue.

It's already working much better in my opinion.


TypeError when construct quantum circuits for multi-classification task

Hi, I’m trying to set up a model for multi-classification task with 4 classes (0 to 3) and wondering if I can ask some questions regarding allocation of qubits when building an ansatz. The dataset consists of label and its corresponding sentence as shown below:
0 joyful man entertains kid
2 young kid irritates man
3 frightened woman startles woman
1 old woman grieves kid
0 old man entertains woman
I encoded the classical labels into two-qubit representation such as label_mapping = {'0': (0, 0), '1': (0, 1), '2': (1, 0), '3': (1, 1)}.

Cups reader:
When Cups reader was used to process the data then turned into the string diagrams, I defined two qubits for each diagram, ansatz = IQPAnsatz({AtomicType.NOUN: 0, AtomicType.SENTENCE: 2}, n_layers=1), so that individual post-selected quantum state can be compared with label_mapping. But this approach gave me the Type error:

`309 for i, circuit in enumerate(circuits):
310     n_bits = len(circuit.post_processing.dom)
--> 311     result = np.zeros(*(n_bits * (2, )))
312     for bitstring, count in counts[i].items():
313         result[bitstring] = count
TypeError: Cannot interpret '2' as a data type
`

Spiders reader:
Using the spiders reader with the same ansatz specification also gave me the type error, but this time, the error was raised by not correctly defining domain and codomain, which I’ve never seen in the previous lambeq version:

`1927 dom_check = self.ob_with_cache(ar.dom)
1928 if ret.cod != cod_check or ret.dom != dom_check:
-> 1929     raise TypeError(f'The arrow is ill-defined. Applying the functor '
1930                     f'to a box returns dom = {ret.dom}, cod = '
1931                     f'{ret.cod} expected dom = {dom_check}, cod = '
1932                     f'{cod_check}')
1933 return ret
TypeError: The arrow is ill-defined. Applying the functor to a box returns dom = , cod = qubit expected dom = , cod =`
It looks like changing the number of qubits in ansatz doesn’t help resolve the issue, so I wonder if anyone can help me with this.
Thanks! (+ I’m using the latest version of lambeq 0.4.0)

Hi @shinyoung3 and sorry for the delay. The problem must be related to the fact you are using 0 qubits for nouns in your ansatz; try to use a number > 0 and let us know if it works.

Hi @dimkart , thanks for the help. I resolved the issue, but I found one more problem when constructing an ansatz with a two-qubit system. For a single-qubit system (e.g., ansatz = IQPAnsatz({AtomicType.NOUN: 1, AtomicType.SENTENCE: 1}, n_layers=1, n_single_qubit_params=3)), changing n_single_qubit_params gives adjustment of the number of parameters operated on each qubit.
However, n_single_qubit_params always gives single Rz gates for a two-qubit system regardless of the n_single_qubit_params setup. So there's no change in the total number of circuit parameters, whether IQPAnsatz({AtomicType.NOUN: 2, AtomicType.SENTENCE: 2}, n_layers=1, n_single_qubit_params=3) or IQPAnsatz({AtomicType.NOUN: 2, AtomicType.SENTENCE: 2}, n_layers=1, n_single_qubit_params=6). Can anyone explain why this happens and how I can construct a circuit with three operations for each qubit (two Rx and single Rz gates? I don't think this is related to the version issue.
Thanks!

Hello, @dimkart, I am writing to report an error I'm experiencing with a program I'm writing for my doctoral research.
I experienced the same TypeError when working on my experiment to define a custom grammatical type in my ansatz.
This is the type error that was mentioned above that I am also experiencing.
Cups reader:
When Cups reader was used to process the data then turned into the string diagrams, I defined two qubits for each diagram, ansatz = IQPAnsatz({AtomicType.NOUN: 0, AtomicType.SENTENCE: 2}, n_layers=1), so that individual post-selected quantum state can be compared with label_mapping. But this approach gave me the Type error:
`309 for i, circuit in enumerate(circuits):
310 n_bits = len(circuit.post_processing.dom)
--> 311 result = np.zeros(*(n_bits * (2, )))
312 for bitstring, count in counts[i].items():
313 result[bitstring] = count
TypeError: Cannot interpret '2' as a data type
Here is how I am defining my ansatz. Note that there is a custom type called "h".
n, s, h = AtomicType.NOUN, AtomicType.SENTENCE, Ty ('h')
ansatz = IQPAnsatz({n: 1, s: 1, h: 1}, n_layers=1, n_single_qubit_params=3)
Here is my output:
Traceback (most recent call last):
File "c:\Users\rdnot\vertical-meaning\vertical_meaning.py", line 323, in
trainer.fit(train_dataset, val_dataset, early_stopping_interval=10)
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\quantum_trainer.py", line 201, in fit
super().fit(train_dataset,
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\trainer.py", line 465, in fit
t_loss = self._step_and_eval(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\trainer.py", line 348, in _step_and_eval
y_hat, loss = step_func(batch)
^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\quantum_trainer.py", line 163, in training_step
loss = self.optimizer.backward(batch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\spsa_optimizer.py", line 157, in backward
y0 = self.model(diagrams)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\quantum_model.py", line 175, in call
out = self.forward(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\tket_model.py", line 129, in forward
return self.get_diagram_output(x)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\training\tket_model.py", line 98, in get_diagram_output
tensors = Circuit.eval(
^^^^^^^^^^^^^
File "C:\Users\rdnot\vertical-meaning\Lib\site-packages\lambeq\backend\quantum.py", line 311, in eval
result = np.zeros((n_bits * (2, )))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Cannot interpret '2' as a data type
Question: Do you have any recommendations on how I can proceed with my experiment?

@Slidejiveman As discussed in discord, this is due to the fact that the diagrams might have different codomains. Using the UnifyCodomainRewriter after the diagram creation should resolve the problem.

Hi @dimkart , thanks for the help. I resolved the issue, but I found one more problem when constructing an ansatz with a two-qubit system. For a single-qubit system (e.g., ansatz = IQPAnsatz({AtomicType.NOUN: 1, AtomicType.SENTENCE: 1}, n_layers=1, n_single_qubit_params=3)), changing n_single_qubit_params gives adjustment of the number of parameters operated on each qubit. However, n_single_qubit_params always gives single Rz gates for a two-qubit system regardless of the n_single_qubit_params setup. So there's no change in the total number of circuit parameters, whether IQPAnsatz({AtomicType.NOUN: 2, AtomicType.SENTENCE: 2}, n_layers=1, n_single_qubit_params=3) or IQPAnsatz({AtomicType.NOUN: 2, AtomicType.SENTENCE: 2}, n_layers=1, n_single_qubit_params=6). Can anyone explain why this happens and how I can construct a circuit with three operations for each qubit (two Rx and single Rz gates? I don't think this is related to the version issue.
Thanks!

Hi, sorry for the delay, it seems that we missed this one. n_single_qubit_params is only relevant for wires that are mapped to a single qubit (as the name implies) in the ob_map dictionary. The reason for this is while any ansatz provides a way to combine two or more qubit into a circuit, it usually becomes degenerate in the single qubit case. This needs to be handled explicitly, which we do through the n_single_qubit_params argument. We will improve the documentation of the ansatz to make this more clear. Further, note that 3 rotations are enough to specify any single-qubit unitary, so higher values for the argument do not make much sense.

Hi, thanks for the clarification. But I have one more question regarding this. If I understand correctly, for binary classification, the measurement outcome from a single qubit is only compared with the binary true label of 0 or 1, and the rest of the measurements are post-selected to be considered "0." So, if one sentence consisting of four words is mapped into individual qubits (a total of four qubits), the probability of getting an accurate prediction is 1/16, assuming all possible outcomes have a uniform distribution.
If this is correct, for multi-class classification, let's say we have four classes, then the circuit for the same sentence should be duplicated to have eight qubits, since only a single qubit can represent the label-specific quantum state (whether it is 0 or 1). So, the outcome from two qubits out of eight can represent 00 to 11 to be compared with the true label, further increasing statistical limitation. I don't know if this concept is correct, but I would like to know if you can give me some insight into this.
Thanks a lot!
@dimkart

In lambeq diagrams, the output of a circuit is delivered from the free wires, which usually get the type 's' (sentence). If you define s=1 in your ansatz (ob_map argument), you assign 1 qubit to your sentence wire which means you have two possible states $|0\rangle$ and $|1\rangle$, and the result of the circuit will be a vector $(a1, a2)$, giving the probabilities of these two states. This is the setting you use in standard binary classification tasks. Now, imagine you have 4 classes. You will need to set s=2 in your ansatz, so you have 4 ($2^2$) different possible states, $|00\rangle$, $|01\rangle$, $|10\rangle$, $|11\rangle$. In that case the result of the model will be a vector with 4 elements, each one providing the probability for a specific state. With 3 qubits at the output wire, you have 8 states, so you can represent up to 8 classes, and the output vector will have 8 elements, and so on. For $\text{s}=n$ in your ansatz, you can represent up to $2^n$ classes. Does this help?

Hi, thank you for the quick response. I understood the relationship between the number of sentence wires (i.e., s=1, 2, or 3) and the output of the circuit we obtain, but what I wanted to ask was how the concept of post-selection would result in different statistical limitations when we change from s=1 to s=2 on the same sentence.
When I construct a quantum circuit based on the bag-of-words model for the sentence, "l like you," each word (I, like, you) is mapped into individual qubits, and the free wire is connected to "I"-qubit for the binary classification (s=1). So when the circuit is measured, we obtain quantum states of $|0\rangle$ and $|1\rangle$, which are from this "I"-qubit. If I understand correctly, this means that we restrict the circuit measurement by post-selecting two qubits ("like" qubit and "you" qubit) to be considered as they are at $|0\rangle$ state and neglect their result to be considered in the measurement outcome. And that's why the "like" and "you" qubits' wires are connected to "0" in the downward triangle in the circuit shown below.
So my question is, does it mean that the actual probability of obtaining a meaningful result is 2/8 (assuming all possible outcomes have a uniform distribution) for s=1 in this example (since 3 qubits are required to represent the sentence but we only consider measurement outcome from a single qubit)?

In addition, the quantum circuit of s=2 looks like two circuits of s=1 are connected in parallel with controlled Rz gates. If the above equation is valid, the circuit for s=2 gives the result of $|00\rangle$, $|01\rangle$, $|10\rangle$, and $|11\rangle$ by only using two free wire qubits (i.e."I"-qubit) to be considered as the measurement outcome but actually representing the whole sentence with the total of six qubits (by mapping two qubits per word). In this case, doesn't the probability of obtaining a meaningful result now become 4/64 (assuming all possible outcomes have a uniform distribution) for s=2 while s=1 is 1/8?

Sorry for the long conceptual question, but I thought this was the best place to obtain good advice on understanding the QNLP algorithm.
I really appreciate the help!
Thanks

Hi again. You are right, as the number of post-selections increase, you need an exponentially higher number of circuit executions (shots) to gather meaningful statistics. However, in lambeq post-selections are relevant only to specific models, such as the DisCoCat mode, that contain "cups"; compositional schemes such as StairsReader and TreeReader do not use post-selections and can be run efficiently on quantum hardware. Check this discussion for more insights and some ways to reduce or completely avoid post-selections.

Hi @shinyoung3,
Postselections appear in 3 broad cases:

Cups
Spiders
Any box with cod qubits > dom qubits (more inputs than outputs), unless using discards

The first 2 cases are unavoidable, but the 3rd can be handled in the ansatz.
When creating the ansatz, specify discard=True. This replaces the postselections with a quantum discard.
For example:
ansatz = IQPAnsatz({N: 1, S: 1}, n_layers=2, discard=True)

Docs for this: https://cqcl.github.io/lambeq/lambeq.ansatz.html#lambeq.ansatz.IQPAnsatz
For your usecase, you can try using the tree reader, and then make sure you use discards. This has no cups or spiders natively.

This issue will be closed due to inactivity.


Training ADAPET on data too large to fit in RAM.

I am training an ADAPET model on 800gb of text. However, I cannot load this data into a variable since I don't have nearly enough RAM to do that. Is there any way to keep loading the data chunk-by-chunk and training it bit-by-bit? Online learning of some sorts, maybe? How to do this with an ADAPET model?

My guess (have not tried this myself) is you could try lazy-loading your dataset using .npz files for each example as mentioned here. This might allow you to train the model normally without having to resort to active learning. We are not sure how good ADAPET might be in an active learning / online learning setting.

That's helpful! Do I just keep the data in .npz format or do I actually have to make any changes to the source code?

I have a bunch of text files, not numpy arrays. How do I save these as npz? I'm guessing I'll have to code a custom task dataprocessor, as directed in timoschick/pet. Do I use the same format as shown in that repo for a data processor and pvp? Once I've written my processor and pvp, where do I specify them?

You'd have to convert each text example into the .npz format and make some changes in the source code when you design the dataset reader. As far as I know, strings can be saved as .npz files without much hassle.
For the data processor, you should be able to infer what to do by looking at one of the dataset readers we've designed (for SuperGLUE) in this repo to get ADAPET running. I do not think there's a direct relation between the data processor in Timo's code and the dataset reader in our repo. If you're interested in running PET, you could redirect the question there as I'm not fully in tune with the codebase now.

I opened up an issue on Mr. Schick's repo. Please check. Somebody says that this(online learning with PET) is possible with DeepSpeed but this required modifying the entire codebase. Do you know anything about this?

I do not think the issue mentioned anything about online learning. DeepSpeed sounds like it might get some improvement. However, I haven't worked with it at all to know how good it might be.

I think I'll make the modifications to PET on my own and write a new implementation of PET by myself. Thanks though!


Explain config.py in readme

Add a note to the readme mentioning that you need to copy config.example.py to config.py for the script to run.

Completed in #31


Brightness Control issu, CPUFriend can't find Data, some errors at booting

hi,
first big thx for providing yours files.
i have t460s 6300u, 12Gb, 512GB, FHD with Touch, Dockingstation.
I used the EFI fron issu "Battery readouts not working" and mist of things are working fine.
So the first problem I notice is that my screen get completely at dark (off) at 75% level through key or the slider in the settings.
The second problem is that want to use CPUFriend to get the low freq. (800mhz I mostly use on battery) as without I get only 1300mhz. I followed your instructions and also search on other form but it don't work.
I always get an critical halt error. OC: Image Kexts\CPUF.. is missing for injected kext  CPUFriend.kext (Frq.. data injector).
i´v tried with dataprovider kext and also apci  but always get that error.
and the last problem is that I get some error at booting but its boot normal.
Boot erros
CPUFriends
thx for your help in advance.

Did you turn CPUFriend.kext ON on your config.plist? It's set to Enabled=false by default.

yes i did

My bad, I just found an issue inside config.plist

This line is wrong. The executable doesn't have an extension. It should be Contents\MacOS\CPUFriend


MySQL EFCore F# project fails to build

To reproduce:
$ dotnet new steeltoe-webapi --language 'F#' --connector-mysql-efcore
$ dotnet build
...
/Users/ccheetham/scratch/Models/ErrorViewModel.fs(3,6): error FS0929: This type requires a definition [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder`2' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder`2' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder`2' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder`2' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
FSC : error FS0193: The module/namespace 'Microsoft.EntityFrameworkCore.Metadata.Builders' from compilation unit 'Microsoft.EntityFrameworkCore' did not contain the namespace, module or type 'ReferenceOwnershipBuilder`2' [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Models/SampleContext.fs(3,35): error FS1109: A reference to the type 'Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder`2' in assembly 'Microsoft.EntityFrameworkCore' was found, but the type could not be found in that assembly [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Startup.fs(22,46): error FS0039: The value or constructor 'options' is not defined. Maybe you want one of the following:   Option   option   Option   voption   OptionModule [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Startup.fs(22,57): error FS0039: The value, namespace, type or module 'options' is not defined. Maybe you want one of the following:   Option   option   voption   OptionModule   MvcOptions [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Startup.fs(22,9): error FS0041: A unique overload for method 'AddDbContext' could not be determined based on type information prior to this program point. A type annotation may be needed.Known type of argument:  ^_arg3Candidates: - (extension) IServiceCollection.AddDbContext<'TContext when 'TContext :> EntityFrameworkCore.DbContext>(?optionsAction: Action<EntityFrameworkCore.DbContextOptionsBuilder>,?contextLifetime: ServiceLifetime,?optionsLifetime: ServiceLifetime) : IServiceCollection - (extension) IServiceCollection.AddDbContext<'TContext when 'TContext :> EntityFrameworkCore.DbContext>(contextLifetime: ServiceLifetime,?optionsLifetime: ServiceLifetime) : IServiceCollection - (extension) IServiceCollection.AddDbContext<'TContext when 'TContext :> EntityFrameworkCore.DbContext>(optionsAction: Action<IServiceProvider,EntityFrameworkCore.DbContextOptionsBuilder>,?contextLifetime: ServiceLifetime,?optionsLifetime: ServiceLifetime) : IServiceCollection [/Users/ccheetham/scratch/scratch.fsproj]
/Users/ccheetham/scratch/Program.fs(26,14): error FS0039: The type 'IHostBuilder' does not define the field, constructor or member 'UseCloudHosting'. Maybe you want one of the following:   UseConsoleLifetime [/Users/ccheetham/scratch/scratch.fsproj]

Similar failure when using --connector-postgresql-efcore


Fix bug about ListOptions and stars/watchers pagnation (#14556)

Backport 0f #14556

make lgtm work


partners/qdrant: DRAFT QdrandVectorStore.aadd_texts POC becnmark

Here I want to boost QdrantVectorStore.aadd_texts performance with truly async implementation
It's just a test in a form of a benchmark. It also has LocalAIEmbeddings implementation allowing bulk request.

[x] Lint and test:

I didn't commit dependencies, perhaps one needs openai>=1.3 to run it.
I run qdrant and cpu embeddings at the same machine. From logs I see that async method really runs requests in parallel, and put cpu cores higher load. However, wall clock time shows not much gain, but it's reproducible.  Notice tests run time below.

Heya!!
I repeat the same exercise with remote Qdrant & LocalAI. And got significant gain (honestly I deliberately sized test data to give advantage for async code spawning parallel request in the beginning):

The interesting thing: the old Qdrant.aadd_texts  using async generator is slower than truly async code with create_tasks().

@Anush008 wdyt?

This also includes time for generating embeddings as well. Correct?

This also includes time for generating embeddings as well. Correct?

Right.

@Anush008 using create_task() gives more parallelism, so it let to put higher load reducing wall clock time. However, I'm not sure if it's a purpose of async VectorStore.a* method.
It's not clear eg in scope of #11141. @baskaryan could you comment what's the purpose of VectorStore async methods?

hey team!
while this is in draft, could you open it against your own fork, and reopen the PR against the main project when it's ready for our team's review?

If we remove the embeddings generation, is the difference in performance worth the code duplication?

If we remove the embeddings generation, is the difference in performance worth the code duplication?
That's actually what I'm asking. Embeddings is one of the pipeline stages, even if we avoid it, aadd_texts can send a few batches in parallel. Whether it's worth it, I don't know.


opentype.js rendering for dsi-logo-maker

This PR updates all design functions in dsi-logo-maker in the following way:

They now use opentype.js for loading a eot version of F Grotesk and render text to <path /> elements or canvas. This makes the output print-ready without the need for outlining fonts.
They now all have string inputs with options for choosing the thin or regular version of F Grotesk

Thanks for the feedback @lnolte and @fdoflorenzano! I just pushed a fix so the logoAnimatedSVG function works with the font selector too. It's running a little choppy tho, and I can't really figure out why. I think we generally need to re-think the way we animate with React and provide some built-in hooks that people can use. I'll be happy to think about this for a bit, but for now I was just trying to fix the choppy logo and couldn't really understand how the props to the Unit component work together for the animation state. @fdoflorenzano do you mind taking a look? I'd also be happy to jump on a call :)

Nice! I'm all for this!

Another thing I was thinking in relation to fps was adding a small timeline scrubber for animations. It's a little hard since we don't know the duration of the animation, but perhaps it could be a small timeline with the ability to set the time you want to jump to. It would be a big help when working with animations.

Let's solve the FPS problem when we merge the new drawLoop functionality. Getting this into main :)


Integration Test - Release - 2022/05/27 09:08:10

Auto create for integration test. IssueCommandFlow

#pri1

Just type '#pri3'

#pri2

#pri3

#assign PRMergerTest1

#assign NonAllowedUser

The following users don't have valid GitHub IDs, or are not collaborators on this repo: nonalloweduser

#reassign PRMergerTest2

#reassign NonAllowedUser

The following users don't have valid GitHub IDs, or are not collaborators on this repo: nonalloweduser

#please-close

GitHub user PRMergerTest2 has been removed from the MicrosoftDocs organization, so they were automatically removed as an assignee.

#unassign PRMergerTest1

#unassign NonAllowedUser


No Sub Fields Button Recognised?  - I might be me?

Please have a look at the attached screenshot.
I cannot seem to locate the 'copy code with sub fields'?
I have flexible content but only the 'copy code' button on its own.

A screenshot of my screen is as follows (no sub field button?)

The  'copy code with sub fields' button will only show up for group and repeater fields as of now.
Functionality for flexible content might be developed in the future, but as of now I have limited time and resources.


Multiple instances not detected anymore

I think discord changed something on how activities work, previously if i had multiple Visual Studio 22 running it would show all of them on my profile, but now it shows only one.
I download your source modified the version and installed it together the version from market place and its now detecting two Visual Studios instead of just one.
I work with c++ i have little to no experience with c# or vs extensions, Isn't possible to tweak it somehow to still detect all running instances?
public const string DefaultApplicationId = "914622396630175855";
This id is the one from the discord developer website? when you create a custom app.
-Edit-
Yes its, one way I thought to achieve it was to create multiple copies of the same app and pick one Id for each instance of Visual Studio, but i wonder if there's any better approach.

There has already been a similar issue #55.
Your issue is only related to the Visual Studio DIscord RPC extension? Or other extensions have the same trouble?

There has already been a similar issue #55. Your issue is only related to the Visual Studio DIscord RPC extension? Or other extensions have the same trouble?

Yes i only use Visual Studio

I didn't do anything to disable the visibility of multiple instances.
Most likely, this is a Discord bug or a new feature of the client's frontend, (because when you close one instance, the second one will be displayed)
Also, I didn't find anything in the app settings on the Discord Developer Portal to change this somehow.

Can you add me on discord? my id: c.e.sar


Fix run_results.json Performance Regression

resolves #8360
Problem
In an attempt to ensure run_results.json was always written, dbt 1.6 was modified to write it out after every node completed. This proved too time consuming in practice.
Solution
We no longer write run_results.json after every node completion, instead writing it once at the end of an invocation, taking care to do so even if a KeyboardInterrupt or FailFastError occurs.
Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have run this code in development and it appears to resolve the stated issue
[ ] This PR includes tests, or tests are not required/relevant for this PR
[x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Looks like you started from 1.6?  Might want to cherry-pick to a main-based branch?

Will branch off main instead, and use our official backport strategy.


Superset 3.0 not able to login , getting CSRF error

not able to login superset after successfull installation , getting the below error
How to reproduce the bug

Might be related to https://github.com/apache/superset/issues/25348

Might be related to #25348

Superset is not a stable tool , we can’t deploy in production confidently . For all the release may have some bugs .. 3.0 is not stable version

I'm sorry you're having a difficult experience with the tool.  It's a tricky dance to get the default configurations working out of the box while also as secure as possible.  For instance you could try disabling Talisman CSP, which lowers your security but could help resolve the issue.  I would recommend disabling/reducing security to get it working, then building it back up, as an easier way to debug.

Superset is not a stable tool , we can’t deploy in production confidently . For all the release may have some bugs .. 3.0 is not stable version

Here are two ways to fix this:

Pay for https://preset.io/ hosted SaaS Superset -- then they'll handle these complexities
Contribute to pre-release testing.  Version 3.0.0 went through four rounds of tests and fixes.  We can always use more rigorous testing.  Please consider joining the project mailing list, then testing 3.0.1 before its release<EMAIL_ADDRESS>

Disabling Talisman CSP fixed it for me. However, this is not a solution. It would be nice if there is a working guide in the documentation about how to authenticate and use the API.

This is a duplicate of https://github.com/apache/superset/issues/24579 so I'm closing.  See the thread there for more details, including a PR that recently merged that changes a setting which might avoid this behavior happening on initial setup without https.


ModalWrapper: Properly unused prop handleOpen?

Summary
I'm not sure if I just don't see the use of the prop handleOpen.
The component uses a class method this.handleOpen, but the prop handleOpen seems not to be used in any way. I don't even see the prop passed down to a defined prop of the component Modal.
Maybe someone can have a look at this to check my supposition.
If I'm right, I would fix this issue together with a new feature I had in mind, when opening the source code.
Relevant information
Here's the line of the prop definition:
https://github.com/IBM/carbon-components-react/blob/0e2f293fc1731b1a848aae090a5d530e9deac369/src/components/ModalWrapper/ModalWrapper.js#L17

hi @IOIO72 thanks for reporting this! yeah it looks like you're right that this prop is unused. I can go ahead and add it to the handleOpen class method on <ModalWrapper>, but if you would like to add more features to go along with it then I will defer to your PR

Hi @emyarod thanks for looking at this. I'll make my changes to the code today. I think I'll refactor the props of the component and add some descriptions, etc.

As suggested by @asudoh I post my question here.
Currently I'm refactoring the propType definitions of ModalWrapper and adding some descriptions. I've analysed the use of each prop and the pass thru of props to Modal.
In ModalWrapper I found some unused props inside the component itself and the passed thru props are not used in Modal as well: status handleOpen modalText withHeader and modalBeforeContent
And the prop onKeyDown in ModalWrapper seems to execute in both components, if defined - I think this could be a bug.
Some other props of Modal are explicitly defined in ModalWrapper and some are implicitly passed thru.
So, here's my question:

should every definable prop of Modal be defined in ModalWrapper as well (duplicated), to allow a better documentation and a better check for used and unused props?
Or should we just define the props used exclusively in ModalWrapper and never define props that are just passed thru to Modal? In the documentation we would just note, that all props are passed thru to Modal and those props are documented there ...

Looking at the internal initial code - Seems that prop type definition of status handleOpen modalText withHeader and modalBeforeContent are redundant as @IOIO72 pointed out. Didn't see onKeyDown pass along to <Modal>. I think <Modal> props available to <ModalWrapper> being re-defined as prop types is a good idea.
BTW not sure if I have mentioned already - <ModalWrapper> merely is a demonstration-purpose component. We may want to deprecate it.


Added list of methods for autocomplete

Added list of available methods to the PHPDoc section of Flight class. Inspired by suggestion: http://stackoverflow.com/a/26628288/1363799
Autocomplete was tested in PHPStorm 8.0.1:

Could we get a tag on this for packagist? I'd prefer not to use dev-master in my projects.


Align Camel Quarkus catalog 3.8.x (3.8.4) to 4.8.4

belongs to #1695

rebase needed, can you do that Aurelien?


os-iperf plugin does not open firewall

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
[X] The title contains the plugin to which this issue belongs

Describe the bug
iperf3 does not open firewall
Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)
To Reproduce
Steps to reproduce the behavior:

Install os-iperf plugin.
Go to 'Interfaces > Diagnostic > Iperf'.
Click on 'Create Instance', having selected your interface fist.
Start iperf3 on the client device using the port listed in OpnSense.
iperf3 on the client hangs and after a while fails due to a communication error.

Expected behavior
iperf3 on the client should connect to the specified port and carry out the speed checks.
Describe alternatives you considered
A workaround is to manually open the firewall on the interface and port specified.
Screenshots

Relevant log files
If applicable, information from log files supporting your claim.
Additional context
sockstat -4 -l | grep iperf3
root     iperf3     72189 3  tcp46  *:12156               *:*
root     iperf3     65993 3  tcp46  *:28391               *:*
root     iperf3     63859 3  tcp46  *:42588               *:*
root     iperf3     93022 3  tcp46  *:8509                *:*
root     iperf3     70443 3  tcp46  *:55047               *:*
root     iperf3     47900 3  tcp46  *:41104               *:*

Note that old instances of iperf3 are left running even though they are not show in the UI - another bug?
The top three listed above are shown on the UI too.  It seems that a pf anchor called 'iperf' is created and is listed in /tmp/rules.debug as the last line (anchor "iperf").  However:
pfctl -a iperf -s rules

returns nothing.
Environment
Software version used and hardware type if relevant, e.g.:
OPNsense 24.1.6-amd64

Have you news informations about this issue ?


Add string names to avoid obfuscation

Uglify tends to obfuscate class names. Adding a string to the
alt.createXXX methods tends to help.
Hopefully helps with https://github.com/aksonov/react-native-router-flux/issues/4

It doesn't work (with both unminification & minification)

For some reason I thought the issue was only after minification. Gimme a couple of minutes/hours :)

Yes, 0.0.5 works well without minification, but 0.0.7 (with your PR) doesn't work at all. maybe I've broken something by myself with 0.0.6, let me check too.

FYI I'm getting complaints about this package being missing: https://www.npmjs.com/package/absolute-path

➜  Example git:(feature/minification-issues) ✗ npm start

><EMAIL_ADDRESS>start /Users/eml/Projects/react-native-router-flux/Example
> node_modules/react-native/packager/packager.sh

Could not find dependencies.
Ensure dependencies are installed - run 'npm install' from project root.

After adding the missing dependencies absolute-path and chalk

Strange, are you using io.js?

Ah that was indeed the case. Tried on 0.12.7 but got these errors:
React packager ready.

[2:40:46 PM] <START> fs crawl
TypeError: Cannot read property 'root' of null
    at /Users/eml/Projects/react-native-router-flux/Example/node_modules/react-native/packager/react-packager/src/DependencyResolver/crawlers/index.js:16:84
    at tryCallOne (/Users/eml/Projects/react-native-router-flux/Example/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/eml/Projects/react-native-router-flux/Example/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/eml/Projects/react-native-router-flux/Example/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at process._tickCallback (node.js:355:11)
[2:41:02 PM] <START> request:/index.ios.bundle
[2:41:02 PM] <START> find dependencies

Let me know if you introduced some trouble in 0.0.6. I need to get back to work but I can try more tonight or tomorrow morning. I was hoping my quick PR could've done it.

You need to have io.js, check this:
http://facebook.github.io/react-native/docs/getting-started.html#content
No, problem only after your PR :)
Read-only error happens because of second name parameter was added. Maybe after that i can't add new actions to class, so the question how to do it.

Ok, i've rollback changes and released 0.0.8 to avoid errors for a while.

I was on iojs 2.5 though. I'll follow the instructions later on. :)
That's really strange, it appears there's an API change in alt that I'm not aware of. Could you try going back to alt 0.17.1?

I’m using 0.17.1 version of alt.

4 сент. 2015, в 15:06, Emil Ahlbäck<EMAIL_ADDRESS>написал(а):
I was on iojs 2.5 though. I'll follow the instructions later on. :)
That's really strange, it appears there's an API change in alt that I'm not aware of. Could you try going back to alt 0.17.1?
—
Reply to this email directly or view it on GitHub https://github.com/aksonov/react-native-router-flux/pull/5#issuecomment-137730663.

Can you verify that is the one installed? Because running npm install would install 0.17.3.

You are right, 0.17.3 was installed, i've changed it to 0.17.1, but read-only error still exists.

Thanks. I'll try and help you with this over the weekend. If we're lucky one of the other collaborators who aren't new and have better answers for you. :)

Thanks, actually I agree with read-only error - way I'm adding custom actions are 'hacky' - i'm modifying internal properties of class now, but i didn't found API for that...

Agreed, they are kind of hacky. A nicer way (to me) would be to dynamically create the action once you have your schema. But then that gives you issues when you import components that imports the action class before the schema is even defined.

I think we really need API for alt to create actions runtime
Pavel.

4 сент. 2015, в 15:36, Emil Ahlbäck<EMAIL_ADDRESS>написал(а):
Agreed, they are kind of hacky. A nicer way (to me) would be to dynamically create the action once you have your schema. But then that gives you issues when you import components that imports the action class before the schema is even defined.
—
Reply to this email directly or view it on GitHub.

@aksonov you can create actions runtime. It's just that once you say alt.createActions the return value is immutable. That's not really a bad thing. Thinking about your problem during the evening I don't think mutable actions are the way to go here. After your schema definition you have a list of actions for your class, you could feed that into alt.createActions!

Yes, I was thinking about it, but how to unite then my 'generated' actions with already existed actions (push/pop) - it will be not good to have two different classes for this? Just merge? Sorry, i'm  still learning Javascript, so could miss something obvious here.

Oh, maybe i could just hide original actions (push/pop) inside component and just duplicate these methods in 'generated' actions ?

Once you have your route definitions and  you could build the specification for the action & call alt.generateActions. You could though I don't know if this is a great solution pass that down through context to the react components. They could call this.context.router.login().

Usage of context will make usage more complex. It looks interesting idea - generate actions by its names (so it will be real actions), subscribe to all of them and handle properly within store. The problem is how to send these generated actions to user? Currently i'm just 'attaching' to actions singleton so user can easily import them as usual actions during compile time and use it later, in runtime.

Indeed it will.
Okay so for generating the actual action is what I would do. Get an array of action names such as ["login", "about", "contact", "faq", "tos", "feed"] and use it to create your an object like:
{
  login: function(data) { this.push("login", data),
  about: function(data) { this.push("about", data),
}

That can in turn be sent to alt.createActions- see http://alt.js.org/docs/createActions/. You want to merge in the implementation of push and what have you into that object though.
Once you have your object you can pass that alt.createActionsand use that return value in your components. Does that make sense?

I think in the same way, but how i can use it as return value for my module.exports, if it is done during compile time?
Btw, i've commented all actions modifications within index.js and still get that read-only error for 'named' actions.

You can't use it as return value for your module.exports. You'd have to modify that value when you've generated your action.
let _action = {};

export function _setAction(value) { _action = value; }
export default _action;

Pretty sure any file that imports the file will have the updated value. Given that you should be doing the whole config & generation before any component is ever rendered and has a chance to call your action, it would work.

Hm, interesting, is it feature of ES6? I.e. if i call _setAction from my component, it will update _action for all other files imports it?
Looks like current react-native doesn't support ES6 fully, but only some feature (like 'class' declaration)

Yeah that would be an ES6 feature. Typically in ES6 projects you run the code through Babel to handle this kind of stuff. If you wish to pursue this path take a look at babel. This looks good: http://daliwa.li/es6-modules-in-node/

Unfortunately that doesn't work within React Native environment - i don't want to patch run script or something like that because this way module will be unusable. I will try to find other solution

@mull Okey, i've implemented some solution without modifying existing actions anymore but generate own ones, but result is the same - it works without minification, but doesn't work with.
As I mentioned above - when I'm applying your PR (adding names for actions), i'm getting readonly error always, even without any modification of actions.

I've fixed bug with minification #4, it happens in code unrelated to alt.


GitHub script

Description
This script produces a markdown file with first a listing of our organisations and then a big listing of our organisations with their corresponding repositories.
The script uses the GitHub API to find them all. It also alerts (to the console) if a new organisation was found that wasn't in the whitelist already.
The script requries you to have a key.txt file next to it with your GitHub API token.
┆Issue is synchronized with this Asana task

Moved to dolittle/Development repo


Add client-resizer

Client Resizer allows for automatic or hotkey-based resizing of the client. Please refer to the README for more info if desired.
If there are any problems or issues, please let me know! Also feel free to DM me on Discord or in #runelite or #development in the RL discord (@Yves W).
Thanks in advance for taking the time to review this!

Fyi you can achieve this plugins functionality with Plugin Presets. See https://github.com/antero111/plugin-presets/wiki/Client-size-presets

Fyi you can achieve this plugins [edit: client size keybind] functionality with Plugin Presets. See https://github.com/antero111/plugin-presets/wiki/Client-size-presets

Yeah, I mostly wrote it for the automatic resizing since I was too lazy to resize my client every time I moved it to a different monitor. The hotkey-based resizing was just an extra.


add service message testMetadata

This PR adds testMetadata service message as documented in https://www.jetbrains.com/help/teamcity/reporting-test-metadata.html#Reporting+Additional+Test+Data
I haven't included any tests as I'm not sure what are the guidelines are for those (no CONTRIBUTING.md or references in README).
Let me know if anything is required
Note: currently using this in a project by subclassing the original TeamcityServiceMessages

very small PR to review @mikekidya 😄


matchers is not available on android and ios

matchers is not available on android and ios，Setting properties has no effect

Please provide a minimal reproduction or at least a few lines of code to demonstrate the issue. This is not actionable.


Reorganize pkg/vdri

The vdri folder currently contains both concrete VDR (verifiable data registry) client implementations along with the VDR interface and local registry of VDRs.

Too much hard-coded logic in there... things I think need to be done:

Decouple did:peer from didcomm:

Move the specification of service of type did-communication to somewhere closer to the didcomm layer... perhaps the didexchange service
Remove the check on the public key type (ed25519)

Remove hardcoded key type in vdri.Registry


handle mismatch peer id region error

As pingcap/tidb#45297 reports, TiKV may report mismatch peer id error, currently the client-go doesn't handle such error, this PR checks this error and invalidate the region cache when receiving this error.

/cc @crazycs520


Fix EVP_PKEY_supports_digest_nid for provider-based keys

Fixes #14343. Adds the missing implementation of EVP_PKEY_supports_digest_nid for provider-based (non-legacy) keys. The ASN1_PKEY_CTRL_SUPPORTS_MD_NID was not handled for non-legacy.
The code uses EVP_PKEY_get_params to "assert" a value, i.e. it sets a value of input OSSL_PARAM and expect the get_params function to fail if the assertion is invalid.

This function is pretty much a hack that should be taken care of in a different manner.  I know that @mattcaswell has some ideas about capabilities, while I would like to remove the need for the whole NID split-and-join-again by making it possible to offer sigalg implementations (i.e. making it possible to fetch EVP_SIGNATUREs like "SHA1WithRSAencryption").
Either way, I don't think it's wise to push this particular functionality on providers.
At.  All.

Alright, I withdraw this.


Docs: Ignore case in search

Description

The search no longer accounts for letter case when finding matches.
How Has This Been Tested?

visually
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 not work as expected)

Checklist

[X] The PR is submitted to the correct branch (dev).
[X] My code follows the code style of this project.
[ ] I've added relevant tests.

Thanks


Publish software-component-version of the running instance

When operating Smarti, it is useful to know which version of the software is running. Thus, the information about

git commit
git tag
alive since

should be exposed.
Proposal: Endpoint such as /status/version could export a JSON

http://localhost:8080/system/info

Functionality is already provided with system info


[qt] Add QMapLibreGL common header

Add QMapLibreGL common header which is common for Qt-based libraries.

@wipfli is waayyy faster!

Haha


Curing Meat in Barrels no longer works - recipe is disabled

Tried both meat types with double the amount salt (64:32) in a barrel but you can't seal it anymore.
Recipe on how to mix in a barrel with the correct ration is no longer visible in the handbook:

Uuuh, there must be some other mod causing this to happen. With only Ancient Tools and Meteoric Expansion running the recipe appears in the handbook as normal. This is using Ancient Tools 1.5.4 on Vintage Story 1.18.5
Feel free to post your mod list and I'll try and help figure out which mod it may be. I'd like to know, too, for curiosity's sake xD

Indeed, sorry for bothering! The mod which caused the recipe to disappear was 'Fauna of the Stone Age: Capreolinae' - thanks for the offered help!

Wonderful! Glad you found the cause of the issue. From what I'm reading, they've already fixed the problem with their 1.0.1 mod release ^.^


errror

Describe the bug
error
Link to the Bolt URL that caused the error
https://bolt.new/~/sb1-pius1f
Steps to reproduce
error not loading
Expected behavior
errror
Screen Recording / Screenshot
No response
Platform
Browser name = Chrome
Full version = <IP_ADDRESS>
Major version = 130
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
performance.memory = {
  "totalJSHeapSize": 87825571,
  "usedJSHeapSize": 83547803,
  "jsHeapSizeLimit":<PHONE_NUMBER>
}
Username = aiwebtools
Chat ID = 8dd2dae77f6c

Additional context
No response

Can you give more context?


Cant stack minecarts in one spot anymore

i assume the changes to speed up minecarts may have caused this?

And could you do this in LE?

I believe you could, as it was a method to launch yourself through the world border with the sheer force of the tnt minecarts at one point. But I’ll try on my Xbox one copy to see if it was changed

Yes, though you can’t hold it down and have to click to stack each one.


scipy.stats.spearmanr mishandles nan variables with "propogate"

scipy.stats.speramnr tries to see which variables have a nan value and nan-out their results in the output matrix. This is seen in line 4215
variable_has_nan = np.isnan(a).sum(axis=axisout)
Unfortunately right now it accidentally applies a SUM where it should be applying ANY. As a result, the indexing vector isn't boolean as expected, but instead an integer based off of the number of nan entries.
So let's say variable 2 has 3 nan entries, the result will be that variable 3 gets replaced with a nan, and not 2.
Proposed fix:
variable_has_nan = np.isnan(a).sum(axis=axisout) -> variable_has_nan = np.isnan(a).any(axis=axisout)

Small working example:
import numpy as np
from scipy.stats import spearmanr

np.random.seed(1234321)
x2n = np.random.randn(3, 10)
x2n[1, 0] = np.nan
corr, pvalue = spearmanr(x2n, axis=1, nan_policy="propagate")
print(corr)

prints
[[nan nan nan]
 [nan nan nan]
 [nan nan  1.]]

With the proposed fix:
[[1.                nan 0.16363636]
 [       nan        nan        nan]
 [0.16363636        nan 1.        ]]

Thanks @urimerhav . I'll fix it.


[PPP-4832] Upgrade commons-dbcp to commons-dbcp2 and commons-pool to …

…commons-pool2

:x: Build failed in 2m 34s
Build command:
mvn clean verify -B -e -Daudit -amd

:exclamation: No tests found!
Errors:
Filtered log (click to expand)

script returned exit code 1

:information_source:  This is an automatic message

:white_check_mark: Build finished in 1h 9m 12s
Build command:
mvn clean verify -B -e -Daudit -amd

:ok_hand: All tests passed!
Tests run: 5336, Failures: 0, Skipped: 14    Test Results

:information_source:  This is an automatic message


Setting serverLanguageDetection: false and changing language on server does not include the new language in initialI18nStore

Describe the bug
If a user sets serverLanguageDetection to false and changes the language using i18n.changeLanguage('de'), the new language is not included in initialI18nStore.
Occurs in next-i18next version
7.0.1
Steps to reproduce
This repository reproduces the issue: https://github.com/davidwgrossman/next-i18next/tree/minimalReproducibleExample

Clone the repo and run yarn && yarn run-example
Go to view-source:http://localhost:3000/ in Chrome and check that initialI18nStore does not have the de language present. The client then must fetch the same language if the client is using the same pattern to opt out of language detection.

Note: Why does the page render in English, the i18n.language === 'de' check on render?
Expected behaviour
When changing the language on server, the initialI18nStore should include the language in which the page is rendered when opting out of serverLanguageDetection.
Screenshots
The page is rendered in German, however initialI18nStore does in include German.

Additional context
In next-i18next-middleware.ts:
  if (!config.serverLanguageDetection) {
    middleware.push((req: NextI18NextRequest, _res: Response, next: NextFunction) => {
      if (isI18nRoute(req)) {
        req.lng = config.defaultLanguage
      }
      next()
    })
  }

This language is then used to populate initialI18nStore in Steps 1 through 3.
One approach I have tried to support this flow is to add an i18nOverrideLanguage to getInitialProps. This approach also provides a better interface for opting out of i18next's language detection strategies. If this is an approach that you would consider, I would be happy to put up a PR :). Here's the change.

What's your reasoning for setting serverLanguageDetection: false?

I was able to find a way around setting serverLanguageDetection: false so I didn't have an issue in the end. I didn't want to use express middleware to handle language detection, however I ended up using customDetectors in the end. Possibly some documentation on how to set up a custom detector could be useful. Would you consider a PR with an example custom detector?
It does seem to be that there are some rough edges with serverLanguageDetection: false. Is that the case?

I would note that I could not follow the example from the i18next documentation here.
They suggest creating an Object with this format:
{
  type: 'languageDetector',
  async: true, // If this is set to true, your detect function receives a callback function that you should call with your language, useful to retrieve your language stored in AsyncStorage for example
  init: function(services, detectorOptions, i18nextOptions) {
    /* use services and options */
  },
  detect: function(callback) { // You'll receive a callback if you passed async true
    /* return detected language */
    // callback('de'); if you used the async flag
    return 'de';
  },
  cacheUserLanguage: function(lng) {
    /* cache language */
  }
}

Instead, I needed to use the following language detector:
const detector = {
  name: 'always-serve-german',
  lookup: (req, res, options) => {
    // You can add anything here (import custom files, etc.)
    return 'de';
  },
  // This method is optional
  cacheUserLanguage: (lng, options) => {
    // options -> are passed in options
    // lng -> current language, will be called after init and on changeLanguage

    // store it
  }
};

and configure it like in this example:
https://github.com/davidwgrossman/next-i18next/blob/master/examples/simple/i18n.js#L6-L31

It does seem to be that there are some rough edges with serverLanguageDetection: false. Is that the case?

Yes, of course. We use server side detection to both do initial language detection based on headers, and also do synchronisation for subsequent requests based on a cookie value.
I don't understand – if you always want to serve German, why do you need localisation in the first place?
I am going to mark this as closed because it seems like you can achieve what you need just via i18next configuration options, but let me know if you feel there is something more to be done here.


Webroot fixes

After running into some issues when setting up the server through a reverse proxy, I noticed some inconsistencies with the webroot setting not being used for the webapp. This PR should fix those issues.

Pulled these into https://github.com/samcm/synclounge/pull/133


AMD_MEDIA - PR#775 Update: this fixes the encoder issue encoding green frames.

Merged the API related changes from pr775, fixed bugs associated, fixed issue with encoder outputting green frames

@kiritigowda : this has changes from pr775 as well. So that can be ignored.
@paveltc : I fixed the segmentation fault associated with PR775 and also fixed the encoder not producing correct output issue.

@rrawther thanks for taking this up. Sorry that I wasn't able to submit a complete PR.

@paveltc can you test this and let me know if this is good to merge. Wanted to include this in the 5.0.2 release today. @rrawther

@rrawther @kiritigowda Tested the PR and it works to encode H.264 files.


Gemeni Models integration

Why

We need to expand our LLM client support to include Google's Generative AI alongside our existing Anthropic client

What Changed

Added a new GoogleClient class in the LLM clients directory
Implemented New model client and provider  for the Gemeni models.  "gemini-1.5-pro", "gemini-1.5-flash" and "gemini-1.5-flash-8b"
##. Note
gemini-1.5-pro might throw 429 resource exhausted error on free plan because they have rate limit of only 32k tokens. Check more about it here. https://ai.google.dev/gemini-api/docs/models/gemini#gemini-1.5-pro
it adds Google generative ai package. https://github.com/google-gemini/generative-ai-js

Thanks so much for taking the time to do this! Curious if you ran any evals already on the different models and how they performed? Transparently, we're trying to limit our scope of LLMs for now to figure out how we want to better incorporate extensibility, so there's a good chance we might refactor a lot of this code. That being said, don't want your contributions and time spent to go to waste, so just want to make sure this has meaningful value-add over OpenAI/Anthropic

Gemini has an OpenAI-compatible API endpoint, as well as their own client SDK which is implemented here. I prefer using their own SDK, just flagging in case it becomes unstable (Google has the genai Python SDK in beta alongside the generativeai SDK...).

Thanks @vladionescu! We'll keep this in mind. We're investing heavily into eval + debugging tools rn, so once we have a good baseline, we're likely to use a more standardized model router. I'm hesitant to add more models just yet until we have a better sense of failure modes -- ie did code fail due to Stagehand or a model


interop failure: node:ruby_server:ping_pong

https://grpc-testing.appspot.com/job/gRPC_interop_master/lastCompletedBuild/testReport/junit/(root)/tests/cloud_to_cloud_node_ruby_server_ping_pong/

Are you sure this is a failure? The log says "OK: ping_pong"

This is a real failure, but link points to "lastCompletedBuild" so the destination is changing.

I haven't seen this for a while.


Update podDisruptionBudget default values

By default, you can only have one or the other. If both are set then we get the following error:
EXIT STATUS
  1

COMBINED OUTPUT:
  Error: UPGRADE FAILED: release opentelemetry-collector failed, and has been rolled back due to atomic being set: failed to create resource: PodDisruptionBudget.policy "opentelemetry-collector" is invalid: spec: Invalid value: policy.PodDisruptionBudgetSpec{MinAvailable:(*intstr.IntOrString)(0xc045b8be40), Selector:(*v1.LabelSelector)(0xc045b8be60), MaxUnavailable:(*intstr.IntOrString)(0xc045b8be20)}: minAvailable and maxUnavailable cannot be both set

Please test it locally

Hey @Mahpara93, tests are failing.

Hi @dmitryax, I had a pretty busy week last week. I am going to take a look today.


Correct display of the "Payment Percentage of Performance Milestone Amount"

Describe the task
On the Emissions Intensity Report page, the "Payment Percentage of Performance Milestone Amount" field should display a percentage between 0% and 100%. (The proponent can never be paid more than 100% of the payment even if they exceed 100% GHG performance. They also can never owe money if their percentage is less than 0%.)

Acceptance Criteria

[ ] If the calculated value goes over 100%, display 100%. If the calculated value goes negative, display 0%. (rework cif.form_change_payment_percentage computed column` to cap amounts)

Additional context

Add any other context about the task here.
Or here

This looks like a duplicate of https://github.com/bcgov/cas-cif/issues/1478. @LindsayMacfarlane, it looks like you thought the same thing and then removed the duplicate label--what's different about this one?

Thanks for confirming, @BCerki (cc: @pbastia) - I believe it's the exact same thing as #1478. Feel free to close it!

Close as confirmed duplication with Brianna.


deployment.nix: init morph

This allows deploying changes to the bornhack screens in a less manual fashion.
This builds the same store path, except for the healthcheck-commands.txt injected by morph.

Rebased on top of @nikstur's changes.


Add uncompressed rle condition in Binarymask

Mask annotation dict can have 2 states

compressed RLE that was handled by code.

uncompressed RLE, like coco annotation
{'counts': [6, 1, 40, 4, 5, 4, 5, 4, 21], 'size': [9, 10]}
this state was not included by code condition.

Hi @lsrock1,
Awesome! thanks for the update.
BTW, I missed uncompressed RLEs so far, did you create them manually?


Add new method to request Pin/Biometric authentication from bridge

Due this spec, we need to provide the following bridge method:
Trigger Pin/Biometric Authentication
This method allows triggering Pin/Biometric authentication if necessary, taking into account 3 possible scenarios:

User has Pin/Biometric already configured in the app

Last previous authentication (or last pin/biometric setup) is still valid.

Nothing will be presented to user and bridge method will success.

Last previous authentication (or last pin/biometric setup) is not valid.

Authentication will be required, blocking the user until it is performed.

In any other case:

User will be taken to the Pin/Biometric screen to enable any authentication method.

In case user leaves the configuration screen without providing an authentication method, bridge method will fail with 401 code.

Js method
triggerPinOrBiometricAuthentication: ({
    maxSecondsSinceLastValidation: number;
}) => Promise<{
    result: 'USER_AUTHENTICATED' | 'USER_ENABLED_AUTHENTICATION' | 'LAST_AUTHENTICATION_STILL_VALID';
}>

Message type
TRIGGER_PIN_OR_BIOMETRIC_AUTHENTICATION
Request Payload

maxSecondsSinceLastValidation: number

If time elapsed since last authentication is less than the number of seconds specified here, authentication will succeed without requesting it again

Success Response Payload
result: 'USER_AUTHENTICATED' | 'USER_ENABLED_AUTHENTICATION' | 'LAST_AUTHENTICATION_STILL_VALID'
Error response codes
401 → Unauthorized

@dpastor, should we have a default value for maxSecondsSinceLastValidation?

No, Vivo will just always set time they want.

Small question @dpastor: what is the minimum required App version that supports this method?


vue2.7  v-model:value  is not supported?

v-model:value is cool and practical
2.7 will v-model:value be supported in the future?

No. Vue 3's v-model:arg is a basically the cleaned-up version of Vue 2's v-bind:arg.sync, so that is what you would use in a Vue 2 app.


Cordova Support

Is there a way to use this library with Cordova, perhaps as part of a React (not React native) application?

I have little experience with Cordova so I sadly don't know if it will work.


Store selected profile in workspace scope setting file

Describe the bug
When I have multiple VSCs running, if I switch the profile in one of them, those in the others would change too.
To Reproduce
Like above
Expected behaviour
Every project should display selected profile separatedly.
Desktop (please complete the following information):

OS: Windows 10

Additional context
I think the selected profile could be placed in workspace setting file(.vscode/setting.json), so that every project can show profiles differently. And the user scope setting stores all the profiles. In this case the selected field is no longer needed.

Should be fixed in v1.2.0 as it supports multi-root workspace and displays the currently selected workspace folder along with the profile.


[Social Media] CN4J meeting call-  push awareness

@rstjames,
Thank you in advance!!!
Can you please once again help us push the next CN4J call?
1 push, only.
Tuesday June 29th, 9:30- 10:30AM PDT
(using same design as May tweet) https://twitter.com/MicroProfileIO/status/1389240833623437315?s=20
description
#OpenSource: Join & contribute to the 5th public & recorded @JakartaEE and @MicroProfileIO steering committee discussion that aims at explaining via a written message the powerful collaboration the two Working Groups enjoy
Access https://bit.ly/calendar-zoom-minutes…
#ByCommunityForCommunity

done


CWA uses wrong validity periods for tests (48h instead of 24h for RATs & 72h instead of 48h for PCRs)

Avoid duplicates

[X] Bug is not mentioned in the FAQ
[X] Bug affects both Android and iOS, for specific issues / questions that apply only to one operating system, please raise them in the respective repositories:

Android repository
iOS repository

[X] Bug is not already reported in another issue

Technical details

Device name: Not important
iOS/Android version: Not important
App version: 2.16.2

Describe the bug
The Corona-Warn-App uses wrong validity periods for tests at the moment.
The app shows RATs as valid for 48h instead of 24h and PCR for 72h instead of 48h.
Steps to reproduce the issue

Add a PCR test certificate & RAT to the CWA
See when the RAT shows as invalid on the "Status" screen
See when the PCR test is no longer used for the 2G+ status on the "Certificates" screen

Expected behaviour
CWA should use the correct values
Possible Fix
Adjust the logic.
Source
https://www.zusammengegencorona.de/informieren/alltag-und-reisen/aktuelle-regelungen/ states:

Die sogenannte 3G-Regel steht für „geimpft, genesen oder getestet“. Wer nicht vollständig geimpft ist oder nicht als genesen gilt (mehr dazu hier) muss in bestimmen Fällen entweder einen negativen Schnelltest (maximal 24 Stunden alt) oder einen negativen PCR-Test (maximal 48 Stunden alt) vorlegen.

Internal Tracking ID: EXPOSUREAPP-10853

@Ein-Tim this validity periods are correct for entering Germany form another country, and the business rules reflect this currently. Do we have a wishlist item, to distinguish entry rules and "internal national" rules? If not, would you open an issue in the wishlist repo?

@Ein-Tim Or I transfer this to wishlist and you re-write this as a new user story?

@dsarkar
PCR tests for entry are only allowed to be 48h, see https://www.auswaertiges-amt.de/de/quarantaene-einreise/2371468#content_2.
So this should definetely be adjusted, do you agree with me?
Regarding RAT: I think it makes no sense to use the rules for entering Germany for the Corona-Warn-App, as you only get a QR code to register the test in the Corona-Warn-App inside of Germany.
So, in conclusion: This is a bug and not an enhancement request.

@Ein-Tim Reg. PCR, agreed, business rules should be adopted. Reg. RAT: However we call it, there is a difference in the rules when entering a country and when accessing venues within a country. The business rules reflect "travel validity" to enter a country, and these rules are applied by verifier apps, like the CovPassCheck-App. There are no "business rules" defined for use within a country, but only entering. A possible approach to solve this, could be changing what is displayed in the CWA.

@dsarkar

Reg. PCR, agreed, business rules should be adopted

Okay, have you mirrored this to JIRA so that it can be adopted soon? This would be nice, thanks!

Reg. RAT: However we call it, there is a difference in the rules when entering a country and when accessing venues within a country. The business rules reflect "travel validity" to enter a country, and these rules are applied by verifier apps, like the CovPassCheck-App. There are no "business rules" defined for use within a country, but only entering. A possible approach to solve this, could be changing what is displayed in the CWA.

Yeah, you're right. I will think of this and open a new issue when I found solution.

Just to add that to enter Portugal the RAT validity is 48 hours. I'm not sure what other countries require, so I'd prefer text, rather than the test result disappearing.

Relaxed issue #855 opened.

@alanrick
The change would only be that test DCCs are not used as standard after 24h anymore and indeed we have to think about how the tile on the "Status" tab should be handled.

I have to agree with @Ein-Tim a little bit. The analogous statement of 'Your test result (quick test) is no longer displayed because it is older than 48 hours' is irritating. And if the CWA is actually a national app and quick tests are only valid for 24 hours in Germany... the question is whether at least textual reference to different national / international validity should be added.
If I have understood the above statements correctly, the corresponding text in the following example and context could possibly read:

Quick test
Test is no longer up-to-date
Your rapid test is older than 24 hours national / 48 hours international and is no longer displayed here.

In other texts and contexts, "24 hours national / 48 hours international" could possibly help further.

@mlenkeit Is there any update available here? Will this be fixed soon? Is the RKI fine with it's own apps not applying the rules it makes? I can't imagine this.

On the business rules we have no influence
For the G Status the longer validity was chosen because in some states are accepting the longer validity-

@thomasaugsten You mean some federal states?

@thomasaugsten Mh, okay, that's strange because all sites from the federal government spoke about 24h as validity time. Has this issue been brought to RKIs attention and they agreed to it?

I have just checked the linked Jira issue.
Jira Ticket is flagged as:
Resolution: Wont Fix
Status: Obsolete
Developer comment:

Closing the issue as its not related to the App

Unfortunately, no additional information was added to this Jira ticket.

I am still not fine with the closing of this issue. Please reopen it @svengabr & @dsarkar.

@Ein-Tim Issue reopened

Thanks @sapcoder123!

This issue seems obsolete and has become stale.


FC1 Add FC2 logo image on homepage

To add in under the text that suggests users go and check out FC2. This will make the link more prominent and improve transition of people over to the new site.
Requires #514

See #508 for draft layout.

Added my version of this to live.
Separate issue, but I noticed on FreeREG, FreeUKGen and FreeBMD where we advertise each of our other websites, none of them are linking to FC2 - all point to FC1.  Should we not be pointing users to the newer site?

Once we flip www.freecen.org.uk to FR2, all links will go to the correct site.  Except those pointing at freecen2.freecen.org.uk, which will need changing.


Atom ⌘-R fails if there's another Flutter app running in background on the Android device

It complains that the Observatory port is in use and shows a black screen (because Atom launches the app with --start-paused)

Hmm, right now sky shell on android starts the observatory listening to a fixed port - 8181. We change which host port we map this to in order to support the user running multiple apps at the same time, but just one app per device. Should we or do we need to support running multiple apps per device? It would require a bit more additional plumbing and complexity.

I think it's reasonable to expect that developers will want to run multiple apps per device. I certainly do.

I'll take this one.

The tricky part here will be communicating the port number back to the clients that need to know it.

We could pick a random one and retry on failure.

@turnidge just hit this as well.

Is this a dupe of https://github.com/flutter/flutter/issues/2188 ?

Yes, or rather #2188 is a dupe of this

:heart: Thank you @johnmccutchan!

:+1:


ProtoStuff serialize data is null may cause jvm crash,and cannot be caught

protostuff:
1.7.2
jdk:
JRE version: OpenJDK Runtime Environment (8.0_322-b06) (build 1.8.0_322-b06)
system:
macos 12.1
idea:
IntelliJ  IDEA 2021.3.3 (Community Edition)
code:
import io.protostuff.LinkedBuffer;
import io.protostuff.ProtostuffIOUtil;
import io.protostuff.Schema;
import io.protostuff.runtime.RuntimeSchema;

public class JVMCrashTest {
    class Bean {
        private String a;
    }

    public final static Schema<Bean> CHATINFO_SCHEMA = RuntimeSchema.createFrom(Bean.class);

    public static void main(String[] args) {
        Bean b = getBean();
        ProtostuffIOUtil.toByteArray(b, CHATINFO_SCHEMA, LinkedBuffer.allocate());
    }
    //returns null for some reason
    public static Bean getBean() {
        return null;
    }
}

crash log:
hs_err_pid10550.log
my analysis:
caused by null
my hope:
if the data type is null,make it caught by try-catch(Throwable e){}.
jvm crash is not recommended. it may be under attack at any time, and cause great financial losses
thanks for ur attention...

protostuff: 1.7.4 also have this problem


🚨DO NOT MERGE UNTIL 2/15 🚨 Migrate namesv2 in counterexamples

Note that this makes a schema change. It remove "local" as valid constant value for "language" tags. It was a mistake in namesv2 to have left this in.
We no longer need a "local" language as the name fields are primary (no language), common (map of valid BCP47 languages to values), and rules (where language is optional when it is unknown)

Merged!


bug: Type 'string' is not assignable to type 'WriteContractMode'

Is there an existing issue for this?

[X] I have searched the existing issues

Package Version
1.2.2
Current Behavior
TypeScript throws Type 'string' is not assignable to type 'WriteContractMode' exception.
Expected Behavior
It supports string
Steps To Reproduce
const hook = useContractWrite({
    // ...
    mode: 'recklesslyUnprepared',
  });

Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response

I had this issue.
But this happens when there is a desynchronization of the frontend application with authorization from WAGMI.

You don’t need to pass mode anymore.

@jxom Here it is from the migration document

If you are not ready to upgrade to usePrepareContractWrite, it is possible to use useContractWrite without preparing the configuration first by passing mode: 'recklesslyUnprepared'.

const { data } = useContractWrite({
+ mode: 'recklesslyUnprepared',
  addressOrName: '0x...',
  contractInterface: wagmiAbi,
  functionName: 'mint',
  args: [tokenId],
})

The migration guide has a - not a +.

@jxom Sorry, I was reading the 0.6.x Breaking changes!  You're right, we can remove mode

🤝


Failures new nnbd VM builders on mac host

There are new test failures on [infra] Add additional nnbd VM builders
vm/dart/thread_priority_macos_test

Another failure standalone/io/shared_socket_test/0

Another failure co19/LibTest/io/Link/watch_A01_t01

vm/dart/thread_priority_macos_test is currently passing.
standalone/io/shared_socket_test/0 is flaky both on NNBD and non-NNBD bots.
co19/LibTest/io/Link/watch_A01_t01 is currently failing both on NNBD and non-NNBD bots.