🐛 [firebase_auth] register invalid action code in mobile browser

Bug report
Describe the bug
The register process doesn't work in mobile browsers. I tried different android browsers including Chrome, and iOS Chrome.
The same code works on linux desktop browser and Android app. I printed and checked the opened link and the action code, it looks pretty much the same.
Steps to reproduce
Steps to reproduce the behavior:

I've created a user by FirebaseAuth.instance.createUserWithEmailAndPassword
I've sent the action code by .sendEmailVerification(...)
I've clicked on the link in the email
I tried to apply the action code by

try {
  await FirebaseAuth.instance.checkActionCode(actionCode);
  await FirebaseAuth.instance.applyActionCode(actionCode);
  await FirebaseAuth.instance.currentUser?.reload();
} on FirebaseAuthException catch (e, st) {
  ...
}

In mobile browsers I've got [firebase_auth/invalid-action-code] The action code is invalid. This can happen if the code is malformed, expired, or has already been used.

Expected behavior
Accept the code as it does in linux desktop browser and android browser.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.
https://github.com/vendelin8/firebase_auth_demo
Hosted for web at
https://firebase-auth-demo.ga/

Additional context
I copied the code from the app I'm developing. Somehow I made a mistake: originally in the mobile web browser opening a dynamic link worked until applying action code failed. In this demo project it even shows an error about failed to resolve uri domain prefix. Not sure if it's something because of the code, or some configuration in the firebase project.

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 2.10.0-0.1.pre, on Arch Linux 5.16.2-arch1-1, locale hu_HU.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 2.16.0-134.1.beta
Flutter SDK 2.10.0-0.1.pre
firebase_auth_demo 1.0.0+1

dependencies:
- cupertino_icons 1.0.4
- firebase_auth 3.3.5 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.11.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine]
- uni_links 0.5.1 [flutter uni_links_platform_interface uni_links_web]

dev dependencies:
- flutter_lints 1.0.4 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- async 2.8.2 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.0
- charcode 1.3.1
- clock 1.1.0
- collection 1.15.0
- fake_async 1.2.0 [clock collection]
- firebase_auth_platform_interface 6.1.10 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.6 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.2.3 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.5.3 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- intl 0.17.0 [clock path]
- js 0.6.3
- lints 1.0.1
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.3
- meta 1.7.0
- path 1.8.0
- plugin_platform_interface 2.1.2 [meta]
- sky_engine 0.0.99
- source_span 1.8.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.4.8 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0 [collection]
- uni_links_platform_interface 1.0.0 [flutter plugin_platform_interface]
- uni_links_web 0.1.0 [flutter flutter_web_plugins uni_links_platform_interface]
- vector_math 2.1.1

I think that my other error originally in the mobile web browser opening a dynamic link worked until applying action code failed. In this demo project it even shows an error about failed to resolve uri domain prefix has simila reason as https://github.com/FirebaseExtended/flutterfire/issues/7074
I experienced that dynamicLinkDomain and handleCodeInApp of ActionCodeSettings get stuck with values called previously.

@vendelin8
Can you check the documentation around sending email verification and then handling it with ActionCodeSettings and see if you have properly implemented it ? https://firebase.flutter.dev/docs/auth/usage#verifying-a-users-email

@darshankawar I've read it and found no distinction if it's an app, or web. The weirdest thing is that it's working in the Android app and in desktop browser, but not in a mobile browser.

@vendelin8
If we go by the error you are getting [firebase_auth/invalid-action-code] The action code is invalid. This can happen if the code is malformed, expired, or has already been used., maybe if the user is already registered ? Can you try to delete the user and register a new one and see if it works ?
If not, can you try the official plugin example and see if you still get same behavior ?

Believe me, I did the very same process for:

Android app
Desktop browser
Android browser
iOS browser
And it was working for the first 2, and not working for the other 2.
I checked the plugin example, but it doesn't even have anything about sending a sign up verification email. My demo has. Please check out.

I think that the only thing that's different from the suggested ones is that I use uni_links package instead of firebase_dynamic_links package, because I want to use dynamic links other than the built in firebase ones. But that shouldn't be a problem, as I get the dynamic link, I can get the oobcode out of it, but it doesn't work.

@vendelin8
Thanks for the update. Can you try couple of things ? Can you confirm if authStateChanges is triggered when running on mobile browser ? Can you also try by refreshing the browser ?

@darshankawar I upgraded all dependencies to latest possible, and it works in Android browser. I was also able to fix the failed to resolve uri domain prefix error by removing a slash from the end of the dynamic url email template link. I couldn't test it on iOS yet, will give a try soon.

And I've split the actionCodeSettings based on platform, so I send only the necessary ones. Not sure which made it work though.

@vendelin8
Good to know you were able to resolve the issue. Closing based on above comment.


composer.json integration for fetch-vendors

could you create scripts that could be put to projects composer.json to fetch vendor scripts:
app/console avanzu:admin:fetch-vendor

for example typical symfony application has:
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },

so, i think you need to create similar php code that could be appended to post-update-cmd and post-install-cmd sections!

@glensc Just add the following in composer.json :
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Avanzu\\AdminThemeBundle\\Composer\\ScriptHandler::fetchThemeVendors",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],

@numerogeek when i created this ticket there was no ScriptHandler class in AdminThemeBundle
script handler was added in 8d7e7e3356dcd6ee9aadf204592e991af1f36d21 via #31 on Feb 25, 2015
while this ticket was created on Aug 11, 2014
@avanzu should review tickets more often, for example #25 is still not solved, nor #27

@glensc @numerogeek as far the issue #29 could be rebased and update, probably it could be merged

I add in the readme a comment about add autofetching after install/update in a composer symfony project. This the code for ScriptHandler is updated and the PR is outdated and after review the code is not needed anymore. I gonna close it. But reopen if you consider needed. Thanks for your contribution!


[Feature] Sequence.first

I really like the fluent sequence api that wren has.
But I feel like a method to extract a single item from a sequence is missing.
Possible implementation
var lst = [6, 7, 8, 9]
lst.first // 6
lst.skip(1).first // 7
lst.first {|n| n > 7 } // 8
lst.first {|n| n > 10 } // null
lst.skip(4).first // null

  first {
    for (element in this) {
      return element
    }
    return null
  }

  first(f) {
    for (element in this) {
      if (f.call(element)) {
        return element
      }
    }
    return null
  }

Do people think this would be a good addition?

I've often thought about it, the interesting question is the lack of symmetry with last, wouldn't it feel weird without?

Yeah. While it's much less common, last would be nice too.
The implementation is a bit more tricky though. For a sequence that can be indexed like List, you would want to prefer that to get the value more efficiently.

I would say no to that addition. We already have sequenceable[index] and
sequenceable.where(unaryPredicate)[index] with index 0 and -1 to achieve
the same results.
Also if first was added, what about second, third...
Also that naming implies ordering which is not implied by the proposed
implementation (which would produce "invalid" results for maps).

Ah okay, the sequence[index] meets what I want, just to get a single item from a sequence. Is it just not added yet then? I'm not sure exactly what I'm looking for, but I couldnt see any PRs.
I just tested in wren_cli its not in 0.4.0.

Sequences aren't in general indexable (for example Range isn't) so you have to convert to a list first:
var lst = [6, 7, 8, 9]
var first = lst.where { |e| e > 6 }.toList[0]
System.print(first) // 7

The trouble with this is that it's not very efficient. You have to iterate through the entire sequence to find out which elements satisfy the predicate, add those to a new list and then extract the first one.
Fot this reason, I would be in favor of your proposal as you only need to iterate the sequence until you find an element which satisfies the predicate and then return that directly.

Out of curiosity, what is your use case?
The real general case would be to use
sequence.iteratorValue(sequence.iterate(null)). But unless I'm mistaken,
there is no guarantee that it will output a predicable output (in
particular since maps can/is unordered). So it defeat the point in the name
choice.

Also if first was added, what about second, third...
Also that naming implies ordering which is not implied by the proposed
implementation (which would produce "invalid" results for maps).

Although you have a point about 'first' implying ordering, in my experience languages which have similar fluent APIs to Wren (C#, Kotlin etc.) do still use the word 'first' in the sense that it returns the first element in the iteration which satisfies the predicate. How useful this is will depend on the nature of the sequence though I agree that it may be useless for maps whose iteration order is undefined unless you simply want to extract some random key/value pair which satisfies the predicate.
Also those languages do generally have a 'last' method as well though I can't think of one which has second, third etc. Although you'd need to iterate through the whole sequence to find the last element it would still be more efficient than 'where' because you wouldn't need to do .toList[-1] to extract it.
Possible implementations for Wren:
  last {
    var final = null
    for (element in this) {
       final = element
    }
    return final
  }

  last(a, f) {
    var final = null
    for (element in this) {
      if (f.call(element)) {
        final = element
      }
    }
    return final
  }

In C++, it's called front/back instead of first/last.

@PureFox48 These implementations are O(N). O(1) can be achieved in most case with a reverse().first(), since most reverse() could be implemented lazily. It would also help to guarantee that we don't enter an infinite loop for non terminated Sequences.

first(unaryPredicate) really sounds like find(unaryPredicate) returning a value instead of an iterator. So maybe it should be something like findValue(unaryPredicate) instead?

I'd avoided suggesting find remembering that you have a PR (#898) open for Sequence.find to return an iterator.
But we could perhaps use findFirst and findLast to return the first and last values.

first(predicate) is useless, it's just where(predicate).first

You could implement it like that but it would produce an intermediate WhereSequence which @Deijin27's suggested implementation does not do.
On the other hand it would add less code to core and front/back would be fine.

I don't mind what it's called, it's the functionality that matters.
A second or third wouldn't be necessary, as you can combine it with skip(1) skip(2) for this rare case.
I've had a think about my use case, and general use cases in any language
First I'll give some common ones
// if a matching item is found, handle it, otherwise return
// handling it in the loop often leads to pyramid code, so it's common to have
// the 'failures' return, and the 'successful' path be the last thing in the method
// if you need a loop, even the where feels unnecessary when it could be replaced with an if
// the example further down is probably a better case to convey why you might
// only want or expect a single matching item
// but it's also reasonable that one might want any singlular Frog
var foundFrog = null
for (frog in amphibians.where {|amphibian| amphibian is Frog }) {
  foundFrog = frog
  break
}
if (foundFrog == null) return
handleFrog(firstFrog)

var firstFrog = amphibians.first {|amphibian| amphibian is Frog }
if (foundFrog == null) return
handleFrog(firstFrog)

// you have a list which could be empty, you want
// a single item, in this example to be a default "selected" item
// the indexer throws an exception if the list is empty,
// so you have less simple code
var selectedAmphibian = null
if (amphibians.count > 0) {
   selectedAmphibian = amphibians[0]
}

var selectedAmphibian = amphibians.first

// find an item, where a property is generally unique to an item
// but it's a property on that item, rather than being enforced via
// a map. Or maybe it's multiple items that are unique as a whole.
// Consider an collection with firstName and surname
var people = [
  Person.new("Kermit", "TheFrog"),
  Person.new("Froggy", "McFrogFace")
]
var kermitTheFrog = null
for (person in people.where {|x| x.firstName == "Kermit" && x.surname == "TheFrog"}) {
  kermitTheFrog = person
  break
}
var kermitTheFrog = people.first {|x| x.firstName == "Kermit" && x.surname == "TheFrog" }

A specific case I have in wren is my xml library.
In the actual implementation of various methods, I use the approach of returning the first value in a loop.
    #doc = "The first and only node in this document that is an XElement. null if there is no XElement in the document."
    root {
        for (node in nodes) {
            if (node is XElement) {
                return node
            }
        }
        return null
    }

And from a user's point of view, an xml element has child nodes that are elements or comments, and thus the elements property is always a WhereSequence to filter out the comments. When processing you often have similar cases to the kermit example, since xml is commonly used for serialization of such data.
// example from readme. Finding a the color of a specific fish in the xml document
var colorOfFishCalledPearl = doc
    .root
    .elements("danio")
    .where {|e| e.attribute("name").value == "pearl" }
    .toList[0]
    .attribute("color")
    .value

I am considering adding various methods that take a function argument, but that wouldn't be necessary wren had the first method; that combined with the already existing where and map would be perfect, and my library would nicely slot into wren's infrastructure.

The real question is why do you need to handle only the first entry. I mean when you are dealing with a list of item, either:

one treat the full list in place.
one extract an entry, to treat exhaust the list.
one choose an entry from it, so the first one become some default.
And because peeking the first entry is not stable, since it depends of what the container implementation is, it is not a predictable source, unless it is indexed by any form of unique key.

Well, a Sequence, by definition, has an order: the order in which you can iterate over the elements. So the "first" is well defined: it's the first element in the sequence.

It has an intrinsic order which is necessary for traversal, not a stable order in the sense that inserting objects in some order guarantee the traversal order in every Sequence species.

I think the examples I gave show how its useful, and they are examples with ordered sequences. Lists or filtered lists. I dont think I've ever used it on the equivalent of a Map in other programming languages, its just there by coincidence.
Skip is comparable to this. Since the Map's enumeration order is not consistent, skip is not useful for it.

It is true, the API is somehow broken/inconsistent in some aspects. It doesn't take into account some Sequences behaviors like infinite size, ordering and probably some others I don't think of right now.

When most programmers see the word peek they probably think about obtaining the first element of some list structure (typically a stack or queue) without removing it. So I think it would be a good word to use here rather than first or  front to avoid any ordering connotation.
I see no reason to use peekValue (what else can we be peeking?)  or peekValueOr - we can just use peek || default for that.
If we also adopt @jube's idea of using where to do any filtering, there's no need to have a separate overload which takes a predicate. So peek is only going to add a few lines to core and would be a worthwhile addition IMO.
Another advantage of peek is that we needn't bother with adding last/back to maintain symmetry. These can only be implemented efficiently in Wren if we have a reverse iterator which would have to be done on the C side to cover non-indexed sequences properly. I doubt whether it's worth the effort as, in practice, most sequences are indexed and people would just use for (i in seq.count-1..0) or simply reverse them with seq[-1..0] and iterate through that.  The last element itself would, of course, be seq[-1].

I proposed peekValue because I thought it could returns an iterator. But I agree peek make sense.
About peekOr I insist on it. We need to be able to distinguish between a peek that failed and potential valid falsy value that could have been returned by the Sequence. It should probably be discussed in another issue, but I really think we need undefined and operator ?: or alike, to mimic null optional. It would simplify a bunch of problem like these.

Well the only way that peek can fail is if the sequence is empty in which case it will return null.
We could check explicitly for that with peek == null || default but I'll grant you that the first element could exist and have a null value and so this isn't a perfect solution.
There are doubtless other methods in core where returning null is ambiguous but, if we start having Or methods for all of them, that may add considerable bloat.
As you suggest, a better solution would be to return an undefined value which can be checked for to resolve any ambiguity - I believe there already is one which is used internally but is not exposed publicly so we could perhaps use that. But that's obviously quite a far reaching change so I think it would be best to open a new issue for that with your preliminary thoughts.

Incidentally, a simple way to deal with undefined values would be to have a convention whereby you returned some obscure control code which would never be used in practice these days to denote a failure. A possible candidate would be NAK ('Negative Acknowledgement') which is "\x15" and, if one goes way back, was actually known as ERR at one time.

A more OO solution which has just occurred to me would be to add a small singleton class to core:
class Undefined {
    // Returns the singleton. If it hasn't been created, creates it first.
    static value { __instance == null ? __instance = Undefined.new_() : __instance }

    // Private constructor.
    construct new_() {}
}

You could then return Undefined.value instead of null to signify an error and test for it with returnValue is Undefined. So instead of peekOr we could do (peek is Undefined) ? default : peek.

undefined exist in the VM. It is not exposed to the public, and serve as a tombstone value for the map implementation. It is only a matter of political decision to expose it.

Well, if there's no good reason why it can't be exposed, then I think that would be the best solution.
undefined would need to become a keyword and so the change would not be backwards compatible but I think that would be a price worth paying.
Technically and analogous to null, undefined would be the only instance of an Undefined class in core and (along with null and false) would be regarded as 'falsey'.

I see what you're getting at with there needing to be a way to distinguish between a not found and a found null value.
I just wanted to say if you were doing the singleton value approach, you just use the class itself.
class Undefined {}

peek {
  for (value in this) {
    return value
  }
  return Undefined
}

Yes, we have a discriminatory equality but to be useful as a null optional it should have a dedicated operator.
The question of exposing it was already discussed with @munificent, who didn't wanted to expose another null. It is a complex topic since handling null values is a hot potato. There are many reasons to have them or not mostly based on error handling decisions, like throwing or monad... Monad are interesting because they trigger compile time error, but since we don't have that, it stays a political decision at how to handle error handling and deal with default/fallback values. But if we go monad we can remove null as this and mostly replace it with an enum of error (including a null equivalent).

I just wanted to say if you were doing the singleton value approach, you just use the class itself.

Yes, that would work.
Instead of peekOr we could then do (peek == Undefined) ? default : peek.

@datatypevoid Can I have a thumb emoji please? I don't mind which one, I just feel left out. :)
On a more serious note, this has come a long way from the initial suggestion.
The naming of "peek" is good.
Using a new operator certainly sounds like a significant decision that shouldn't be taken lightly.
Would you consider adding a "peek" method to Sequence with a simple implementation, and moving the greater discussion to it's own thread?
Could be a peek that returns null.
Could even only be the peekOr, then future changes wouldn't break code assuming a particular return value of peek.

For now the implementation should be something like:
peek() {
  var iterator = iterate(null)
  if (iterator) errorHandlingToBeDefined
  return iteratorValue(iterator)
}

or if we simply throw it can be reduced to:
peek() { iteratorValue(iterate(null)) }

If it were up to me (which, thankfully, I hear everyone say it isn't!), then I'd implement Sequence.peek to return null on failure as you had it originally:
peek {
  for (value in this) {
    return value
  }
  return null
}

This at least would be consistent with the way all other methods in core use nulland would also be consistent with the way existing methods in the Sequence class which don't return an iterator are coded (i.e. using a simple for statement).
We can then decide later what if anything to do about undefined for which there should be a separate issue. If we do decide to expose/introduce it in some shape or form, then all methods returning null can be reviewed/changed at the same time.

I just saw that python uses "next" for this function, which could be an alternative to peek.
Similarly to "peek", it doesnt imply order the way "first" does.
The situation I would favour this over peek is if you included the predicate variant.
peek(f) feels weird. So you'd probably go with findValue(f), but then they seem less related
next(f) feels like "the next iterated value that fulfills the condition.", thus is natural in both cases.

Specifically in the situation that the predicate variant is included (I'm fine if not, where(fn).peek is fine). Peek sounds odd.
peek(condition), "peek for a value that meets the condition" is a stretch
I thought about "next" "next value that meets the condition", but for the non-predicate one it implies a state in my head, like if you called it twice you would get a different value each time.
"single" might be good. "single value that meets the condition" "get a single value". But it might be too abstract from the fact that in many sequences it will give you a consistent value evem if there is multiple items.
Or of course, just be a different name like findValue, but you lose the assocoation between the two.

@PureFox48 your statement is false, seeking a non existing element in an array and map throws.
@Deijin27 single may imply to return a Sequence of one element, or test the size() == 1.

It throws if the index is out of range in the list List.
It returns null if the key isnt found in a map.

@Deijin27
I agree that peek(predicate) just doesn't sound right and, if we go with peek, then I think we would have to use where(predicate) to do any preliminary filtering.
I'm not keen on next which sounds a bit like you're wanting the second element rather than the first and I think single would be confusing as it's used in a different sense in other languages which have a fluent API. In C#, for example, it's always used with a predicate and returns the only element of a sequence which satisfies that predicate, throwing an exception if there's more than one.
@mhermier

your statement is false, seeking a non existing element in an array and map throws.

Which statement is that?
For the avoidance of any doubt, I'm only suggesting we look at methods which currently return null to indicate an undefined value, not those which throw in this situation. Sure, we can review the latter to ensure that's still the best course of action but changing them now would probably be a huge break from the past.
As @Deijin27 has just said, seeking a non existing element in a map returns null rather than throwing - you can use the containsKey method to check whether the key actually exists.

I've just had a quick look through all the core and CLI modules to find out which methods return null if unsuccessful and could only find these 5:

List.remove(value) - returns null if value not found (or the removed value otherwise)
Map.remove(key) - returns null if key not present (or the removed value otherwise)
Map[key] - returns null if key not present (or the value for that key otherwise)
Num.fromString(value) - returns null if value can't be parsed (or the number otherwise)
Stdin.readLine() - returns null if stdin is closed (or the string read otherwise)

Of these the last two aren't a problem - null is neither a number nor a string and so they aren't ambiguous.
The first three are ambiguous as null could be a value in the list or map but we do have list.contains (or indexof) and map.containsKey to resolve any ambiguity.
This makes me wonder whether we are getting over-excited about introducing some kind of undefined value - particularly if @munificent was against it - and should we therefore just stick with what we have?
User defined modules can, of course, deal with this situation in any way they please and, as already noted in this issue, there are several ways which don't use null available to them.

If it is ambiguous then it is not well defined. By that I mean, if we use null to encode a valid value, an error, or as an optional place holder, we can't use an API correctly and intuitively.

I agree that it's not ideal but there are other things in Wren which, due to the simplicity of the language, we accept - sometimes reluctantly - as 'best efforts'.
Having chewed this over at length, I've come to the conclusion that we should accept the possibly ambiguous use of 'null' as a best effort (at least in core).
There are, after all, ways to check if it's a 'real' value or not and, even with this proposal, you could use Sequence.isEmpty for that purpose.
There doesn't seem to be much appetite for exposing undefined as a 'second null' in any case (it was voted down when I proposed it). This doesn't really surprise me as @munificent's views still carry considerable weight with all of us.
The alternatives - using an obscure sentinel value, using a singleton value or a singleton class object - all suffer from being 'truthy' under the current rules so, if you're using 'falsiness' to check for an undefined value (even in a third party module), you'd need to change your code to check for undefined values explicitly.
Also the 'singleton' solutions are not backwards compatible (Undefined, or whatever, may have previously been used as an ordinary identifier) though the sentinel value approach could be made so by introducing an extra property into core (Object.undefined or Object.error perhaps) to wrap it and make it easier to use. There are plenty of candidates other than NAK -  such as: 0x7f (DEL) or even an unused NaN value perhaps.
Out of curiosity, as you obviously feel strongly about this,  what is your preferred solution?


Task view: esc button closes task view instead of closing active sub-task or comments window

Hi there, once again thanks for the extension. I've noticed a bug with hitting esc in task view. Steps to reproduce:

Open task view
Click to add a new sub-task or input text in comments section
Hit esc to get back to task view from the activated field

→ instead of closing the activated field, the task view itself is closed upon hitting esc. This does not happen if this extension is disabled.

Ah, good catch!  Fixed in version 159

Unfortunately having some issues with getting things updated in the chrome webstore, as I'd uploaded some prior zips with missing files, which were rightfully rejected.  Version 157 is still pending review, so I can't upload 159 yet.  So for now stuck on version 152 in chrome webstore, hopefully will be resolved soon.


[Impeller] LayerTree::Preroll and ::Paint use different criteria for impeller_enabled flag.

See https://github.com/flutter/engine/blob/cd90cc8469fbc789e0b44adc79f330f8d4d2744c/flow/layers/layer_tree.cc#L63
and https://github.com/flutter/engine/blob/cd90cc8469fbc789e0b44adc79f330f8d4d2744c/flow/layers/layer_tree.cc#L143
The flag was introduced in https://github.com/flutter/engine/pull/43759
I believe they should both use !!frame.aiks_context() as a criteria, but Preroll is using !frame.gr_context().
For now it could lead to inconsistent behavior between the two methods, but this led to a crash (see b/298583505) in the "lazy RasterCache" PR where Preroll assumed that the RCI could be left lazily null and the Paint method got different answers and dereferenced it.
The inconsistency in the initialization of the flag fixes the crash on its own and it should be fixed in any case as it can lead to inconsistent behavior, but the PR could also be written more defensively in case another logic issue creates an unexpected lazy allocation.

Fixed via revert in https://github.com/flutter/engine/pull/46113


Error while using user.home with sources on windows

On windows when i try to use
@Sources({"file:///${user.home}/XXXX/XXX.properties"})

I have this exception :
Caused by: java.net.URISyntaxException: Illegal character in path at index 10: file:///C:\Users\XXXX/XXXX/XXX.properties
at org.aeonbits.owner.ConfigURIFactory.newURI(ConfigURIFactory.java:39) ~[owner-1.0.8.jar:na]
	at org.aeonbits.owner.PropertiesManager.toURIs(PropertiesManager.java:130) ~[owner-1.0.8.jar:na]
	at org.aeonbits.owner.PropertiesManager.<init>(PropertiesManager.java:105) ~[owner-1.0.8.jar:na]
	at org.aeonbits.owner.DefaultFactory.create(DefaultFactory.java:43) ~[owner-1.0.8.jar:na]
	at org.aeonbits.owner.ConfigCache.getOrCreate(ConfigCache.java:87) ~[owner-1.0.8.jar:na]
	at org.aeonbits.owner.ConfigCache.getOrCreate(ConfigCache.java:40) ~[owner-1.0.8.jar:na]

I think it's caused bu the back slash (\) in the user home folder in windows.

Hi. Thanks for the report.
This has been solved on master branch. I need to release a new version with the problem fixed.
See #123

This should have been addressed by release 1.0.9.


Eye Tracker Calibration Strategy

While working on outputting calibration data, I found a potential alternative to recalibrating the ET before each task. Right now, we calibrate with 9 points at the start and then use 5 points for subsequent tasks. But I've seen a few places where they suggest that too much recalibration might not be the best idea because we could replace a good calibration model with an inferior one.
I wonder if it would not be better to conduct a thorough calibration at the start and subsequently perform "drift checks" for the following tasks rather than carrying out a full recalibration every time. WDYT @bfranceschiello @oesteban ?
I suspect that, as the documentation seems to suggest, the ET retains calibration between tasks when it's not turned off. Can someone confirm if this is accurate?
For context, here are a few discussions highlighting this issue:
SR Research Discussion
PsychoPy Forum Discussion
Another SR Research Discussion

I think you can perform one calibration at the beginning and drift check
after, just make sure the trigger referring to the start of each task is
well printed on the signal
Il giorno gio 7 set 2023 alle ore 11:57 esavary @.***>
ha scritto:

While working on outputting calibration data, I found a potential
alternative to recalibrating the ET before each task. Right now, we
calibrate with 9 points at the start and then use 5 points for subsequent
tasks. But I've seen a few places where they suggest that too much
recalibration might not be the best idea because we could replace a good
calibration model with an inferior one.
I wonder if it would not be better to conduct a thorough calibration at
the start and subsequently perform "drift checks" for the following tasks
rather than carrying out a full recalibration every time. WDYT
@bfranceschiello https://github.com/bfranceschiello @oesteban
https://github.com/oesteban ?
I suspect that, as the documentation seems to suggest, the ET retains
calibration between tasks when it's not turned off. Can someone confirm if
this is accurate?
For context, here are a few discussions highlighting this issue:
SR Research Discussion
https://www.sr-research.com/support/thread-7741.html
PsychoPy Forum Discussion
https://discourse.psychopy.org/t/saving-eye-tracker-calibration-data/18236/3
Another SR Research Discussion
https://www.sr-research.com/support/thread-7821.html
—
Reply to this email directly, view it on GitHub
https://github.com/TheAxonLab/hcph-sops/issues/174, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH7BDAAFEN7QX3UMQHUMB33XZGK7PANCNFSM6AAAAAA4OUIJRY
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Benedetta Franceschiello, Ph.D.s, (she/her/they/them)
Associate Professor,
School of Engineering, Institute of Systems Engineering,
HES-SO Valais-Wallis, Route de L’industrie 23, Sion, Switzerland
The Sense Innovation and Research Center,
Lausanne and Sion, Switzerland
Department of Radiology, Lausanne University Hospital and University
of Lausanne (CHUV-UNIL), Avenue de Provence 82
Linktree https://linktr.ee/bfranceschiello, Mat-Tech Lab
https://sites.google.com/view/mat-tech-lab/home?authuser=1


Run actionlint as a pre-merge check.

This results in much less config and way better capability.
Enable the linters that we were running before, plus actionlint.
alphagov/govuk-infrastructure#1361

Rather than faff about getting problem-matchers to work, decided to look around and found we can replace all our home-grown linter actions glue with github/super-linter.
PTAL


Added color styling

fixed #770

@MastanSayyad

@Priyanshi0112 I will ban you for such practice, is it all planned? @vanshchauhan21 you are a PA you have review the PR and give levels accordingly, you gave level 3 for 1 line of code
This is cheating + spam!!

Remove the levels @vanshchauhan21


Replace image should be incorporated.

@jasimawan Thanks for the request. We plan to incorporate replace and resize in the next few months. What would you have in mind for the replace API, something like ref.replace([1, 0], "url") ?

Thanks for the quick response @lukebrandonfarrell.
What I have in mind was to implement a "shortPress" on the every image just like "longPress" and when user will press any image, he/she can select the image from gallery or a local image, and then replace it using your logic "ref.replace([1, 0], "url")" ...

Hi - any update or progress on this?

@harbolaez I don't think replace image should be directly incorporated into this library. What we could do instead is allow custom callbacks for onPress, onLongPress, onPressIn and oPressOut. This should be a fairly simple PR if you wish to contribute.

I forked your library 6 months ago and I added a custom absolute button into the library which then I used to replace the respective image. I can contribute in the library and can request a merge pull request but for that firstly I have to pull the latest library and then I will implement the changes. After that I will request to merge. @lukebrandonfarrell

@jasimawan
If we are going to go the direction if the button, there should be simple props which allow you to customise the button component and position. i.e.
<DynamicCollage
       onEditButtonPress={/*custom action*/}
       editButtonPosition="top-left|top-right|bottom-left|bottom-right"
       EditButtonComponent={<MyCustomEditButton />}
/>

Let me know what you think

Yes, You are right. It will be a better approach and give developer the flexibility to implement his/her own custom button. Let me know if you will implement yourself or I do it and send you the merge pull request ?
@lukebrandonfarrell

@jasimawan Send a PR and can help contribute if needed

thanks, guys -- looking forward to this. Let me know if I can help with anything.

@harbolaez That might be a good first PR if you are interested ? I guess it would be an onFocus callback when image is pressed (short pressed) and some isFocusses state which is tracked in the library which applies the imageFocussedStyle when true for that image

I implemented it and sending you the PR. @lukebrandonfarrell


Bump GOVUK Frontend Jinja

We bumped GOVUK Frontend (the library that provides the CSS, JavaScript and images) in https://github.com/alphagov/notifications-govuk-alerts/pull/113 so I thought we should also bump GOVUK Frontend Jinja (the library that provides the Jinja templates and components to render HTML).
They've both moved a minor version on since then so this bumps both libraries to the latest (v3.13.0).
I figured that, while I was doing this work I should also see what else needs updating (via npm outdated). Based on that, I bumped all the other NPM modules we use to their latest versions. I also made changes to our code needed by these new versions.
Run make bootstrap or npm ci to bring down all the updates.
Notes for reviewers
GOVUK Frontend Jinja
GOVUK Frontend Jinja has its own version numbers but each version is based on a version of GOVUK Frontend. So this bumps GOVUK Frontend Jinja to v1.4.0 which supports GOVUK Frontend v3.13.0. All this is listed in their CHANGELOG.
Local changes
Jest now requires you to specify the environment our JavaScript tests run in to be JSDOM (a simulation of the Document Object Model) so this changes our Jest config to specify this.
Gulp-sass changed the part of its API that sets the Sass compiler to use. This changed the code in gulpfile.js to work with the new API.
Gulp-sass also advised that the node-fibers module*, used by our Sass compiler**, will not work past NodeJS v16. Removing it adds about 140 milliseconds to our build, on my machine at least, so I figured we should drop it now to save problems in the future.
This pins the sass module to v1.32.13 because versions after that produce warnings from the GOVUK Frontend Sass code that it looks like won't be changed for a while (see https://github.com/alphagov/govuk-frontend/issues/2238).
All these local changes are documented in the commits.
*The node-fibers module's official name is fiber.
**We use the Sass compiler recommended by https://sass-lang.com, Dart-sass. It's official name is sass.

Forgot to mention: great explanations!
The only thing that's missing from the first commit is the part about pinning sass, which I didn't spot until I came back to the PR description. Putting it in the commit should make it easier for someone to reason about whether to upgrade it in the future, since the explanation of why it's on the version should be directly on the diff.

The only thing that's missing from the first commit is the part about pinning sass, which I didn't spot until I came back to the PR description. Putting it in the commit should make it easier for someone to reason about whether to upgrade it in the future, since the explanation of why it's on the version should be directly on the diff.

That's a great catch. I've added it to the commit that describes all the other fixes.


Fixes dashboard and vagrant_ip zeroes issue

Can you squash the commits into one? Also, does this also resolve #685 ?

@geerlingguy - closing this issue and adding this change from a fresh branch. Apparently, I inadvertently cleared this out while refreshing my local fork! Does seem to fix the issue identified in #685.


Fixes for issues #37 and #38

I refactored the MavenBomRecommendationProvider to fix issues #37 and #38. Now the resolution problems are correctly reported, and the provider does not fail for Maven repositories that require the authentication.
I tried to write Spock tests, but unfortunately I was not able to reproduce the issue there, probably due to the differences in the layouts of mock repositories.
PS. I fixed the Javadocs to make the plugin build with JDK8.

Fixed by a different PR


Add all polish translations

Purpose
I'm not academia person and may not get these domain names 100% correct but I had to at least translate contact fields and did the rest too
Screenshots

Documentation

@alkuzad thanks for your contribution!


Submission Rejected - Contains minified or obfuscated code

Hello,
Today I submitted my extension to Chrome Web Store. But they respond me with the following:

Per  our policies, where possible, make as much of your code visible in the
package as you can. If some of your app's logic is hidden and it appears to
be suspicious, we may remove it. During the course of a review, your item
was found to be suspicious and has one or more file(s) that contain
minified or obfuscated code which is not human readable.

Do you submit with dev or dist folder? It means anyone uses dist folder will have problems as it has obfuscated code. Please let me know if you used obfuscated code.
Thanks

Did you solve the problem?

I solved it by disabling uglfy feature on webpack dist config. After that, they accepted the extension. It’s very strange that there are plenty of extensions with minified code.
I’m on mobile so pardon for any typos.

Did your bundle size increased a lot? :)

Hey @zabka229 I just saw your comment. It definitely increases ~300kb or more depending on your package.json. But that’s not a problem as chrome extension comes bundled and doesn’t load the file from any server.

@cihadturhan : Hi, your post is from 2018. Do you have any problem with this issue since then?
I plan to create my extension, and I'm considering some boilerplates (React). Not sure if using React boilerplate causes me any trouble in the future, because I don't want to spend time building an extension and get rejected when I want to submit it to the store.
Another question: I see that this repository is not active since 2018. Are you using any newer (and better) boilerplate for chrome extension development? If yes, please suggest it to me.
Thank you.

@piavgh I had no problems since then. To be honest, I didn't add new features for a while.
See the extension: https://chrome.google.com/webstore/detail/clipboard-paste-anywhere/pbmkobomelmhlgfbfjohpblialcopjco?hl=en-US


cert-manager.io/v1alpha2: the server could not find the requested resource

Summary
The infrastructure components uses cert-manager/v1alpha2 API version for Cert Manager, whereas cert-manager/v1 should be used instead.
$ clusterctl init -i maas:v0.4.0 -b microk8s -c microk8s
Fetching providers
Installing cert-manager Version="v1.12.3"
Waiting for cert-manager to be available...
Installing Provider="cluster-api" Version="v1.5.2" TargetNamespace="capi-system"
Installing Provider="bootstrap-microk8s" Version="v0.6.2" TargetNamespace="capi-microk8s-bootstrap-system"
Installing Provider="control-plane-microk8s" Version="v0.6.2" TargetNamespace="capi-microk8s-control-plane-system"
Installing Provider="infrastructure-maas" Version="v0.4.0" TargetNamespace="capmaas-system"
Error: action failed after 10 attempts: failed to get current provider object: failed to get API group resources: unable to retrieve the complete list of server APIs: cert-manager.io/v1alpha2: the server could not find the requested resource

hi there, you can try looking here to see how you can get things working:
https://github.com/antongisli/maas-clusterctl-hackup


Allow rusqlite bundling

This adds a bundled feature to tokio-rusqlite that just enables the bundled feature in rusqlite.

Thank you!


Reaction menu control (long press) is never updated locally

Ref https://github.com/rnystrom/GitHawk/issues/541#issuecomment-336440376.
When we add or remove a reaction locally, that should be reflected in the reaction detail cell.

By “detail cell” it looks like you mean the menu control? Because the actual cell does update. Am I reading that right?
Sent with GitHawk

Yes, sorry. Updated the title, should be clearer now
Sent with GitHawk


UI - add user menu, fixes for responsive design

fix mobile version updates
Signed-off-by: Bogdan Sava<EMAIL_ADDRESS>

recheck


[RELEASE-1.7] Trigger CI to get images with new tag schema

Trigger CI to get images with new tag schema

/cc @nak3 , @skonto

/lgtm


Add openSUSE Leap containers using the DNF package manager

These shortnames make it easy to access the alternative openSUSE
Leap containers using DNF or Micro DNF package managers instead
of Zypper.

LGTM
@vrothberg PTAL


msbuild /t:pack fails on 15.3 with cryptic error

Very similar to https://github.com/NuGet/Home/issues/5408, with MSBuildSdkExtras 1.0.5 installed I see this build failure when I use MSBuild /t:pack on VS 15.3 installations:

C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(141,5): error : The file '' to be packed was not found on disk. [C:\git\threading\src\Microsoft.VisualStudio.Threading\Microsoft.VisualStudio.Threading.csproj]

It works fine on 15.2 installations.
I'm filing the issue here first because the failure doesn't repro in a project where I don't use MSBuildSdkExtras.
Repro steps
git clone https://github.com/microsoft/vs-threading
cd vs-threading
git checkout 00890d8c1540c7d41dde2867391954210e632c47
cd src\Microsoft.VisualStudio.Threading
MSBuild /t:restore
MSBuild /t:pack

It looks like this is indeed because Nuget/home#5408 is actually not fixed yet. :frowning:

...and it repros just fine without MSBuildSdkExtras. so I'm closing this bug.

It stops reproing with the .NET Core SDK 2.0-preview.3.


Add a const PipeSystem constructor

Objective
Fix #5914.
PipeSystem cannot be constructed in const contexts.
Solution
Add a const PipeSystem::new function.

bors r+


Ability to authenticate the ServicePrinciple for KeyVault access with a certificate instead of a password

Describe the solution you'd like
We are looking to use the secrets-store-csi-driver-provider-azure to integrate AKS secrets with Keyvault, but our internal IT Risk and Security team require all access to KeyVault to be authenticated with certificates, not passwords. I don't see, at first blush, any mention of doing that in the documentation here. Would like to see that support added if it doesn't exist, or documented if it already exists but just isn't documented.

@spr-metlife Thank you for opening the issue 👍
The provider currently only supports clientID and password for Service Principal mode. This will be a good feature to have. I've added this to our backlog for now.

@aramase @spr-metlife how about the possibility of not providing any sort of credentials (neither password nor certificate) and attaching the Service Principal to a Service Account which can be used in turn for choosing the Pods having permissions to communicate with the Key Vault?
Please refer to https://github.com/Azure/secrets-store-csi-driver-provider-azure/issues/318.


MultiRegistration::loadMovables: voxel size is different for EPI data during SYN SDC

What happened?
Error during SYN SDC (node is named epi_merge). Crash is not isolated to any participant in particular, as most subjects fail (but a few make it to the end without errors; hard to find differences in these few subjects). This issue looks similar to previous reports on T1 images (#538, nipreps/fmriprep#599, nipreps/fmriprep#777).
What command did you use?
singularity run -B ${scratch},${bids_dir} $IMG ${bids_dir} ${output_dir} participant --participant_label ${subject:4} -w $scratch --fs-license-file $license --output-layout legacy --use-syn-sdc --force-syn --use-aroma --skip-bids-validation

What version of fMRIPrep are you running?
21.0.0rc2
How are you running fMRIPrep?
Singularity
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
Node: fmriprep_wf.single_subject_MIND3002_wf.syn_preprocessing_auto_00000.epi_reference_wf.epi_merge
Working directory: /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge

Node inputs:

args = <undefined>
auto_detect_sensitivity = True
average_metric = <undefined>
environ = {'SUBJECTS_DIR': '/opt/freesurfer/subjects', 'OMP_NUM_THREADS': '1'}
fixed_timepoint = True
in_files = <undefined>
in_intensity_scales = <undefined>
initial_timepoint = 1
initial_transforms = <undefined>
intensity_scaling = True
no_iteration = True
num_threads = 1
out_file = mri_robust_template_out.mgz
outlier_sensitivity = <undefined>
scaled_intensity_outputs = <undefined>
subjects_dir = /opt/freesurfer/subjects
subsample_threshold = 200
transform_outputs = True

Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 264, in run
    return super(FSCommandOpenMP, self).run(**inputs)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 149, in run
    return super(FSCommand, self).run(**inputs)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 428, in run
    runtime = self._run_interface(runtime)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 822, in _run_interface
    self.raise_exception(runtime)
  File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 749, in raise_exception
    raise RuntimeError(
RuntimeError: Command:
mri_robust_template --satit --fixtp --mov /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz --inittp 1 --iscale --noit --template mri_robust_template_out.mgz --subsample 200 --lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp1.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp2.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp3.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp4.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp5.lta /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/epi_merge/tp6.lta
Standard output:
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $

--satit: Will estimate SAT iteratively!
--fixtp: Will map everything to init TP!
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz as movable/source volume.
--mov: Using /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz as movable/source volume.
    Total: 6 input volumes
--inittp: Using TP 1 as target for initialization
--iscale: Enableing intensity scaling!
--noit: Will output only first template (no iterations)!
--template: Using mri_robust_template_out.mgz as template output volume.
--subsample: Will subsample if size is larger than 200 on all axes!
--lta: Will output LTA transforms
Setting iscale ...
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise0/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise1/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise2/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise3/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise4/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz'...
converting source '/om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz' to bspline ...
MRItoBSpline degree 3
Standard error:
ERROR: MultiRegistration::loadMovables: images have different voxel sizes.
  Currently not supported, maybe first make conform?
  Debug info: size(5) = 3, 3, 3.3   size(0) = 3, 3, 3.6
MultiRegistration::loadMovables: voxel size is different /om/scratch/Mon/smeisler/fmriprep/fmriprep_wf/single_subject_MIND3002_wf/syn_preprocessing_auto_00000/epi_reference_wf/clip_bg_noise/mapflow/_clip_bg_noise5/clipped.nii.gz.

Bad address
Return code: 251

Additional information / screenshots
The correct native resolution for all BOLD images are 3X3X3.6.

@effigies, do you know whether this is expected from mri_robust_template?

Yes, we had to add in the conform interface for anatomicals (https://github.com/nipreps/fmriprep/pull/545) to handle this. (In https://github.com/nipreps/fmriprep/pull/601, we limited the up-sampling to <3x.)

We can probably just select the highest resolution (or most numerous resolution) BOLD files and drop the others. Splitting by field strength would probably also make sense, so if we have a 7T high-res fMRI we should get a different estimated fieldmap from 3T.

I get the same error after adding a -t argument to limit to a single task. My workaround is to create "single-subject single-task" BIDS datasets in scratch space, and passing that into fmriprep. So far appears to work.

We're having this issue as well.
[ndas@micc func]$ grep Thick *json
sub-AS03_task-intf_bold.json:   "SliceThickness": 5,
sub-AS03_task-MSIT_bold.json:   "SliceThickness": 5,
sub-AS03_task-rest_bold.json:   "SliceThickness": 3.5,
sub-AS03_task-words_bold.json:  "SliceThickness": 5,

Is there any possible temporary workaround?

Hi @dmd,
As I have mentioned, I work around this by creating mini BIDS directories consisting of single subjects and single tasks, and then passing that in as the BIDS root directory. That is, these temporary files have just dataset_description.json, and a single subject folder with files from only a single task.

Thanks, we'll try that.


Environment in terminal different than bottom left, no warning that they are mismatching

 Environment data

Language Server version: 2021.3.4-pre.1
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda): Anaconda

Imported mip and openpyxl with pip and requirements.txt
 Expected behaviour
No error
 Actual behaviour
Import could not be resolved. Interpreter runs OK.

@jose-applesox If you are using virtual environment then it should activate in the terminal. Please provide details on the environment type and logs from output > python panel.
But if it is non-virtual environment based python, then python in the terminal will be based on whatever is the python that is available on PATH. We have #8907 to track improvements in that scenario.

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.


⚠ Bofrost.at has degraded performance

In 2d90eba, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 975 ms

Resolved: Bofrost.at performance has improved in 361b936.


Remove prisim from app chunk

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

Before:

After:

Hey Ahmad,
There is a good chance this is just my run of GitPod, but I thought I would mention it. I cannot view the solutions (I do see Prism in the webpack internals):

I also see this error (likely nothing more than #39719 )
Warning: Failed prop type: Invalid prop `files` of type `object` supplied to `SolutionViewer`, expected an array.
    in SolutionViewer (created by ProjectModal)
    in ProjectModal (created by CertificationSettings)
    in section (created by CertificationSettings)
    in CertificationSettings (created by withI18nextTranslation(CertificationSettings))

Hey Ahmad,
There is a good chance this is just my run of GitPod, but I thought I would mention it. I cannot view the solutions (I do see Prism in the webpack internals):

That is interesting because I do not see the issue when developing and building locally.

Turns out all I needed to do was refresh the page - same thing happens on .dev

Can you please elaborate, what you mean by "same thing happens on .dev"? This has not been shipped yet. Did you mean whatever issue you were reporting was pre-existing?

Did you mean whatever issue you were reporting was pre-existing?

Yes. Oliver suggested it has to do with Redux not refreshing. What I experience is:

Complete a JS Project (Palindrome Checker)
Submit project
Navigate to /settings
Click on Show Code button in Certification section of settings page for submitted project
See modal appear saying "[no solution]"
Be sad, and bother Oliver. Refresh page
Click Show Code again
Modal appears with code - sadness diminishes

This happens on both a Gitpod instance of this PR, as well as on .dev for me. Does not happen on current production, but it would be most accurate to test with a new account which I have not.

We do not care about any developer environments, what I am interested in why would you have a difference in experience between staging and production.


Test local serv

re## Purpose
This Pull Request aims to enhance the user experience by addressing issues related to ... Additionally, it introduces ... functionality that allows users to ...
Pull Request Type
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Upstream sample reference
Links to PR(s) that made the original change in the upstream sample:

...

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

[Add specific steps to run the test suite here, e.g., npm test]
[Or provide steps for manual testing]

What to Check
Verify that the following are valid

All new features work as expected.
No existing functionality is broken.
The code adheres to the project's coding standards.

Other Information
The changes made in this PR should be reviewed considering potential impact on existing features and ensure compatibility with previous versions.

This PR doesn't look ready for merging. Please reach out via a github issue if there is a substantial change you would like to make to this sample


Negative filter

Hi. Thanks for the awesome work.
I am trying to understand how to do a negative filter. Like the example here: http://webvision.med.utah.edu/wp-content/uploads/2012/06/laura_galloway_invert.jpg
All colors should just be inverted, so 1-r, 1-g, 1-b. I'm trying to understand your "Parsing string rule".
adjust format: "@adjust  ..."
I'm not sure if I can use a variable to get the rgb values and subtract from 1, or do I need to write a custom shader for that. Could someone please help me how to get this to work.
Another thing, maybe you should change the All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86 to the recommended, since most android phones have arm64-v8a now.

@curve RGB(0, 255)(255, 0)

Another thing, maybe you should change the All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86 to the recommended, since most android phones have arm64-v8a now.

Go find any popular apps such as snapchat,  download its apk, decompress it, and you'll know why.

Thank you!
Okay, I was just having trouble getting the library to work on my Galaxy S8+ with this gradle dependency. compile 'org.wysaid:gpuimage-plus:2.4.6-min-armv7a', it could not find libCGE.so since it was only located in armeabi-v7a, but the S8+ has a arm64-v8a, but I guess you know more about this than me 😄

You can try the builtin demo with your device.


Add CLIP training example script

What does this PR do?

This PR adds an example script for training CLIP-like models. This is inspired from the Transformers example.
It solves #167.

[x] Run the full example on one device (3 epochs over COCO)
[x] Run the full example on 8 devices
[x] HMP

Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

@skaulintel I tested the script quickly and it seems to work fine. Feel free to try it and let me know if you encounter any issue. I suggest you to follow the README to make sure everything is set properly for running the script.

I managed to run the example on 1 and 8 devices. However with HMP I got bad results. I'll take a look to see if I can get a good set of bf16 operators.

I managed to get HMP to work well by merging the bf16 ops of RoBERTa and ViT. Here is the configuration I get: https://huggingface.co/Habana/clip/blob/main/gaudi_config.json

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@regisss
I verified the command from the ReadMe works on My end.
However, I tried running the following command adapted from you example in the readme for clipvit.
python run_clip.py --output_dir ./clip-vit-finetuned --model_name_or_path /scratch2/skaul/clip-vit-large-patch14/ --data_dir /scratch2/skaul/data/ --dataset_name ydshieh/coco_dataset_script --dataset_config_name=2017 --image_column image_path --caption_column caption --remove_unused_columns=False --do_train  --do_eval --per_device_train_batch_size="16" --per_device_eval_batch_size="16" --learning_rate="5e-5" --warmup_steps="0" --weight_decay 0.1 --overwrite_output_dir --use_habana --use_lazy_mode --use_hpu_graphs --gaudi_config_name /scratch2/skaul/vit/gaudi_config.json --throughput_warmup_steps 2
The scratch directory is where I have the coco dataset downloaded as well as the clipvit pretrained model and clip gaudi_config. I get this error...
hmp:verbose_mode  False
hmp:opt_level O1
[INFO|trainer.py:518] 2023-02-16 22:38:26,134 >> ***** Running training *****
[INFO|trainer.py:519] 2023-02-16 22:38:26,134 >>   Num examples = 35302
[INFO|trainer.py:520] 2023-02-16 22:38:26,134 >>   Num Epochs = 3
[INFO|trainer.py:521] 2023-02-16 22:38:26,134 >>   Instantaneous batch size per device = 16
[INFO|trainer.py:522] 2023-02-16 22:38:26,134 >>   Total train batch size (w. parallel, distributed & accumulation) = 16
[INFO|trainer.py:523] 2023-02-16 22:38:26,134 >>   Gradient Accumulation steps = 1
[INFO|trainer.py:524] 2023-02-16 22:38:26,134 >>   Total optimization steps = 6621
[INFO|trainer.py:525] 2023-02-16 22:38:26,136 >>   Number of trainable parameters = 427616513
0%|                                                                                | 0/6621 [00:00<?, ?it/s]Traceback (most recent call last):
File "run_clip.py", line 542, in
main()
File "run_clip.py", line 513, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/usr/local/lib/python3.8/dist-packages/optimum/habana/transformers/trainer.py", line 395, in train
return inner_training_loop(
File "/usr/local/lib/python3.8/dist-packages/optimum/habana/transformers/trainer.py", line 667, in _inner_training_loop
tr_loss_step = self.training_step(model, inputs)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2539, in training_step
loss = self.compute_loss(model, inputs)
File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2571, in compute_loss
outputs = model(**inputs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/clip/modeling_clip.py", line 1125, in forward
text_outputs = self.text_model(
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1212, in _call_impl
result = forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/clip/modeling_clip.py", line 712, in forward
hidden_states = self.embeddings(input_ids=input_ids, position_ids=position_ids)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1212, in _call_impl
result = forward_call(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/clip/modeling_clip.py", line 230, in forward
embeddings = inputs_embeds + position_embeddings
File "/usr/local/lib/python3.8/dist-packages/habana_frameworks/torch/hpex/hmp/utils.py", line 212, in wrapper
return op(*args_cast, **kwds)
RuntimeError: Incompatible input shapes, broadcast not possible. Tensor1 Size: 768 128 16 Tensor2 Size: 768 77 1
0%|

@skaulintel Can I see the name of the files in /scratch2/skaul/clip-vit-large-patch14/? And could you also print here the content of the file called config.json in /scratch2/skaul/clip-vit-large-patch14/?

@skaulintel Can I see the name of the files in /scratch2/skaul/clip-vit-large-patch14/? And could you also print here the content of the file called config.json in /scratch2/skaul/clip-vit-large-patch14/?

skaul@sc09super14-klb:~$ ls /scratch2/skaul/clip-vit-large-patch14/
config.json         preprocessor_config.json  special_tokens_map.json  tokenizer.json
flax_model.msgpack  pytorch_model.bin         tf_model.h5              vocab.json
merges.txt          README.md                 tokenizer_config.json

config.json
{   "_name_or_path": "clip-vit-large-patch14/",   "architectures": [     "CLIPModel"   ],   "initializer_factor": 1.0,   "logit_scale_init_value": 2.6592,   "model_type": "clip",   "projection_dim": 768,   "text_config": {     "_name_or_path": "",     "add_cross_attention": false,     "architectures": null,     "attention_dropout": 0.0,     "bad_words_ids": null,     "bos_token_id": 0,     "chunk_size_feed_forward": 0,     "cross_attention_hidden_size": null,     "decoder_start_token_id": null,     "diversity_penalty": 0.0,     "do_sample": false,     "dropout": 0.0,     "early_stopping": false,     "encoder_no_repeat_ngram_size": 0,     "eos_token_id": 2,     "finetuning_task": null,     "forced_bos_token_id": null,     "forced_eos_token_id": null,     "hidden_act": "quick_gelu",     "hidden_size": 768,     "id2label": {       "0": "LABEL_0",       "1": "LABEL_1"     },     "initializer_factor": 1.0,     "initializer_range": 0.02,     "intermediate_size": 3072,     "is_decoder": false,     "is_encoder_decoder": false,     "label2id": {       "LABEL_0": 0,       "LABEL_1": 1     },     "layer_norm_eps": 1e-05,     "length_penalty": 1.0,     "max_length": 20,     "max_position_embeddings": 77,     "min_length": 0,     "model_type": "clip_text_model",     "no_repeat_ngram_size": 0,     "num_attention_heads": 12,     "num_beam_groups": 1,     "num_beams": 1,     "num_hidden_layers": 12,     "num_return_sequences": 1,     "output_attentions": false,     "output_hidden_states": false,     "output_scores": false,     "pad_token_id": 1,     "prefix": null,     "problem_type": null,     "projection_dim" : 768,     "pruned_heads": {},     "remove_invalid_values": false,     "repetition_penalty": 1.0,     "return_dict": true,     "return_dict_in_generate": false,     "sep_token_id": null,     "task_specific_params": null,     "temperature": 1.0,     "tie_encoder_decoder": false,     "tie_word_embeddings": true,     "tokenizer_class": null,     "top_k": 50,     "top_p": 1.0,     "torch_dtype": null,     "torchscript": false,     "transformers_version": "4.16.0.dev0",     "use_bfloat16": false,     "vocab_size": 49408   },   "text_config_dict": {     "hidden_size": 768,     "intermediate_size": 3072,     "num_attention_heads": 12,     "num_hidden_layers": 12,     "projection_dim": 768   },   "torch_dtype": "float32",   "transformers_version": null,   "vision_config": {     "_name_or_path": "",     "add_cross_attention": false,     "architectures": null,     "attention_dropout": 0.0,     "bad_words_ids": null,     "bos_token_id": null,     "chunk_size_feed_forward": 0,     "cross_attention_hidden_size": null,     "decoder_start_token_id": null,     "diversity_penalty": 0.0,     "do_sample": false,     "dropout": 0.0,     "early_stopping": false,     "encoder_no_repeat_ngram_size": 0,     "eos_token_id": null,     "finetuning_task": null,     "forced_bos_token_id": null,     "forced_eos_token_id": null,     "hidden_act": "quick_gelu",     "hidden_size": 1024,     "id2label": {       "0": "LABEL_0",       "1": "LABEL_1"     },     "image_size": 224,     "initializer_factor": 1.0,     "initializer_range": 0.02,     "intermediate_size": 4096,     "is_decoder": false,     "is_encoder_decoder": false,     "label2id": {       "LABEL_0": 0,       "LABEL_1": 1     },     "layer_norm_eps": 1e-05,     "length_penalty": 1.0,     "max_length": 20,     "min_length": 0,     "model_type": "clip_vision_model",     "no_repeat_ngram_size": 0,     "num_attention_heads": 16,     "num_beam_groups": 1,     "num_beams": 1,     "num_hidden_layers": 24,     "num_return_sequences": 1,     "output_attentions": false,     "output_hidden_states": false,     "output_scores": false,     "pad_token_id": null,     "patch_size": 14,     "prefix": null,     "problem_type": null,     "projection_dim" : 768,     "pruned_heads": {},     "remove_invalid_values": false,     "repetition_penalty": 1.0,     "return_dict": true,     "return_dict_in_generate": false,     "sep_token_id": null,     "task_specific_params": null,     "temperature": 1.0,     "tie_encoder_decoder": false,     "tie_word_embeddings": true,     "tokenizer_class": null,     "top_k": 50,     "top_p": 1.0,     "torch_dtype": null,     "torchscript": false,     "transformers_version": "4.16.0.dev0",     "use_bfloat16": false   },   "vision_config_dict": {     "hidden_size": 1024,     "intermediate_size": 4096,     "num_attention_heads": 16,     "num_hidden_layers": 24,     "patch_size": 14,     "projection_dim": 768   } }

@skaulintel This looks right. I just tested in Transformers and it fails too so I guess this issue is not related to Optimum Habana.
Let me see why it fails on Transformers' side and I'll follow up.

@skaulintel Okay I understand better what is going on. This is not a bug.
Basically, the model openai/clip-vit-large-patch14 has a config parameter max_position_embeddings equal to 77 (see here). Because it was pre-trained on captions that contains maximum 77 tokens. However, in the example run_clip.py, captions are by default padded to 128 tokens. Hence the dimension issue.
So I recommend you create a new model with another text encoder (e.g. RoBERTa as shown in the README).
Or if you absolutely want to run this model, add the argument --max_seq_length 77 to your command.

@regisss are we using the same set of bf16 ops as default?

@libinta We use the bf16 ops defined here: https://huggingface.co/Habana/clip/blob/main/gaudi_config.json
Basically I just merged the bf16 ops of ViT with the ones of RoBERTa and that's what I got.

@libinta
I ran a quick benchmark Gaudi vs V100:

Gaudi 8x bf16

batch size: 96
throughput: 850,39 samples/s
evaluation loss: 1.7529

V100 8x fp16

batch size: 96
throughput: 637,259 samples/s
evaluation loss: 1.759

I also tried running a CLIP model with Swin as the vision encoder and BERT as the text encoder and it works.


Using styled.div as well as styled.Text in expo-web

Hello there.
Use-case: An expo-web project with styled-components used in two forms - styled.div (the native web way) and styled.Text(the native-native way).
Error in runtime: TypeError: undefined is not a function (near '...styled_components_web__WEBPACK_IMPORTED_MODULE_7__["default"].div...')
Question: Is this even possible to use both the styled variants as shown in the use-case? If, yes. How do I get rid of the error above? I tried aliasing so as to map styled.div variant to the styled-components and styled.Text variant to the styled-component/native using webpack (and babel too), but didn't help.
While looking for some info on the issue itself, found an interesting answer. And according to that it seems that this isn't possible. So, is that valid?
And if this isn't possible, in case if any-one has come-across such a use case, how was that dealt with. Or if someone has any suggestion to better the use; Also, seems like a nice use case to be dealt within the library - could be a feature. But why isn't that possible to do in first place - curious.
Thanks.
P.S: styled-components version in use is 4.4.1. And expo is set to ^44.0.0.

@astriskit i tried it in a slightly different setup with nextjs
you can actually mix styled-components/native and styled-components however i noticed the following:

styles from styled-components (without /native) are not picked up, you also have to use styled-components/native and then pass "div" to it:

import styled from "styled-components/native";

export const ContentColumn = styled("div")`
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;

  border: 20px solid red;
`;

this works but typescript will complain


Select

Cambios /10-01-2021

Agrego el modulo Select y el modulo Stats.
Agregue algunas listas csv para hacer pruebas.

Arregla #7 .

Arregla #7 .

Codecov Report

Merging #8 (7703587) into master (9043bb6) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master      #8   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files           2       2
  Lines           8      27   +19
======================================
- Misses          8      27   +19

Impacted Files
Coverage Δ

src/Select.jl
0.00% <0.00%> (ø)

src/Stats.jl
0.00% <0.00%> (ø)

Continue to review full report at Codecov.

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

Codecov Report

Merging #8 (7703587) into master (9043bb6) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master      #8   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files           2       2
  Lines           8      27   +19
======================================
- Misses          8      27   +19

Impacted Files
Coverage Δ

src/Select.jl
0.00% <0.00%> (ø)

src/Stats.jl
0.00% <0.00%> (ø)

Continue to review full report at Codecov.

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


improve the designing by  making changes in the css file

Please explain as what changes we are primarily discussing here.

I think index.css is in sync with mantine changing might led to overlapping classes.

Using your idea I've opened a refactoring issue #18, check that out and comment if want to get assigned.


chore(deps): update dependency org.hibernate:hibernate-core to 5.4.0.cr2

This PR contains the following updates:

Package
Change

org.hibernate:hibernate-core
4.2.21.Final -> 5.4.0.CR2

Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR is stale, or if you modify the PR title to begin with "rebase!".
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.

This PR has been generated by Renovate Bot.

Renovate Ignore Notification
As this PR has been closed unmerged, Renovate will now ignore this update (5.4.0.CR2). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the ignoreDeps array of your renovate config.
If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.


Move most of ODE logic into TimeDependentOperator wrappers

After some discussion with @samuelpmishLLNL it was determined that almost all of the content of the lambdas passed to FirstOrderODE/SecondOrderODE is physics-independent.
This PR removes the std::function interface from the ODE classes and moves the logic in the lambdas (stencil, constraint application, etc) to the ODE classes.  Physics modules now pass references (to member variables) to the ODE class such that results are made available to the residual operator contained within the physics module.
A follow-up PR will implement a wrapper for MFEM's ODESolvers that accepts a TimeStepMethod and an ODE.

Codecov Report

Merging #295 (607aff3) into develop (c39d0dd) will decrease coverage by 0.53%.
The diff coverage is 89.84%.

@@             Coverage Diff             @@
##           develop     #295      +/-   ##
===========================================
- Coverage    87.08%   86.54%   -0.54%
===========================================
  Files           44       45       +1
  Lines         1525     1613      +88
===========================================
+ Hits          1328     1396      +68
- Misses         197      217      +20

Impacted Files
Coverage Δ

src/coefficients/coefficient_extensions.hpp
50.00% <ø> (ø)

src/physics/base_physics.hpp
100.00% <ø> (ø)

src/physics/nonlinear_solid.hpp
100.00% <ø> (ø)

src/physics/thermal_solid.hpp
100.00% <ø> (ø)

src/physics/utilities/boundary_condition.hpp
100.00% <ø> (ø)

src/physics/utilities/equation_solver.hpp
100.00% <ø> (ø)

src/physics/utilities/solver_config.hpp
100.00% <ø> (ø)

src/physics/base_physics.cpp
56.56% <14.28%> (-7.81%)
:arrow_down:

src/physics/utilities/boundary_condition.cpp
79.01% <66.66%> (+1.09%)
:arrow_up:

src/physics/operators/odes.cpp
89.79% <89.69%> (ø)

... and 19 more

Continue to review full report at Codecov.

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

LGTM

LGTM


No default jsDelivr CDN file set

This package doesn't have a default file set. You can set it via jsdelivr, browser, or main field in package.json

What would the default file be in our case? Can you submit a PR?


add sonarcloud static analysis for repository

Problem Description
No existing static code analysis for the project.
Solution
Add SonarCloud analysis through GitHub Actions.
TODO: update documentation to point to SonarCloud public URL
TODO: update README.md with analysis badges
how you tested the change
Testing by creating this PR and watching analysis.
Where the following done:

[ ] Tests. Check all that apply:

[ ] Unit tests created or modified that run during ant test.
[ ] Integration tests created or modified that run during integration testing
(Formerly called regression tests.)
[ ] Test procedure descriptions for manual testing

[ ] Was relevant documentation updated?
[ ] Were relevant config element (e.g. XML data) updated as appropriate

Needed to chmod +x

it was the text "empty file" that confused me but that makes sense the diff would be empty.


Added a section on active versus passive management.

Repositioned wide diagrams so they don't disrupt flow of text midway through a page.
Added reference to alpha with respect to portfolio managers and their fees.
Cleaned up capitalisation of some entries in the bibliography.

Thanks!


add documentation

Related Issue

Checklist

[ ] I have read the CONTRIBUTING guidelines.
[ ] I have added tests to cover my changes.
[ ] I have updated the documentation (docs folder) accordingly.

Additional Notes
Add any other context about the PR here.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 1.21951% with 81 lines in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (944643b) to head (f5d2d6f).

Files with missing lines
Patch %
Lines

libs/infinity_emb/infinity_emb/cli.py
0.00%
81 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

:exclamation:  There is a different number of reports uploaded between BASE (944643b) and HEAD (f5d2d6f). Click for more details.
HEAD has 43 uploads less than BASE

Flag
BASE (944643b)
HEAD (f5d2d6f)

44
1

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
- Coverage   79.98%   72.42%   -7.56%
==========================================
  Files          42       43       +1
  Lines        3467     3471       +4
==========================================
- Hits         2773     2514     -259
- Misses        694      957     +263

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


it's too blured when pdf document is printted usring pdf.js

the demo pdf file
Configuration:

IE 11 and chrome
win7
PDF.js 1.7.225 and PDF.js 1.8.188:
Is not  an extension:

Steps to reproduce the problem:

The preview is ok ,but when I print the pdf document, the contents on the paper is too blured to use.

What is the expected behavior? (add screenshot)
I hope that when I print pdf document on a browser usering pdf.js, the contents on the paper are clear enough.I have tried my best to deal with the problem, but it is not solved, help me,please. thank you.
What went wrong? (add screenshot)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

Closing as duplicate of #8075. See also #7488


Support for dot(dns, csr) = dns and dot(dns, csr.T) = dns on CPU

Description
Support for dot(dns, csr) = dns and dot(dns, csr.T) = dns on CPU
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

The PR title starts with [MXNET-JIRA_ID], where JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
Changes are complete (i.e. I finished coding on this PR)
All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-PR_ID/BUILD_ID/index.html
To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

Feature1, tests, (and when applicable, API doc)
Feature2, tests, (and when applicable, API doc)

Comments
We implemented  dot(dns,csr/csr.T)=dns on cpu inspired by the implementation  of dot(dns,csr/csr.T)=dns on gpu by @haojin2 . It gains 190 times speed up when density of csr is 0.01%. The details as follows.
---test dot(dns1, csr) = dns2, shape_lhs=(256,30000), shape_rhs=(30000,30000)---
1.00 % with fallback: 2.205663, without fallback: 1.179663
0.50 % with fallback: 4.471481, without fallback: 2.309979
0.10 % with fallback: 20.552546, without fallback: 10.095501
0.05 % with fallback: 39.141270, without fallback: 18.930919
0.01 % with fallback: 155.199133, without fallback: 75.759737
---test dot(dns1, csr.T) = dns2, shape_lhs=(256,30000), shape_rhs=(30000,30000)---
1.00 % with fallback: 3.031672, without fallback: 1.474902
0.50 % with fallback: 6.197231, without fallback: 3.054169
0.10 % with fallback: 29.555133, without fallback: 14.591607
0.05 % with fallback: 56.621382, without fallback: 28.377709
0.01 % with fallback: 190.064799, without fallback: 94.031036

The benchmark script is here: https://github.com/XiaotaoChen/incubator-mxnet/blob/mytest/example/sparse/cxt-test/test_dot.py . And also can test this with haojin's script by replacing mx.gpu() with mx.cpu() : https://github.com/apache/incubator-mxnet/pull/10371
@pengzhao-intel @TaoLv

@haojin2 @eric-haibin-lin for the review :)

@haojin2 @eric-haibin-lin  I have solved the problems mentioned in your comments. Can you accept this PR ?

LGTM, will wait for @eric-haibin-lin to take a final look.

Thx, it's Done ! May you review it again :) @eric-haibin-lin


DBTR How to discovery chained triggers capabilities

Current version of DBTR extension documentation proposes to use sbi_debug_num_triggers in boot time of S-mode application due to discovery of hardware debug triggers capabilities. It easily allows to count number of triggers that support configuration specified with tdata1 CSR value, discover supported trigger types & optional bit fields.
But It is unclear how chaining capabilities could be discovered using this method. What method should be used to figure out

which triggers supports chaining (chain bit)
what maximal chain length on the current system

As an example we can meet hardware implementation supporting 4 mcontrol6 triggers where the 1st and 3rd triggers are breakpoints only, 2nd and 4th triggers are watchpoints only. In this case probe with sbi_debug_num_triggers says us, that there are 2 breakpoints supported, but there is no way to get out information, that breakpoints can't be chained.

@avpatel @hschauhan

The SBI DBTR extension exposes logical debug triggers to the supervisor software because the SBI implementation could be a hypervisor running in HS-mode where the debug triggers are shared between host (hypervisor) and guest. Even for M-mode SBI implementation, the debug triggers might be shared between external debugger and HS-mode.
The sbi_debug_num_triggers() returns the number of debug triggers on the calling hart which can support the trigger configuration specified by the trig_tdata1 parameter. Over here as well, it is logical debug triggers and not physical or hardware triggers. Please note that, the SBI implementation may intentionally not support certain trigger configuration (i.e. trig_tdata1) in which case the sbi_debug_num_triggers() will return 0 for such trigger configuration.
To detect chaining, just pass a valid trig_tdata1 parameter with chain bit set so that sbi_debug_num_triggers() will return how many logical debug triggers support it. The sbi_debug_install_triggers() has a requirement which ensures that SBI implementation MUST use contiguous physical / hardware triggers for chained trigger configuration.

Hi, @avpatel, thank you for your reply!
As you said, chaining capabilities of hardware debug triggers can be discovered with the sbi_debug_num_triggers() call along with other trigger features. It works fine without chaining because each debug trigger is a separate entity which features may be easily discovered with the sbi_debug_num_triggers() call. Thus we can just ask SBI about each trigger we want to install, get the number of places where it is possible to install it and make the sbi_debug_install_triggers() call, being sure that it will likely be successful. However, it works well only because unchained triggers do not require information about the order, i. e. SBI is free to install required debug trigger at any physical id (satisfying all limitations of hypervisor, external debugger and hardware).
Process of discovering chained triggers capabilities requires information about the order of the hardware debug triggers, because Sdtrig extension specification allows hardware to have non-uniform triggers, where some set of triggers supports only a subset of features. As an example, I can propose a valid hardware configuration (in terms of Sdtrig SPEC) that has the following hardware debug triggers structure:
trig0 mcontrol6: `load`, `store`, `chain` bits supported, `execute` did not (watchpoint trigger)
trig1 mcontrol6: `load`, `store`, `chain` bits supported, 'chain' and `execute` did not (watchpoint trigger)
trig2 mcontrol6: `execute` bit supported, `load`, `store` and 'chain' did not (breakpoint trigger)
trig3 mcontrol6: `load`, `store`, `chain` bits supported, `execute` did not (watchpoint trigger)
trig4 mcontrol6: `load`, `store`, `chain` bits supported, 'chain' and `execute` did not (watchpoint trigger)

In this case the sbi_debug_num_triggers() call will detect two triggers with chaining and load, store bits support, but there is no way to determine from current SBI SPEC that it is impossible to setup three-trigger-length chain. Thus, there is no way to find out possible chained triggers configurations in S-mode software and particularly to find out max length of each or at least any chain. So the main point of my longread is that lack of knowledge about triggers order makes it impossible to discover the capabilities of chained non-uniform triggers .
When faced with this problem it is tempting to use sbi_debug_install_triggers for discovery of chaining hardware capabilities, but it still does not enough for the discovery, because this call does not provide any transactional semantics guarantees. I mean that being called with N triggers to be installed sbi_debug_install_triggers may fail on Mth (where M < N) trigger installation and left 1st .. (M-1)th triggers installed raising a error (as I see the SBI SPEC).
Of course, you mentioned that sbi_debug_install_triggers() should not be used for triggers capabilities discovery, but it is the only way to gain any knowledge about triggers order.
Could you please comment this on whether this idea is correct? In turn, I may be wrong, misunderstanding something in SBI SPEC. If that is the case, I would propose to make the sbi_debug_num_triggers() call take an array of tdata1 trigger values and return non-zero value in case the triggers configuration can be installed on the current hardware (or to make separate call for this purpose). What do you think about this?
P. S. I suppose, there is also another problem with sbi_debug_num_triggers() and sbi_debug_install_triggers() calls pair. Two different calls do not provide an atomic interface of hardware debug triggers discovery and installation. The triggers can be 'stolen' between sbi_debug_num_triggers() and sbi_debug_install_triggers() calls by a hypervisor or external debugger, so discovered triggers configuration may be changed multiple times between these calls... However, in absence of hypervisor and external debugger, the previous problem is much more significant in my opinion...