Vertically align tokens

We should at least align delimiters, imo, e.g.:
val apple  = 0
and orange = 1

val () =
  case foo of
    (NONE, _)        => ()
  | (_, NONE)        => ()
  | (SOME x, SOME y) => ()

datatype apple = Foo | Bar
and orange     = Baz

I would also prefer right-aligning keywords before name definitions so names are aligned, e.g.:
eqtype apple
   and orange

datatype apple  = Foo | Bar
     and orange = Baz

Unsure if this is a popular opinion, though.

@shwestrick Thinking about how to implement this. Instinctively, I want to compute the length of each column and (left or right) align by padding with spaces. However, I'm not sure how this would work with comments and non-atomic components (e.g., ('a, 'b, 'verylong...) apple). Do you think something like this would be workable, or perhaps this alignment should be a doc operation?

Yeah I've thought a bit about this and I'm not sure what the best solution is.
The simplest solution, from the layout perspective, is something like
datatype doc =
...
| Table of {numRows: int, numCols: int, elem: (int * int) -> doc}

And you could imagine augmenting it with padding/justification info, like a function int -> {Left | Right | Center} which describes how to justify each column.

It might be possible to instead allow each element of the table to be a doc, with nested tables. Not sure how to lay those out.

I would also prefer right-aligning keywords before name definitions so names are aligned

Personally I find this really difficult to read, because I look to the left to see where the next declaration begins, rather than at the names.
This maybe isn't too bad?
eqtype apple
and    orange

datatype apple  = Foo | Bar
and      orange = Baz

It might be possible to instead allow each element of the table to be a doc, with nested tables. Not sure how to lay those out.

Hmm, yeah... I think we'd need to support at least a few tokens in a row (Token.t Seq.t?), due to type parameters:
datatype ('a, 'b) apple = Foo 'a | Bar of 'b
and orange              = Baz of (int, int) apple

Personally I find this really difficult to read, because I look to the left to see where the next declaration begins, rather than at the names.

Ah, I see. My eye tends to center around the sort/name, I think (datatype foo, and bar), which makes right alignment read more naturally.
I wonder how each of our approaches fare as the length of type names vary. (I hadn't thought about it, but?)
Some sample cases:
datatype foo = Foo
and bar      = Bar

(* left/left *)
datatype foo = Foo
and      bar = Bar

(* right/left, right/right *)
datatype foo = Foo
     and bar = Bar

datatype ('a, 'b) apple = Foo
and orange              = Bar

(* left/left *)
datatype ('a, 'b) apple = Foo
and      orange         = Bar

(* right/left *)
datatype ('a, 'b) apple = Foo
     and orange         = Bar

(* right/right *)
datatype ('a, 'b) apple = Foo
     and         orange = Bar

datatype apple      = Foo
and ('a, 'b) orange = Bar

(* left/left *)
datatype apple           = Foo
and      ('a, 'b) orange = Bar

(* right/left *)
datatype apple           = Foo
     and ('a, 'b) orange = Bar

(* right/right *)
datatype           apple = Foo
     and ('a, 'b) orange = Bar

Just realizing - the left vs. right justification issue only arises in a few relatively uncommon cases for and: afaict val rec, type, eqtype, datatype, exception, structure, signature, functor. The other cases, val and fun (most common?) don't matter anyway, since they're three letters.

Just remembered another use case for this (in specs):
val twelve : int
and thirteen : int

(* formatted to *)
val twelve   : int
and thirteen : int

If values are declared together, should probably align their :s, so asymmetries aren't introduced simply due to variable name length.

Perhaps also:
type t =
  { apple : t
  , watermelon : t
  , orange : t
  }

(* formatted to *)
type t =
  { apple      : t
  , watermelon : t
  , orange     : t
  }

@HarrisonGrodin I'm thinking we could try adding this to the interface
val table: {numRows: int, numCols: int, elem: {row:int, col:int} -> doc} -> doc

I'm picturing that each doc element would be forcibly flattened, so that there are no "multirows" of the resulting layout. Tables themselves would be rigid. And, we would throw a runtime error if an element of a table is rigid (disallowing e.g. nested tables but of course other problematic elements as well).
I don't think this would be too difficult to implement. But it leaves the question of whether or not it is usable for writing pretty cases. One hangup is that you would need to be careful to not put possibly rigid things inside a table. Thoughts?

And, we would throw a runtime error if an element of a table is rigid (disallowing e.g. nested tables but of course other problematic elements as well).

This seems problematic to me; it seems important that all code have at least some autoformatted output.
Forcible flattening sounds somewhat reasonable, although this probably shouldn't apply to the last doc on a line. For example:
(* should align ='s *)
val pat1 = exp1
and pat2 = exp2

val x   =
  case bar of
    nil     => 0
  | x :: xs => x + prod xs
and foo = exp2

A similar issue shows up for many other and-able keywords, such as fun, type, structure, and datatype, all of which can have multi-line/possibly rigid docs at the end of a row.

Oh, just realized - we probably want nested tables, as long as they're nested only at the end of another table, in cases like this:
type short            =
  { label1 : t1
  , label2 : t2
  }
and  veryveryverylong =
  { label3 : t3
  , label4 : t4
  , label5 : t5
  }

And, we would throw a runtime error if an element of a table is rigid (disallowing e.g. nested tables but of course other problematic elements as well).

This seems problematic to me; it seems important that all code have at least some autoformatted output.

Well, keep in mind these are implementation details. It restricts how you use tables, not what the pretty-printer can do. If there was a runtime error due to rigid inside table, that would be a bug in our code.

Forcible flattening sounds somewhat reasonable, although this probably shouldn't apply to the last doc on a line.

You can do this without changing the table definition. If the last doc shouldn't be flattened, then we can just take it out of the table, and prettify it separately.

type short            =
  { label1 : t1
  , label2 : t2
  }
and  veryveryverylong =
  { label3 : t3
  , label4 : t4
  , label5 : t5
  }

More of an aesthetics point, but I think this is a great example of where we need to be careful with vertical alignment. The first equals definitely should not be way out there like that ;)

If there was a runtime error due to rigid inside table, that would be a bug in the implementation of the pretty printer.

Ohh, I see what you mean. :+1:

You can do this without changing the table definition. If the last doc shouldn't be flattened, then we can just take it out of the table, and prettify it separately.

Not sure I follow this - if the last doc in each row shouldn't be flattened, how could we insert it after each table row if the table was a single compound doc?

The first equals definitely should not be way out there like that ;)

Hmm... I can't decide if I agree or not! I like the principle that if definitions are given with and, they're "combined", and thus asymmetries induced due to name lengths should be modded out by; this means that programmers feel comfortable using any names, rather than trying to align word lengths to bring out the symmetry (e.g., hi/lo instead of high/low).
My instinct is that it's unusual that you would have short and veryveryverylong defined together via and, but if you do, it makes sense for the ='s to be aligned.

Another case for potential alignment I was just thinking about - of in datatype declarations. For example:
datatype foo =
  Apple of int
| Pineapple of string

(* should perhaps be formatted to *)
datatype foo =
  Apple     of int
| Pineapple of string

I think this is probably sensible, since it's dual to aligning the :s in a record definition.

You can do this without changing the table definition. If the last doc shouldn't be flattened, then we can just take it out of the table, and prettify it separately.

Not sure I follow this - if the last doc in each row shouldn't be flattened, how could we insert it after each table row if the table was a single compound doc?

You would need to have in hand the last doc of the table anyway, in order to define what the elements of the table are. So all you need to do is just not give that particular doc to the table, and instead do something like beside (mytable, makePretty last).

it makes sense for the ='s to be aligned.

I think I agree only if the =s are touching, i.e. no extra rows in between. Otherwise, the symmetry is lost.
Actually, this might be a nice general principle: vertical alignment only when the aligned tokens are on adjacent lines.

You would need to have in hand the last doc of the table anyway, in order to define what the elements of the table are. So all you need to do is just not give that particular doc to the table, and instead do something like beside (mytable, makePretty last).

Think I might be missing something here; given last1 through lastn, we'd want beside (row1, last1) $$ ... $$ beside (rown, lastn), right?

I think I agree only if the =s are touching, i.e. no extra rows in between. Otherwise, the symmetry is lost.
Actually, this might be a nice general principle: vertical alignment only when the aligned tokens are on adjacent lines.

Hmm, that's interesting; I think I'm okay with either. (I still feel a bit of the symmetry across multiple lines, but your suggestion might be the less obscure style.) It would make table formatting easier, I suppose (given multiline rows, just display in sequence with no alignment). What should happen if some of the =s are touching but not others, though? e.g.,
type foo = int
and  short =
  { label1 : t1
  , label2 : t2
  }
and  veryveryverylong =
  { label3 : t3
  , label4 : t4
  , label5 : t5
  }

Should the first two =s be aligned; all three; none? Similar issue with =>'s in case expressions:
case foo of
  pat =>
    long multiline expression
| longpat => 1
| longerpat => 2

I'm perfectly happy with always aligning the =>s no matter what (and I'd prefer this to no alignment), since on a large scale it suggests that the case arms are parallel to one another, even if one happens to be particularly long. Perhaps there's a clever middle ground, though?


duplication

Ok, not an issue, but I don't find how to send a message to you otherwise.
Perhaps interesting to join forces with https://github.com/MarkDurbin104/3dp.rocks which also generates lithopanes with javascript from ?

Good catch!  I've reached out to @MarkDurbin104 so let's see what we can make.


Add retry logic for schema registration failures

Codecov Report

Merging #142 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #142      +/-   ##
=========================================
+ Coverage   92.38%   92.4%   +0.02%
=========================================
  Files         135     135
  Lines        2232    2239       +7
  Branches      120     121       +1
=========================================
+ Hits         2062    2069       +7
  Misses        170     170

Impacted Files
Coverage Δ

...ala/hydra/kafka/services/TopicBootstrapActor.scala
97.5% <100%> (+0.23%)
:arrow_up:

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 35d2a8b...051bc47. Read the comment docs.


How does "Pause action" work during mission

Hello,  I am now studying the interrupt mechanism behind mission pause in the example of mavsdk
https://github.com/mavlink/MAVSDK/blob/main/examples/fly_mission/fly_mission.cpp
In this example, the variable "want_to_pause" is an atomic bool variable and initialized to be false (L202).
Then author subscribes to mission process and sets it true if the mission_progress.current  >=2 to activate the interruption.
This interruption will start the code to pause the mission, then wait for 5s and then resume the mission. (L232-264)
However, i have some questions:

I do not observer the variable "want_to_pause" be reset to "false"; thereby this interruption will occur only once at mission_progress.current  ==2, i.e. mission >=3 will not call this interruption , is it right? How do I enable the pause properly, change "want_to_pause" variable back to "false"  at line L263?
During the pause process, I can use the offboard mode ?
The code L228-230  concerning " while  (!want_to_pause)" serves for which reason? It has any connection with the interruption ?

I do not observer the variable "want_to_pause" be reset to "false"; thereby this interruption will occur only once at mission_progress.current ==2, i.e. mission >=3 will not call this interruption , is it right? How do I enable the pause properly, change "want_to_pause" variable back to "false" at line L263?

It's only set to true once, correct.
You could also call it at every waypoint like this:
    mission.subscribe_mission_progress([&want_to_pause](Mission::MissionProgress mission_progress) {
        want_to_pause = true;
    });

Then you would have to reset it somewhere else, e.g.
while (!want_to_pause) {
    sleep_for(seconds(1));
}
want_to_pause = false;

During the pause process, I can use the offboard mode ?

Yes you can. Pause just means it goes to Hold/Loiter mode.

The code L228-230 concerning " while (!want_to_pause)" serves for which reason? It has any connection with the interruption ?

This waits until the flag is set to true.

Thanks @julianoes


Web API doesn't work even though REPL works (path issue)

I setup a Quasar instance connected to a Mongo sharded replica set with nginx infront. The REPL works fine. But the REST interface doesn't.
To get a sense of the "file" structure,
(v27.0.10) 💪 $ ls
dbs@ (mongodb)
(v27.0.10) 💪 $ cd dbs@
(v27.0.10) 💪 $ ls
heroku_vzf3h06d/

And inside this, there's all my collections. I wanted to do a select * on the users collection (say).
I tried all of the below urls: (None worked)

/query/fs/dbs/heroku_vzf3h06d/?q=select * from users
/query/fs/dbs@/heroku_vzf3h06d/?q=select * from users
/query/fs/dbs@ (mongodb)/heroku_vzf3h06d/?q=select * from users
/query/fs/dbs/?q=select * from users
/query/fs/heroku_vzf3h06d/?q=select * from users

Then I added /local infront and tried a couple (None worked)

/query/fs/local/heroku_vzf3h06d/?q=select * from users
/query/fs/local/?q=select * from users

For all this, I got this error in the API:
{
  "error": {
    "status": "Directory path expected.",
    "detail": {
      "message": "Expected '/dbs/heroku_vzf3h06d' to be a directory.",
      "path": "/dbs/heroku_vzf3h06d"
    }
  }
}

Here's my config file:
{
  "server": {
    "port": 8080
  },
  "metastore": {
    "database": {
      "h2": {
        "location": "~/quasar-metastore.db"
      }
    }
  },
  "mountings": {
    "/dbs/": {
      "mongodb": {
        "connectionUri": "<url to mongo replica set>"
      }
    }
  }
}

Quasar version: 27.0.10

The error "Expected '/dbs/heroku_vzf3h06d' to be a directory." leads me to believe nginx might be stripping a trailing slash. @sreejithr could you check your nginx conf to see if that might be the case?


How to get more info from pokemons query

First thanks for this awesome api 👏 been using it in one of my side projects.
When I use pokemons query I get an URL to pokeapi rest service I wanted info that comes from there, how I'm supposed to get this info using apollo client?
import { gql, useQuery } from '@apollo/client';
import React from 'react';
import { ListItem, UnorderedList } from './styles';

const GET_POKEMON_DETAILS = gql`
    {
        pokemons(limit: 150, offset: 0) {
            results {
                url
                name
                image
            }
        }
    }
`;

export const Home: React.FC = () => {
    const { loading, error, data } = useQuery(GET_POKEMON_DETAILS);
    if (loading) return
Loading...
;
    if (error) return
Error :(
;

    return (
        <UnorderedList>
            {data.pokemons.results.map((x: any) => (
                <ListItem key={x.name}>

{x.name}

                </ListItem>
            ))}
        </UnorderedList>
    );
};

export default Home;

This is what I been doing on my codebase.
What I wanted is a way to do
const GET_POKEMON_DETAILS = gql`
    {
        pokemons(limit: 150, offset: 0) {
            results {
                url
                name
                image
                types
               stats
               ...
            }
        }
    }
`;

We have Pokemon query.
If you need a detail info you should use it.

Is it possible to use the pokemon query to get the first 150 Pokémons for example ?

Yes, bit not recommended.
It's very bad practices.

Ideally, you should only show the name and image on the list, then routing to other page to see the detail of Pokémon

Okay thank you 👌


Added customizable filter key for flexibility

This PR adds a new user config for createOptions to customize how to run a search on given options. This allows users to add custom JSX.Element as labels without worrying about search results.

👋 I was going to say I don't think this would solve what you need. Did you still have a problem to solve here or all good now?


Update Ray to Foundry VTT V9.233

Take Points as parameters
new method towardsPoint
new method towardsPointSquared
docs
remove _getIntersection
remove deprecated normAngle

Done.


WSL2 Ubuntu GUI apps are not showing up in the Windows 11 Start Menu

Windows build number:
10.0.22622.0
Your Distribution version:
Ubuntu Preview 22.10
Your WSL versions:
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.42
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22622.590
Steps to reproduce:

Enable/Download WSL
Download Ubuntu or Ubuntu Preview, either from the command line or the Microsoft Store
Install any GUI app
Open the Start Menu

WSL logs:
pulseaudio.log
stderr.log
weston.log
WSL dumps:
No response
Expected behavior:
The installed GUI apps should have a shortcut on the Start Menu, under the Ubuntu-Preview folder.
Actual behavior:
The shortcuts for the GUI apps are not created in the Start Menu. Neither is the Ubuntu or Ubuntu-Preview folder in "%appdata%\Microsoft\Windows\Start Menu\Programs". The .desktop files for the apps are generated just fine. This issue happens both with Ubuntu and Ubuntu Preview.

I have the same issue, it started very recently. Uninstalling the WSL Preview from the Store and using WSL from the Windows feature + Windows Update instead fixed it, so I suppose there might be a bug with the newest WSL version from the Store.

I have the same issue, it started very recently. Uninstalling the WSL Preview from the Store and using WSL from the Windows feature + Windows Update instead fixed it, so I suppose there might be a bug with the newest WSL version from the Store.

Hmm, interesting. Do you know if I'll lose my distro and its files if I do what you suggested?

I have the same issue, it started very recently. Uninstalling the WSL Preview from the Store and using WSL from the Windows feature + Windows Update instead fixed it, so I suppose there might be a bug with the newest WSL version from the Store.

Hmm, interesting. Do you know if I'll lose my distro and its files if I do what you suggested?

You shouldn't lose anything, as that will only uninstall the WSL app package and keep the distro package. However, if you're worried about that, you could copy over the ext4.vhdx to another folder during the process and move it back afterwards (or make a copy but if you're like me, that's a 180 GB file 😅).

@VictorPLopes, thanks for reporting the issue, this is known regression fixed by below PR, it will be fixed in next release, thanks!
https://github.com/microsoft/weston-mirror/pull/104

I have the same issue, it started very recently. Uninstalling the WSL Preview from the Store and using WSL from the Windows feature + Windows Update instead fixed it, so I suppose there might be a bug with the newest WSL version from the Store.

Hmm, interesting. Do you know if I'll lose my distro and its files if I do what you suggested?

You shouldn't lose anything, as that will only uninstall the WSL app package and keep the distro package. However, if you're worried about that, you could move over the ext4.vhdx to another folder during the process and move it back afterwards (or make a copy but if you're like me, that's a 180 GB file 😅).

Alright, thank you! Although, since hideyukn88 confirmed it to be a known issue I'll just wait for the next release.

@VictorPLopes, thanks for reporting the issue, this is known regression fixed by below PR, it will be fixed in next release, thanks!
microsoft/weston-mirror#104

I see, thanks for informing me!

@VictorPLopes, thanks for reporting the issue, this is known regression fixed by below PR, it will be fixed in next release, thanks!
microsoft/weston-mirror#104

Any ETA for the new release? This currently is a huge blocker since I cannot use any graphical apps in my freshly installed WSL, and the Windows Store doesn't allow me to install previous versions of the WSL package.

@VictorPLopes, thanks for reporting the issue, this is known regression fixed by below PR, it will be fixed in next release, thanks!
microsoft/weston-mirror#104

Any ETA for the new release? This currently is a huge blocker since I cannot use any graphical apps in my freshly installed WSL, and the Windows Store doesn't allow me to install previous versions of the WSL package.

The WSL package from Windows Update works fine, you could use that temporarily. See the discussion above.

You can use the WSL Preview packages from here https://github.com/microsoft/WSL/releases. Uninstall the current WSL Preview package with Remove-AppxPackage command in Powershell and install the msixbundle from that link with Add-AppxPackage command.

@VictorPLopes, thanks for reporting the issue, this is known regression fixed by below PR, it will be fixed in next release, thanks!
microsoft/weston-mirror#104

Any ETA for the new release? This currently is a huge blocker since I cannot use any graphical apps in my freshly installed WSL, and the Windows Store doesn't allow me to install previous versions of the WSL package.

The WSL package from Windows Update works fine, you could use that temporarily. See the discussion above.

I cannot use it since my computer is on the Windows Insiders Program and doesn't let met download the normal WSL package (which should never be a reason for not being able to downgrade but apparently it is)

Uninstall the store version and then install via wsl --install --inbox

I have this issue but nothing I've tried fixes it.  Also wsl --install --inbox does nothing except print out the help text.

no luck here.

I got the same problem. I have managed to create the shortcuts manually.
Create the shortcut here:
C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Ubuntu(distro name)
VLC.lnk
C:\Windows\System32\wsl.exe ~ -d Ubuntu /usr/bin/vlc
It is working like a charm :-)

Hi all, WSL 0.70.0 is just released, and this should address this issue, please update it by wsl --update, and if the problem still persists, please let us know by reopening this issue, thanks!

Hi all, WSL 0.70.0 is just released, and this should address this issue, please update it by wsl --update, and if the problem still persists, please let us know by reopening this issue, thanks!

It's working fine now, thank you!


Add Admin to a specific Tenant

As a MET Admin I want to be able to assign a Tenant "Instance Admin"  so that it can manage the tenant instance.

Add Instance Admin via keycloak
Create a new Tenant Ministry in the database (potentially postman script)

@saravanpa-aot  @marieanik @sidtobias    Is this something we need to complete before end of project? I would argue it's not directly outlined in the charter, but wondering if you feel strongly about finishing it... or documenting it and including it Parking Lot.

@carlygreenehill methinks this is included in the roles you may have sorted but may have different names.  Super Admin being Steve and Tenant Admin being a Ministry Super User

@sidtobias not quite. In our original designs, there was the following hierarchy:

MET Admin - example, Steve
Instance Admin - example, Carly or Geoff for EAO
Super User - example, Josh
Team Members - example, Brennan Hutchinson
Viewer - example, Julie Chace

We haven't made any screens custom to the MET Admin or Instance Admin. But that's why I want to check in with @saravanpa-aot because as long as Steve has a way to appoint a Tenant Admin on the back end, we should be good.

@sidtobias not quite. In our original designs, there was the following hierarchy:

MET Admin - example, Steve
Instance Admin - example, Carly or Geoff for EAO
Superuser - example, Josh
Team Members - example, Brennan Hutchinson
Viewer - example, Julie Chace
Reviewer - someone invited to review a specific engagement/survey

We haven't made any screens custom to the MET Admin or Instance Admin. But that's why I want to check in with @saravanpa-aot because as long as Steve has a way to appoint a Tenant Admin on the back end, we should be good.

we can support MET Admin in the backend..We need to pull this story in the sprint

New group INSTANCE_ADMIN has been created in keycloak with role create_tenant.


Adding support for new (index, point) lambda signatures

Once LLNL/ygm/#128 is merged into develop, I'll revert the cmake fetch_content pointer and merge this here.

I forgot about this PR waiting on YGM PR #128. The YGM PR has been merged in, so this can be wrapped up.
I'm currently working on porting Saltatlas to use the API changes to the ygm::map.

@steiltre This PR is now ready for merge. We're finally able to dump the pair_bag class. We currently rely on the pair-specific modifications I made to ygm::container::bag::for_all, but that will change once we add lambda adapters.


Set feed url based on upgrade ring during installer [master]

When upgrading internal installations of VFSForGit (as determined by the explicit presence of upgrade.ring), configure a NuGet feed URL.
Scenarios:
No GVFS installation
2019-02-19 15:33:11.910   GetConfiguredUpgradeRing: Call to gvfs config upgrade.ring failed with Incorrect function
2019-02-19 15:33:11.910   SetNuGetFeedIfNecessary: No upgrade ring configured. Not configuring NuGet feed.

No configured ring
2019-02-19 15:38:13.163   GetConfiguredUpgradeRing: upgrade.ring is
2019-02-19 15:38:13.163   GetConfiguredUpgradeRing: Unknown upgrade ring:
2019-02-19 15:38:13.163   SetNuGetFeedIfNecessary: No upgrade ring configured. Not configuring NuGet feed.

Bogus ring
2019-02-19 15:30:05.764   GetConfiguredUpgradeRing: upgrade.ring is bogus
2019-02-19 15:30:05.764   GetConfiguredUpgradeRing: Unknown upgrade ring: bogus
2019-02-19 15:30:05.764   SetNuGetFeedIfNecessary: No upgrade ring configured. Not configuring NuGet feed.

Slow ring
2019-02-19 15:35:08.156   GetConfiguredUpgradeRing: upgrade.ring is slow
2019-02-19 15:35:08.463   SetNuGetFeedIfNecessary: Set upgrade.feedurl to https://pkgs.dev.azure.com/microsoft/_packaging/VFSForGit-Slow/nuget/v3/index.json
2019-02-19 15:35:08.833   SetNuGetFeedIfNecessary: Set upgrade.feedpackagename to Microsoft.VfsForGitEnvironment

Porting from release branch #803


[4.0.0-rc-2] Link on content overview

Bludit v3 displayed the links of contents. To link internally (with copy & paste) it should be the same in v4.

its the same ticket right?
https://github.com/bludit/bludit/issues/1406


fix redirect link

Fix the link from within this github repo to the website, which is more intuitive for users.

This change is

@lvjiangzhao We just fixed a Travis issue, so if you update the branch, the Travis CI check should now work. Thx

thanks, branch rebased


What does "leftover" mean?

Can you please update the README to explain the difference between Report specs: and leftover specs:
thanks

Thanks for pointing this out. I added explanation https://github.com/ArturT/knapsack#what-does-leftover-specs-mean

Hello. I found this issue because I'm seeing leftover specs, but the link to the explanation above doesn't work anymore. Where can I find the explanation? Thanks!

@monfresh Here is the link to explanation https://docs.knapsackpro.com/ruby/knapsack#what-does-leftover-specs-mean


Is there any way to change dark mode to light mode in HXPhotoPicker?

I tried 2 of the styles below but none of them have light mode colors. Does HXPhotoPicker support Light Mode?
public enum AppearanceStyle: Int {
    /// 跟随系统变化
    case varied = 0
    /// 正常风格，不会跟随系统变化
    case normal = 1
    /// 暗黑风格
    case dark = 2
}

i meet the same problem. But I can change the style in Demo, I do not know where is the different.


Add redirect to Checkout IO

What's the purpose of this pull request?
Make it possible to use Checkout IO in Jamstack
How it works?
Tell us the role of the new feature, or component, in its context.
How to test it?
Describe the steps with bullet points. Is there any external link that can be used to better test it or an example?
References
Spread the knowledge: is there any content you used to create this PR that is worth sharing?
Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process

Tackled in another way. Related to this PR


Can't install on Arch.

Have no experience with Go, so I am not sure if it related to Pillager.
Describe the bug
Can't install.
To Reproduce

Have Arch linux
Try to install

Expected behavior
Successful install
Log
#go get github.com/brittonhayes/pillager
go: downloading github.com/brittonhayes/pillager v0.5.10
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/gookit/color v1.5.0
go: downloading github.com/spf13/afero v1.6.0
go: downloading github.com/spf13/viper v1.9.0
go: downloading github.com/BurntSushi/toml v0.4.1
go: downloading github.com/zricethezav/gitleaks/v7 v7.6.1
go: downloading github.com/ghodss/yaml v1.0.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading golang.org/x/text v0.3.6
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/magiconair/properties v1.8.5
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: downloading github.com/mitchellh/mapstructure v1.4.2
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading gopkg.in/ini.v1 v1.63.2
go: downloading github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778
go: downloading golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/pelletier/go-toml v1.9.4
go: downloading github.com/go-git/go-git/v5 v5.3.0
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/jessevdk/go-flags v1.5.0
go: downloading github.com/sergi/go-diff v1.1.0
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351
go: downloading github.com/xanzy/ssh-agent v0.3.0
go: downloading golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
go: downloading golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading github.com/go-git/go-billy/v5 v5.1.0
go: downloading github.com/imdario/mergo v0.3.12
go: downloading github.com/emirpasic/gods v1.12.0
go: downloading github.com/go-git/gcfg v1.5.0
go: downloading github.com/Microsoft/go-winio v0.4.16
go: downloading gopkg.in/warnings.v0 v0.1.2
# github.com/spf13/viper/internal/encoding/toml
go1: internal compiler error: in add_method_declaration, at go/gofrontend/types.cc:10277
0x16c60b8 internal_error(char const*, ...)
        ???:0
0x6eb67f fancy_abort(char const*, int, char const*)
        ???:0
0x77f3c2 Import::import_func(Package*)
        ???:0
0x780f48 Import::read_named_type(int)
        ???:0
0x7815f3 Import::parse_type(int)
        ???:0
0x7817a5 Import::type_for_index(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, bool*)
        ???:0
0x782f62 Import::read_type()
        ???:0
0x7d2bc5 Pointer_type::do_import(Import*)
        ???:0
0x78167f Import::parse_type(int)
        ???:0
0x7817a5 Import::type_for_index(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, bool*)
        ???:0
0x782f62 Import::read_type()
        ???:0
0x7cdeb4 Struct_type::do_import(Import*)
        ???:0
0x78167f Import::parse_type(int)
        ???:0
0x7817a5 Import::type_for_index(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, bool*)
        ???:0
0x782f62 Import::read_type()
        ???:0
0x78131a Import::read_named_type(int)
        ???:0
0x7815f3 Import::parse_type(int)
        ???:0
0x78378a Import::read_types()
        ???:0
0x785033 Import::import(Gogo*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
        ???:0
0x775d1f Gogo::import_package(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, Location)
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.

Hey @Casul51! Sorry you're running into issues installing with arch!
I'll see if I can reproduce this on my end but in the meantime I have pre-built Linux releases available in the releases tab.
So you can download a working build of pillager while I check this issue out.

Well, actually I have I problem with it either.
λ ./pillager
bash: ./pillager: cannot execute binary file: Exec format error

rwxrwxrwx casual casual 10 MB Sat Dec 25 01:30:26 2021  ./pillager
./pillager: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=dwgKm1kuEMwf15sPAxKf/Gufm7yrj4Bnf_rrVn2aV/18PPasgz2XF2r2REnwQy/qcTkqlnc2cC1mg_8-6rg, stripped

Everything else works fine in my system, so I have no idea what's wrong.

Oh
My bad, I've downloaded ARM version

Pre-built binary works fine.

No worries at all. Awesome! Glad to hear that works for ya. I'll make some time to see what's up with the pillager Go install on arch.
For now I'm gonna mark this issue as closed since it sounds like you're up and running with pillager's pre-built binary.
But don't hesitate to open another issue if ya run into anything else.


Allow immediate integers for all STORE values

The spec says that all STOREs should permit an immediate integer type
as the value operand. Prior to this, the following (legal) Quil would
fail:
DECLARE ro REAL
DECLARE index INTEGER
STORE ro index 1

where instead one would have to write
DECLARE ro REAL
DECLARE index INTEGER
DECLARE val REAL
MOVE val 1
STORE ro index val

@notmgsk Looks like you didn't catch all instances of TYPECHECK-CONDITIONAL-INSTRUCTION. Aside from that, this looks fine.

great PR


Daily builds of skopeoimage produce new images each time (when no changes in base image or skopeo binary)

Originally reported in https://github.com/containers/skopeo/issues/2133 :

Currently, image builds are not idempotent (for example quay.io/skopeo/stable:latest image):
# using container-diff from https://github.com/GoogleContainerTools/container-diff

sudo container-diff diff daemon://quay.io/skopeo/stable@sha256:$PREV_HASH daemon://quay.io/skopeo/stable@sha256:$CUR_HASH --type=file

-----File-----

These entries have been added to quay.io/skopeo/stable@sha256:$PREV_HASH: None

These entries have been deleted from quay.io/skopeo/stable@sha256:$PREV_HASH: None

These entries have been changed between quay.io/skopeo/stable@sha256:$PREV_HASH and quay.io/skopeo/stable@sha256:$CUR_HASH:
FILE                                                               SIZE1        SIZE2
/usr/lib/sysimage/rpm/rpmdb.sqlite                                 8.6M         8.6M
/var/lib/dnf/history.sqlite-wal                                    3.9M         3.9M
/etc/pki/ca-trust/extracted/java/cacerts                           158K         158K
/var/lib/dnf/history.sqlite                                        132K         132K
/var/lib/dnf/history.sqlite-shm                                    32K          32K
/etc/shadow                                                        504B         504B
/etc/shadow-                                                       475B         475B
/var/log/hawkey.log                                                240B         240B
/etc/machine-id                                                    33B          33B
/var/lib/dnf/repos/fedora-376ef8e983c65ce0/countme                 26B          12B
/var/lib/dnf/repos/updates-modular-29738c1a65877bb4/countme        26B          12B
/var/lib/dnf/repos/updates-b7ba662710b98f1a/countme                12B          12B

Update: I'm currently working on a chain of tasks that will result in us publishing some unchanging image tags.  Most likely they will be tags with a suffix of -stable or something similar.
Actually, I think the tracker for this is public:
https://issues.redhat.com/browse/RUN-2025

Hi @cevich I had one further thought that I'd like to share here. In my particular use-case, I'd like to be able to pin to a digest and allow for automated tools (Dependabot, et. al.) to find new versions. For example if I were to specify:
FROM quay.io/skopeo/stable:v1.14.0@sha256:3eeae9f95a5f5ebc9ceca4b1745040ffb22db4b4bf6027bb933925e571701b7e AS skopeo

Dependabot would know it should make an update when the tag increments and/or the digest changes. With any luck, this will work in your updated pipeline without any effort. I just wanted to make sure you're at least aware of this desired functionality, so that you can decide if it's something you'd like to specifically test for.
Also as I typed this out, I occurred to me that you might find it awkward to name the image skopeo/stable-stable. Perhaps the current functionality should be retained under a new name like skopeo/nightly, or pushed as a "pre-release"?
I hope my feedback is helpful. I'm looking forward to seeing what you come up with.

Thanks for the feedback.  Yes, I'm sensitive to the dependabot and Renovate use-cases.  I dunno about dependabot, but Renovate uses the OCI image labels to figure out versions.  IIRC, it uses 'loose' semantic versioning by default, which would be compatible to their having a suffix after the version.
Hmmm, you're right about the weird looking name.  Maybe '-static' would be better? Continuing the skopeo example and picking a random version, the images would be as follows, and initially all point at the same thing.  Though that would change with every periodic build, except the -static tags that would be untouched:
quay.io/skopeo/stable:latest
quay.io/skopeo/stable:1.13.3
quay.io/skopeo/stable:1.13.3-static
quay.io/skopeo/stable:1.13
quay.io/skopeo/stable:1.13-static
quay.io/skopeo/stable:1
quay.io/skopeo/stable:1-static
quay.io/containers/skopeo:latest
quay.io/containers/skopeo:1.13.3
quay.io/containers/skopeo:1.13.3-static
quay.io/containers/skopeo:1.13
quay.io/containers/skopeo:1.13-static
quay.io/containers/skopeo:1
quay.io/containers/skopeo:1-static

Thanks again @cevich. I’m definitely looking forward to trying that out.

Hello again @cevich  - I wanted to share a thought that might make things easier and/or more semantic.
Many images will include a keyword indicating the base image that's being used. node:20.11.1-alpine is one example. So If it's feasible to create a build based on scratch - copying the binary + required libs, that would provide a conventionally semantic image name quay.io/containers/skopeo:1.13.3-scratch. And, it would likely accomplish an acceptable fix for this issue. Assuming of course, that the unwieldy amount of spurious changes are caused by underlying OS & library changes.
Hopefully this is helpful. Thanks again for looking into this issue.

Thank you for the feedback.  So if I understand correctly, these images being Fedora based, you propose I use a -fedora suffix instead of -static?
Assuming so, I agree that -static could be confusing in that these images are not actually providing staticly-compiled binaries.  So scratch copying wouldn't be possible w/o knowing which shared libraries to also haul over.
Some other possible suffix options could be:

-eternal
-immutable
-unvarying
-perpetual

Hello again @cevich,
I'm actually recommending using the -scratch suffix, and hauling over the shared libraries. I'm currently accomplishing this with the ldd utility.
 I just figured I'd volunteer this in case it provides you with more choices.

I'll need to talk this over with the team, but my gut is they'll say no.  It may be okay for the skopeo image.  But for podman and buildah I think they want some minimal extra tooling available (like dnf) - which hauls in an entire python stack :disappointed:

Fair enough. This looked like a simple & semantic solution to me. But if it doesn't look feasible for any reason, I'm sure the original solution using a -static (or other) suffix would be completely sufficient.

So in the case of Skopeo this seems more possible.  For the buildah and podman images though it's not going to work.  There's too many necessary dependencies in those images for an ldd hack to work long-term.  i.e. crun, pasta, shadow-utils, dnf, etc.  Though I do like the idea in terms of drastically shrinking the image size, unfortunately we've gotten enough community push-back that even replacing dnf -> microdnf isn't very possible :confounded:


Section with a single option returns empty match

var glob = require("glob")
glob.sync('/*');          // returns a bunch of entries
glob.sync('{/*}'); // empty []
glob.sync('/{}*'); // empty []
glob.sync('/{*}'); // empty []

Yeah, that's by design.  {} without any commas is a literal {}.  Try it in bash.
$ for i in {/*}; do echo $i; done
{/*}

You could argue that it's a bug in the design of the glob format, and I'd probably agree with you, I mean, it's freaking weird.  But it is what it is.  The goal of this module is to implement glob, not fix it.


docs: How can We upload image to server?

Description
Hello,
I'm trying to upload an image on the server using form data in Postman. I'm getting Image at the server as a string in this format { name:<PHONE_NUMBER>614.jpeg, contentType: image/jpeg }. I'm confused about how to handle this and save to server.

I'm about to try the same thing. I'm using this as an example.
https://github.com/AseemWangoo/flutter_programs/blob/master/experiment_with_dartfrog/server/routes/api/v1/rekognizeIfCelebrity/index.dart
  final imageBytes = base64Decode(bytes);
  final celebrities = await dataSource.recognizeIfCelebrity(imageBytes);

Closing out tickets that are old/stale and have no activity. If this question is still open please create a new issue that can be triaged.


Model can't see camera input or screenshare if I talk with it via text. Sees only if I start speaking with audio from the beginning.

If I start conversation with text, then turn on the camera, and ask if it sees something with text, it responds that it can't (if I convince it that it can it starts making up things, i.e. hallucinates)
If I start with text, turn camera on, and ask if it sees with my voice, it starts seeing (I'm sure). If I just turn the mic on, but still ask with text, it still says it cannot see, so any voise input is mandatory.
So it only sees if I ask it with voice. Same thing applies to screen share, obviously.

I just checked it at Ai Studio and it is an issue there too. Sooooo.... Either my and Google's wrapper contains some major error, or it is a server thing. I will check if it's a former.

I checked Google's React based implementaion, and when I connect to the server it turns on the mic automatically and sends client.realtimeInput from the beginning so the issue doesn't appear. However, if turn off the mic, disconnect from the server, and connect again then since the mic is turned off by from the start the issue appears. It cannot see untill asked with audio.
So I guess it is a server problem or it was intended this way.


MeeCreeps are not disapearing after chopping trees

Hello,
If I am using the Chop Tree command to mecreeps, they will not disappeare automaticaly as before. I dont know if this is a bug or not I am just informing you :)
I am using the latest version from MeeCreeps and forge version 2560.
Thank you

Found the issue and will be fixed next release


Stop carousel animation queue to build up

Hello,
I've been looking all over the internet for a hint but I don't seem to find one so I decided to ask here.
I have this carousel that's modified as follows:

Carousel has a left part, that's the images holder;
At the right part is the carousel-indicators which is a list of text links

My problem: When I go fast trough the list (the carousel-indicators) up and down, the animation queue is building up so when I stop moving up and down, there's a period of time that the carousel keeps changing slides quickly in the order I moved I mouse over.
I've looked up that there is this stop() method that's hooked before the animate method, but I am not sure how it will be the best way of overriding bootstrap's carousel js. Looked in the documentation, there's nothing about this stuff.
Thanks in advance for your time guys and I hope this question would be helpful for a lot of other people as well.
Best Regards

I've looked up that there is this stop() method that's hooked before the animate method

Bootstrap only uses CSS3 animations, not jQuery animations, so that method isn't applicable.

the animation queue is building up so when I stop moving up and down, there's a period of time that the carousel keeps changing slides quickly in the order I moved I mouse over.

There isn't an explicit queue, but what you're running into is this:
https://github.com/twbs/bootstrap/blob/b9b824c5922eca4e7c02ecfe8f2836cbfb38ec7e/js/carousel.js#L88
When you click a carousel-indicator, clickHandler gets called, and it ends up calling to(slideIndex) to switch to the relevant slide.
If to is called while a slide animation is already in progress, a callback is setup that waits for the sliding to complete (i.e. for the slid.bs.carousel event to fire) and then retries the .to(slideIndex) call. If clickHandler gets invoked many times quickly, this will result in many pending to callbacks. You can clear these callbacks via $('#your-carousel-here').off('slid.bs.carousel'), although if you have your own event listeners for that event, this will have the unfortunate side-effect of unsubscribing them.

Thank you @cvrebert for your input.
I will try the solution suggested by you. I'm afraid it won't work though, because I have another event handler the. The thing is... I use the carousel indicators on-click event. On hover you see the image for that carousel indicator (topic title) and on click, you're forwarded to the page for that topic.

hm @cvrebert was right on.
unfortunately without a bit of hacking i dont think we have the means to do what you want right now.


Add option to overwrite original subtitle

This PR adds an option called overwrite_old_sub which when set to true will save the retimed subtitle as the original subtitle.

Thank you!
The new option is not mentioned in the docs.


Store user that submitted a form

Taken from #19
Description:
We've added authentication in #19, so we now need to store the user that submits the form.
We could also add a firebase security rule, if possible, to make sure only authenticated users can submit the form - check https://firebase.google.com/docs/database/security/user-security and https://gist.github.com/codediodeio/6dbce1305b9556c2136492522e2100f6#file-database-rules-json-L20).
We also need to check that the data submitted by users that were deleted or disabled is persisted.
Assumptions:
TODO:

store user that submitted the form
add firebase security rule to make sure only authenticated users can submit the form
check that data submitted by users that were deleted or disabled is persisted
make sure users that were disabled/deleted cannot submit the form

ACs:

moved to https://github.com/BMMRO-tech/BMMRO/issues/40


Get Maximum Available GPU using Prometheus Data

This PR implements changes that include using Prometheus metrics from dcgm-exporter to obtain maximum available GPUs for users at a given time.
Related PR: https://github.com/opendatahub-io/odh-manifests/pull/551

Testing Steps:

Ensure you have GPU Operator installed and GPU nodes enabled in the cluster
Install ODH Operator
Scale the Operator to 0 and Update Jupyter Hub DC with custom image (This image can be used for testing : quay.io/vhire/jupyterhub-img:prom-gpu16)
Update jupyterhub-cluster role with permissions given here - https://github.com/opendatahub-io/odh-manifests/pull/551/files
Verify available GPUs in Spawner UI.


[review] revisit apply_member_pointer

apply_member_pointer seems to be trying to do too much. I can get a
pointer to member data of any type, unless that data member is itself
a pointer to member or a pointer to function, in which case I get
something else entirely. Additionally, the description doesn't mention
that PMDs also get special handling.

from http://lists.boost.org/Archives/boost/2017/04/234173.php

Is it useful at all? Should it be split into multiple traits, or removed entirely? What was the rationale for the current design?


Updated to support TLS/SSL on Stratum ports.

Updated configuration to fully implement TLS Password requirement for PFX certificate, when enabling SSL on a Stratum port.  Merged from Coinfoundry repository update.

Cancel


${DS_PROMETHEUS} not processed in Kubernetes GrafanaDashboard kind

We're integrating Strimzi with Prometheus/Grafana. This URL: https://github.com/strimzi/strimzi-kafka-operator/blob/master/metrics/examples/grafana/strimzi-kafka.json - defines a Strimzi/Kafka dashboard.
If I hand-import the dashboard JSON into the Grafana UI, the dashboard works fine. (Precursor steps are to deploy a Prometheus instance and a GrafanaDataSource for Prometheus.)
However, if I include the dashboard JSON - as is - into a GrafanaDashboard CR like this:
apiVersion: integreatly.org/v1alpha1
kind: GrafanaDashboard
metadata:
  name: strimzi-kafka
  namespace: my-ns
  labels:
    app: grafana
spec:
  name: strimzi-kafka.json
  json: >
    {
      "__inputs": [
        "name": "DS_PROMETHEUS"
        ...
      ],
      ...
      "panels": [
         {
         ...
         "datasource": "${DS_PROMETHEUS}"
         ...

The dashboard does get loaded  by Grafana, but the datasource variable replacement apparently does not take place in this code path. So the dashboard in the UI fails with "Datasource named ${DS_PROMETHEUS} not found"
The specific steps are:

Deploy Strimzi/Kafka cluster
Deploy Prometheus CRs
Ensure Prometheus is scraping Kafka
Subscribe Grafana Operator v2.0.0
Deploy GrafanaDataSource CR
Deploy GrafanaDashboard CR
Deploy Grafana CR (e.g. example from https://operatorhub.io/operator/grafana-operator)
Port forward 3000 to Grafana pod
Access the Grafana UI from the browser
Observe that the dashboard is present, but is unable to resolve the data source

Is this by design - or - am I doing something wrong? If I hand-edit the resulting grafana-dashboards configmap generated by the Grafana Operator and replace all occurrences of "${DS_PROMETHEUS}" with "Prometheus" - the dashboard then works. So it looks like - in order to use an exported dashboard JSON I have some text replacement to do in the GrafanaDashboard CR. I would have expected the JSON to be handled identically by Grafana whether it flows in from the UI via import, or from a custom resource.
Thanks

@aceeric I've hit similar issues with exported dashboards that have the __inputs field populated. My best guess is that Grafana does an additional step of resolving the datasource when you import via UI. But that doesn't seem to happen when provisioning the dashboard from the file system (as it's the case with the Grafana Operator).
We're currently working to change the Operator to use the Grafana API directly instead of provisioning and my hope is that this also resolves the import issue. But this issue suggests that it could still be a problem even when importing via API: https://community.grafana.com/t/dashboard-import-with-datasource-variable/4896

Thanks for the response!

I've hit exactly the same issue as described with ClickHouse dashoard
Works fine when imported manually, unresolved DS_MYPROMETHEUS when used as GrafanaDashboard Custom Resource.
As far as I see, when importing dashboard as .json file manually, you has to specify data source to be used (which is correct). While there is no way to specify datasource in GrafanaDashboard Custom Resource - which seems to be incorrect.
Looks like new field in GrafanaDashboard custom resource is required, which would point to the datasource where to pump data from (as what you has to specify manually during import .json file). And this specified datasource name would be used in imported .json dashboard specification.

Same here, I want to import existing dashboards and have to sed to replace all datasources occurence in the JSON file before creating the GrafanaDashboard Custom Resource.
Having a field in the CRD would indeed be really useful

Proposing a fix for this in #95

I've created a quay tag named import-datasources if anyone want's to give it a try.


[Core] Currency.compareTo #3358

The following test fails for the last two lines. compareTo returns
btc.compareTo(Currency.LTC) --> -10,
xbt.compareTo(Currency.LTC) --> 12
To fix, I think we need to add look at Currency.compareTo, subtracting hashcodes looks like it should work. CurrencyPair.compareTo looks ok too. so wondering how to fix.

@Test
public void testCompareTo() {
Currency btc = Currency.BTC;
Currency xbt = Currency.XBT;
assertThat(btc.equals(btc));
assertThat(btc.equals(xbt));
assertThat(xbt.equals(btc));
assertThat(xbt.equals(xbt));

assertEquals(btc.compareTo(xbt), 0);
assertEquals(xbt.compareTo(btc), 0);

assertEquals(btc.compareTo(Currency.LTC), xbt.compareTo(Currency.LTC));
assertEquals(btc.compareTo(Currency.ETH), xbt.compareTo(Currency.ETH));

}

XBT is not the same as BTC.

https://themoneymongers.com/what-is-xbt-btc/
Is XBT the same as BTC?
Yes, XBT or BTC is the same thing, i.e., BTC. The only reason for the confusion is because some exchanges are using the term XBT while the majority of them are using BTC because that's more

XBT seems to be the ISO code, whereas BTC is the crypto friendly code

https://support.kraken.com/hc/en-us/articles/360001206766-Bitcoin-currency-code-XBT-vs-BTC
Bitcoin currency code: XBT vs BTC
Being that Bitcoin is decentralized, there is no standard, nor governing body, to dictate what notation should be used for it. Nonetheless, "BTC" has been the generally accepted abbreviation for Bitcoin stemming from the early days of Bitcoin.
"XBT" is a new abbreviation for Bitcoin that is starting to come into use, and reflects its growing legitimacy as an international currency.
The abbreviation "XBT" comes from the International Standards Organization (ISO) that maintains a list of internationally recognized currencies. The standard dictates that if a currency is not associated with a particular country, it should begin with an “X”, hence "XBT". Another example of this is the abbreviation for gold, "XAU".

I sense a lot of reluctance on this solution, what would make everyone more comfortable?
We are going to have to deal with all the X codes
https://en.wikipedia.org/wiki/ISO_4217#Cryptocurrencies

Some exchanges use XBT and some BTC. We've had discussions in the past about adding a "unified" symbol converter, but we don't want to do it. I think because there are some symbols that overlap.


Workaround against error caused by importing protected/private object properties in PHP 7

Issue
import() method in \Timber\Core may cause fatal error in PHP 7 in a case if it receives object containing protected / private properties as input. I've prepared gist that demonstrates problem.
Problem arises when several factors are came together:

get_object_vars() function, used into method returns object property names for protected / private properties prefixed with \0 character (see comment)
Previous point by itself is not a problem without (object)(array)$var type casting used into \Timber\Post::get_info() method. This type cast (actually cast from object to array) causes protected / private object properties to be stored into resulted variable.

Solution
Provided fix ensures that no special chars are used into key names that eliminates issue.
Testing
Since problem is affected only PHP 7 and causes fatal error - it is not obvious that tests needs to be written, instead problem should be avoided in its entire.

Coverage increased (+3.2%) to 91.504% when pulling 4f6e1e92eebca7630b418425ea44e1a6d383625e on FlyingDR:import-error-php7 into c8e5568860cbc76f812654a29bafa9583bc0f3c9 on timber:master.

This is great @FlyingDR! I'm going to try to write a test to cover this one but then will merge


UBI may not be correctly modeled

I tried a simple OG-USA model run on CS (https://compute.studio/PSLmodels/OG-USA/107), setting all UBI parameters to 12000, and exempting it from taxes. These were the only parameters I changed:

The results were unexpected, especially debt reduction:

Might the UBI only be going into Tax-Calculator for MTRs/ETRs rather than as a government transfer?

@MaxGhenis Thanks for opening this issue, I have not done any runs with UBI parameters before, so this is very helpful to see.
First, let me point out that UBI is going through TC and therefore entering OG-USA through it's effects on ETRs/MTRs (though, in your example, MTRs should not be affected).
Second, yes, the results on D are surprising given the lower net tax revenues that should results from this program.  I'm also surprised by some of the other macro changes (esp C).  Let me try to simulate this run locally so I have more results to digest.
cc @rickecon

@MaxGhenis just fyi, your sim is private. Their private by default on c/s.

Thanks @hdoupe, changed to public.

@MaxGhenis, I see that OG-USA is not handling the UBI correctly.  This is for at least three reasons:

UBI is not considered net tax liability from TC, so we missing the effect of the UBI to the net tax liability out of TC (this is the numerator of the ETR calculation).  However, TC does include the UBI in the measure of expanded income (the denominator of the ETR calculation).  This would tend to push ETRs down after implementation of a UBI (though not in the accurate way, where we'd want both the numerator and denominator to move by the amount of the UBI).  See here for the relevant code.
When "cleaning" the data before tax function estimation, OG-USA drops values with very low income (mostly to avoid outlier ETR/MTRs when income values are near zero).  Generally, this works ok, because expanded income is the same for each observation out of TC for both the baseline and reform, so it's the same values dropped in each simulation.  However, a UBI (especially of the size you propose) can significantly change the filing units dropped due to the lower income threshold.  This will then cause sample selection to, in part, drive differences in the estimation of the ETR functions for the baseline and reform (and thus differences in the ETR functions aren't purely a function of the change in UBI parameters directly).
Outlier ETRs are dropped.  We've set the threshold for outlier ETRs at -15%.  But with a UBI of the size proposed here, this probably lead to many observations being dropped.  It would be nice to have the threshold used to determine outliers to vary with the policy proposed, but that is really tricky.  The -15% seemed fine for current law (where it was mostly the EITC pushing a handful of filers below this), but it is not great for the ETRs resulting from large UBI benefits.

I can open a PR to start fixing these issues.  But please, let me know:

If anything above isn't clear.
If you have suggestions for setting income and ETR thresholds when cleaning data.

To follow up, I propose the following:

Adjust the numerator in the ETR calculations in get_micro_data.py to include UBI benefits.
Drop the restriction that expanded_income is above some minimum values in txfunc.py, keeping the restrictions on labinc and capinc.  This will keep some income restrictions (which is helpful), but exclude income restrictions based on an income concept that includes policy parameters (and therefore whose values would differ under the baseline and reform policies).
Change the constant in txfunc.py for the minimum allowable ETR.

Thanks Jason, so will the ETR change correct the debt projections?

@MaxGhenis, making one change to OG-USA to include UBI in the ETR calculation in get_micro_data.py:
'etr': ((calc1.array('combined') - calc1.array('ubi')) /
                calc1.array('expanded_income'))

Seems to get consumption and gov't debt going in the expected directions:

Upon further thought, I don't think I should change the denominator in this calculation since expanded income in the model will include the UBI, it should be included in the calculation here as well.
I will test out some of the other proposed changes soon.

@MaxGhenis UBI should now be modeled through the effective tax rate functions in OG-USA.  These updates were made in PR #573.


[HW]

Name: Saurabh Malviya
Email<EMAIL_ADDRESS>Linkedin Profile: https://www.linkedin.com/in/saurabh-malviya-34763616
Attach the homework screenshots below for both step II and step III:

Name is Saurabh Malviya

Looks great Saurabh, thank you.

Hey Saurabh Malviya, great job! Congrats! Here is your badge! https://api.badgr.io/public/assertions/C7GHh3miRmqQ3WDwLzx-nA

Thanks @HadesArchitect for the badge. I had attended Cassandra Day India on 10th July and had filled the form with my details  https://dtsx.io/cdindia-voucher for the free certification voucher. I have not received it till now. Would you be able to help.


Raplace RCTLogError with RCTLogWarn

It makes no sense to impose a red screen for a non-breaking error in development time. Inefficiencies should be reported as a warning, as they will also be swallowed on the production build.

@jsdario I disagree! These are not inefficiencies, these are errors in which a socket is not created or not found. In Node.js, an unhandled error of this sort would crash the process. I think we should slap the developer in the face rather than put hints in their peripheral vision. Let's not make it easier for the developer to ignore these!

Then the correct decision should be to effectively crash the process and call the callback so it can be handled in the Javascript side. Showing the red screen is only half way between both decisions.
And this would feel much more as a slap ✋

haha, yea, maybe true. When there's a callback to call with an error, that is what it already does. When there isn't, it follows the React Native ecosystem red screen convention. It probably sounds a little hypocritical after what i said about slapping people as hard as possible, but i think it's an acceptable compromise :) Back in Node.js land we can slap them twice as hard to make up for it.

Hehe, it is a good compromise then, sorry for not knowing about the callback in advance.


Feature req: Fields in Structure editor or enable/disable conditional fields

Is your feature request related to a problem? Please describe.
Trying to reverse large structure from open source lib that use so many conditional compilation feature (#ifdef) ie:

Describe the solution you'd like

either ability to input the #ifdef feature01  in the structure editor or enable/disable them
or enable and disable field from the structure without deleting => and re-entering them again later when you figure out that you needed them
or simply show sum size of selected field near complete structure size . to help guess if that block need to deleted or not.

Describe alternatives you've considered
Delete field look ant the code then retype them if need : error prone workflow than to just enable disable feature flag. not doable for structure that has very large amount of conditionals
Additional context
the structure has 10 conditionals #ifdef : make it like<PHONE_NUMBER> =3628800 flavor of the same structure

You may want to write a script that leverages the CParser or use the CPArser GUI to create such structures


Python 3.6 support and testing

This is based on cclauss' pull request #146 but with changes on top to:

Cope with broken versions of coverage.py on Python 3.6. Branch coverage is merely disabled, the rest should work.
Skip the tests which fail under these old versions, because it is not a bug in coveralls-python.

Something still fails, I don't have time to look at it now, but I'll try and fix it tomorrow.

Hey there! Thanks for submitting this.

Ok, after some debugging it seems there is no way to cope with coverage.py < 4.1 failing on some files (at least) when run with --branch under Python 3.6. The analysis step occasionally fails (my guess is due to the dict changes in 3.6) and we get no results.
I made the test matrix only test coverage.py 3.x and 4.0 under Python <=3.5. This makes tests pass. I also added an error message informing the user that they should upgrade their coverage.py. It is only shown if they hit the issue and their coverage.py version is affected.
Since the new code paths are not testable the coverage numbers decreased.

Cool, this looks good to me. Thanks again @jvarho and @cclauss for the contributions.
Note: closing #146 in favour of this one, since this is a superset.


Jared/3samps basemapstyle

@ldanzinger @tanneryould Ready for review. Thanks
This PR updates the following 3 samples, Change basemap, Display a map, and Display a Scene to use the new BasemapStyle's. Readmes have been updated where needed as well as the metadata. Screenshots were checked and don't need updating as far as I could tell.

For some reason the github action checks aren't running today. I wonder if it's something to do with GitHub's end? Nothing has changed on our end.

@tanneryould - https://www.githubstatus.com/

Investigating - We are investigating reports of degraded performance for GitHub Actions.
Dec 1, 16:40 UTC


Developer

Codecov Report

Merging #36 (dc966e2) into main (180e93e) will decrease coverage by 0.09%.
The diff coverage is 91.32%.

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   96.90%   96.80%   -0.10%
==========================================
  Files          13       13
  Lines         969     1096     +127
==========================================
+ Hits          939     1061     +122
- Misses         30       35       +5

Impacted Files
Coverage Δ

alphastats/DataSet_Plot.py
92.62% <86.36%> (-4.33%)
:arrow_down:

alphastats/DataSet_Statistics.py
95.00% <87.50%> (+8.63%)
:arrow_up:

alphastats/DataSet.py
100.00% <100.00%> (ø)

alphastats/DataSet_Preprocess.py
97.67% <100.00%> (+0.08%)
:arrow_up:

alphastats/loader/AlphaPeptLoader.py
100.00% <100.00%> (ø)

alphastats/loader/BaseLoader.py
100.00% <100.00%> (ø)

alphastats/loader/FragPipeLoader.py
100.00% <100.00%> (ø)

alphastats/loader/MaxQuantLoader.py
90.00% <100.00%> (+1.11%)
:arrow_up:

tests/test_DataSet.py
99.13% <100.00%> (+0.09%)
:arrow_up:

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


Documentation link error on MacOs

When I pass my mouse pointer over resource name pressing COMMAND button the documentation automatically open.
For exemple, COMMAND+C to copy text open documentation.
resource '**aws_xxxx**' 'xxxx' {
}

Thanks

do you have the erd0s.terraform-autocomplete extension installed?
On Wed, Jul 25, 2018 at 4:06 PM, Vitor Nascimento<EMAIL_ADDRESS>wrote:

When I pass my mouse pointer over resource name pressing COMMAND button
the documentation automatically open.
For exemple, COMMAND+C to copy text open documentation.
resource 'aws_xxxx' 'xxxx' {
}
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mauve/vscode-terraform/issues/111, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAwkmOC4p1Omg2PEexvo94FcfbFrcrPtks5uKHtagaJpZM4VgJiH
.

thanks for using my plugin, feel free to open the issue again if uninstalling the other plugin does not help.
kind regards,
Mikael

Sorry man, yes I was using.
Thanks

Thanks for getting back to me. This bug report is so common that I actually warn of the plugin is installed nowadays.
Thanks for using my plug-in.
Sent from my iPhone

On 3. Aug 2018, at 01:57, Vitor Nascimento<EMAIL_ADDRESS>wrote:
Sorry man, yes I was using.
Thanks
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.


Bug 1170736 non ff dl button

The follow changes were made:

Removal of display: inline-block; from the CTA class to disallow disabled buttons from being seen (fixing the multiple buttons being displayed issue)
Screenshot:

Addition of !important tag to override changes to the background color of the button seen on multiple pages
Screenshot:

I double-checked with chromium on both an add-on with multiple files (to make sure the "three CTA buttons" issue was solved) and an add-on with a preliminary reviewed file (to make sure the "disabled CTA button" issue was solved).
This looks good to me, and will be merged once the indentation is fixed. Thanks @FrancescoSTL !
r+wc

Merged (again) in https://github.com/mozilla/olympia/commit/f3dddaa12ffe5e9baf6d0a21f96670e6aac0b23a


nanops on datetime objects failing

Hi,
It looks like apply_along_axis does not play well with objects that have no length? If I go comment out the numpy 1.6.1 workaround in Python 3.x portion, this goes back to working fine.
Thanks!
For example:

import pandas as ps
x = ps.Series([ps.datetime(2011,4,3)])
x.min()

Traceback (most recent call last):
File "<pyshell#3>", line 1, in
x.min()
File "C:\Python27\lib\site-packages\pandas\core\series.py", line 722, in min
return nanops.nanmin(self.values, skipna=skipna, copy=True)
File "C:\Python27\lib\site-packages\pandas\core\nanops.py", line 118, in nanmin
result = np.apply_along_axis(builtin.min, apply_ax, values)
File "C:\Python27\lib\site-packages\numpy\lib\shape_base.py", line 104, in apply_along_axis
outshape[axis] = len(res)
TypeError: object of type 'datetime.datetime' has no len()

OK, this is fixed in master. Probably fails in Python 3 now but, so it goes-- will report the bug upstream to NumPy


[consensus] Cleanup SafetyRulesManager and ChainedBftSmr

The goal was to eliminate SafetyRulesManagerConfig and do some broad cleanup in consensus along the way. As a result, ChainedBftSmr is a little bit tidier as it reduces its multiple configuration inputs to a single 1, SafetyRulesManagerConfig is gone, chained_bft_smr_tests have been simplified as they move less data around on restart.
Note: this is a third stack of commits, rather than rebase all of them it seems prudent to get some reviews and restack if all is good.

:umbrella: The latest upstream changes (presumably 0f97648bd9df4fa8e5da2eadc34d164e75727529) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably a7ef849dff190466ef10518157ded26a31d278ab) made this pull request unmergeable. Please resolve the merge conflicts.

@bors-libra r=zekun000

:pushpin: Commit 23d6117 has been approved by zekun000

:hourglass: Testing commit 23d6117747228c646c2747e5c94bd7d36944b71a with merge 62a901496a8260d96bb13992ef29242fa237310f...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: zekun000
Pushing 62a901496a8260d96bb13992ef29242fa237310f to master...


Not working with Python3.7

SUMMARY
Ansible role fails on Gathering Facts .
ISSUE TYPE
COMPONENT NAME

ANSIBLE VERSION
ansible 2.8.4
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, May  3 2019, 11:24:39) [GCC 8.3.0]

CONFIGURATION

OS / ENVIRONMENT

N/A
STEPS TO REPRODUCE

- name: install java
  hosts: all
  become: true
  become_user: root
  roles:
    - role: ansible-role-java
      java_package: jdk
      java_major_version: 8
      java_distribution: oracle_java
      transport: s3
      transport_s3_path: jdk-8u212-linux-x64.tar.gz
      transport_s3_bucket: "{{ aws_bucket_name }}"
      transport_s3_aws_access_key: "{{ aws_access_key_id }}"
      transport_s3_aws_secret_key: "{{ aws_secret_access_key }}"

EXPECTED RESULTS

ACTUAL RESULTS

TASK [Gathering Facts] *********************************************************
/usr/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  m.add_string(self.Q_C.public_numbers().encode_point())
/usr/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/usr/lib/python3.7/site-packages/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  hm.add_string(self.Q_C.public_numbers().encode_point())
fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo /root/.ansible/tmp/ansible-tmp-1569748498.059054-219969678795466 `\" && echo ansible-tmp-1569748498.059054-219969678795466=\"` echo /root/.ansible/tmp/ansible-tmp-1569748498.059054-219969678795466 `\" ), exited with result 1", "unreachable": true}

Root cause - https://github.com/paramiko/paramiko
Workaround - https://github.com/paramiko/paramiko/issues/1369#issuecomment-456940895


Want to add scrolling feature in Talking Therapy in html page

pls assign me this issue

@AnshuPathak-88825  Do you mean smooth-scrolling?

yes

@AnshuPathak-88825 Go ahead

Screencast from 14-08-22 06:49:47 PM IST.webm
I've added smooth scrolling feature to every file


@BatchMapping's api with JPA forces you to use spring.jpa.open-in-view=true

When you have a spring-data-jpa project with
spring.jpa.open-in-view=false

and an 1:n relationship that you want to traverse via @BatchMapping.
Lets assume the following data model

Club

Athletes

where 1 club has n athletes
and the following mapping
@Entity
open class Club(
    @Column
    open var clubName: String,
    @Id
    open val id: Tsid? = TsidCreator.getTsid1024(),
)

@Entity
open class Athlete(
    @ManyToOne(fetch = FetchType.LAZY)
    open var club: Club?,
    @Column
    open var lastName: String,
    @Column
    open var firstName: String,
    @Id
    open var id: Tsid? = TsidCreator.getTsid1024(),
)

Then trying to allow quering the club.athletes via Graphql @BatchMapping causes  the list of clubs passed in as a parameter to be from a different hibernate session than the athletes loaded in the current session.
    @BatchMapping(typeName = "Club")
    fun athletes(clubs: List<Club>): Map<Club, List<Athlete>> {
        val clubIdList = clubs.map { it.id!! }.toList()
        val athletes = athleteRepository.findAthletesByClubIdIn(clubIdList)
        val result = athletes
            .groupBy { it.club!! }
        return result
    }

Therefore, the athlete.club will return a hibernate proxy which is not initialized at this point.
Either you make the @BatchMapping method @Transactional which causes the athlete.club instances to be hydrated again (therefore, defeating the purpose of the @BatchMapping as this is effectively an n+1 on the club table) or you simply get an exception that the hashcode of the athlete.club cannot be calculated.
I feel that the API for @BatchMapping is a bit unfortunate, it would have been better to allow
    fun athletes(clubs: List<Club>): Map<Tsid, List<Athlete>>

that way, you could use "projection DTO" interfaces (for the Athlete) which would avoid the hibernate lazy loading issue.
A sample repo showing this problem can be found at https://github.com/rburgst/spring-boot3-graphql-kotlin
See also https://github.com/spring-io/initializr/issues/1359

I feel that the API for @BatchMapping is a bit unfortunate, it would have been better to allow
fun athletes(clubs: List): Map<Tsid, List>

Also, if we use DTOs that are auto-generated by a plugin from the GraphQL schema then the we can't add proper equals and hashCode implementations for the key in the map (e.g. Club above). This would  avoid duplicate lookups across different batch mappings for the same table/entity. One possibility is to use the standard Node interface's id field, if implemented, for the key.

  Switching to eager loading removes the issue. If you still want to stick to lazy loading, then spring.jpa.open-in-view=true is the way to go.

well if the API was only using the ID types then it would be trivial to "fix" the problem. Eager loading has many performance implications, therefore, an API that either requires you to use eager loading or open-in-view is sub-optimal IMHO.

I think the conversation has run its course here and I don't see any enhancement idea in this thread.


Make save_main_session optional

This PR does 3 things:

make --save_main_session optional
Sets it to true in all examples that need it (e.g., wordcount needs it)
refactor setup.py to separate as much as possible setup logic from strings/versions.

R: @robertwb - PTAL - I abandoned the other pull request (#715)

Thanks. LGTM. Could you close the other pull request?

Also, rather than abandoning pull requests, you can do a force push to that branch.


An unsupported operation

An unsupported operation: mode was provided, known values are [start, stop, settings, lock, unlock, flash, honkandflash, unknown] please report this as a bug
domains/charging/chargeMode/request/XX/operation

Added in 0.24.0


Update README.md, remove .DS_Store files, add .gitignore

Update to follow https://help.github.com/articles/github-flavored-markdown/ for lists, code, etc
Remove .DS_Store files and add a .gitignore file so they won't return :)

Dave, thanks for the cleanup :) Still learning here.


ADD a ERASE WALLET BUTTON [UX]

At the moment, the only way to create a fresh wallet or to switch between several wallets is to uninstall/reinstall the app.
An erase wallet button with a proper disclaimer in the settings could be handy
An alternative would be having several wallets that you can switch in the settings
Phoenix got something like this in the settings, for reference

This could definitely go in the "danger zone" of the settings

At the moment, the only way to create a fresh wallet or to switch between several wallets is to uninstall/reinstall the app.
An erase wallet button with a proper disclaimer in the settings could be handy

Why would you want to create a fresh wallet? IMHO reinstalling seems to be a good enough solution.

An alternative would be having several wallets that you can switch in the settings

What do you mean with several wallets? Several installations of the 10101 wallet? I don't see why you want that 🤔

Why would you want to create a fresh wallet? IMHO reinstalling seems to be a good enough solution.

You might want to have a fresh start and create a new wallet from scratch

What do you mean with several wallets? Several installations of the 10101 wallet? I don't see why you'd want that 🤔

No I was meaning, several "profiles" that you can switch from and to.


Theme selectrum in doom-themes-base

Adds support for selectrum to doom-themes-base.

Before

After

Thanks! The selectrum part looks good, I'm not sure in the solarized dark should be included here.

Well apparently I can push to your repo, but not force push a revert. Remove those last two commits and it should be good.

Closing this in favor of #571.


Core data

thanks @meganmason , could you please do another git fetch upstream and git merge upstream/main ?


LineView in dark mode

As of now, the LineView always has a black background if the device is in dark mode. This is a problem if the chart is to be put on a different colored background (or simply a modal presented sheet).
Would you consider an option to add a dark mode background color as well?

Hello,
Right inside the documentation it describes how to use a different style. Make sure you look it over as it's full of helpful stuff!
let chartStyle = ChartStyle(backgroundColor: Color.black, accentColor: Colors.OrangeStart, secondGradientColor: Colors.OrangeEnd, chartFormSize: ChartForm.medium, textColor: Color.white, legendTextColor: Color.white )
 ...
 BarChartView(data: [8,23,54,32,12,37,7,23,43], title: "Title", style: chartStyle)

Thanks for replying. In LineView.swift, you set the background color of the chart with
Rectangle().foregroundColor(self.colorScheme == .dark ? Color.black : self.style.backgroundColor)
In this case, the background color will be black in dark mode, or am I missing something?

Well, you would have to use a color that can adjust with dark mode.
If you set a color to black it will always be black. You can create your own color set inside the assets folder or you can use a color that already adjust with Dark Mode, for example:
.systemBackground or .systemBlue
Have you tried implementing a style with the code from my previous comment?

That won't make a difference since it's set to black explicitly when colorScheme is .dark.
Yes, I did try it out. I can see however, that the BarView uses the chosen background color, even in dark mode, which is not the case for LineView.
I'm only talking about LineView, as the BarView functions as intended.

You have two options here, my friend:

You can send in a PR so that it takes in a UIColor value instead of Color - that's not necessary, though.
Create your own colors using a custom Color initializer like so:

Color(UIColor.systemBackground)
You will notice this now changes with the environment of the device. In this, you can also create custom colors in the assets folder. Here is a full implementation:
let chartStyle = ChartStyle(backgroundColor: Color(UIColor.systemBackground), accentColor: Color(UIColor.systemBlue), secondGradientColor: Color(UIColor.systemPurple), textColor: Color(UIColor.label), legendTextColor: Color(UIColor.secondaryLabel))
    var body: some View {
        VStack{
            LineChartView(data: [8,23,54,32,12], title: "Title", style: chartStyle)
        }
    }

That's still plain wrong. I'm not talking about the LineChartView, it's the LineView that has the non-optional black background in dark mode.
What I'm suggesting is:
Rectangle().foregroundColor(self.style.backgroundColor)
instead of:
Rectangle().foregroundColor(self.colorScheme == .dark ? Color.black : self.style.backgroundColor)
As of right now, no matter what color you pass as a backgroundColor, be it a system color or not, the lineView will always have a black background in dark mode, as can be seen in the ternary operator in the current implementation.
In LineChartView and BarChartView, this ternary operator is not present, and the background will change depending on your set color in dark mode. The LineView does not.

Hello,
I am sorry that i repeatedly kept misunderstanding you. I see now what you mean. I have forked the project and have removed the check for the colorScheme of the application and have changed the color freely as you can see below.

I would suggest that you submit a PR with a better method for background color selection if you think you can come up with a good idea.

No problem, just a misunderstanding 👍

I created a new feature which allows you to specify a darkMode style if you are creating a custom style so please use that


is.number(NaN) returning true

Not sure why, but that is what is happening:

Running 0.4.0 of is_js

Hi @eriklharper, I think this has been fixed. Please check the latest version.

@didxga I verified that it isn't fixed in 0.4.0. The problem is that when you pass this in:
is.number(NaN)

The method converts the value to a string and checks whether it's part of the number object:
// is a given value number?
is.number = function(value) {
    return toString.call(value) === '[object Number]';
};

Because NaN is a property of the Number object, NaN is returning true. The solution would be to make the test more robust to prevent this:
// is a given value number?
is.number = function(value) {
    return !isNaN(value) && typeof(value) !== "string";
};

https://github.com/arasatasaygin/is.js/issues/72 I actually fixed this last month.
console.log(typeof NaN)
// number

It was decided that even though javascript considers NaN a number still it goes against the point of the check so it now returns false for NaN.

Could you please also change then the return of is.nan?
Today, is.nan(null) return false, which means that null is considered as a number by the language. It is because javascript evaluated everything false as "0".
So you will always have values considered as number through NaN() when it is null, false or empty string.
I think the library is should remove this inconsistency from the language.

If NaN returns false, that does not mean that it has to be a number.
NaN in javascript is a predefined keyword, which is neither equal to null, nor undefined and not even itself (yes..!!). But still, it is a number.
Hence it is correct if is.nan returns false for null.
console.log(NaN == NaN)
// false

Also NaN will "only" return true when the argument passed is not equal to itself (to keep it simple, when NaN is passed as argument).
Hope that helps. :-)

@ekaradon
If is.nan returns false on something, that does not mean that it has to be a number.
NaN in javascript is a predefined keyword, which is neither equal to null, nor undefined and not even itself (yes..!!). But still, it is a number.
Hence it is correct if is.nan returns false for null.
console.log(NaN == NaN)
// false

Also is.nan will "only" return true when the argument passed is not equal to itself (to keep it simple, when NaN is passed as argument).
Hope that helps. :-)


/ru/docs/Web/JavaScript/Guide/Regular_Expressions

Request type

[ ] Please close this issue, I accidentally submitted it without adding any details
[ ] New documentation
[x] Correction or update

Details

at "#special-quantifier-range" ancor there is an error: "m и n - положительные целые. Соответствует как минимум n и максимум m вхождениям предыдущего символа. При m=n=0 пропускается.
...", correct: m=n=1

Hello, thanks for reporting.
I've changed this bit but I'm not a Russian speaker/writer and the "parent" English page has been revamped (the Russian counterpart is now behind) so this typo is fixed but the content overall would need an update.
As MDN is a wiki and anyone can contribute, if you're enclined to help, that would be super great :)
I'm closing this one but feel free to open it if you think this needs some more work.


Question: Is there a way to catch native exceptions in other threads?

In our production macOS app (which has been built on corert since April 2017 !) we are sometimes experiencing bugs that come from native exceptions being thrown on other threads, or native exceptions that we somehow miss to catch in other ways.
Since our logging and error handling infrastructure is in C#, it would be great if there was a way to deal with these native exceptions somehow - without them causing the process to exit.
Is there already support for this in CoreRT or would it be possible for us to inject some custom logic?
Another thing we're seeing is that when our CoreRT console process is launched by another process, which is then killed, the CoreRT process hangs with CPU usage around 100%.
I'm not entirely sure how to debug this - my first look at the "Sample" in Activity Monitor didn't reveal anything that I could see problematic, but would that be helpful for you to help find the bug?

which has been built on corert since April 2017 !

Nice :-)

native exceptions being thrown on other threads, or native exceptions that we somehow miss to catch in other ways.

When you say native exceptions, do you mean C++ exceptions? Are you worried about the case where they hit C# code; or are you worried about the case where they go completely unhanded?

the CoreRT process hangs with CPU usage around 100%.

Yes, it would be useful to get to the bottom of this. It does not look right. We need to find out what is consuming 100% CPU. Could you please attach debugger and look at the threads? Do you happen to know whether you get the same behavior with CoreCLR? I just tried a simple test to reproduce the problem, but it does not happen for me.

Thanks to this
  <ItemGroup>
    <IlcArg Include="--stacktracedata" />
  </ItemGroup>

I was able to find the bug which was regrettably in my own code.
Turns out I was reading from Console.ReadLine in an endless loop in a separate thread, but once a parent process has been terminated, ReadLine will return null and my code didn't break out of the loop in that case.


Delete NSX-T NAT rules.

Leftovers should clean up NSX-T NAT rules.

VMware documentation on NSX-T NAT rules

@rowanjacobs Is it possible that since NAT rules are created for a specific tier 1 router, that if you are deleting the router, you are deleting its NAT rules? Can you imagine a case where you would want to delete the NAT rules and not the router its on?

It seems like you cannot have NAT rules independent of a router given the id is required when you create one with terraform: https://www.terraform.io/docs/providers/nsxt/r/nat_rule.html

(Offline discussion that this story is not relevant since nat rules are not independent of routers and thus not deletable alone.)


feature(cli): add force flag to database drop command

Closes #455

I somehow saw neither this nor the issue before I refactored the CLI. I did add a -y to mean the same thing as --force. I personally dislike the confirmation but I can see how it might avoid a "oh *@#I" moment.
To me, --force would mean a force disconnect of anyone using the database. As the db won't drop otherwise.


US 06.04.01 Total Sum of Scanned QR Code Ranking

As a player, I want an estimate of my ranking for a total sum of scores of QR codes scanned, so that I can know which place I can take and compete with other players.
Priority: Low
Story Point: 2
Risk Level: Low

Acceptance Criteria:

The player logs into the game on their device.
The player is taken to their profile, which displays their username, contact information, and game statistics.
The player can navigate to a leaderboard feature within the game.
The leaderboard displays the game-wide rankings of all players, ranked by the total number of QR codes they have scanned.
The player can view the details of each player's profile, including their username, contact information, and a list of the QR codes they have scanned.
The player can use the leaderboard to estimate their ranking based on the total score of all QR codes they have scanned and strive to improve their score.
The leaderboard updates in real-time as players scan new QR codes and increase their total number of QR codes scanned.
The player can use the leaderboard to find and connect with other players, either by searching for players by username or by clicking on a player's profile to view their information.

Priority: Low
Story Point: 2
Risk Level: Low


Inconsistent Bootstrap reference

_Layout.cshtml references a bootstrap css file that is at version 5.1 but also references a CDN that uses 4.5.3 javascript file.

Hi @Eonasdan,
Thank you for your feedback! We will update this to Bootstrap 5.3 in the next release.
-Bryan

Hi @Eonsandan,
I wanted to let you know this issue has been fixed in the latest release.
https://github.com/microsoft/CloudAdoptionFramework/blob/master/ready/AzNamingTool/RELEASENOTES.md
-Bryan


[PE-D][Tester E] Editing reviewed cards does not allow review session for edited cards

Hi, suppose i have a list with only a single card word : translation, after which I enter a review session and mark the word as reviewed, if I were to edit the card using edit the application doesn't seem to allow me to start a new session with the new card.
It is possible that this is intended, given that users are unlikely to utilise edit to pseudo add new cards into the list, but I think it might still be beneficial for the application to allow the user to start a new session with the edited card, given that if the user were to use the edit function, there's a decent chance that the translation might be incorrect in some way. For example:
Suppose that I thought 雪 = ice, then perhaps I realised that the correct translation is 雪 = snow, I might want to review this corrected translation again.

Labels: type.FeatureFlaw severity.Low
original: lihongguang00/ped#2

We need to update UG for this confusion


Add support for comma-separated filter values

Implements #235

LGTM. I need to wrap my head around how to release this. I think it's a breaking change despite being what is pretty obviously a bug in the initial implementation. I'd be curious to hear what other maintainers think.
cc @jeregrine @doomspork

I've re-read the documentation and I've made a mistake. The part I quoted in the issue is from the recommendations page so it's not supposed to be the default jsonapi behaviour.
Maybe this could be a configurable behaviour?

I'm pretty certain this is the kind of behaviour users of this library would expect. My inclination is to merge this as a bug fix and call it out in the changelog.

I do agree with you, I would expect this behaviour, however this is not jsonapi standard.
I was discussing this with @lucacorti, which pointed out that this is only a recommendation's example, and one may want to support a different a strategy for filtering, or may want to use a comma in the filter value.
Isn't it better to at least offer a way to prevent this behaviour via configuration?

You've convinced me: configuration is probably the way to go here.
On Tue, Sep 8, 2020 at 4:31 AM Matteo Costantini<EMAIL_ADDRESS>wrote:

I do agree with you, I would expect this behaviour, however this is not
jsonapi standard.
I was discussing this with @lucacorti https://github.com/lucacorti,
which pointed out that this is only a recommendation's example, and one may
want to support a different a strategy for filtering, or may want to use a
comma in the filter value.
Isn't it better to at least offer a way to prevent this behaviour via
configuration?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jeregrine/jsonapi/pull/236#issuecomment-688710633,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAZZCVBUFR4MFGDBAZYLLSEXTVDANCNFSM4QYOPF4Q
.

Hey @jherdman, sorry I was off the grid.
I've updated the PR to make the parsing configurable. Let me know what you think.
I don't particularly like the config name, and how I handled the tests (without sacrificing concurrency).
Since they run asynchronously, tests at line 70 and 77 may change the same configuration and one of the two may fail.
The problem may still arise with the current implementation, although much less likely.

Hey @jherdman, sorry I was off the grid.

Never sweat about this. F/OSS is done on a volunteer basis for the vast majority of people. Any and all contributions are much appreciated!

Could we take the chance to also merge this one among #245 and make a new release? We ended up not using this feature so I forgot about it, but it would still be useful. What do you think?

@CostantiniMatteo I think merging this would be a mistake as this is really constraining what the spec allows in term of filtering: https://jsonapi.org/format/#fetching-filtering
The spec  specifies that the filter parameter is used for filtering and its content are entirely up to implementation specific strategy. Processing the filter query param with some predefined logic is really limiting in terms of what can be implemented. Maybe we could explore some delegation to a behaviour like what I implemented earlier for pagination, or leave it entirely to the library user to parse its content?

The processing is optional and needs to be configured so it's not limiting and does not break the existing behaviour.
Maybe it can be refactored to accept a module used to parse the filter content, and include a parser with support for comma-separated values, instead of the current hard-coded solution.

You can't implement all possible user needs on this, so extensible is arguably better than any built in logic.

@jeregrine / @jherdman / @lucacorti / @CostantiniMatteo where do we stand with this PR? It looks like it was approved but there's been some discussion about whether this is the change we want.

@doomspork @CostantiniMatteo as I said I think this would be better addressed with an extensible approach instead of configurable baked in logic.


Fix the formatting of the AddCommand Help Message

Before

After

Fixed the help message of AddCommand.java

Duplicated with PR #46