add remapping surface area test

PULL REQUEST
Purpose and Content
Add a unit test to check that LandSeaMask remapping is conservative with respect to the surface area of the planet. Also change the remapping code to be monotone by default, removing the need for a clean_mask function.
PR Checklist

[x] This PR has a corresponding issue OR is linked to an SDI.
[x] I have followed CliMA's codebase contribution and style guidelines OR N/A.
[x] I have followed CliMA's documentation policy.
[x] I have checked all issues and PRs and I certify that this PR does not duplicate an open PR.
[x] I linted my code on my local machine prior to submission OR N/A.
[x] Unit tests are included OR N/A.
[x] Code used in an integration test OR N/A.
[x] All tests ran successfully on my local machine OR N/A.
[x] All classes, modules, and function contain docstrings OR N/A.
[x] Documentation has been added/updated OR N/A.

bors try

bors try

@juliasloan25 all is passing now and it's calling your CC commit for the mono flag. I will update the Manifest to the release version in a separate PR when we do other upgrades. After you've addressed the remaining issues above, feel free to squash and bors r+.

bors r+


devise_group not working Rails 6.0.2|Ruby 2.6.5|Devise 4.7.1

Environment
Rails 6.0.1
Ruby 2.6.5
Devise 4.7.1
Current behavior
In my application controller I have:
devise_group 	:user, contains: [:investor, :founder, :squad, :general]

however, stepping through my controller I found that current_user is null but current_general is present.  This is causing a real problem
Expected behavior
I thought the whole point of devise_group was to allow STI current_[parent_name] in this case current_user to access the user regardless of type.
What am I missing here?

Actually, I think there's something weird going on, let me make a simple example reproducing this.

yes, an annoying Application Controller include mucked with current_user.  Closing.

What was the instance here? Running into something similar where the group is being ignored even though it's defined in ApplicationController.


[Fix CI Build] Have fixed the links

Incorrect links were causing the CI build to fail, this is a PR to turn the CI build green.

@lijiarui Some of the previous commits are causing the CI build to fail. Please take a look at this first.

Thanks @sbis04
Could you make github action green and then I will merge this PR.


Consider adding to criteria "apply hardening" to project's website / repo / download

Consider adding to the criteria that the project's website, repo (hosting), and its download location be hardened.
E.G., that it use the various HTTP hardening headers (in particular, CSP).
These hardening headers may not matter as much unless they already use HTTPS (see #214).
Note that this is different from, but related to, #125; #125 proposes that software itself be hardened, but doesn't say anything about its hosting sites.  It's also related to #103, which recommends that we apply #125 to BadgeApp itself.

Note: Headers can be checked by: https://securityheaders.io

Here's a first draft:
"It is SUGGESTED that the project website and repository (if the latter can be accessed via the WWW) support HTTPS and at least the following hardening headers (with nonpermissive values):
Content Security Policy (CSP), HTTP Strict Transport Security (HSTS), HTTP Public Key Pinning (HPKP), X-Content-Type-Options (as "nosniff"), X-Frame-Options, and X-XSS-Protection. Sites such as https://securityheaders.io/ can quickly check this.  GitHub.com is known to meet this."
Github does very well in terms of hardening headers; many others do not, which is why I'm leaving this as SUGGESTED.  Some of these, like HPKP, can take more time to set up. The site https://securityheaders.io/ makes this easy to check, at least.
We could also consider:

X-Content-Type-Options - Prevent content type sniffing
X-Download-Options - Prevent file downloads opening
X-Permitted-Cross-Domain-Policies - Restrict Adobe Flash Player's access to data

I think we probably ought to drop HPKP from the list.  It can be helpful, but it's a challenge to set up in some environments.  Also, if you make a mistake, you can essentially permanently brick your site (you can never recover to a trusted state). It's not supported by the Let's Encrypt client, and it may never be because of various concerns: https://community.letsencrypt.org/t/hpkp-best-practices-if-you-choose-to-implement/4625.  Finally, there are other ways to detect a misbehaving CA.

How's this - better?:
"It is SUGGESTED that the project website and repository (if the latter can be accessed via the WWW) support HTTPS and key hardening headers.  Note that GitHub is known to meet this.   Sites such as https://securityheaders.io/ can quickly check this. The key hardening headers are the following hardening headers (with nonpermissive values): Content Security Policy (CSP), HTTP Strict Transport Security (HSTS), X-Content-Type-Options (as "nosniff"), X-Frame-Options, and X-XSS-Protection."

Note that this is trivial to automate - just read the home and repo pages, and see what headers are provided. Some of the headers aren't strictly necessary if no user-provided data is ever needed, but the headers do harden against accidents, so they seem like a generally good idea.

Dan Kohn notes the security headers used by:
Github (does a great job):
https://securityheaders.io/?q=https%3A%2F%2Fgithub.com&hide=on
GNU Savannah (doesn't look good currently):
https://securityheaders.io/?q=https%3A%2F%2Fsavannah.gnu.org%2F
…

Another tweak:
"It is SUGGESTED that the project website, repository (if accessible via the WWW), and download site (if separate) support key hardening headers. Note that GitHub is known to meet this. Sites such as https://securityheaders.io/ can quickly check this. The key hardening headers are the following hardening headers (with nonpermissive values): Content Security Policy (CSP), HTTP Strict Transport Security (HSTS), X-Content-Type-Options (as "nosniff"), X-Frame-Options, and X-XSS-Protection."

s/WWW/web/
s/key hardening headers are the following hardening headers/key hardening headers are/

Sounds good!


memory addresses for tibia 10.100 client

hey guys im playing an OT (not sure if u guys frown about this but... yeah) and im using a 10.100 client. however, my health HUDs, party HUDs, etc. aren't working as I do not have the addresses for 10.100 and it looks a lil complicated to get it. so just trying my luck here to see if anyone has those values.
thanks!

try this
PlayerIDAddress=0x70F050
BattleListAddress=0x76A48C
HealthAddress=0x70E000
MaxManaAddress=0x57045C
ManaAddress=0x57048C
TabsBaseAddress=0x570744
XORAddress=0x570458
MaxHealthAddress=0x70E048
AmmunitionCountAddress=0x7B147C
AmmunitionTypeAddress=0x7B1480
WeaponCountAddress=0x7B14FC
WeaponTypeAddress=0x7B1500
LevelAddress=0x570470
ExperienceAddress=0x570460
ClassicClientName=Tibia
Tibia11Name=client
Tibia11XPos=Qt5Core.dll + 004555C8 > 8 > 134 > 24 > 18
Tibia11YPos=Qt5Core.dll + 004555C8 > 8 > 134 > 24 > 1C
Tibia11ZPos=Qt5Core.dll + 004555C8 > 8 > 134 > 24 > 20
Tibia11MyHP=[2] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 18
Tibia11MyMaxHP=[2] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 1A
Tibia11Experience=[8] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 28
Tibia11Level=[2] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 30
Tibia11MyMana=[2] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 60
Tibia11MyMaxMana=[2] Qt5Core.dll + 004555C8 > 8 > 124 > 60 > 62

Addresses posted by marcosvpb are working perfectly on the newest update of real tibia 11 by 08.06.2017. Thank you very much for contribution, it made my tibialyzer work!

holy crap marco. this worked. thanks a LOT i've tried many ways almost resorting to figuring out how cheat engine works but..... i installed it and it installed some... programs on my computer (i didnt see any option to not install them. urgh)
thanks once again


ajax request

Hello there,
I get an error in ajax requests.
request:
id: 5
action: read
csrftoken: tBiu5YnMRbxvBAnaZkeVx5UmL1m99jL5lfYi1rTQvzhPZwUBGnWzRq1jVITInZLT

response:
403 - CSRF token missing or incorrect. I am using Django 1.1.

It is normally simple in Django,,if you get a CSRF token error high chances are you submitted a form somewhere and you didn't include csrf value in the form data that you are passing to the server
Try that,it might work
All the best✌


eval_semantic_segmentation is wrong

Currently, accuracy is calculated per image.
However, in VOC evaluation, confusion matrix is calculated from all the sample in dataset, and that matrix is used to calculate accuracy.
https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/score.py#L21

Since it would be too memory intensive to accept list of labels of the entire dataset as input, I am considering to split the function into two.
The first one takes list or batch of images and returns confusion matrix (i.e. hist).
The second one takes the matrix and calculate acc, acc_cls, miou, fwavacc.
I will also write a SemanticSegmentationEvaluator that does following in a loop

get batch_imgs and batch_gt_labels
pred_labels = model.predict(batch_imgs)
hist += compute_hist(pred_labels, batch_gt_labels)
(after the entire dataset is sampled), `pa = compute_pixel_accuracy(hist); ma = compute_mean_accuracy(hist); miou = compute_miou(hist) ...

Fixed https://github.com/chainer/chainercv/pull/217


Article Submission jump between steps each page (with storing data)

it is already works step 1-2-3-4. But only not work in preview page. so, it is right. am i add tag won't fix and close this issue ?


DH-136 fix hyphen in urls

Codecov Report

Merging #170 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #170   +/-   ##
========================================
  Coverage    95.78%   95.78%
========================================
  Files           37       37
  Lines         1233     1233
  Branches        78       78
========================================
  Hits          1181     1181
  Misses          41       41
  Partials        11       11

Impacted Files
Coverage Δ

datahub/v2/urls.py
100% <ø> (ø)
: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 0c7a118...2039b05. Read the comment docs.


change icons and splash screens in build step

I just ran into the problem, that I had two versions of the app on my phone and didn't know which one was the dev or prod.
Before we used cordova we had this badges on the app icons. Maybe we can find a method to add these badges again.

resources/ folder with different app badge icons (prod, dev, beta, ...)

maybe this - https://github.com/djett41/generator-ionic/blob/master/templates/hooks/after_prepare/icons_and_splashscreens.js

cordova doc for icons and splashscreens - http://cordova.apache.org/docs/en/5.1.1/config_ref_images.md.html#Icons and Splash Screens

so, I have no problem to take the name from cordova and name the folder 'res', anyone else?

closed with https://github.com/mwaylabs/generator-m/issues/171


policy: replace ingress / egress booleans with TrafficDirection type

See https://github.com/cilium/cilium/pull/3324#discussion_r177912227 .
More coming soon.

This was taken care of already. Closing.


Scroll Physics

Can you please add physics property for more customization.

@ElsayedDev
Hmm..
There is not enough explanation Can you give me a more detailed example?


Disconnect upon use of the button

Whenever I use the button, it actually disconnects me from OctoPrint. I have to reconnect again, in order to move my red-hot printer nozzle away from the extruded plastic (!)

What do you mean disconnects me from OctoPrint, your printer is disconnected or your account is disconnected from the  octoprint interface ?

Oops sorry I see how that can be confusing. My account is disconnected from the Raspi.

Can i have your octoprint version ?

1.4.2


Buffer length message in CHIPDevice.mm sendMessage might not be safe

Problem
The code looks like this:
        buffer->SetDataLength(messageLen);

        memcpy(buffer->Start(), messageChars, messageLen);

but SetDataLength does not guarantee that it will set the length to its argument.  It might clamp it to a smaller length, if the argument is larger than what PacketBuffer can support.
Proposed Solution
Check the data length after the SetDataLength call and either error out if it's smaller than messageLen or only copy enough bytes that will actually fit, whichever makes more sense here.
@pan-apple

Fixed in #3879


Permission to translate into chinese plz？

Hello dinorush！When I see your mod in thunderstore I immediately share it to my friends and test in my server.In chinese ttf2 northstar community, the total player number is 500+ and active player number is 200~300，and we have a 80+ player group in social media platform which focus on hardcore ttdm combat gameplay. We all agree that your mod did really great work！Adding a lot of fresh and interesting contene while keeping the gameplay balanced.
Considering your mod changed so many content，We think giving a certain translate to your mod content and mod document is necessary.And after thay maybe we can give the community feedback and help to debug. Even oneday give a balance edition to ttdm mode.
Thanks you and your work！

Absolutely feel free to. The mod is already built to support localizations. It in fact used to have German, but it was never updated by those who did it so I had to remove it.


unconditionally send nonces and unsafe-inline when working with nonces

Fixes #381
/cc @jasssonpet can you see if this resolves your issue?
All PRs:

[x] Has tests
[x] Documentation updated N/A

This pull request stops guessing whether or not a UA supports nonces and relies on the backwards-compatible behavior of sending 'unsafe-inline' with every 'nonce-.
The reason for sniffing was mostly because Safari < 9 would generate console messages about an unknown directive value (nonce-*). Safari 9 is two versions behind so in theory fewer people are using it. Given the bugs UA sniffing like this has caused, I'm less sympathetic to those on unsupported browsers craving a clean console.

I think I'll ship this with https://github.com/twitter/secureheaders/pull/383 in v6.0 unless there are objections.
My feeling is that the console will be noisy and it's not worth adding code/bugs for the sake of a clean console. Thinks are built to be backwards compatible when possible so I don't understand why the console has to be so noisy about legitimate use.

Released in 6.0.0.alpha01


How to detect when streaming connection gets cut off on Android

When streaming audio on an android device if the stream connection is cut off the player eventually changes its status to loading then switches it back to playing.  The only indication that the player gives that it has lost it's data stream is the quick transfer from playing to loading and then back to playing.  It does not throw a MediaFailed event nor does it change it's Status to Failed.  How should I best handle this scenario and how should I set up the player to recover from a loss of internet connectivity while streaming?

I don't think there is anything in MediaPlayer that will detect the stream failure, but i believe this functionality is available in ExoPlayer 2+ and will be added in the V1.0 release we are working on.

OK.  Currently I check to see if the player is loading and if the device doesn't have a connection to throw the warning.  I'll be sure to integrate the newest MediaPlayer release into my project as soon as it becomes available.

Just as clarification, MediaPlayer refers to the underlying Android system for playing media, ExoPlayer is its replacement which has more transport layer information that should allow detection and retries on a connection glitch.

Oh sorry for the mix up then.  I'm using CrossMediaManager with ExoPlayer currently and in my previous post I meant to say the CrossMediaManager object.


track how many times eeprom corruption had to be corrected?

I think someone would have to connect the car to the programmer website to see this info, but maybe it would be useful?

the builtin led blinks once per correction on start, and then stays on (if there were any corrections).
document this somewhere?

[ ] document this somewhere


[FLINK-3754][Table]Add a validation phase before construct RelNode using TableAPI

This PR aims at adding an extra phase of validation for plans generated from Table API, matches the functionality of Calcite's Validator that are called during we execute an query expressed in SQL String.
In order to do this, I inserted a new layer between TableAPI and RelNode construction: The Logical Plan.
And the main procedure of validation and RelNode construction work as follows:

Constructing logical plan in flight
When we are about to execute the plan:
Do resolution using table/dataset/datastream schema
Do validation on the type annotated logical plan tree
Translate logical plan into RelNode once we successfully finished validation.

Thanks @yjshen for working on this issue!  I'll try to have a look soon.
@twalthr, can you have a look at the changes done on the expressions?

For ease of review, I would like to explain this RP with more details.
While table api are called to construct a query, it was first constructed as a operator tree, LogicalNode is used to express the tree node. Therefore, after we finished constructing a query and about to translate it into a dataset/datastream program, the constructed logical plan looks like:
Aggregate(List of group by, List of aggregate)
+- Filter (condition expression)
    +- Union
        +- Project (select column expression)
            +- TableScan(DS1)
        +- Project (select column expression)
            +- TableScan(DS2)

At this time, only the leaf node: TableScan (CatalogNode in current implementation) is equipped with type information, in order to do plan validation, we need to annotate the full logical plan with type information first and use type information to do validate works.

The type annotation work is done from bottom to top:
Firstly, we know each schema of the two input, and we know List[] expression in Project are used to manipulate one row of table data as input and output one value per expression, therefore, we can infer the the output schema of Project (in the current impl this was expressed as: def output: Seq[Attribute]) if we know each expressions dataType.
For example, Add's dataType is same as it's input, Or's dataType is always Boolean, pow(a, b)'s dataType is always Double, however, if and only if we understand all kinds of expressions, we are able to infer its dataType. The main problems here is we only have Call(Unresolved Function) generated during expression construction, therefore, we should resolve them first into solid Expressions. FunctionCatalog is introduced here for a mapping from FunctionName -> Expression, we can easily finish the translation work as we look up catalog.

Thanks for the additional information @yjshen! I'm a bit behind with PR reviews, but will definitely have a look begin of next week. Thanks, Fabian

@fhueske, thanks for your job. Looking forward to more discussions on this :)

Thanks for the contribution @yjshen. I will also have a look at it tomorrow.

@yjshen I looked through the code changes. I was quite impressed that your PR touches nearly every class of the current API.
Basically your changes seem to work, however, I'm not sure if we want to implement the validation phase for every scalar function ourselves. Actually, Calcite already comes with type inference, type checking and validation capabilities. I don't know if we want to reinvent the wheel at this point. Your approach inserts a layer under the Table API for doing the validation. However, instead, this layer could also translate the plan into a SQL tree (on top of RelNodes). We could then let Calcite do the work of validation.
This could also solve another problem that I faced when working on FLINK-3580. If you take a look at StandardConvertletTable of Calcite, you see that Calcite also does some conversions which we also need to implement ourselves if we do not base the Table API on top of SQL.
We need to discuss how we want to proceed. Both solution are not perfect.

Hi @yjshen, thanks for your patience. I also finished a first pass over the PR.
I'd like to propose a third alternative, in addition to the custom validation phase (this PR) and generating SqlNodes and using Calcite's validator. Both approaches would mean that the validation happens before the logical plan is translated into a RelNode. I think it would be good to eagerly check each method call of the Table API. This would make debugging easier, because exceptions would be thrown where the error is caused. Please correct me if I am wrong, but I think we would not lose validation coverage compared to the coverage this PR if we do eager validation? It might also be easier, because we do not need the recursive operator traversal (still the expression traversal though). Maybe we can even directly translate to RelNodes after validation, just like we do right now. I think a lot of this PR could be used for eager validation, not sure if it would be easily possible with the SqlNode validation approach.
What do you think about eagerly validation, @yjshen and @twalthr?
While reviewing the PR, I noticed that some classes seem to be partially derived from Spark's code base (e.g., TreeNode and RuleExecutor). I know there are some common patterns that apply in optimizers, but it is good style to give credit to the original source code.
Can you list which classes are derived from Spark code and add a comment to them pointing to the source of the code?
Thanks, Fabian

I think it would be good to eagerly check each method call of the Table API. This would make debugging easier, because exceptions would be thrown where the error is caused. Please correct me if I am wrong, but I think we would not lose validation coverage compared to the coverage this PR if we do eager validation? It might also be easier, because we do not need the recursive operator traversal (still the expression traversal though). Maybe we can even directly translate to RelNodes after validation, just like we do right now. I think a lot of this PR could be used for eager validation, not sure if it would be easily possible with the SqlNode validation approach.

Regarding the eager validation you mentioned, I think that could be accomplished by calling validate() each time I am constructing another Table, in other words, each time I am calling a Table api, changing the current code from:
class Table(
    private[flink] val tableEnv: TableEnvironment,
    private[flink] val planPreparation: PlanPreparation) {

  def this(tableEnv: TableEnvironment, logicalPlan: LogicalNode) = {
    this(tableEnv, new PlanPreparation(tableEnv, logicalPlan))
  }

to
def this(tableEnv: TableEnvironment, logicalPlan: LogicalNode) = {
    this(tableEnv, {
      val pp = new PlanPreparation(tableEnv, logicalPlan)
      pp.validate()
      pp
    })

and also add an additional flag annotate the logical node as validate and therefore avoid the recursive logical plan traversal would be enough.  Do I understand your idea correctly?
On the other hand, I prefer to postponed RelNode construction until we are going to run the query on Flink, since we only need RelNode at that time.

While reviewing the PR, I noticed that some classes seem to be partially derived from Spark's code base (e.g., TreeNode and RuleExecutor). I know there are some common patterns that apply in optimizers, but it is good style to give credit to the original source code.
Can you list which classes are derived from Spark code and add a comment to them pointing to the source of the code?

OK, I will do a more detailed scan and give credit to all the original source code.

@twalthr, translate table API call to SqlNode and use validator in Calcite seems another reasonable solution, maybe it's hard to do eager validation as @fhueske proposed?
Yes, I agree we should discuss which way is preferred solution :)

Hi @fhueske @twalthr, thanks for the detailed review work! 👍
I've left some comment above to express my opinion, looking forward to more discussions on this :)

If we decide for eager validation, we can also simplify the code a bit, right?
I might be wrong but we could remove PlanPreparation and the recursive validation of LogicalNode since the inputs of an operator would have been already validated. The checks of Validator.validate() could be moved to the respective LogicalNode. Not sure if we would still need the RuleExecutor.

@fhueske If that's the preferred way, I will try to do some simplifications and see.

Will start to work on eager validation now. :)

Great, thanks!


Escape strings to be passed in as arguments.

Addresses the bug where command injection can be used in the projectName value in workspace settings, by escaping strings passed in as arguments.
https://security-insights.corp.stripe.com/pathfinder/sats/SAT-10878
The solution is based on shell-escape, but also adapted to handle Windows computers. This was tested on both Windows and Mac.

r?


Feature Request - Add Color to Movie Posters

@fewieden Can this module be updated so that that posters are displayed in color? Thanks!

Was able to do it via the custom.css

Closing issue...

@BerkSmash1984 glad you already found a work around. I will keep this issue open, it would be a valuable addition to the module via a config option.


Adding more content to the guide

Making the guide, it was pretty much useless before.

Nice addition, just a note: guides need to have an h1 title for seo but also for the server to pick up their name and show it to other users.


Upgrade upb

Known issues: #21992 #15027 #22022 #21937 #22023 #21898 #22024 #20928 #21994 #13379

Please be sure to delete third_party/upb/BUILD file before merging this. (https://github.com/grpc/grpc/pull/22149)

Known issues: #22820
The "Bazel C/C++ Dbg MacOS" failure is an infrastructure failure.
I will not squash commits here, since that would destroy the upb subtree update history.


Added content to resources.html with dynamic Markdown to HTML conversion

[x] Added a RESOURCES.md file where new content can be added
[x] Converted existing resources from Rich Text to Markdown in RESOURCES.md
[x] Added dynamic conversion of Markdown to HTML using ShowdownJS for RESOURCES.md

I can make minor improvements to the Resources page if needed for things like font size and alignment. It currently works as per the requirements given in #412.

@prssanna Thanks for the pull request, this is a great start and works well. I tested this locally.
Couple points of feedback to round this out:

Let's make the section titles and subtitles as markdown headers
Can we remove the table of contents?
Do we need all the <br>? We shouldn't have to add those in with markdown.
How can we get the correct styles onto the page? Let's match what we have on the About page right now.

@smit1678 Thanks! I've made the required. Just check if it's okay and let me know if I should change anything else.

@prssanna Excellent. Let's bring the style in line a little bit more:

left align the Resources title, all caps too
change MapCampaigner subtitle to Getting Started Creating a Campaign, left align

Other style ideas? We have the text go full width on both the About and Resources page, I wonder if it would be more readable if we reduce the width. Thoughts?

@smit1678 Yes you're right, the text will definitely be more readable if we reduce the width, so I've done that, but I think after implementing this change the Resources title looks better centre aligned. Do you agree? If not, I can left align it. I've done the other things you've asked for. 👍🏻

thanks @prssanna, sorry for the delay in reviewing. Width looks nice.
I suggest we keep both the page title and first heading left aligned since that was how the About page was originally designed:


editor.acceptSuggestionOnCommitCharacter not working?

Issue Type
Bug
Description
// Controls if suggestions should be accepted on commit characters. For instance in JavaScript the semi-colon (';') can be a commit character that accepts a suggestion and types that character.
  "editor.acceptSuggestionOnCommitCharacter": true,

But when I type e.g. ; with a suggestion selected, the selection is not inserted, but the ; is.
I tried setting some keys to run acceptSelectedSuggestion or acceptSelectedSuggestionOnEnter (what's the difference between these anyway?) but while that commits the suggestion, it eats the key I just pressed, requiring a 2nd press to get to where I want to be.
 Please add some screenshots that illustrate the problem.

JavaScript (ES6).
I don't have the code handy at the moment, but for example I have an object called state with properties on it, but pressing s t a (autocomplete shows up, with state selected) . results in sta. rather than state. as expected given that setting.

I've found this functionality to be inconsistent. It seems that you have to hit tab to accept the first suggestion, and from then on VSCode will properly accept the suggestions and type what you type (so in your scenario, you'd get state; by hitting ;
Furthermore, when it does work, it has the wrong undo order. As per VS, if I hit undo in your scenario, the code would revert to sta; assuming that I wanted to undo what I didn't explicitly typed.
Because of the inconsistency and improper undo behavior, I've actually written an extension to implement the proper behavior. My limitation so far is that I can't detect if the suggestion is a snippet, a limitation in the extension API, which should not be accepted on punctuation.

It's a two-step-thing: Extensions must enumerate accept characters per completion, the feature must be enabled, and one of the character must be typed when a completion is active. So, it depends and we are really requiring more input from @GufNZ on this.

I am doing a lot of work in .js and .vue files - sounds like the extension for .vue files (vetur) might be missing something?

; is not registered as a commit character for our built-in javascript and typescript support. Seems that C# does register it as one (along with many others)
We can look into adding ; as a commit character

Is there any way to disable commit characters? It seems , will accept a suggestion, and with auto-importing enabled in javascript, I'm getting random imports when trying to type function arguments.
E.g. when typing out the following function:

simply continuing typing (pressing , to add another function argument) will change what i typed into some random import and add an import. This causes you to have to very slowly type code in case some variable triggers intellisense and starts adding random imports to your file...
I'd prefer to only ever accept an intellisense suggestion by pressing the enter key. Is something like this possible?


[API] Gravatar has hardcoded size

As an API user, I wouldn't expect any additional parameters to be added to the gravatar URL.

We had a brief discussion on this issue, and it's leading to the following proposed changes:

v2 serializer uses profile_image_url instead of gravatar_url because we may not always use gravatar;
modify the user view to accept a query parameter to set the profile_image_size.

By default, it will still return a specified size.

Perhaps we remove it altogether from the response model? After all, it is derived data--the client can compute the gravatar URL given the user's username.

No, you need an email address to get the gravatar, which we don't provide. We need an API method to get the url.

Oh ok, then including it in the response is fine.


[AWS] Optimize installation flow

Currently, we kfctl build -V -f ${CONFIG_URI} (https://github.com/kubeflow/website/blame/master/content/docs/aws/deploy/install-kubeflow.md#L107) and then make some customization, in order to build latest kustomize files, we have to rm -rf kustomize/  (https://github.com/kubeflow/website/blame/master/content/docs/aws/deploy/install-kubeflow.md#L166)
As we need to setup cluster name and role, there's no way to by pass customization. It would be better to wget the file first and then customize it. At the last step, we kfctl build -V  or kfctl apply -V directly

/assign @Jeffwan

PR has been merged and we can close the issue.


Global server cache

Hi, guys!
I'm using nuxt with express and I want to create global server cache for all requests. I can use lru-cache or something similar, but I don't know how to pass this data to nuxt.
For example, I have file data.js:
let data = undefined
function getData () {
  return new Promise(function (resolve, reject) {
    if (data) {
      resolve(data)
    } else {
      axios.get('/data')
        .then(response => {resolve(response.data)
        .catch(reject)})
    }
  }
}
module.exports = getData

If I add this file as a plugin, then it will be unique for every request, but how can add it as global?

I found the solution, all I need to do is use my data.js as a plugin and call getData in nuxtServerInit, then the instance of data.js will be the same for all requests.


legion-20.03.0: scatter test fails on armv7hl

From https://koji.fedoraproject.org/koji/taskinfo?taskID=42940047:
      Start 36: scatter
36/41 Test #36: scatter ..........................Child aborted***Exception:   3.21 sec
scatter: /builddir/build/BUILD/legion-legion-20.03.0/runtime/realm/transfer/channel.cc:1509: void Realm::XferDes::update_pre_bytes_write(int, size_t, size_t, size_t): Assertion `val == pre_bytes_total' failed.

@junghans did this work on legion-19.12.0?  I don't have access to an arm test setup right now.  Do you have a way to reproduce this on a local system?

It passed with 19.12.0.

It turns out I can reproduce this error in i686 builds as well - debugging now.

@junghans can you see if this patch fixes the problem:
https://gitlab.com/StanfordLegion/legion/-/commit/0741659dc1961b2cdfc7a6c33015670eec2942f3.diff

Running: https://koji.fedoraproject.org/koji/taskinfo?taskID=42951007

@streichler  yes that fixes armv7hl, i686 is still broken though.


Fixed documentation for environment variable specification (see also …

…AStyleFormat.py, line 67 and 78).

%USERPROFILE%/astylerc is correct on windows


Use HTTPS links and redirects for docs

Replaces https://github.com/GoogleCloudPlatform/google-cloud-java/pull/2200

cc @pongad because his PR https://github.com/GoogleCloudPlatform/google-cloud-java/pull/2267 will conflict with this

Changes Unknown when pulling 7d159fddcbc35d80aa6e78378d12a0992c8708fa on tswast-patch-1 into ** on master**.

Could you sync & resolve conflicts?

Are those Travis failures something I should worry about? I'm having trouble parsing the build logs.

Ignore the oraclejdk7 failure (I'm going to remove that shortly). Also ignore the appveyor/branch failure - that ran integration tests, and the failures are due to tests that have since been turned off in master. You're good to merge.


Add initial implementation of NullPointGenerator

The main function of this is to simply "multiply" existing generators
by adding an extra dimension. This adds no "axes" or new positions.
It can also be used on its own in a CompoundGenerator to provide empty
points.

Feel free to suggest a better name.

How about RepeatGenerator?
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

Does it make sense as a name for when it's shoved into a CompoundGenerator on its own?

Maybe, maybe not. I slightly prefer it to NullPointGenerator...

Renamed to StaticPointGenerator by popular demand.


signcolumn triggers redraw, even with &lazyredraw

copen 20
set signcolumn=auto
set lazyredraw
sign define neomake_file_err
silent sign place 5000 line=1 name=neomake_file_err buffer=2
echom 'sleep: nothing should be drawn already'
sleep 1
resize 1

Use it with vim -u NONE t.vim, and then :source %.
Using signcolumn=no works around this (i.e. there is no redraw happening before the sleep).
I've noticed this with Neomake's custom quickfix, which adds signs to the entries, and then later vim-qf_resize resizing it: this causes flicker, since setting the signs triggers a redraw.

Daniel Hahler wrote:

copen 20
set signcolumn=auto
set lazyredraw
sign define neomake_file_err
silent sign place 5000 line=1 name=neomake_file_err buffer=2
echom 'sleep: nothing should be drawn already'
sleep 1
resize 1

Use it with vim -u NONE t.vim, and then :source %.
Using signcolumn=no works around this (i.e. there is no redraw happening before the sleep).
I've noticed this with Neomake's custom quickfix, which adds signs to the entries, and then later vim-qf_resize resizing it: this causes flicker, since setting the signs triggers a redraw.

Why do you say "nothing should be drawn"?  Is that because the buffer
does not exist?  Normally adding a first sign when 'signcolumn' is
"auto" causes the sign column to be displayed, thus require a redraw.
--
Ed's Radiator Shop: The Best Place in Town to Take a Leak.
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Sure, it should be drawn, but only later, i.e. after the window has been resized.
It seems to get redrawn due to placing a sign, but the sign itself (appears to) be drawn only later itself (but am not sure about that currently).

Daniel Hahler wrote:

Sure, it should be drawn, but only later, i.e. after the window has
been resized.
It seems to get redrawn due to placing a sign, but the sign itself
(appears to) be drawn only later itself (but am not sure about that
currently).

Ehm, how can Vim know a resize will happen later?  Note that lazy redraw
checks if there is a typed character, it doesn't matter if there is more
Vim script to execute.  When checking for input it's possible that a
callback is invoked, which will then trigger a redraw, if one is
pending.
--
From "know your smileys":
:^[/   mean-smiley-with-cigarette
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Note that lazy redraw checks if there is a typed character

But there is not in this case, is there?
Therefore &lazyredraw should have an effect at least, no?

According to :h lazyredraw, there is zero reason to expect a redraw in this case to be skipped unless one takes "macros" to cover sourced scripts.  But :h macro takes one to mappings, which are neither sourced scripts nor relevant to the present case.  So the asked-for behavior is not the documented behavior.

Ah, yes.
I've assumed that &lazyredraw would also affect scripts/functions in general.
A workaround for Neomake is to hook into "FileType qf" as late as possible (via VimEnter, but maybe after should/could be used instead).
Another workaround could be wrapping things in a mapping (but that involves the :lwindow / :cwindow then already.
btw: using cgetexpr 'foo' instead of sign place does not trigger an early redraw already, so it might be possible to fix this issue by delaying the drawing of the signcolumn in the same way as the drawing of the list items.

I am closing this. There is an entry in the todo list now:
https://github.com/vim/vim/blob/d315cf551f1d15609c4d7cf724e471de55f5cdac/runtime/doc/todo.txt#L115-L116
that mentions to have a new option that skips redraws while executing a script


Use array for exit code in child process

Change accepted exit code in child process from a number to an array, which is align with bootstrap.js running in the node.

The coverage decrease is unclear and I can't find details about it. The child-process.js I modified in this PR has 100% line and statement coverage.

I have modified exit code parameter within RackHD, and there is only one place. https://github.com/RackHD/on-tasks/pull/114/files#diff-1c4c0a36d5f79178ac5aaa894f289424R38
So I can't think of the reason of Jenkins failure. Is there any log that I can look into?

Hi @iceiilin  - why change the result code to be an array? It's not clear to me how you would leverage or use more than one response, and this subtly changes the implicit "truthiness" of the results, which could result in very unexpected responses.
-1 until it's clear what the value is of adding this complicated response

@heckj from looking it appears we may have had a bug before this given that, as @iceiilin mentions, bootstrap.js treats acceptedResponseCodes as an array (https://github.com/RackHD/on-http/blob/master/data/templates/bootstrap.js#L142). Since it does an indexOf call, I could see some false positives, for example where the error code is '127' and the acceptedResponseCodes is '1'.
That said, perhaps it would be better to fix bootstrap.js to treat the accepted response value as a string/number instead of an array?

Thanks Ben, that helps me understand. I'll withdraw my -1 if the core committers would prefer to have this return an array result to match the bootstrap.js code, but I agree that updating/fixing bootstrap.js would seem to make more sense from a longer term fix perspective. There could easily be some reason I'm missing on why changing bootstrap.js would be a bad thing though.

test this please

@benbp:
I haven't understood your comment about false positive case could you please explain more?
Since it does an indexOf call, I could see some false positives, for example where the error code is        '127' and the acceptedResponseCodes is '1'.

@benbp, @heckj : I'd prefer to use array, Normally the command line returns 0 means it executes successfully, but acceptedResponseCodes is designed to intentionally ignore some particular errors, since we may want to ignore multi kind of errors, so Array should be better.

@yyscamper right now the bootstrap.js implementation is buggy if used against a string instead of an array, for example '127'.indexOf('1') returns a truthy value even though '127' != '1'.

Thanks @benbp, understand your concern, this is sure a problem, force it to array of number should fix this.

@benbp I would prefer to use an array of number as accepted exit codes, to cover cases where several exit codes is acceptable. https://github.com/iceiilin/on-core/blob/bugfix/odr-399-ipmi-cata/lib/common/child-process.js#L52 has ensured the input code is an array of number. So I think this PR is ready. I will open another PR in on-http to solve the problem in bootstrap.js.

changing from previous -1 to :+1:

:+1:


Azure Functions Dataset 2019 download link not working

Hello,
Thank you for sharing the data however, the link for downloading it is not working.
https://azurecloudpublicdataset2.blob.core.windows.net/azurepublicdatasetv2/azurefunctions_dataset2019/azurefunctions-dataset2019.tar.xz

Update:
However, the individual file link works: https://azurecloudpublicdataset2.blob.core.windows.net/azurepublicdatasetv2/azurefunctions_dataset2019/invocations_per_function_md.anon.d01.csv

It seems that the file type tar.xz has some errors. But replacing it with  tar.gz does not work.

Thank you. There was a problem uploading the archive, but it is fixed now. There is no .gz, xz compresses the file significantly better than either gz or bzip2.


⚠ Samsung has degraded performance

In 0bc9e1e, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 3120 ms

Resolved: Samsung performance has improved in fe9b89b.


WRGB support

I have wrgb led strip, adaptive lighting trying to control White channel instead of RGB. Colours are off.

No information given: no logs, debug; config, adaptive lighting version, ha version: nothing. Not even an explanation of the issue.
6 words isn't enough to start an issue thread. Please read the readme or ask for help in the discussions.


Failed to construct 'MediaMetadata': required member src is undefined.

Version
4.16.1
Description
When showMediaSession = true, it is not possible to skip tracks in your playlist with the fast forward button.
Steps to Reproduce
I couldn't reproduce it using the demo website as I don't see an option to set showMediaSession to true.
Expected Behavior
Same behavior as when showMediaSession = false; user can skip tracks however he wishes.
Current Behavior
Getting Uncaught Error (in the console)

Uncaught TypeError: Failed to construct 'MediaMetadata': required member src is undefined.
at n.updateMediaSessionMetadata (index.js:1487)
at n. (index.js:335)
at da (react-dom.production.min.js:131)
at al (react-dom.production.min.js:212)
at pu (react-dom.production.min.js:255)
at t.unstable_runWithPriority (scheduler.production.min.js:19)
at Vo (react-dom.production.min.js:122)
at du (react-dom.production.min.js:248)
at Zl (react-dom.production.min.js:239)
at react-dom.production.min.js:123
Again thanks for the awesome work and your patience!
Let me know if you need more info

can your show me your code ?

Here you go https://github.com/chaos87/backtube/blob/master/src/App.js
Thanks for the help, I just started learning React a month ago

you website It looks good, thanks for using the player. i'think this is a bug
https://github.com/lijinke666/react-music-player/blob/d037b4351c67f1d3e023f80936d988489ea6f10d/src/index.js#L1893-L1907
i forget compatible with no cover case
in the your app only have  name and musicSrc field. so MediaMetadata  throw error
https://github.com/chaos87/backtube/blob/221f802a8f89a45bf3e18df09e5648e9ab5ebe50/src/App.js#L92-L96
thank your feedback, I will fix it as soon as possible

Thanks for the feedback!
Well spotted, I just set autoHiddenCover back to false and assign the image as shown on the card as cover and it works!

fixed.


Scoped packages fail for NPM

When I call codeartifact requesting a scoped package @my-org/package1, it returns results
GET https://testdomain-12345567890.d.codeartifact.us-east-1.amazonaws.com/npm/testrepo/@my-org%2fpackage1/
Authorization: Bearer $AWS_CODEARTIFACT_AUTH_TOKEN

returns
{
  "_id": "@my-org/package1",
  "name": "@my-org/package1"
}

When I request the same package through the proxy, I get an error.
GET http://localhost:8080/testrepo/@my-org%2fpackage1/

{
  "success": false,
  "error": "1 validation error detected: Value '[@my-org/package1]' at 'versionSelection.targetedVersions' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 255, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: [^#/\\p{C}\\p{IsWhitespace}]+]"
}

Can we fix the proxy so it works with scoped npm packages?

I'm looking to use this, but scoped/namespaced is a requirement for us.


refactor update blas/ext/base/dsnansumors follow current project conventions

Resolves #1493  .
Description

What is the purpose of this pull request?
update blas/ext/base/dsnansumors follow current project conventions

This pull request:

progresses #1152
fixes #1493

Related Issues

Does this pull request have any related issues?

This pull request:

resolves #
fixes #

Questions

Any questions for reviewers of this pull request?

No.
Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.
Checklist

Please ensure the following tasks are completed before submitting this pull request.

[x] Read, understood, and followed the contributing guidelines.

@stdlib-js/reviewers

@Planeshifter @kgryte @Pranavchiku Please review this PR

@Planeshifter I have made the required changes please review this


docs: add missing npm_link_all_packages.md

Fix #1223
Do you know of a way to generate docs for generated rules like this? If not I'll clean up this manual one a bit.

Replaced with https://github.com/aspect-build/rules_js/pull/1236


Use searchable select boxes in admin forms

Load select options via Ajax to improve performance when lists get
long.

Remove N+1 queries and in memory filtering in permissions logic to
improve performance.

Coverage increased (+0.03%) to 99.198% when pulling 540240d50767dba11eff44c03ab2d7dd1b2f082c on tf:searchable-select into b2c5e5316a8d93eddf88db103b24af332d155bec on codevise:master.

Coverage increased (+0.03%) to 99.198% when pulling 540240d50767dba11eff44c03ab2d7dd1b2f082c on tf:searchable-select into b2c5e5316a8d93eddf88db103b24af332d155bec on codevise:master.

Coverage increased (+0.03%) to 99.198% when pulling 540240d50767dba11eff44c03ab2d7dd1b2f082c on tf:searchable-select into b2c5e5316a8d93eddf88db103b24af332d155bec on codevise:master.


Make validation check for missing photos/participant names in new episodes

When making a new episode, the build should fail if the image is missing or the participant is not in _data/participants.yml

Eh. We already have the game at https://hour.gg/member-information-game


Add enum interpretation and misc variables

With this PR, enum values can be retrieved as decoded strings (e.g. "heating") in addition to the raw values (e.g. "15003").
Also added some more variables, which work on Tehowatti Air (together with Jäspi Nordic Inverter a.k.a. Nibe F2120). Two of those variables can make use of the enum decoding.

:+1:


Add GA events for error messages

Create GA events for the following error messages being shown:

From time can't be the same as until time
From time can't be greater than until time
Can't double book

https://developers.google.com/analytics/devguides/collection/analyticsjs/events

This probably needs a content review before we can implement it


Add rest of Stanford datasets to source table

This was completed without including datasets that overlapped greatly with already existing datasets from departments


Validate hub cluster contains all zones of multi-cluster

What this PR does / why we need it:
Validate all multi-cluster zones are also contained in hub subnets.
fixes #281
Validate configuration, so that hubs in multi cluster environments contain all zones of their clusters

/assign @simonswine

/approve
/lgtm
/assign @JoshVanL
/unassign
@JoshVanL thanks this work well for me. Can you please add a release note and sort out the dco situation

/unassign
/assign @simonswine

/lgtm


--index-strategy not behaving as described

Scenario
I want to install the package PACKAGE. The package is present both on the global pypi, the default index-url, and in another extra-index-url EXTRA_INDEX_URL, but the specific version VERSION_ONLY_ON_PYPI is present only on the global pypi.
Theoretically, the extra_index_url would not be needed for this particular package, but since this is part of dependencies installation it is installed with many others packages through a requirements.txt file and for some of them the EXTRA_INDEX_URL is required.
When I try to install it with the command
 uv pip install PACKAGE==VERSION_ONLY_ON_PYPI --extra-index-url EXTRA_INDEX_URL --index-strategy unsafe-best-match  --verbose
I get something like
...
DEBUG Solving with target Python version 3.10.12
DEBUG Adding direct dependency: PACKAGE==VERSION_ONLY_ON_PYPI
DEBUG Found stale response for: EXTRA_INDEX_URL/PACKAGE
DEBUG Sending revalidation request for: EXTRA_INDEX_URL/PACKAGE
DEBUG Found modified response for: EXTRA_INDEX_URL/PACKAGE
DEBUG Found fresh response for: EXTRA_INDEX_URL/PACKAGE
DEBUG Searching for a compatible version of PACKAGE (==VERSION_ONLY_ON_PYPI)
DEBUG No compatible version found for: PACKAGE
 × No solution found when resolving dependencies:
  ╰─▶ Because there is no version of PACKAGE==VERSION_ONLY_ON_PYPI and you require PACKAGE==VERSION_ONLY_ON_PYPI, we can conclude that the requirements are unsatisfiable.

To my understanding unsafe-best-match should look for all the versions in all the index-url (so Pypi's one and EXTRA_INDEX_URL) but as soon it finds the package in EXTRA_INDEX_URL but not the correct version it bombs without looking further.
Setup
Python 3.10.12, Ubuntu 22.04, UV 0.2.5

Unfortunately I can't really do much with this -- it does work as described for me. Here's a concrete example:
echo "anyio==4.4.0" | uv pip compile --extra-index-url https://test.pypi.org/simple - --index-strategy unsafe-best-match

(anyio only exists at 3.5.0 on the Test PyPI index.)


Publish Helm-Chart

please publish this helm chart, so others can use it easily via helm.
there is a gh action that supports publishing helm charts via gh pages.
https://helm.sh/docs/howto/chart_releaser_action/

Hello @grafjo, sorry for the late notice. I just arrived inside Lago and I will take care of this next week :)

This is now live, see #67


add unarchiver example

Hi Matt,
As previously discussed, I am opening a new PR to provide the unarchiver example.

However, I don't think we should be providing an actual program, just an example in the docs.

Yes this is just an example that can be worked on, I am not aiming to change anything of the library itself. I believe you already agreed with that.
If needed, I can add a link in README.md for this example.

Thank you!
I do think it's important that we don't provide a program, but we can put something like this in documentation. Maybe the readme, or the wiki. (Drop main(), and the go.mod/sum files.)
And while creating an archive is relatively straightforward (the formats are pretty standard), extracting an archive is not. There are many ways to do it -- like there are many ways to copy a directory of files. How do you handle existing files? What if one file fails to copy? Do you create a new folder or litter the destination? What about file properties and names that aren't supported on the target FS? Do you trust directory traversals (..)? Symlinks? Hard links? The list goes on.
For these reasons I am not prone to adding a particularly detailed example. There are too many ways to do it, and people will just ask for more examples to do it their way, some of which are less secure and less portable than others. Some may be very niche. There is no one right way to extact an archive, but almost all the ways are the wrong ways.
We should thus explain clearly that extracting an archive is a very opinionated operation, and is often insecure, thus we are leaving the integration/implementation up to the users.

but we can put something like this in documentation. Maybe the readme, or the wiki. (Drop main(), and the go.mod/sum files.)

I don't see any difference, but if you think it's more appropriate I can do that as well. It's just that the code will seem lengthy if put in the documentation.
I totally understand your point that users should decide how to extract the files, it looks like you intend to implement only the lower level APIs instead of providing another tar. However, it will be beneficial if we provide a secure default way of unarchiving, maybe even with a new project that does exactly that?

Ohh, actually, a separate project for a command / utility would maybe be great. I know a lot of people want it, but it's just not something I need or have time for right now. Beware that it is fraught with security perils however.

Very good. I will be happy to maintain the said project if you decide to open one.

Thanks. I don't think I should own the repo though if I won't be maintaining it from the start. Might be confusing. 😅

I see, my point is to make it easier for people to use this library, if you intend to make the library lower level we can create a new one dedicated to high level archive operations.
I'm going to create the project later, let's work together in the future.

Oh I definitely think we can refer to it from here so people can find it and learn from it. 👍
Thanks again for contributing!

https://github.com/jm33-m0/arc
Done!

Legend! I'll add it to the readme, and hope it gets developed more fully! :100: :tada:


Get-DbaDatabaseFile errors on Single-drive servers

Bug Report

General Troubleshooting steps

[X] Verified running the latest release of dbatools?
[X] Verified errors are not related to permissions?
[X] Can duplicate in new/clean PowerShell session (clean = powershell -NoProfile)?

Version Information

Operating System (Name|Version): Windows 10, Windows 7
PowerShell Version: 5.1.14409.1012
SQL Server (Edition|Version): All

Steps to Reproduce
Get-DbaDatabaseFile errors on Single-drive servers, but not on multiple drive servers.
IOW, if you have SQL Server with just a 'C: drive' and you run this:
Get-DbaDatabaseFile -SqlInstance <instance> -Database <database> -EnableException

You will get an error like this:
Select-Object : Cannot convert System.Char to one of the following types {System.String,System.Management.Automation.ScriptBlock}.
At C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.305\allcommands.ps1:25518 char:111
+ ... g(0, 1) } | Select-Object $MbFreeColName -ExpandProperty $MbFreeColNa ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Select-Object], NotSupportedException
+ FullyQualifiedErrorId : DictionaryKeyUnknownType,Microsoft.PowerShell.Commands.SelectObjectCommand

Additional information
I have a fix already coded and committed to the bugfix-get-dbadatabasefile branch in my fork.
This is literally a one-line fix.
This is my first contribution to the dbatools project and I'm stumbling along. Do I wait for someone to request a PR from my side, or do I just go ahead and submit the PR?

hey @ashdar - we'd love your PR! I believe (but dont know for sure) that you'reth e only one who can request the PR from your branch.

I've created a PR that I believe covers all of the required bases.
-d
On Sat, Mar 24, 2018 at 11:57 AM, Chrissy LeMaire<EMAIL_ADDRESS>wrote:

hey @ashdar https://github.com/ashdar - we'd love your PR! I believe
(but dont know for sure) that you'reth e only one who can request the PR
from your branch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sqlcollaborative/dbatools/issues/3420#issuecomment-375901654,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK5fUVLpQfDVpUwen2rknrq8fggE9Pseks5thmzhgaJpZM4S5wXy
.

--
Ashdar Partners
Specializing in Performance Engineering (and Re-engineering)
Blog http://blog.ashdar-partners.com/, LinkedIn
http://www.linkedin.com/in/darinstrait, GitHub
https://github.com/AshdarPartners, Twitter
https://twitter.com/ashdarpartners


[table] pageFn in request and convert back field type after edit

[table] support pageFn in request params
[table] convert field to its original data type after edit

Coverage remained the same at 49.273% when pulling 81337c5e3d3654ce81518c8326b3f7b4904dba27 on shixiaobao17145:support-pageFn into 0a433bf2e427d3a18c4d92039f8b2666884a0b4a on sentsin:master.


No code found for dataset partitioning

Did you divide the dataset into training dataset and test dataset? I didn't find any content related to dataset partitioning in the paper. In the code corresponding to the paper, I found that there are data files named 'test' and 'train', but it seems that the main program file 'main.py' uses the same file specified by argument 'dataname' when training and testing.

As this is purely unsupervised learning, so there is no training set and testing set split.


[Bug]: Navigation seems to only work once

What happened?
I think this is entirely related to a known SwiftUI bug and the deprecation of NavLinks with isActive bindings. Effectively, isActive never gets set to false. You can confirm this by adding an onChange modifier and pressing the built in "back" button. Because it never gets set to false, setting it to true triggers no changes.
Version
iOS 16
Relevant code sample
// Here's a reproducible example:

import SwiftUI
import Combine

struct ContentView: View {
    var body: some View {
        NavigationStack {
            VStack {
                Combiner(current: Screen1(), next: Combiner(current: Screen2(), next: Combiner(current: Screen3())))
            }
        }
        .padding()
    }
}

protocol FlowRepresentableView: View { }

extension Never: FlowRepresentableView { }

class Workflow: ObservableObject {
    let proceedPublisher = PassthroughSubject<Void, Never>()
}

struct Combiner<Current: FlowRepresentableView, Next: FlowRepresentableView>: FlowRepresentableView {
    @State var current: Current
    @State var next: Next?
    @State var isActive: Bool = false
    @StateObject var workflow = Workflow()

    init(current: Current, next: Next) {
        _current = State(wrappedValue: current)
        _next = State(wrappedValue: next)
    }

    init(current: Current) where Next == Never {
        _current = State(wrappedValue: current)
        _next = State(wrappedValue: nil)
    }

    var body: some View {
        Group {
            if let next {
                NavigationLink(destination: next, isActive: $isActive) { }
                    .isDetailLink(false)
            }
            current
        }
        .onReceive(workflow.proceedPublisher) {
            isActive = true
        }
        .environmentObject(workflow)
    }
}

struct Screen1: FlowRepresentableView {
    @EnvironmentObject var workflow: Workflow
    var body: some View {
        Text("\(String(describing: Self.self))")
            .onTapGesture {
                workflow.proceedPublisher.send()
            }
    }
}

struct Screen2: FlowRepresentableView {
    @EnvironmentObject var workflow: Workflow
    var body: some View {
        Text("\(String(describing: Self.self))")
            .onTapGesture {
                workflow.proceedPublisher.send()
            }
    }
}

struct Screen3: FlowRepresentableView {
    @EnvironmentObject var workflow: Workflow
    var body: some View {
        Text("\(String(describing: Self.self))")
            .onTapGesture {
                workflow.proceedPublisher.send()
            }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

Relevant log output
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Note: Using the new:
        .navigationDestination(isPresented: $isActive, destination: {
            next
        })

syntax does work.


egressip-ipam-operator new version

New Submissions

[ ] Has you operator nested directory structure?
[ ] Have you selected the Project Community Operator Submissions in your PR on the right-hand menu bar?
[ ] Are you familiar with our contribution guidelines?
[ ] Have you packaged and deployed your Operator for Operator Framework?

[ ] Have you tested your Operator in all supported installation modes?
[ ] Is your submission signed?

Updates to existing Operators

[x] Is your new CSV pointing to the previous version with the replaces property?
[x] Is your new CSV referenced in the appropriate channel defined in the package.yaml ?
[ ] Have you tested an update to your Operator when deployed via OLM?
[x] Is your submission signed?

Your submission should not

[x] Modify more than one operator
[x] Modify an Operator you don't own
[x] Rename an operator - please remove and add with a different name instead
[x] Submit operators to both upstream-community-operators and community-operators at once
[x] Modify any files outside the above mentioned folders
[x] Contain more than one commit. Please squash your commits.

Operator Description must contain (in order)

[x] Description about the managed Application and where to find more information
[x] Features and capabilities of your Operator and how to use it
[x] Any manual steps about potential pre-requisites for using your Operator

Operator Metadata should contain

[x] Human readable name and 1-liner description about your Operator
[x] Valid category name1
[x] One of the pre-defined capability levels2
[x] Links to the maintainer, source code and documentation
[x] Example templates for all Custom Resource Definitions intended to be used
[x] A quadratic logo

Remember that you can preview your CSV here.
--
1 If you feel your Operator does not fit any of the pre-defined categories, file a PR against this repo and explain your need
2 For more information see here

/ok-to-test

/test all

@raffaelespazzoli everything is fine with operator, but can you please rebase master. You should get ci.yaml file in your operator dir. Thanks

@mvalahtv done.

@raffaelespazzoli Please put back file ci.yaml. You are deleting it with this push

@raffaelespazzoli you can do
git checkout community-operators/egressip-ipam-operator/ci.yaml

got it, @mvalahtv should be fixed now.

/ok-to-test

/lgtm

/test all


feat: support wasi_nn

@Puellaquae Node fs module test is fail, but I not modify any thing about fs module.

I passed the tests on Debain but failed on Ubuntu. Maybe there has some bug on version 0.11.2 in ubuntu.

There is a bug in fs module, which happens to have no real impact on version 0.10.0 and debian. I fixed it on #95 .


Unable to run in windows because of escapeshellarg()

When deployer runs in windows (php for windows) then in this line escapeshellarg() corrupts an ssh command by replacing a '%' to a space so the printf become printf [exit_code: s] $?; : https://github.com/deployphp/deployer/blob/9a48ed0561dc52cf49e7fbf8b754d12ff12f55af/src/Component/Ssh/Client.php#L62
Maybe related to #1001
Also I see that ssh multiplexing via ControlPath is not working in windows. And it seems a known problem. So I just disable it.

Deployer version: 7.0.0-beta.11
Local OS: Windows 10 Enterprise Insider Preview x86_64 2004 20201.1000
Target OS: Ubuntu 18.04.5 LTS
php -v:

PHP 7.4.11 (cli) (built: Sep 29 2020 13:18:06) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans

A minimal reproducible example of deploy.php:

<?php
namespace Deployer;
set('ssh_multiplexing', false);
host('unix@ubuntu-h-v');
task('test_test', function () {
    $pwd = run('pwd');
    writeln($pwd);
});

Actual output:
$ dep test_test -vvv
[unix@ubuntu-h-v] C:\tools\openserver\modules\php\PHP_7.4\php.exe C:\Tools\OpenServer\userdata\composer\vendor\deployer\deployer\bin\dep connect --host unix@ubuntu-h-v --decorated -vvv
task test_test
[unix@ubuntu-h-v] C:\tools\openserver\modules\php\PHP_7.4\php.exe C:\Tools\OpenServer\userdata\composer\vendor\deployer\deployer\bin\dep worker --task test_test --host unix@ubuntu-h-v --port 15121 --decorated -vvv
[unix@ubuntu-h-v] ssh  -A unix@ubuntu-h-v  ": 0d84caafc8c06b09c0f7; bash -ls; printf  $?;"
[unix@ubuntu-h-v] run pwd
[unix@ubuntu-h-v] /home/unix
[unix@ubuntu-h-v] [exit_code:
[unix@ubuntu-h-v]  error  in deploy.php on line 6:
[unix@ubuntu-h-v] exit code -1 (Unknown error)
done test_test 1s 302ms

Expected output:
$ dep test_test -vvv
[localhost] /usr/bin/php7.4 /mnt/c/tools/openserver/userdata/composer/vendor/deployer/deployer/bin/dep connect --host localhost --decorated -vvv
task test_test
[localhost] /usr/bin/php7.4 /mnt/c/tools/openserver/userdata/composer/vendor/deployer/deployer/bin/dep worker --task test_test --host localhost --port 44209 --decorated -vvv
[localhost] ssh  -A localhost  ': d4ad40a034b99eb1827f; bash -ls; printf  $?;'
[localhost] run pwd
[localhost] /home/unix
[localhost] /home/unix
done on localhost
done test_test 3s 45ms

Yes, some work should be done on windows to enable it.

Somebody wants to implement it and send PR?

Now I use proper args passing via new Process([...]), see: https://github.com/deployphp/deployer/pull/2458
I think, deploy on windows now should work!
PS What is your setup for working with php/git on windows?


Maintenance and chores

Add makefile to run sanity tests
Fix lint errors
Change the test redis namespace to use UUID to allow some tests to run in parallel
Update the mod and remove proven benches since the one of bench causing mod error

Edit: Sorry I was trying to comment on 250fcba
@ardhitama I was just browsing these PR commits and noticed particular one.
Can you elaborate on why you changed this? It might affect people that already depend on this behavior.
Thanks

Thanks for noticing,  this was to debug my particular need. Will remove this commit from the PR.


Allow custom PropType classes with no-typos rule

This is simply a rebase of @jseminck's branch, plus the removal of the
lingering failing test.
I removed the failing test because I believe it's a very small corner case
that should not block the resolution of this issue, which seems to affect
a lot of people and limits our ability to keep our components' proptypes DRY.
If it's determined that this corner case should be handled, I suggest creating
a new issue to track just that case.
Closes #1389.

...well, I thought I'd rebased on master. Fixing.

Ok, rebased again, conflicts resolved, tests fixed up to handle changes on master. PTAL

In the future, please do not open up duplicate PRs; this permanently pollutes the git graph.
Posting a link to your branch on the original PR allows collaborators to bring it in to the original PR branch for you.
At this point, please leave this PR open; I'll force push to both of them so their git refs can match.

Thanks, will review soon.

Added them. They fail. :confused: Looking into it.

Ok, new tests (and fixes) pushed. Apologies if it's a touch sloppy; I just now got this to work and wanted to get it out before I unplug for the day. PTAL, thanks for the feedback!

@ljharb How crucial is that? There are no pre-existing createClass tests for the no-typos rule;  adding that coverage strikes me as out of scope here.
Also, there's an implicit test matrix in the no-typos tests, along at least these dimensions:

Method of importing React/PropTypes
Method of declaring component
Method of declaring propTypes object
I wouldn't feel confident about createClass coverage without doing the refactoring to create parameterized tests on these dimensions, which also strikes me as out of scope here.

I created a couple quick-and-dirty createClass versions of other no-typos tests, and they fail when run against master. So, I'm inclined to think that this is another instance of an issue like #1663, where createClass just isn't supported currently. (I didn't see any other issue related to createClass and no-typos, so I'm guessing it's not something a lot of people are encountering.)

I think it's crucial in that no createClass-related bugs have been reported for it, so even though there's no tests, any change to the rule might break it - and tests ensure that it's not broken.
DRY is generally a bad idea in tests; it'd be better to copy-paste all the needed tests.
However - if, in fact, this rule never worked on createClass components, which your tests seem to suggest, would you be willing to add commented-out createClass tests in this PR, and file a new PR after this one is merged that uncomments the tests? (From that point I can try to get the rule passing, if you don't have the time)

DRY is generally a bad idea in tests; it'd be better to copy-paste all the needed tests.

Strongly disagree on "generally" and definitely in this particular case. The repetition makes it hard to know which are "all the needed tests" - it's hard to see which tests test which behavior, since there is clearly a cross product of behaviors under test. It would be better IMO if that was extracted and made explicit. Thankfully, we don't have to agree on that to make progress with this PR. :)

However - if, in fact, this rule never worked on createClass components, which your tests seem to suggest, would you be willing to add commented-out createClass tests in this PR, and file a new PR after this one is merged that uncomments the tests? (From that point I can try to get the rule passing, if you don't have the time)

Sure, sounds good. I only have a couple such tests, but it'll be a start, anyway. Pushing shortly.

Removed prefer-stateless-function commits and rebased on master.

Thanks for your feedback. However, I'm concerned that we're getting solidly into scope creep territory again.

Can you add test cases for require as well? we should be able to handle top-level static requires along with import.

There are no such tests currently; it's not part of this PR to add that coverage. Can we make a separate issue for that?

Separately, can we make sure that every test using babel-eslint has a duplicate test that uses the default parser?

It would be similarly out of scope to ask this for every no-typos test. I assume you mean every new test that this PR adds? Also, this would be a perfect use case for parameterization; it seems quite noisy to copy the entire tests' content just to remove the parser line, and glancing through the tests as they are now, it's quite hard to pick out which tests use which parser. But I feel hesitant to start going down that road, due to the opposition to it you expressed above, and the uncertainty I've expressed about getting it right.
Also, are all tests valid with both parsers? I don't really understand the difference between babel-eslint and the "default parser", so I'm not sure I'm the one to make that change anyway, even if it were in scope here.

I assume you mean every new test that this PR adds?

Yes, certainly only the added tests :-) if the others are missing tests for both the default parser and babel-eslint, that's something we'll have to fix separately.
"Noisy" isn't really a concern in tests; copy-pasting in tests is also fine. The value in testing with both parsers is that each parser might generate different node names, making the rule behave differently (even though it's unlikely). Including both tests prevents any regressions on that in the future as we update eslint and/or babel-eslint.

Added copies of this PR's new tests with the default parser.

Anything else needed on this one? I'd love to get it merged soon.

Thanks for dealing with this @brettdh - I also hope to see this merged and released soon 👍

Any idea when is this going to be released? Or is that a temporary workaround for it until then?

@lucaslim looks like there's an RC now: https://github.com/yannickcr/eslint-plugin-react/releases/tag/v7.8.0-rc.0

@lucaslim As @brettdh noticed, I published a pre-release a few hours ago.
You can test it using npm i eslint-plugin-react@next -D.
If no major issues are found the final release will be most likely published tomorrow or the day after.

@yannickcr That's awesome! Thanks :)


Auto corrected by following Lint Ruby Style/SymbolArray

Auto corrected by following Lint Ruby Style/SymbolArray
Click here to configure it on awesomecode.io

Coverage remained the same at 78.438% when pulling dde879741c51f4513a256cde1c81daac6dee2742 on awesomecode-lint-ruby-style-symbolarray-48520 into 6f30aed91323bfb8244b7998c7693f64de76222e on master.


Reactivate Generator function in Unity 2018.4.

Since Generator is one of the key features of Unity Atoms, this PR is to re-activate this feature. And since 2018.4 is LTS version I think it should be supported as well.

Updated based on comments.
Added path to Core Package because the template search path should not be based on a variable path input by user.
When Example project is opened, changed Generator path to "Assets/Atoms" will cause search path to search in "Assets/Atoms" instead of "../Packages/Core", which will not be able to search for any templates.

Updated based on your comments. :)

I've updated the pull request.


Update MALA to use Metropolis-Hastings code

Closes the second half of #2
I did not literally make MALA a subclass of Metropolis-Hastings, since doing so would require defining the proposal and correction as separate functions which couldn't share work

I think that would make the user-facing API much heavier, since instead of a "simple" proposal looking like
proposal_fn = lambda theta: np.random.normal(loc=theta, scale=4)

The model now needs to get involved, so the smallest it could be is
# assume model is defined somewhere
def proposal_fn(theta):
    prop = np.random.normal(loc=theta, scale=4)
    lp = model.log_density(prop) # note: this function is now a closure over model
    return (prop, lp)

I thought the point was so that the random variate generator and log density evaluation is done so as to share code.  I think that requires just delegating this call to the model.  On the other hand, I don't see what code sharing you expect here other than using the output of the RNG as input to the log density.

Perhaps it's clearer to just write out
You could define MALA like this:
from typing import Optional, Union
from numpy.typing import NDArray
import numpy as np

from .model_types import GradModel
from .metropolis import MetropolisHastings

class MALA(MetropolisHastings):
    def __init__(
        self,
        model: GradModel,
        epsilon: float,
        init: Optional[NDArray[np.float64]] = None,
        seed: Union[None, int, np.random.BitGenerator, np.random.Generator] = None,
    ):
        self._epsilon = epsilon
        super().__init__(
            model,
            proposal_fn=self._proposal,
            transition_lp_fn=self._correction,
            init=init,
            seed=seed,
        )

    def _proposal(self, theta: NDArray[np.float64]) -> NDArray[np.float64]:
        _, grad_theta = self._model.log_density_gradient(theta)
        return (
            theta
            + self._epsilon * grad_theta
            + np.sqrt(2 * self._epsilon) * self._rand.normal(size=self._model.dims())
        )

    def _correction(
        self,
        theta_prime: NDArray[np.float64],
        theta: NDArray[np.float64],
    ) -> float:
        _, grad_theta = self._model.log_density_gradient(theta)
        x = theta_prime - theta - self._epsilon * grad_theta
        dot_self: float = x.dot(x)
        return (-0.25 / self._epsilon) * dot_self

(ignoring the fact that MyPy now forgets that self._model is broader than just a LogDensityModel and complains, this passes all our tests).
The difficulty is in the internals of MetropolisHastings. For each call to sample:

We call _proposal(theta) to generate theta_prop
We call _correction(theta_prop, theta)
We call _correction(theta, theta_prop)

If you count them up, that means each iteration calls log_density_gradient 3 times, twice on theta and once on theta_prop.
The current way MALA is coded, we only call log_density_gradient once per iteration, so it is in theory three times faster than the version where we strictly adhere to the MH API.

Even with the general case, we should only need one log_density_gradient call.  I can't quite tell what _correction is doing here, but it shouldn't be continually calling the log_density_gradient function.  Metropolis-Hastings in the dumbest iteration should call each iteration:

gradient for proposal
log density of original and proposed point
log density of both transitions

So that's only one call to log_density_gradient as there's only one gradient required.  I'm assuming that any log_density_gradient implementation also implements just log_density.

_correction computes the Hastings correction for MALA’s proposal,
log q(x' | x) = -0.25 * dot_self(x' - x - epsilon * grad(x))
Feel free to correct me if it’s possible to compute this without the gradient, I’m just following from the formula I’ve seen on line and the current code. The current code only does one gradient call per iteration because it knows what is being re-used.

Thanks.  I keep forgetting that the gradient's needed to figure out where the normal location is for the random part of the proposal.

I don't like the long variable names for everything as I find it makes it harder for me to read the math

This is a point on which I would differ pretty strongly. I find the long variable names make it much easier to follow the author's intention (whether mathematical or algorithmic), especially given notation that's overloaded (so many alphas), paper-specific, or otherwise pretty opaque.
For a similar reason, I do actually favor parentheses for clarity of expression chunking, even if they aren't strictly necessary. (But I won't fight on this point; code is just always going to be an awkward way to write math expressions that involve fractions.)

Why is the MH test in the Metropolis file?

#17 the code for both Metropolis and MetropolisHastings in the same file. I think this is probably the right thing to do (in the limit, it doesn't really make sense for every variant of an algorithm to get its own file), but we can argue if said file should have a better name.

_correction

I've renamed it to _directional_log_density, let me know if you have a better name for it

I can't even guess what the _al suffix means for grad_prob_al (for the end of "proposal" maybe?)

It stands for ArrayLike. This ties in to your next question, but it is basically an implementation detail because of how we defined the Model types. If we wanted to be significantly more restrictive about the types of the model functions we were accepting, we wouldn't need to do this with asanyarray.
If a user does provide something which isn't an ndarray, this will be a non-zero-cost call. I think we need to document that at the top-level of the library, since it will be true for basically all the callbacks a user provides.
That said, it's not really worth requiring the user to do it - they'd just call np.array() on their list before passing it to us, which is exactly the same cost.

I find _forward a bit confusing in that it's the proposal log density and in a different measure than the the other log densities, which are of the target

Happy to change it, but I'm not sure what a better name is.

_rng is more typical as a name than _rand, but I can live with _rand if we're consistent
Sure, I don't mind saving a character for a better name

for the type Sample, I would prefer Draw

I like this better, too. I've updated the other couple usages, and in the long term we will want that to live in its own file rather than at the top of each one most likely

I've renamed it to _directional_log_density, let me know if you have a better name for it

Yes, I do.  Please let me belabor the point.  I would call it _proposal_lpdf because it's the PROPOSAL Log Probability Density Function.  I'm not sure if _proposal_lpdf seems too terse to you, but the full description _proposal_conditional_log_probability_density_function is obviously too verbose.
Technically, the _proposal_lpdf function is the conditional log density of the proposed parameters theta' given the current parameters theta, i.e., log q(theta' | theta), where we follow the standard Bayesian stats convention of overloading the density function q and resolving by argument names (not argument types!).
MCMC is confusing because there are usually (at least) two measures in play, the measure for proposals and the measure in which the target density lives.  We typically use q for proposals and p for the target densities.  Things get even more confusing because there are two conditional densities in play, the proposal density and the transition kernel density, where the transition kernel density is typically a mixed continuous/discrete thing because there's a non-zero probability mass at the current parameter value.  Stationarity conditions for Markov chains relate the transition kernel and target density, saying that transitions under the kernel  preserve the target measure.
Measures assign probabilities to events.  Events are subsets of parameter values.  If X is a random variable and x is a bound variable, x <= X is the event that the value of X is greater than or equal to x.  The cumulative distribution function for the random variable X is F_X(x) = Pr[x <= X] in the measure Pr.  Then, the density is just p(x) = d/d.x F_X(x), which has units of change in probability.  This is why we never call the value of a pdf a probability---it's the wrong units.
To disambiguate densities, we subscript with random variables and conditioning, e.g., writing q_{Theta' | Theta}(theta' | theta) to disambiguate q(theta' | theta) if there are multiple random variables in play that might cause confusion.  But usually it's clear because we establish a one-to-one convention of naming bound variables after their capitalized random variable counterparts.
Whew, that took a bit longer than expected, but this stuff really really nagged at me moving into stats from CS, so I hope it helps.

Is the name _proposal_log_density an acceptable compromise for writing out the complete name? Otherwise we can go with _proposal_lpdf

I can live with "proposal log density".  "pdf" is standard, but "lpdf" is something we made up for Stan.

Codecov Report

Merging #19 (f2de338) into main (22a3e9f) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   95.68%   95.75%   +0.06%
==========================================
  Files           9        9
  Lines         255      259       +4
==========================================
+ Hits          244      248       +4
  Misses         11       11

Impacted Files
Coverage Δ

bayes_kit/hmc.py
94.73% <100.00%> (ø)

bayes_kit/mala.py
93.93% <100.00%> (+0.39%)
:arrow_up:

bayes_kit/metropolis.py
100.00% <100.00%> (ø)

bayes_kit/__init__.py
100.00% <0.00%> (ø)

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

I've just resolved the conflict that merging #20 caused so this should be ready to go now


Need to download a specific version of dotnet in order to run everything

Summary: (Update documentation to specify dotnet version to download)
I downloaded the latest version of dotnet, and was unable to build the backend since as it required dotnet version 8.0.x. I resolved by uninstalling and reinstalling the correct version (and I did this before I copied the errors, which is why I am unable to paste them here).
Component:
Backend projects
Version:
Beta release
Device, OS, Browser:
Macbook Pro, Mac OS, Chrome
Description:
The latest version of dotnet (version 9) does not seem compatible with the project. It's not a major issue as I imagine most developers would see the message and downgrade, but it would be good to specify in the developer guide.

This code should still build in dotnet 9, we are unable to reproduce this issue. I just tried to reproduce this, and was able to run the backend in .NET 9.


Drone for PR#262

This PR is just to run drone for https://github.com/code-dot-org/blockly/pull/262

@marcd123 Looks like the build is failing. Let me know if you're not able to repro locally.

Can't reproduce build issues on my end. I'm also not authorized to view the build results on the PR.
Can you share the build error here or through Slack?


Camera preview/capture using WP8 camera APIs

This pull request includes all changes for the WP8 version of the library for using SL8 AudioVideoCaptureDevice instead of the legacy PhotoCamera SL7 APIs.
This fixes the issues with the flash/torch not being able to be turned on, while maintaining API coherency without introducing any breaking changes.

Wow this looks great, I'll integrate this very shortly, thanks!

Thanks! Please perform a bit of testing on it - I can confirm it works but it seems that ZXing is having a bit of trouble recognizing the barcodes with the new APIs. Not sure if is caused by the preview resolution (I set it to the smallest available size until resolution selection is implemented)?

This was manually integrated, thanks :)


runtime: repair the android build

The android log symbol is print rather than printf.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please smoke test


🐞fix: object-management.md Chinese typo

typo
modifying Chinese characters

/easycla

Hey @sean,
You have to sign the CLA so that we can review this PR and move forward.
Just click on the red NOT COVERED button in the first comment.
哈囉，你需要先簽署 CLA 貢獻者授權協議，我們才能 Review 並合併這個 PR
請點擊上方第一個留言的紅色 NOT COVERED 按鈕，並依網站指示操作
After signing the CLA, you may use this command to refresh the status:
/easycla
If you have any problem, please take a look at the CLA tutorial.
如果用起來還有問題，可以先看看 這篇教學 的操作截圖

Hey @Dog4j,
Since you didn't sign the CLA agreement, we cannot review this PR and move forward.
I'm closing this PR now, but feel free to /reopen once you are ready to sign CLA. (tutorial here)
/close


Document lowlevel server

Current coverage is 95.46% (diff: 75.00%)

Merging #1470 into master will decrease coverage by 3.37%

@@             master      #1470   diff @@
==========================================
  Files            30         30
  Lines          6961       6963     +2
  Methods           0          0
  Messages          0          0
  Branches       1154       1155     +1
==========================================
- Hits           6880       6647   -233
- Misses           40        252   +212
- Partials         41         64    +23

Powered by Codecov. Last update 6397088...ae7194d


Copy working in vim but not with normal tmux

I can now copy to the osx clipboard with vim after installing tmux-MacOSX-pasteboard.
But when I select text with the mouse or c-[ ] in a tmux session running zsh nothing gets copied to osx keyboard
Don't know if this is the correct behaviour or not.
compiled from master and placed in /bin/
Copying text in osx and running pbpaste sends the text to the terminal
Running: echo "test" | pbcopy under tmux sends to osx clipboard
Using Os X 10.7.2
iTerm 2 Build <IP_ADDRESS>11020
tmux 1.5
vim 7.3.260
zsh 4.3.11 (i386-apple-darwin11.0)

It is not clear to me which program you are actually interacting with when you say “select text with the mouse or c-[ ] in a tmux session running zsh”, but I would expect only iTerm to actually use the Mac OS X pasteboard—most terminal programs do not support directly using the OS clipboard; Vim is an exception in this regard.
Using the mouse strongly implies that the interaction is with iTerm, but it could also be tmux, or even zsh if the appropriate settings are in place (iTerm generating mouse event sequences and sending them to its tty, and the program(s) on the other end know how and are configure to interpret those mouse sequences).
The keystrokes that you mention imply that you are interacting with either tmux or zsh, but it is not clear which one since c-[ ] does not seem (to me) like a standard binding for either one (maybe you are referring to copy-mode of tmux, which is usually invoked with <Prefix> [ and paste-buffer which is usually invoked with <Prefix> ]).

If you need to copy something with tmux and put that on the Mac OS X pasteboard, you can (after having made a selection and exited copy-mode) use save-buffer and pbcopy like this:
tmux save-buffer - | pbcopy

save-buffer usually saves to a file, but it interprets - to mean “stdout” (this is semi-standard in many UNIX tools). show-buffer might seem more appropriate, but it escapes its output, so most control characters and non-ASCII characters be copied in an unexpected format.
This can not be bound directly into the bindings that copy-and-exit from copy-mode, but you could add a normal binding that did this for you:
bind-key C-] run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"

Then your interaction might look something like this:

TYpe <Prefix> ] into tmux to active copy-mode.
Make your selection and exit copy-mode (keystrokes vary based on Emacs/vi mode).
Type <Prefix> C-] into tmux to “paste” from tmux into the Mac OS X pasteboard.
Switch to a different application and paste (i.e. with the Edit > Paste menu item, or ⌘V (Command-V)).

While I haven't tried this yet I felt a strong urge to leave a clarifying response to your excellent and very helpful response.
"maybe you are referring to copy-mode of tmux, which is usually invoked with  [ and paste-buffer which is usually invoked with  ])."
You are correct. Im interacting with a tmux session running under zsh in iTerm.
I will clarify if this is the solution tomorrow morning!

This solved my problem. It would be nice to add that Vim is an exception to the rule to the readme.
Thank you so much for what must be the most detailed response to an issue ever.


Integer values gets saved as Decimal.decimal in moto dynamodb (@mock_dynamodb2)

I am trying to test insertion on a table by filtering records based on an 'int' valued column in the table. I inserted some records using the @mock_dynamodb2 feature and called the function to be tested which filters records based on an 'int' valued column. The query always resulted in an empty response because every Integer value is getting saved as <Decimal.decimal> in the table. Below I have reciprocated the issue using a small code snippet.
I am using the following:
moto: 1.3.4
boto3: 1.7.84
botocore: 1.10.84
In my below code I am creating a table called Movies and inserting some dummy data in it while mocking it via @mock_dynamodb2. I then run 'pytest' to ensure that the test function is collected and the assertion at the end of the function is run.
import pytest
import boto3
from moto import mock_dynamodb2
from decimal import Decimal
from boto3.dynamodb.conditions import Key, Attr

@mock_dynamodb2
def test():
    table_name = 'Movies'
    dynamodb = boto3.resource('dynamodb', 'us-east-2')
    table = dynamodb.create_table(
            TableName=table_name,
            KeySchema=[
                {
                    'AttributeName': 'id',
                    'KeyType': 'HASH'
                }
            ],
            AttributeDefinitions=[
                {
                    'AttributeName': 'id',
                    'AttributeType': 'S'
                }
            ],
            ProvisionedThroughput={
                'ReadCapacityUnits': 12,
                'WriteCapacityUnits': 5
            }
        )
    data = []
    data.append({'id': 'ABCD', 'duration': 12345})
    data.append({'id': 'EFGH', 'duration': 6789})
    for item in data:
        table.put_item(Item=item)
    response = table.query(
        KeyConditionExpression=Key('id').eq('ABCD')
    )
    assert(isinstance(response['Items'][0]['duration'], int))

The assertion always fails as after insertion the 'int' value becomes 'Decimal'.
    @mock_dynamodb2
    def test():
        table_name = 'Movies'
        dynamodb = boto3.resource('dynamodb', 'us-east-2')
        table = dynamodb.create_table(
                TableName=table_name,
                KeySchema=[
                    {
                        'AttributeName': 'id',
                        'KeyType': 'HASH'
                    }
                ],
                AttributeDefinitions=[
                    {
                        'AttributeName': 'id',
                        'AttributeType': 'S'
                    }
                ],
                ProvisionedThroughput={
                    'ReadCapacityUnits': 12,
                    'WriteCapacityUnits': 5
                }
            )
        data = []
        data.append({'id': 'ABCD', 'duration': 12345})
        data.append({'id': 'EFGH', 'duration': 6789})
        for item in data:
            table.put_item(Item=item)
        response = table.query(
            KeyConditionExpression=Key('id').eq('ABCD')
        )
>       assert(isinstance(response['Items'][0]['duration'], int))
E       AssertionError: assert False
E        +  where False = isinstance(Decimal('12345'), int)

test/tests.py:223: AssertionError

In my original code I want to filter data based on an Integer value which works fine with boto3 dynamo db table but does not work when mocked with @mock_dynamodb2. Unfortunately I cannot change the data type of this field from 'int' to 'decimal' and hence I want to test this table as it is.

Hi,
I have the same issue, can you please advice if this has been solved?
Thanks and Regards,
Camillo


Feature: Enable/disable snippets from switcher

Implementing #21 enabling enabling/disabling snippets from the switcher.
With these changes enabled now the switcher looks like:

I've chosen Tab as the character to toggle enabled/disabled, and the color for enabled is the accented color.

I think we should not show the enabled/disabled text when typing something that does not exist. A non-existing CSS snippet isn't really enabled or disabled.

I like using tab for toggling, though it may not be accessible on mobile. Though we have this same issue with deleting. I recommend we also add a command to toggle the enabled status of the currently visible CSS snippet, similar to the command I've added for deleting a CSS snippet.

I forgot about the command, but I initially thought about it, and found myself reasoning that would a command be useful if you don't know the current state? And after that I thought about your could I show this in the file itself, and found no solution.
Come to think about it now, I'm wondering how hard would it be to have the command display the state, and offer to either cancel or toggle it? Or would you like to have a "blind" command which just toggles it anyways?

I'm off to work so I can't do any changes until tonight (aka 10-12 hours or so). Hopefully I'll get response on my responses by then, and the changes should be easy enough to implement.

OK, now I've corrected the texts, removed the "disabled" state related to new files, and added the command to toggle the state from within the file.

Thanks for your contribution!!

Not even considered a problem, as I can be very picky myself.