Support Storage Access Framework standard

Is your feature request related to a problem? Please describe.
A SAF support will be useful in the following situation:

automatically sync code with cloud solution such as Nextcloud.
open file with SFTP mounted SAF folder on a remote Linux server.

Describe the solution you'd like
Be able to open file with SAF mounted storage.
Describe alternatives you've considered
Be able to use SFTP to open file on a remote server.
Additional context
Could refer to Nextcloud code for SAF implementation. Could refer to VLC code for SFTP implementation.

+1 for this
also by adding SFA we can edit files from termux
I'm excited about this
please add SFA ASAP🥳

Another place to find SFA implementation is the Aegis authenticator.

Google is enforcing SFA as the only method to access shared storage in the future Android release.

Hello,
Any news on this ?
Thanks

SFTP support was added in v2022.2.0
d3f08c39e8b6e2c3cd359368eb998d41ee9b6796
SAF will not be implemented

Added in v2023.1.2

gh search issues --json title,number  -R massivemadness/Squircle-CE saf
SAF providers give EACCESS or No such file or directory
is saf supported at all. is this a bug or lack of feature
open file uses the saf dialogue but it seems like it's trying to convert all saf paths content://... to regular paths
Downloads/abc/abc.txt is nearly correct but missing subfolder
No such file or directory (/storage.../Downloads/abc.txt

content://org.app/tree/blabla/abc.txt translates to root folder? path conversion failed completely?
/: open failed EACCESS

This app looks dead anyway


Allow org user to be re-added after deletion

Related Issue or Background Info
Closes https://github.com/CDCgov/prime-simplereport/issues/923
Changes Proposed

When a deleted user who is in the same org is added, instead of rejecting the request re-provision the user with the information from the request and send the user a new activation email where they can reconfigure their password, mfa, etc.

Additional Information

After discussion, it was clear that to minimize support burden the action to take when a user is re-added to an org after deletion is to wipe their credentials and put them back through the activation workflow.  See discussion on the ticket.

Doing it Live (Testing with Okta)
In addition to the tests included, you can try test this workflow.
On test.simplereport.gov
As of this writing, this branch is on test and you can try it out there.  Check https://test.simplereport.gov/api/actuator/info first to make sure this branch is still deployed.  To try it, you'll need

An Okta account that is an Org Admin
Another Okta account that is a member of the same Org

What to do:

Log in to test as the Org Admin
Navigate to the settings page
Select your other Org user, then "Remove user"
Choose "New user" and add a user with the same email address as the one you just removed

What to verify afterward:

That the user was re-added successful and their name, permissions, and facility access in the app are set to what you chose when re-adding them
Then, in Okta, look up the user at https://hhs-prime-admin.okta.com/admin/users and check to make sure their name is set to what you chose, that the account is has the status "Pending user action", and that the groups reflect what you chose when adding them
Ensure that a user activation email was received at the email address of the user re-added.  Follow the activation link and ensure you are able to set up the account password, mfa, etc.
Ensure user added is able to log in to SimpleReport (test) and has the chosen permissions

Locally (because why not?)
This can be tested using real Okta accounts with some effort.  The description below uses test and it is assumed that groups, etc for the test environment will be used.  Prerequisites:

An Okta account that is an Org Admin
Auth token for the Org Admin User
Another Okta account that is a member of the same Org
Okta credentials in your application-local.yaml
An Org to your local database with the same external id as the Org you are using in the test environment
Api Users in your local database with the same email addresses as the two Okta accounts

Then, to test:

In your local database, set is_deleted to true for the Api User you are going to attempt to re-add
In Okta, find the user from the previous step and Suspend them (in their user profile, use the "More Actions" drop down)
Run the backend app with the okta-local spring profile
Make a request to the graphql mutation addUserToCurrentOrg using the email of your Suspended Okta user
If the request is successful, you will receive an activation email (just like the initial one when creating an okta account)

The various error conditions can be tried by making the same request while the local Api User and Okta user are in various states.
Checklist for Author and Reviewer
UI

[ ] Any changes to the UI/UX are approved by design
[ ] Any new or updated content (e.g. error messages) are approved by design

Testing

[x] Includes a summary of what a code reviewer should verify

Changes are Backwards Compatible

[ ] Database changes are submitted as a separate PR
[ ] GraphQL schema changes are backward compatible with older version of the front-end

Security

[ ] Changes with security implications have been approved by a security engineer (changes to  authentication, encryption, handling of PII, etc.)
[ ] Any dependencies introduced have been vetted and discussed

Cloud

[ ] DevOps team has been notified if PR requires ops support
[x] If there are changes that cannot be tested locally, this has been deployed to our Azure test environment for verification

Would prefer you use the AccessDeniedException where we discussed it, otherwise LGTM!

You're right, that makes more sense.  I made the change and tested it with the frontend to ensure this error is displayed the same as it was before (it is).


RMS Norm achieving poor memory bandwidth on MI300

The RMS norm implementation below achieves well below the peak possible memory bandwidth on MI300. The results can be reproduced using the code below.
When benchmarking BabelStream on the same device I achieved much better performance. Any insights on how to achieve better perf on RMS norm will be appreciated. Thank you!
RMS norm implementation
import torch
import triton
import triton.language as tl

if hasattr(tl, "libdevice"):
    tl_math = tl.libdevice
else:
    tl_math = tl.math

@triton.jit
def _rms_norm_kernel(
    x_ptr,
    h1_ptr,
    w_ptr,
    eps,
    stride,
    N_COLS,
    BLOCK_SIZE: tl.constexpr,
    INCLUDE_WEIGHT: tl.constexpr,
):
    row = tl.program_id(0)
    x_ptr += row * stride
    h1_ptr += row * stride

    _mean = tl.zeros([BLOCK_SIZE], dtype=tl.float32)
    for offset in range(0, N_COLS, BLOCK_SIZE):
        cols = offset + tl.arange(0, BLOCK_SIZE)
        a = tl.load(
            x_ptr + cols, mask=cols < N_COLS, other=0.0, eviction_policy="evict_last"
        ).to(tl.float32)
        _mean += a * a
    rstd = tl_math.rsqrt((tl.sum(_mean, axis=0) / N_COLS) + eps)
    for offset in range(0, N_COLS, BLOCK_SIZE):
        cols = offset + tl.arange(0, BLOCK_SIZE)
        mask = cols < N_COLS
        a = tl.load(
            x_ptr + cols, mask=mask, other=0.0, eviction_policy="evict_first"
        ).to(tl.float32)
        if INCLUDE_WEIGHT:
            w = tl.load(w_ptr + cols, mask=mask)
            tl.store(h1_ptr + cols, a * rstd * w, mask=mask)
        else:
            tl.store(h1_ptr + cols, a * rstd, mask=mask)

def _rms_norm_forward(x, attn_norm_weights, eps):
    if not x.is_contiguous():
        raise ValueError("data must be contiguous")
    if attn_norm_weights is not None:
        if not attn_norm_weights.is_contiguous():
            raise ValueError("weights must be contiguous")
    out = torch.empty_like(x)
    x_arg = x.reshape(-1, x.shape[-1])
    M, N = x_arg.shape
    # Less than 64KB per feature: enqueue fused kernel
    MAX_FUSED_SIZE = 65536 // x.element_size()
    BLOCK_SIZE = min(MAX_FUSED_SIZE, triton.next_power_of_2(N))
    BLOCK_SIZE = max(BLOCK_SIZE, 128)
    BLOCK_SIZE = min(BLOCK_SIZE, 4096)
    # heuristics for number of warps
    num_warps = min(max(BLOCK_SIZE // 256, 1), 8)
    _rms_norm_kernel[(M,)](
        x_arg,
        out,
        attn_norm_weights,
        eps,
        x_arg.stride(0),
        N,
        BLOCK_SIZE=BLOCK_SIZE,
        num_warps=num_warps,
        INCLUDE_WEIGHT=attn_norm_weights is not None,
    )

    return out

lines = ["triton-jit"]

@triton.testing.perf_report(
    triton.testing.Benchmark(
        x_names=["N"],
        x_vals=[512 * i for i in range(2, 32)],
        line_arg="provider",
        line_vals=lines,
        line_names=lines,
        styles=[
            ("blue", "-"),
            ("green", "-"),
            ("orange", "-"),
            ("yellow", "-"),
            ("red", "-"),
            ("pink", "-"),
            ("yellow", "-"),
        ],
        ylabel="GB/s",
        plot_name="rms-norm",
        args={"M": 4096, "dtype": torch.bfloat16},
    )
)

def bench_rms_norm(M, N, dtype, provider, eps=1e-6, device="cuda"):
    # create data
    x_shape = (M, N)
    w_shape = (x_shape[-1],)
    weights = torch.rand(w_shape, dtype=dtype, device="cuda")
    x = -2.3 + 0.5 * torch.randn(x_shape, dtype=dtype, device="cuda")

    # utility functions
    if provider == "triton-jit":
        y_fwd = lambda: _rms_norm_forward(x, weights, 1e-6)  # noqa E731
    else:
        raise RuntimeError()

    gbps = lambda ms: 2 * x.numel() * x.element_size() / ms * 1e-6  # noqa E731
    quantiles = [0.5, 0.2, 0.8]

    with torch.inference_mode():
        ms, min_ms, max_ms = triton.testing.do_bench(
            y_fwd, rep=500, quantiles=quantiles
        )

    return gbps(ms), gbps(max_ms), gbps(min_ms)

def main() -> None:
    bench_rms_norm.run(save_path=".", print_data=True)

if __name__ == "__main__":
    main()

RMS Norm memory bandwidth achieved in GB/sec.
N = number of column of the X matrix in the code above.
rms-norm:
          N   Mem BW (GB/s)
0    1024.0   242.845380
1    1536.0   406.980213
2    2048.0   580.727436
3    2560.0   765.160535
4    3072.0   902.283824
5    3584.0  1039.517351
6    4096.0  1249.839195
7    4608.0  1438.787001
8    5120.0  1705.244163
9    5632.0  1801.149440
10   6144.0  1825.396106
11   6656.0  1759.866815
12   7168.0  1702.653270
13   7680.0  1706.342602
14   8192.0  1539.900528
15   8704.0  1536.557202
16   9216.0  1539.256920
17   9728.0  1569.662726
18  10240.0  1594.398303
19  10752.0  1591.708676
20  11264.0  1618.314765
21  11776.0  1635.566654
22  12288.0  1651.720727
23  12800.0  1562.869454
24  13312.0  1615.739393
25  13824.0  1559.854407
26  14336.0  1594.316138
27  14848.0  1552.484248
28  15360.0  1574.615740
29  15872.0  1521.845394

BabelStream Performance
BabelStream
Version: 3.4
Implementation: HIP
Running kernels 100 times
Precision: float
Array size: 1073.7 MB (=1.1 GB)
Total size: 3221.2 MB (=3.2 GB)
elements per lane 4
chunks per block 1
block count 65536
Using HIP device
Driver: 60032830
pciBusID: 8
Validation failed on sum. Error 0.000548607
Sum was 1031357.625 but should be 1030792.125
Function    MB/s        Min (MB/s)  Max         Average     Std. Dev.
Read        5078256.332 3294948.498 5078256.332 4646183.747 475212.302
Write       5120960.761 4347262.408 5120960.761 4950686.092 129090.976
Copy        4582436.884 4404328.357 4582436.884 4494574.336 31689.560
Mul         4570321.508 3736024.556 4570321.508 4454265.825 153658.684
Add         4578054.322 3842006.551 4578054.322 4304480.187 269786.931
Triad       4565575.586 3732177.621 4565575.586 4350104.930 247397.217
Dot         3316880.248 2676907.156 3316880.248 2975013.389 138793.670

Definitely curious what’s going on here.  This is less than half of peak bandwidth; by contrast on A100 we get essentially 100% of peak bw

@bertmaher Not sure whether you already figured this out. If you change the kernel signature to:
@triton.jit
def _rms_norm_kernel(
    x_ptr,
    h1_ptr,
    w_ptr,
    eps,
    stride,
    N_COLS: tl.constexpr,
    BLOCK_SIZE: tl.constexpr,
    INCLUDE_WEIGHT: tl.constexpr,
):

i.e., changing N_COLS to const, there is pretty big performance boost to:
22  12288.0  2247.299783
23  12800.0  2223.278530
24  13312.0  2266.673025
25  13824.0  2274.271469
26  14336.0  2324.921587
27  14848.0  2327.270964
28  15360.0  2374.492701
29  15872.0  2360.028753

though we still have room to improve.

@scxiao I made the suggested change you mentioned along with some others and are now we see bandwidth slightly over to 3TB/s. Analyzing the LLVM IR I found that the loads and stores are not being vectorized at the LLVM IR layer. We are working on a fix that we hope to push upstream.

Closing due to inactivity

@anupambhatnagar I know this is a closed issue, the Babelstream results that you pasted above, is it from this repo?
https://github.com/UoB-HPC/BabelStream
I don't see the Read, Write kernels that you have listed in the results, is this some modified version of Babelstream that you are running


Network is unreachable

hello, i use prost makedb, error is urlib.error,URLErroe Network is unreachable   . I use ubuntu . I am in china .  Then I try VPN in windows,also the same error. what is the reseason? If Network is the reseason, is there altenative to overcome it ? Thanks

Hi fenghuawei ,
Thanks for the notification of the network issue! I'll try to use GitHub release assets in the next release so all the required binaries can be downloaded from GitHub which I assume accessible for you. I'm planning to do this in coming days.
Thank you for trying PROST and I'll update it soon!
Best,
Mesih

Hi fenghuawei,
The issue is fixed on the release v0.2.7 and onward. Now the files are downloaded from GitHub.
Best,
Mesih

Thanks very much.
----- 原始邮件 -----
发件人：Mesih Kılınç @.>
收件人：MesihK/prost @.>
抄送人：fenghuawei @.>,  Author @.>
主题：Re: [MesihK/prost] Network is unreachable (Issue #1)
日期：2023年04月22日 05点48分
Closed #1 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Is it possible to reformat data from withPivot

I'm using Bookshelf to create a fairly simple RESTful API and would like to return a consistent camelCase format while using underscore_database_columns.
I am using the format and parse methods from the documentation to do this successfully with the exception of withPivot data.
All code is simplified from my project so please forgive any syntax errors etc, they may not exist in my real code
I have two models, Recipe and Ingredient.
var Recipe = BaseModel.extend({
  tableName: 'recipe',

  defaults: { name: null },

  ingredients: function () {
    return this
      .belongsToMany('Ingredient')
      .withPivot(['measurement', 'sort_order']);
  }
}));

var Ingredient = BaseModel.extend({
  tableName: 'ingredients',

  defaults: { name: null },

  recipes: function () {
    return this
      .belongsToMany('Recipe');
  }
}));

I am querying with the following:
Model
  .forge({
    id: 1
  })
  .fetch({
    withRelated: ['ingredients']
  })
  .then(function (model) {
    return res.json(model.toJSON());
  })
  .catch(function (err) {
    return done(err);
  });

Which returns:
{
  "id": 1,
  "name": "Yummy Thing",
  "ingredients": [
    {
      "id": 1,
      "name": "Food Stuff",
      "_pivot_ingredient_id": 1,
      "_pivot_recipe_id": 1,
      "_pivot_measurement": "Loads",
      "_pivot_sort_order": 1
    }
  ]
}

As you can see the _pivot data is underscored and the .withPivot(['measurement', 'sort_order']) is referencing the joining table column names.
Is there any way to easily reference to and return pivot data as camelCase?
I've overridden toJSON which works fine but feels wrong.
toJSON: function () {
  var data = BaseModel.prototype.toJSON.apply(this, arguments);
  data.ingredients && (data.ingredients = data.ingredients.map(this.parse));
  return data;
}

I'm open to using through models but I couldn't work out how to return the through table data with the fetch (and in fact asked on SO  (I'm not set on the the above JSON format so long as all the data is there in some form.)

Just ignoring the obvious implied question of "should there be a good way to do this" at this moment.
The best way to achieve this would be to override your Model#serialize function.
Something like this:
MyModel = bookshelf.Model.extend({
  serialize: function(options) {
    var attrs = _.clone(this.attributes);
    if (options && options.shallow) return attrs;
    var relations = this.relations;
    for (var key in relations) {
      var relation = relations[key];
      attrs[key] = relation.toJSON ? relation.toJSON(options) : relation;
    }
    if (options && options.omitPivot) return attrs;
    if (this.pivot) {
      var pivot = this.parse(this.pivot.attributes); // <-- Added parse here
      for (key in pivot) {
        attrs['_pivot_' + key] = pivot[key];
      }
    }
    return attrs;
  }
});

This should give you the behaviour you want for now.
The real problem is here though. If no "through" model is provided, it defaults to the original bookshelf.Model. So even if you replace bookshelf.Model with your own base with custom parse/format, the pivot model does not use it.

Hi @rhys-vdw thanks for the reply.
Although I can't get this working at the moment I think I can see what the aim is.
I had previously been using a through model (extending my BaseModel) as these seemed very logical to me however I could not access any of the pivot data.  There are very few (if any) examples of access through data during a fetch.
I had asked on Stack Overflow but it was suggested I remove the through model which then brought me to the formatting issue.
  var RecipeIngredient = BaseModel.extend({
    tableName: 'cocktail_ingredients',

    defaults: {
      measurement: null,
      sortOrder: null,
      recipeId: null,
      ingredientId: null
    },

    recipe: function () {
      return this.belongsToMany('Recipe');
    },

    ingredient: function () {
      return this.belongsToMany('Ingredient');
    }
  }));

  // Recipe
  ingredients: function () {
    return this
      .belongsToMany('Ingredient')
      .through(['RecipeIngredient']);
  }

During a fetch I cannot see measurement or sortOrder.
I feel like I am either missing some crucial information or the point of this. :(

Hey @rockingskier.

I feel like I am either missing some crucial information or the point of this. :(

Okay, so does this work?
  // Recipe
  ingredients: function () {
    return this
      .belongsToMany('Ingredient')
      .through(['RecipeIngredient'])
      .withPivot(['measurement', 'sort_order']);
  }

I tend to do this, just because I don't like flattening the data.
Recipe.fetchAll({withRelated: 'recipeIngredient.ingredients'}).then(function (results) {
  var json = result.toJSON();
  // json is:
  [{
    id: ...
    recipeIngredient: {
      sortOrder: ...
      measureMent: ...
      recipedId: ...
      ingredient: {
        id: ...
        name: ...
        ...
      }
   }, { ...
}]

Although in this particular case I think the flattened data is probably appropriate.

Normally I would agree with you and would avoid flattening the data (I have it working that way) but in this case I'd like it flat.
I have tried 3 options, withPivot, through and through.withPivot.
.withPivot(['measurement'])
{
   "id": 1,
   "name": "Banana Cake",
   "ingredients": [
     {
       "id": 1,
       "name": "Banana",
       "_pivot_recipe_id": 1,
       "_pivot_ingredient_id": 1,
       "_pivot_measurement": "2",             "<--": "Measurement"
     }
   ]
 }

.through('RecipeIngredient')
{
   "id": 1,
   "name": "Banana Cake",
   "ingredients": [
     {
       "id": 1,
       "name": "Banana",
       "_pivot_id": 1,                           "<--": "ID",
       "_pivot_recipe_id": 1,
       "_pivot_ingredient_id": 1
     }
   ]
 }

.through('RecipeIngredient').withPivot(['measurement'])
{
   "id": 1,
   "name": "Banana Cake",
   "ingredients": [
     {
       "id": 1,
       "name": "Banana",
       "_pivot_id": 1,                           "<--": "ID",
       "_pivot_recipe_id": 1,
       "_pivot_ingredient_id": 1
     }
   ]
 }

As you can see I when the through is used no other pivot data is returned and the id of the pivot table is returned.
If you are interested I've dropped the code into a repo, its highly simplified and contains a pre-populated DB for you entertainment.

Okay, it sounds like you've found a problem then. Thanks for the very detailed feedback. It would be preferable to get these test cases into the Bookshelf test framework and work from there.
If you're interested in tackling this there are instructions for setting up the test framework here. I'm happy to review your PR's and merge when ready. If you're unable to provide the PR, I (or someone else) should get around to it eventually, but you'll have less control over the delivery time.
I expect that this fix I suggested should keep you going in the meantime either way.

Thanks for your help!
I'll certainly try and put something together for you although it might take a few weeks to get to (currently on hols)

No problem. I think the whole parse/format thing needs a bit of a rethink anyway. Hopefully this can be addressed with other outstanding issues in one fell swoop.

Hey @rockingskier I had a look into this last night using your example project (thanks for that). I discovered that it's not as simple a fix as I'd hoped for. I will keep looking into it, but it was hard to make a change that didn't touch a large portion of the relations codebase. This might have to be addressed with more than duct tape.
I'll leave the issue open for when relations are revisited. Of course you're still welcome to try a PR if you're game.

The project leadership of Bookshelf recently changed. In an effort to advance the project we close all issues older than one year.
If you think this issue needs to be re-evaluated please post a comment on why this is still important and we will re-open it.
We also started an open discussion about the future of Bookshelf.js here https://github.com/bookshelf/bookshelf/issues/1600. Feel free to drop by and give us your opinion.
Let's make Bookshelf great again


Sync changes

Description
Syncs changes from the generator repo and also updates some generated files that got missed
References
https://github.com/openfga/sdk-generator/pull/421
https://github.com/openfga/sdk-generator/pull/434
https://github.com/openfga/sdk-generator/pull/422
https://github.com/openfga/sdk-generator/pull/424
Review Checklist

[x] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

If you haven't done so yet, we would appreciate it if you could star the OpenFGA repository. :)

Seems like sdk-generator doesn't fail if the tests fail

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

Project coverage is 69.17%. Comparing base (fe3af43) to head (b51370d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #141   +/-   ##
=======================================
  Coverage   69.17%   69.17%
=======================================
  Files         122      122
  Lines        9771     9771
=======================================
  Hits         6759     6759
  Misses       3012     3012

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


Only render EditableGraphValue if the axis is numeric

This makes it so the axis scale controls are only visible on numeric axes.

Should I wait for any additional reviews on this PR or is it ready to be merged?

Should I wait for any additional reviews on this PR or is it ready to be merged?

There is an approval from @kswenson so I believe it should be good to merge. He just managed to hit approve before I requested review so the check mark doesn't seem to show.


handle IM7 constant change

Fix for issue: #607
IMGTYPE_TRUECOLORMATTE -> IMGTYPE_TRUECOLOR

Thanks.

On ImageMagick 7.0.4-6 and imagick 3.4.2_7 I now get the following error:
Undefined class constant 'IMGTYPE_TRUECOLORALPHA'

@Preau it seems it only works in imagick >= 3.4.3
https://github.com/mkoppanen/imagick/blob/3.4.3/ChangeLog#L33

@valentinxxx Thanks, I see a new formula for php70-imagick was released on Homebrew 2 days ago, upgrading solved my issue.

No it is broken < 3.4.3 actually, upgrading solved the issue.

@olivervogel I think it's broken if the imagick version is < 3.4.3 and ImageMagick >= 7
https://github.com/mkoppanen/imagick/blob/3.4.2/imagick_helpers.c#L1153-L1155

Unfortunately I can't test it right now, but maybe this code will handle this issue better?
https://github.com/Intervention/image/pull/684/files


Issuehub site non-existent

Contents in Issuehub has been taken down and raising an issue to remove from the list.
Visit :- http://ww7.issuehub.io/ to know more

Hey @samyak1999 , why did you close the issue? The PR is not accepted yet.


Use bold color instead of white for common information

In a terminal with black on white color scheme the common information was not visible before as they where printed with a white color. Instead use the default foreground color with the bold attribute to highlight the values.
fixes #15
Before

After

thanks!!


Android -Tapping space key does not trigger any action

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

**Version Number:**<IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4416779
Issue reported by: Applause - Internal Team
Action Performed:

Launch app/mweb
Navigate to a conversation
Keep entering random text without space filling two lines
Keep cursor at start point of second line
Tap space key

Expected Result:
When the cursor is positioned at the start of the second line and the user taps the space key, a space should appear in the compose box, similar to the behavior in mWeb.
Actual Result:
When the cursor is positioned at the start of the second line and the user taps the space key, a space is not displayed in the compose box on Android, unlike in mWeb where it does show up.
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/a55a0453-5a11-4a64-ad03-10b404c4c56c
View all open jobs on GitHub

@abekkala I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.


Downloader is really great,but...

Can you support the m3u8 format? At present, all downloaders on the market are very compatible, I hope you can improve it, thank you.

你为啥要用英文呢  不都是Chinese吗

😄.


Function links in JSDoc jump to after the function name

I'm not sure we can anything about this, but it is worth investigating as it is undeniably annoying. From Dave Cassel:
When I click a link on the right to go to a particular function, the anchor is off. The name of the function is off the top of the screen.

@kcoleman-marklogic would you like to review this fix?

I just spot checked a dozen or so methods, in various "namespaces", on pubs. I checked both v8 and v9. I found no problems.
In fact, it looks so terrific that I could weep for joy! Thank you, Mike.

Thanks for reviewing, @kcoleman-marklogic -- I'm going to enjoy this fix, too!


New Kafka input operator using 0.9.0 Kafka consumer API

Some highlights of the operator

Out-of-box One-to-one and one-to-many partition scheme support plus customizable partition schema
Fault-tolerant when the input operator goes down, it redeploys on other node
At-least-once semantics for operator failure (no matter which operator fails)
At-least-once semantics for cold restart (no data loss even if you restart the application)
Multi-cluster support, one operator can consume data from more than one kafka clusters
Multi-topic support, one operator can subscribe multiple topics
Throughput control support, you can throttle number of tuple for each streaming window

Things needs to be done,
More unit test for different partition scheme, application restart
More integration test
Metrics for operator
Bring back idempotency

Package names: org.apache.apex.malhar.kafka

@tweise  I have an update, please review

new update

@tweise  I have removed deserializer detail from the abstract operator, please review

@siyuanh There are still a few comments that have not been addressed. Once that is done, please squash.

@tweise  squashed

Running tests produces these warnings:
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Created topic "test_topic".
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Created topic "test_topic".

Probably they are not an issue, but could be misleading to the developer. Can we change the topic names to avoid them.

@tweise Please review new update


Add the groovy underscore to @Library

Otherwise @Library will fail if there are not import statements

Ah great - thanks @carlossg. I'll update our Jenkinsfile library https://github.com/fabric8io/fabric8-jenkinsfile-library

[merge]


Add an example to show an issue with spark-testing-base library

@quocanh - Thanks for demonstrating this issue.  I really appreciate it.
We could do this, but it's kind of ugly:
assertDataFrameEquals(firstDf.sort(col("first_name")), secondDf.sort(col("first_name")))

It looks like the order based comparison is intentional.
I'm going to ask Evan and Jay for their thoughts.
Thanks for the great pull request.

The purpose of this project is to document the behavior of the spark engine, so I'm going to close this pull request.  I recommend submitting a pull request to the spark-testing-base project if you'd like to start a discussion about making unordered DataFrame comparisons.  Thanks!


UI can render on top of the player

Maybe in the lower part of the screen. It's confusing when the "Quack count" is covering the player :/

Thank you! Sorry about that.


vultr-cli: 2.4.1 -> 2.7.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/vultr-cli/versions.
meta.description for vultr-cli is: "Official command line tool for Vultr services"
meta.homepage for vultr-cli is: "https://github.com/vultr/vultr-cli"
meta.changelog for vultr-cli is: ""
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
Warning: no invocation of /nix/store/790v00i80671q7104wfy826wpb0ac54i-vultr-cli-2.7.0/bin/vultr-cli had a zero exit code or showed the expected version
0 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
found 2.7.0 with grep in /nix/store/790v00i80671q7104wfy826wpb0ac54i-vultr-cli-2.7.0
found 2.7.0 in filename of file in /nix/store/790v00i80671q7104wfy826wpb0ac54i-vultr-cli-2.7.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

0 x86_64-linux rebuild(s)
0 i686-linux rebuild(s)
0 x86_64-darwin rebuild(s)
0 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
vultr-cli

Instructions to test this update (click to expand)

Build yourself:
nix-build -A vultr-cli https://github.com/Kranzes/nixpkgs/archive/32138825dde896f76a89e343e54f84a6c256f5a9.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/790v00i80671q7104wfy826wpb0ac54i-vultr-cli-2.7.0
ls -la /nix/store/790v00i80671q7104wfy826wpb0ac54i-vultr-cli-2.7.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

vultr-cli

Maintainer pings
cc @Br1ght0ne @kalbasit for testing.

Result of nixpkgs-review pr 134208 run on x86_64-linux 1

1 package built:

vultr-cli


rpc error: context deadline exceeded

When I'm deploying my add-on updates, I'm facing an issue. Each time it gives error with failed to update service for different add-on name.

NVM, I can see my add-on updates went live. But beamup-cli deploy issue still there.


Feature/edit api backend check authorization

@elnzv or @frenchbread Please review

@apinf/developers Reviewed and tested, looks and works perfectly. Can I merge it now?

Closes issue #434.

@frenchbread merge if it seems good.


Improved room views for admin

Added new options to improve views for admins

Coverage increased (+0.9%) to 70.404% when pulling 83feb6610805f58bbd723d753abd3b3a884c6865 on new_room_graphs into 5b879fab81547186baa251aeaa6fc026e408f9da on master.

Coverage increased (+1.4%) to 70.852% when pulling e5cf44e6c032b68b7398beb586590794840a7931 on new_room_graphs into 5b879fab81547186baa251aeaa6fc026e408f9da on master.


Bump g3fcgen version to v0.6.3 release

Helps fix the build / release scripts changes introduced by boringssl for g3fcgen packaging.

done with commit 8f0a525f3b1ed55cb0a815d15c736bb2885665c7


Refactor test_qnode.py

Description of the Change:
Refactor test_qnode.py from unittest to pytest.
Benefits:
Possible Drawbacks:
Related GitHub Issues:
#99, #199

@johannesjmeyer I am assuming you would want to change the BasicTest too and port them to pytest. Will you do this in a new PR? Or this one?

@quantshah This is a WIP Pull Request (I just use the labels and don't put it in the name). I will refactor the whole file!

Actually, I didn't discover any bugs while rewriting the tests. But I think that the tests are better now, especially with most of the dependency on default.qubit removed.
I implemented the suggested changes :+1:


refactor: Remove unwrap and handle errors

References Issue #174
Remove unwraps by returning Result

Thanks for your PR! Please notice that the tests failed - you need to change the call to the function to unwrap/pass the error along, also need to run cargo fmt --all

okay. let me look into it.

Is there a way to run these tests locally? Also rust-analyzer fails on my machine. I am on Linux, pop os

Is there a way to run these tests locally? Also, rust-analyzer fails on my machine. I am on Linux, pop os

Yes! We just released out local test/development guide - https://mirrord.dev/docs/developer/testing/
I haven't tested PopOS but requirements are mostly having a K8S cluster and a Unix system.

P.S regardless of tests please add an entry to the CHANGELOG file

@jim4067 I think you should try to get clippy/fmt to work locally as it might be impossible to have the issue solved current way :) If you need any help you can talk with us on the Discord channel.

@aviramha okay. let me check it out.

@aviramha Found where I had messed up. I was using ? on Option when it should be used on Result

Hey @jim4067, are you planning on completing this PR? Feel free to get support on Discord if you need any help.


Simulator and helper code

Hi, I am looking forward to this year's video.
Over the last couple of days I have written a simulator and some utility code to help make users code a bunch simpler than last year.
Are these things you would be interested including so that others can use them?
They will probably need modifying a little to work with the CSV format and if anything else has changed.
Simulator:
https://github.com/gentlegiantJGC/xmastree2020/blob/main/simulator.py
Utility code to import either the real tree or fall back to the simulator if it does not exist; a function to set up the LED interface that was imported and a context manager to control the frame time.
https://github.com/gentlegiantJGC/xmastree2020/blob/main/matts_tree_helpers.py
I also added a minimal template using this system
https://github.com/gentlegiantJGC/xmastree2020/blob/main/template.py

I sent this before realising the video had been released and have since watched the video and saw that you are only accepting spreadsheet submissions.
I may modify this code to take the gift files as input to visualise unless I find another visualiser. I couldn't see one in the other repository.
I may also look into adding a command line argument to the visualiser to make it also output as the gift format as the code runs so python users don't have to do their own file writing (again I didn't see anything for this but didn't look too hard)
It is also a little sad it can't randomise and it must be designed to loop or have a jump at some point when it restarts but I understand your reasoning.

I may modify this code to take the CSV animation files as input to visualise unless I find another visualiser. I couldn't see one in the other repository.

I have made a GIFT-Simulator that runs independent of the programming language used.
It`s available as online application here (still work in progress):
https://leukipp.github.io/xmastree2021/simulator/
A procedural tree is rendered and light coordinates/animation frames can be loaded from url`s or local csv files.

I have made a GIFT-Simulator
That is cool and I like the addition of the tree.

I think technically the GIFT format was just the coordinate scaling which can be packed into a CSV file or the old text format linked in Matt's video description.
I don't think the animation format was actually given a name.
My plan is that this module can be used to simulate python code that could be on the real tree and also generate the CSV animation file as the program runs.

My plan is that this module can be used to simulate python code that could be on the real tree and also generate the CSV animation file as the program runs.

At the moment you can interact with the application via url parameters as described here:
https://github.com/leukipp/xmastree2021/blob/main/simulator/README.md
It should also be possible to run everything as a standalone application, so that one has direct access to the file system (without the hassle of uploading csv files).

With regards to simulators, my plan is to go through what's been PR'd and pick a simple one to merge to the repository. I think it'd be nice to have a trusted one that can be used for verifying submissions and that everyone can contribute to.
Beyond that, I think simulators are best in the "further work" section of the README so we're not filling the repo with them :)
TLDR: Feel free to PR something, but I'm probably only going to merge one :)


Address deprecation

In order move toward implementing Xlint and ensuring we don't have any compiler warnings. A first somewhat easy step is to address deprecation.
We can limit to deprecation concerns -Xlint:deprecation, but the catch is that whenever we deprecate something we'd also have to stop using it internally. Which really should be true anyway IMHO but isn't necessarily quick or straight forward.
On that limited front here's what we'd have to address:
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[447,20] net.datafaker.formats.Csv in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[447,43] net.datafaker.formats.Csv in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[457,9] net.datafaker.formats.Csv in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[457,36] net.datafaker.formats.Csv in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[460,30] net.datafaker.formats.Csv in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/service/FakeValuesService.java:[462,16] net.datafaker.formats.Format in net.datafaker.formats has been deprecated
[WARNING] /C:/datafaker/src/main/java/net/datafaker/transformations/JavaObjectTransformer.java:[20,31] newInstance() in java.lang.Class has been deprecated

Originally posted by @kingthorin in https://github.com/datafaker-net/datafaker/pull/663#discussion_r1096534504

To get warnings from xlint we'd do this:
warning: in the working copy of 'pom.xml', CRLF will be replaced by LF the next time Git touches it
diff --git a/pom.xml b/pom.xml
index 0c0b607b..d8e4e945 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,6 +176,9 @@
                     <configuration>
                         <source>${maven.compiler.source}</source>
                         <target>${maven.compiler.target}</target>
+                        <compilerArgs>
+                            <arg>-Xlint:all</arg>
+                        </compilerArgs>
                     </configuration>
                 </plugin>
                 <plugin>

To have those warnings error (and fail builds) we'd add another arg entry <arg>-Werror</arg>.
There are quite a large number of warnings. Shall I open an issue adding the output? So that we can discuss further. I'm not sure the best way to tackle it. I definitely don't know enough about the code base yet to tackle it all.

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCJCABJ

Hi @kingthorin , sorry, I don't get this change, or the related changes. I'm trying to run ProvidersDocsGenerator, but I'm getting an java: warnings found and -Werror specified error when I run anything. Can you explain what this is, and how I can run the current code as is? Thanks.

To get around the issue you can comment <!-- …. --> the Werror line in pom.xml .
This is running in ci now so I don’t understand why you’re encountering it in a one-off situation, unless the code you’re using isn’t triggered during our ci or local maven executions (Ex: .\mvnw install)?

Hi @kingthorin , thanks for the quick response. I've reverted the PR for now, since I can't run a single unit test nor generator from IntelliJ. If I clean the project, run a single test, the compilation fails. I don't think that's ideal, so I've reverted this change until I better understand what's causing this. mvnw install works fine, it's just running from my IDE which breaks.

I don't think I'm using mvnw, nor would I use mvnw to run the ProvidersDocsGenerator or ProviderGenerator, which are failing for the same reason as running any test.
This is my configuration, I think it's pretty default:

Okay, thanks I'll dig into it.

Thanks! Btw, are you using Eclipse, since you don't seem to have this issue?

Yes I am using Eclipse. But I've been working with a combination of Eclipse and mvnw at the CLI to work around any weirdness I was encountering.
It's just a bumpy road getting in to a new project, maybe I moved on the Xlint stuff too quickly. I'll work on getting it all sorted out. I can also install IntelliJ on a VM and see how it behaves.

I futzed with this a bit more on the weekend. I think IDEs try to be helpful and apply the maven settings even when maven isn’t being used (Ex: the scripts and tests).
I’m not sure if there’s a simple way around that, I’ll research/test further.

I think with IntelliJ, if you have either maven or gradle, intellij will delegate the build to those tools instead of using its own builder. Would that affect this behavior?

Yes exactly, since these setting were being specified in the maven pom I believe IntelliJ and Eclipse apply the settings to all code in the project.
I’ll investigate if there’s a way to control that more finely with maven (or the IDEs).

@kingthorin what do you want to do with this issue?

I’m still trying to see if there are good options for the Xlint stuff. Separate from that I’d have to look at whether or not we still have deprecated code in use.

Yeah, I thought about cleaning up all the deprecated code too, but it doesn't matter, we will deprecate more code in the future as part of the releases, so we will run into the same problems again then.

If we’re deprecating code we shouldn’t be using it ourselves, that’s the thing.
The problem isn’t having things annotated deprecated, it’s that we have (or had) places internally still using those methods etc

wouldn't it be better to split this task in several dedicated tasks (one per corresponding deprecated usage)?
Then for any new deprecated usage there could be another task created. It will allow to have much clear understanding what should be done to close this or that task. I'm suggesting this since right now current task seems never ending since there will be potentially other deprecations in future

If we’re deprecating code we shouldn’t be using it ourselves, that’s the thing.
The problem isn’t having things annotated deprecated, it’s that we have (or had) places internally still using those methods etc

Our current practice is that we never break the API without deprecating things. It isn't really semver, but we would be at Datafaker 25 by now if we did.
There will always be some internal usage, even if it's by tests only, but we also deprecate things as a signal to show that in the near future we will replace it by something else, so I don't think we can ever avoid deprecating things, or banning the complete use of it.

Again the issue isn’t the existence of deprecated code it’s the use of it. If we deprecate something we should cease using it internally.
I’m obviously not getting my point across and don’t have time to dig into this right now so I’ll just close it.

Again the issue isn’t the existence of deprecated code it’s the use of it.

But I said:

There will always be some internal usage, even if it's by tests only,

Maybe I'm misunderstanding you or the feature, but if we'd deprecate a feature, that doesn't mean that immediate there can't be no usage of it, even if the usage is just a test for example (though I can image that someone might mark a piece of code deprecated to signal this code shouldn't be used anymore, but might still exist for a short while, while being used)

My argument is that if we deprecate something we "should" stop using it internally. That should be part of the PR that deprecates it :wink: The tests should be for the functionality that will be maintained.


[REFACTOR] Restructed Activities Controllers

Hi Tarun,
Please review. I have removed the unwanted binary files.
Thanks,

@imdhruvgupta Please check new comments.

@imdhruvgupta Please check new comments.

@tarunsinghal92 Yes, I did not realised that. Please review.
Thanks

@imdhruvgupta @tarunsinghal92 there are some issues which are causing breaking changes. ES6 syntax is used here which is not recognized by node until we use Babel. I think there's no need to use Babel in this project for now. This is causing breaking issues in the project. After pulling the latest code. I'm getting the error:
> node sugarizer.js

FATAL ERROR, uncaught exception 'Unexpected token export'
/sugarizer-server/dashboard/controller/activities/index.js:5
export { fakeLaunch } from "./fakeLaunch";
^^^^^^

SyntaxError: Unexpected token export


New feature request: ispc

Would love to have the ispc compiler assembler output added to this. It's not C++ but it would be a great addition to the toolbox

You're in for a treat.
We've been supporting ispc for a month at https://ispc.godbolt.org/
:)

I'm closing this one. Let us know if you have any suggestions regarding ispc!


41 given user navigates to application root then display main landing page

Resolves #41 , Resolves #48, Resolves #42, Resolves #43, Resolves #44, Resolves #47, Resolves #49, Resolves #50
Landing page, player waiting room page, and admin post login page created.
Prominent features:
Landing Page:

Create a Game prompts login, then redirects to admin post login page
Join a Room shows a number input for room code box
entering number input box shows pop up window for name entry (name is passed into waiting room page)

Admin Post Login Page:

Create room button (doesn't do anything)

Back buttons for admin post login and waiting room

UI looks nice! :-)
A couple things:

Rename pages/index.js to something else (perhaps pages.js since react element is Pages) to remove confusion of /src/index.js and update refs.
Remove the dead code in App.js

If the commented and dead code in App.js is used as a reference, lets yank it into something like _reference.js.
After the changes, I think I'm good with merging after that.


fix(pool): insert re-injected withdrawals to db

If a block containing withdrawals is reverted, mem pool should insert these withdrawals to db mem-pool withdrawals when re-injecting them. Otherwise producing the next block will fail.

/itest


chore: release 1.2.1

:robot: I have created a release *beep* *boop*
1.2.1 (2019-07-26)
Bug Fixes

deps: update dependency @google-cloud/paginator to v2 (#286) (bc30fcc)

This PR was generated with Release Please.

Release is at https://github.com/googleapis/nodejs-dns/releases/tag/v1.2.1

The release build has started, the log can be viewed here. :sunflower:

:egg: You hatched a release! The release build finished successfully! :purple_heart:


why there is no str_split!(string, needle) macro ?

i've seen a lot useful macros for const string operations
like str_index
but i really need a str_split macro, why there is no such macro ?
and also there is none in the const_str crate.
thanks in advance.

This is definitely possible, but it requires the const_slice_from_raw_parts unstable feature that should stabilize soon (without it str_split would have quadratically slow performance relative to the length of the string).
I just started working on this, it'll be in the next patch release (assuming that there's no sudden need for a patch before this is ready)

thanks for response.
nice.
i wish you success!

With the 0.2.26 release, which includes the str_split macro, this issue can be closed.


Navigation Bar needs to be updated

It should only have

curriculum
repo
learn (replaces journey)
community (should link to discord)

The other links are deprecated

#773 closed this issue.


Select action sheet content open animation

Description
The opening animation on Android works very strangely. Sometimes it opens with a jump, and sometimes it opens correctly
CodeSandbox/Snack link
No response
Steps to reproduce
example of the code I use
<Select >
     <Select.Trigger w="100%">
       <Select.Input />
       <Icon as={ChevronDownIcon} />
     </Select.Trigger>
     <Select.Portal useRNModal >
       <Select.Backdrop />
       <Select.Content>
         <Select.DragIndicatorWrapper>
           <Select.DragIndicator />
         </Select.DragIndicatorWrapper>
         <Select.ScrollView>
             <Select.Item key={'1'} label={'1'} value={'1'}/>
             <Select.Item key={'1'} label={'2'} value={'2'}/>
             <Select.Item key={'1'} label={'3'} value={'3'}/>
             <Select.Item key={'1'} label={'4'} value={'4'}/>
         </Select.ScrollView>
       </Select.Content>
     </Select.Portal>
   </Select>

gluestack-ui Version
"@gluestack-style/react": "1.0.33",     "@gluestack-ui/config": "1.0.11",     "@gluestack-ui/themed": "1.0.35",
Platform

[x] Expo
[ ] React Native CLI
[ ] Next
[ ] Web
[x] Android
[x] iOS

Other Platform
No response
Additional Information
Запись экрана от 15.01.2024 16:45:50.webm

@AstaninIvan
Could you please provide the code for us? This would aid in gaining a better understanding of your issue, enabling us to reproduce it more effectively. Additionally, kindly specify the device name and operating system version you used for testing.

i have same issue, any solution ?


Compatibility issue with 2.9

There is some problems on execution, with CKAN 2.9 and python 3, did you try it on this configuration ?

Just in case someone stumbles into this (outdated?) issue, you can install this plugin on CKAN 2.9 with the following commands in the CKAN virtual environment:
pip install ckantoolkit
pip install<EMAIL_ADDRESS>
Then append the desired plugins to the ckan.plugins setting in the .ini file, e.g.:
ckan.plugins=envvars image_view text_view recline_view datastore datapusher resource_proxy geo_view shp_view


Donation Account emoji discrepancy

While setting up a donation account today morning for a demo, I had used the US Flag. In desktop view the flag is not visible, in mobile view webpage, the flag is visible.
All emojis that people use in the description should be uniformly visible across all devices and the major browsers.

@ASN-BitHyve Could you please share the Donation link and the OS and Browser this issue was seen?
I have created a donation account and am able to see emojis on
Safari and Chrome on Mac OS
URL: https://donation.hexawallet.io/qV5g

Spoke with Utkarsh, we found that Country flags are not rendering on windows. Remains to be seen, which other set of emojis are not rendering.

Few specific emojis are not supported by windows, hence we do not have a fix for this issue. Please suggest what should be done?


Improve configurability of NTP sync sources

As an end user it would be helpful to edit the chrony.conf file on the create3, using a similar process as the "Application ROS2 Parameter File". So that we can configure the create3 to directly source from a local ntp time server.
Originally posted by @Jayden-F in https://github.com/iRobotEducation/create3_docs/issues/327#issuecomment-1428869938

@shamlian How is this going?


ConvexPolyhedron and Box collision detection issue

First of all, thanks for this project. I didn't think a physics engine could be this fun.
I'm just starting out with Cannon.js, but I'm having an issue with collision detection.
I have two objects: a Box and a ConvexPolyhedron. Sometimes when they collide, the collision is not immediately detected and the box enters the polyhedron. Then, if the box is pushed further, they are suddenly violently separated.
If I use gravity, the polyhedron stands nicely on the ground, but if it is disturbed, it sometimes falls partially into the ground and is then violently thrown skyward.
Is this a known issue, or is there something wrong with my ConvexPolyhedron? The model I'm using is convex. It is a small model that I made for testing purposes. I have uploaded it here: https://www.dropbox.com/s/aih8dxy6cxi6jan/simple.js?dl=0
There is no problem with collision detection when I'm using two Boxes, however.
Thanks in advance.

I have the exact same problem (using 0.6.2).
Spheres always collide with a ConvexPolyhedron, but boxes will not collide at certain locations.
Basically, I have created a plane with a ConvexPolyhedron, added some gravity and placed boxes and spheres on top. Some of the boxes fall through, all of the spheres remain in place.

Strange.. I started off by re-making the scene in the Cannon.js debug renderer. The code follows.
<!DOCTYPE html>
<html>
  <head>
    <title>cannon.js - convex demo</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="css/style.css" type="text/css"/>
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  </head>
  <body>
    <script src="../build/cannon.js"></script>
    <script src="../build/cannon.demo.js"></script>
    <script src="../libs/dat.gui.js"></script>
    <script src="../libs/Three.js"></script>
    <script src="../libs/TrackballControls.js"></script>
    <script src="../libs/Detector.js"></script>
    <script src="../libs/Stats.js"></script>
    <script src="../libs/smoothie.js"></script>
    <script>

      /**
       * Experiment for testing ConvexPolyhedrons.
       */
      var demo = new CANNON.Demo();

      demo.addScene("test",function(){
          var world = setupWorld(demo);

          world.gravity.set(0,0,0);

          // Blue Box
          var shape = new CANNON.Box(new CANNON.Vec3(0.5, 0.25, 1));
          var body = new CANNON.Body( {
              position:      new CANNON.Vec3(0, -0.1, 5),
              velocity:      new CANNON.Vec3(0, 0, -4),
              linearDamping: 0.5,
              angularDamping: 0.5,
              mass:          100
          } );
          body.addShape(shape);
          world.addBody(body);
          demo.addVisual(body);

          body = new CANNON.Body( {
              mass:          10,
              linearDamping: 0.5
          } );
          body.angularDamping = 0.5;
          var vertices = [];

          // Gray ConvexPolyhedron
          body.position.set(0, 0, -2);
          body.quaternion.y = 10;
          body.quaternion.z = 5;
          body.quaternion.normalize();

          var verts = [-1.281104,-0.003405,0.892073,1.839549,-0.003405,0.892073,-1.281104,0.641190,0.892073,1.839549,0.641190,0.892073,-1.281104,0.641190,-0.694338,1.839549,0.641190,-0.694338,-1.281104,-0.003405,-0.694338,1.839549,-0.003405,-0.694338,0.279223,1.241851,0.892073,0.279223,1.241851,-0.694338,-0.500941,1.241851,0.892073,-0.500941,1.241851,-0.694338];

          for (var i=0; i<verts.length / 3; i++) {
              vertices.push(new CANNON.Vec3(verts[i * 3], verts[i * 3 + 1], verts[i * 3 + 2]));
          }

          var faces = [
            [
              0,
              1,
              2
            ],
            [
              2,
              1,
              10
            ],
            [
              10,
              1,
              8
            ],
            [
              1,
              3,
              8
            ],
            [
              2,
              10,
              4
            ],
            [
              4,
              10,
              11
            ],
            [
              7,
              6,
              5
            ],
            [
              5,
              6,
              9
            ],
            [
              6,
              4,
              9
            ],
            [
              4,
              11,
              9
            ],
            [
              6,
              7,
              0
            ],
            [
              0,
              7,
              1
            ],
            [
              1,
              7,
              3
            ],
            [
              3,
              7,
              5
            ],
            [
              6,
              0,
              4
            ],
            [
              4,
              0,
              2
            ],
            [
              9,
              8,
              5
            ],
            [
              5,
              8,
              3
            ],
            [
              11,
              10,
              9
            ],
            [
              9,
              10,
              8
            ]
          ];
          var part = new CANNON.ConvexPolyhedron(vertices, faces);
          body.addShape(part);
          world.addBody(body);
          demo.addVisual(body);
        });

      function setupWorld(demo){
        var world = demo.getWorld();
        world.broadphase = new CANNON.NaiveBroadphase();
        world.solver.iterations = 10;
        return world;
      };

      demo.start();

    </script>
  </body>
</html>

Hi. Apart from misunderstanding something, I encounter the same problem. ConvexPolyedra (simple tetrahedra with mass 0 in my example) have strange behaviors. Other physical objects go through these tetrahedra or... sometimes not, depending upon the location of the contact point??
Don't really understand "bullet 2" of Stefan's conclusion in https://github.com/schteppe/cannon.js/issues/109 ("The winding of the faces needs to be counter clockwise around the normal"?????). In my example, behaviors of tetrahedra change when changing the way face indices are organized. So, I probably missed something... Any idea??

The issue seems to be casued by coplanar faces in the model. Even though the object itself is convex and that's good, additionally no pair of faces must be coplanar i.e. be contained in the same 3D plane.
See here: https://github.com/pmndrs/cannon-es/blob/master/src/shapes/ConvexPolyhedron.ts##L16-L17
Realizing and changing this fixed my collision issues that looked very similar to yours.

Thanks @YouRik. It's been a while and I don't remember how I generated the example model. But if I assume that all faces are triangular, then yes, it does indeed have coplanar faces.
If I modify the side that gets hit, by moving one of its vertices out of the shared plane, the problem disappears. Here's the example modified in this way: https://www.dropbox.com/s/vmy3l3rib5tdrnl/example_fixed.html?dl=0

Just ran into this issue where box colliders acted strangely with convex polyhedrons, turns out I was using a Static Cannon Body with mass =1 .
I set the mass = 0, and the problem got fixed.

Thanks Rafapp for the tip! I've used this extension (fork?) 1 year ago: https://pmndrs.github.io/cannon-es/. Maybe, the problem is solved in this extension (untested)?

Greetings everyone.
Convex polyhedron never behaved correctly for me with more complex shapes. To fix this, I created a Python script with blender that parses the boxes in a collection, which you should name "Colliders," then it will print out json format text in the console, and using that json file I parse it and generate the proper box colliders in my game.
Here is the blender python script:
import bpy
import math

collection = bpy.data.collections.get("Colliders")

# Get all objects in the scene
all_objects = collection.objects

# Count meshes for formatting
meshCount = 0
for obj in all_objects:
    if obj.type == 'MESH':
        meshCount += 1

# Print mesh information using ID counter
objectID = 0

print("{")

for obj in all_objects:
    if obj.type == 'MESH':
        print("    \"box_" + str(objectID) + "\":{")

        # Position
        position = obj.location
        print("        \"position\":{")
        print("            \"x\":" + str(position.x) + ",")
        print("            \"y\":" + str(position.y) + ",")
        print("            \"z\":" + str(position.z))
        print("         },")

        # Scale
        scale = obj.scale
        print("        \"scale\":{")
        print("            \"x\":" + str(scale.x) + ",")
        print("            \"y\":" + str(scale.y) + ",")
        print("            \"z\":" + str(scale.z))
        print("         },")

        # Rotation (Euler)
        rotation = obj.rotation_euler
        print("        \"rotation\":{")
        print("            \"x\":" + str(math.degrees(rotation.x)) + ",")
        print("            \"y\":" + str(math.degrees(rotation.y)) + ",")
        print("            \"z\":" + str(math.degrees(rotation.z)))
        print("         }")
        if(objectID != meshCount - 1):
            print("    },\n")
        else:
            print("    }")

        objectID += 1

print("}")

That will generate the json text. Copy that from your console, paste it in a .json file, and parse it like so in a js file with cannon:
/*
 * Creating the level collision geometry
 */
async function GenerateLevelColliders(){

    // RigidBody
    levelRigidbody = new CANNON.Body({
        type: CANNON.Body.STATIC
    });

    // Parse the JSON file
    await fetch("levelColliders/level_" + currentLevel + ".json")
    .then(response => response.json())
    .then(data => {
        let boxID = 0;

        for (let boxKey in data) {
            if(data.hasOwnProperty(boxKey)){
                const box = data[boxKey];
                const position = box.position;
                const scale = box.scale;
                const rotation = box.rotation;

                let boxShape = new CANNON.Box(new CANNON.Vec3(scale.x, scale.y, scale.z));

                // Set the last box as the "checkpoint"
                if(boxID == Object.keys(data).length - 1){
                    // Create a specific body for final shape
                    levelEndRigidbody = new CANNON.Body({
                        type: CANNON.Body.STATIC
                    });

                    // Add its box
                    levelEndRigidbody.addShape(
                        boxShape,
                        new CANNON.Vec3(position.x , position.z, -position.y), // ~ Y is up in blender
                        EulerToQuaternion(rotation.x + 90, rotation.z, -rotation.y)
                    );

                } else {
                    // Add each other box given position, scale and rotation
                    levelRigidbody.addShape(
                        boxShape,
                        new CANNON.Vec3(position.x , position.z, -position.y), // ~ Y is up in blender
                        EulerToQuaternion(rotation.x + 90, rotation.z, -rotation.y)
                    );
                }
                boxID += 1;
            }
        }
    })
    .catch(error => {
        console.error('Error parsing JSON file:', error);
    });

    // Add the bodies
    PhysicsWorld.addBody(levelRigidbody);
    PhysicsWorld.addBody(levelEndRigidbody);

    console.log("Finished loading: levelColliders/level_" + currentLevel + ".json ☑");
}

Keep in mind you must:

Run blender directly in order to see console output ( https://blender.stackexchange.com/questions/6173/where-does-console-output-go )
Generate 1 box in blender per collider and do not apply transforms
Name your collection in blender "Colliders"

Hope this is helpful for game devs building larger levels with a bunch of colliders. The only downside to this is your colliders will use only boxes as primitives, but I'm sure this pipeline can be applied to spheres, and even tris.


Runyan/sc 10437/add sdk header to api calls

This PR

Adds the header {"x-watchful"-sdk: "the.sdk.version"} to all API requests from the SDK
Updates the SDK's PyPI readme to include the data enrichment feature

:heavy_plus_sign: to your question. Should we reserve patch for bug fixes and to use minor as it is, being "a change to an api that is backward compatible"? Recall the prior CI breakages and some folks used semver as an indicator..


NPM Scripts works incorrectly on macos-latest

Describe the bug
npm scripts in job.step.run works incorrectly
Area for Triage:
Scripting and command line
Bash
Question, Bug, or Feature?:
Bug
Virtual environments affected

[x] macOS 10.15
[ ] Ubuntu 16.04 LTS
[ ] Ubuntu 18.04 LTS
[ ] Ubuntu 20.04 LTS
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Expected behavior
npm run dist --->  run cat scripts/args.esbuild.app-builder | xargs esbuild
Actual behavior
got "cannot execute binary file" error related to esbuild from the runner.
a global installed esbuild package with config run: cat scripts/args.esbuild.app-builder | xargs esbuild works, but then "command not found" error occurred after calling other commands from node_modules/.bin.

Hello @neatfx,
Thank you for the issue reported. Could you please provide us public repository where the issue can be reproduced?
We are looking forward to your reply.

@Darleev
😄 just solved this issue with:
run: |
   export NPM_BIN=node_modules/.bin
   export PATH=$PATH:$NPM_BIN
   npm run dist

remove these 2 export lines will reproduce the issue:
https://github.com/neatfx/tiny-evt/blob/master/.github/workflows/build-release.yml

@Darleev  I've tested and just like u said, nothing wrong...  😭 , but I did met this tricky problem and  it made me crazy. so, just close this issue now ?

@neatfx thank you for the information and the details provided. It seems you faced some intermittent issue which has a specific condition to reproduce.
I'm going to close the issue since the initial problem cannot be reproduced at this time.
In case of any issues/questions, do not hesitate to contact us, we will be glad to assist you

@Darleev my pleasure, thanks for your work 🤝


Should subprocess.run use the env variable instead of setting the os.environ?

When setting an environmental variable for a program, SC appears to use os.environ instead of creating a copy of the current environment and passing that to the subprocess via , env={} (https://docs.python.org/3/library/subprocess.html)
https://github.com/siliconcompiler/siliconcompiler/blob/9adcaa7b7780c57e8086a54f026ff08f0e5e9ced/siliconcompiler/core.py#L3839
Using the os.environ means the variables are preserved through the subsequent runs which may result in the incorrect behavior? The other option would be to restore the tool environmental variable after the run to prevent leakage. Or is there another mechanism SC uses to address this?

Good question! Each task currently runs in its own process forked from the parent process (managed by the multiprocessing module). Since these tasks run in their own process, any global changes to the environment variables are invisible to the other tasks, and they are not propagated back to the main thread.
Here's a quick program to verify this:
import os
import multiprocessing

def _runtask(i):
    os.environ['MY_INDEX'] = i
    print(f'MY_INDEX thread {i}:', os.environ['MY_INDEX'])

def run():
    procs = []
    for i in range(4):
        p = multiprocessing.Process(target=_runtask, args=(str(i)))
        p.start()
        procs.append(p)

    for p in procs:
        p.join()

    print('MY_INDEX main thread:', os.environ.get('MY_INDEX', '<none>'))

if __name__ == '__main__':
    run()

However, this is a good point in that I think setting os.environ directly is a bit of a code smell, and it's not very bug-safe, since _runtask() is relying on certain assumptions about how it is called to ensure that this is okay. I think it would be reasonable to refactor the code to feed in an environment directly, and I think we can keep this issue open until that's done.


fix(deps): Add 'typesafe-dynamodb' as a dependency

Fixes #7

Thanks for taking the initiative!

To fix the build, run yarn build locally and commit any changes.

Fix the commit message and pushed it upstream.

Fix the commit message and pushed it upstream.

Did you push it to the right branch?

Yeah... patch-1. The original failure was because of the title of the PR. but I'm not sure what this one is about.
Error: Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch.

Ah, it looks like something is adding a comma.

Ah, it looks like something is adding a comma.

Probably prettier! haha.

Thanks for the contribution, @volkanunsal! We are just now creating a discord community. If you want to be able to ask us questions more quickly and freely, feel free to come join https://discord.gg/zercqjtE


[Popover] black flash on iPad/iPhone

On mobile Safari (iPad and iPhone, as well as Simulator), a translucent black overlay sometimes flashes when interacting with the popover.

Material-UI: 0.15.4
React: 15.1.0
Browser: Mobile Safari

Seems like the <div> that gets appended to <body> when the Popover appears is causing the flash. Looks like its meant to be the click trigger for dismissing the Popover. Adding -webkit-tap-highlight-color: rgba(0,0,0,0) fixes it.

Fixed with #7588


Dependency was not found

I'm using Vue-cli, so I installed vue-swing with npm and imported it to main.js file. Then I put your example in my template. When I try to run terminal says the folllowing:
 ERROR  Failed to compile with 1 errors                                 14:24:28

This dependency was not found:

* swing in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/vue-swing/VueSwing.vue

It also says that I can install swing with npm install --save swing, but then all of properties or events in vue-swing component are not working. :disappointed:

Did you install swing as well (using npm install --save swing)?

First I installed vue-swing with npm install --save vue-swing,
then, after getting and error, I installed swing with npm install --save swing.

Did you try restarting the server? It seems like swing cannot be found, which should not be the case. Can you check that swing is in the dependencies section of your package.json?

After installing only vue-swing, the swing is not there.

Yes, that is supposed to be the case because swing is a peer-dependency of vue-swing, meaning it needs to be installed separately. Try running npm install --save swing as well and restart the server.

Ok, it works, but I didn't see it in installing directions. Thanks!

That's a good point, I'll remember to add it in next time.

Guys I still get this. I have both dependancies, any ideas?


Removed content from NVIDIA server page and linked to v0.6 docs

Removed the content from the NVIDIA server page and pointed users at the v0.6 docs.
This fix unblocks Kubeflow v1.0 in terms of issue https://github.com/kubeflow/website/issues/959. With this change, we can reduce the priority of the issue (currently P0). We've been trying to find someone to fix this doc since July 2019, so I think it's fine to point to v0.6 as the last version that the instructions work for.
Preview: https://deploy-preview-1608--competent-brattain-de2d6d.netlify.com/docs/components/serving/trtinferenceserver/

This change is

/assign @jlewi

Should we just refer to the NVIDIA inference server docs for info on deploying on K8s
https://github.com/NVIDIA/tensorrt-inference-server/tree/master/deploy/single_server?

NVIDIA inference server docs for info on deploying on K8s
https://github.com/NVIDIA/tensorrt-inference-server/tree/master/deploy/single_server

Thanks @jlewi Done.

@sarahmaddox The statement NVIDIA inference server isn't supported on KF isn't quite accurate. Since the server works on K8s it will just work on Kubeflow. What we no longer have is any special documentation.
So could we just say something like
"If you want to run NVIDIA inference server; please refer to the docs for running NVIDIA inference server on Kubernetes"

I see, thanks @jlewi I've modified the wording. PTAL.
https://deploy-preview-1608--competent-brattain-de2d6d.netlify.com/docs/components/serving/trtinferenceserver/

/lgtm
/approve

/retest


Update Blog “pug-swag”

Automatically generated by Netlify CMS

👷 Deploy Preview for prolisok-info processing.
🔨 Explore the source changes: db8d428b1b5764210fe40d6481568f9f07fdde8a
🔍 Inspect the deploy log: https://app.netlify.com/sites/prolisok-info/deploys/620ad6995d28a30008ca7fe8


Question about use with dynamic styles

I built a small theming HOC that injects a jss sheet dynamically, and I would like some feedback on my approach. Specifically, I'm wondering if what I have done has decent code smell and doesn't violate certain assumptions and/or best practices of the jss and react-jss libraries.
I saw cssinjs/jss#170, but I wanted a solution that lets me write all of my styles using the full jss syntax, and not one that forced me into only using a subset of the syntax. Here is my HOC:
import { inject } from 'mobx-react'
import { compose, createEagerElement } from 'recompose'
import injectSheet from 'react-jss'

export const applyTheme = ( mapThemeToStyles = () => ({}), mapThemeToProps = () => ({}) ) =>
  compose(
    // Get the theme from a mobx store, then call the
    // mapping functions to create the dynamic jss and
    // any additional theme-based props
    inject(({themeStore: {theme}}, props, context) => ({
      ...mapThemeToProps(theme, props, context),
      themeStyles: mapThemeToStyles(theme, props, context)
    })),

    // Take the dynamically generated jss and call injectStyles
    // with it. This is the part I'm wondering about...
    BaseComponent => {
      const OuterHelper = ({themeStyles, ...rest}) => {
        const InnerHelper = injectSheet(themeStyles)(BaseComponent);
        InnerHelper.displayName = 'applyTheme-InnerHelper';
        return createEagerElement( InnerHelper, rest );
      };
      OuterHelper.displayName = 'applyTheme-OuterHelper';
      return OuterHelper;
    }
  );

Using the HOC looks like this:
const mapThemeToStyles = theme => ({
  button: {
    borderWidth: theme.button.borderWidth
  }
});

const enhancer = applyTheme(mapThemeToStyles);

const SomeButton = props => {
...
};

export default enhancer(SomeButton)

It works, but I'm not sure that I haven't done something horrible.

What happens on every render?

The code runs fine and renders correctly. I've modified the theme during runtime, and the UI updates great. I guess what I'm asking is not so much a, "Why is it broken?" question, but I'm more wondering if what I've done is just bad code and why? And if so, how can it be improved? To say it another way, I can't imagine that dynamic styles wouldn't have already been included in react-jss if they were easy. There must be something wrong with my code, no?

Thats why I am asking what happens on every render when props you use in the theme change … a sheet in react-jss is shared between all elements. So if one element has different props than the other what happens?

I understand what you're saying now. I think the current implementation of react-jss isn't going to work for my needs. I'm messing around with a modified HOC that generates a dynamic stylesheet, and I have noticed that, if I call jss.createStyleSheet() twice with the same rules I will get two sheets that have the same class names. Am I seeing that correctly? The class names are a hash of the rules?

The class names are a hash of the rules?

https://github.com/cssinjs/jss/blob/master/src/utils/generateClassName.js#L9
Class name is based on style object , meta and rule name.

Thanks. I dug around and found that. GT
On Tue, Dec 27, 2016 at 1:12 AM Oleg Slobodskoi<EMAIL_ADDRESS>wrote:

The class names are a hash of the rules?
https://github.com/cssinjs/jss/blob/master/src/utils/generateClassName.js#L9
Class name is based on style object , meta and rule name.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/cssinjs/react-jss/issues/64#issuecomment-269298310,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADgUyluiDPJ-qFFDzrIK2xYrvzJXs6fBks5rMNaMgaJpZM4LVIEb
.

Thanks. I dug around and found that. It seems like maybe there's three different general categories for how jss would be used:

Static styles applied to all components of a given type. This is what react-jss does
Dynamic styles applied to all components of a type. This is general theming usage.
Dynamic styles applied to one component instance. This is the most flexible, but requires a sheet per component instance.

I've got an HOC that's doing number 3 now, and it's working pretty well. I realize it's very simplistic. I'm really just trying to wrap my head around this stuff. Thanks for your patience.
import { inject } from 'mobx-react'
import { Component } from 'react'
import getDisplayName from 'react-display-name'
import { jss } from 'react-jss'
import { createEagerElement } from 'recompose'
import { composeWithName } from '../recompose-extras'

export const applyTheme = ( mapThemeToStyles = () => ({}), mapThemeToProps = () => ({}) ) => composeWithName(
  'applyTheme',
  inject(({themeStore: {theme}}, props, context) => ({
    ...mapThemeToProps(theme, props, context),
    themeStyles: mapThemeToStyles(theme, props, context)
  })),
  BaseComponent => class extends Component {
    static displayName = 'applyTheme-DynamicStyleManager';
    sheet;

    constructor(props) {
      super(props);

      this.attachSheet();
    }

    attachSheet() {
      this.sheet = jss.createStyleSheet(this.props.themeStyles, {
        link: true,
        meta: getDisplayName(BaseComponent) + '-dynamic'
      }).attach();
    }

    detachSheet() {
      jss.removeStyleSheet(this.sheet);
      this.sheet = undefined;
    }

    componentWillUpdate({themeStyles}) {
      this.detachSheet();
      this.attachSheet();
    }

    componentWillUnmount() {
      this.detachSheet();
    }

    render() {
      const {themeStyles: _, ...rest} = this.props;
      const {classes} = this.sheet;
      return createEagerElement(BaseComponent, {classes, ...rest});
    }
  }
);

three different general categories for how jss would be used

yep

trying to wrap my head around this stuff. Thanks for your patience.

take a look at this issue https://github.com/cssinjs/jss/issues/356

Thanks for the pointer to that thread. I'm interested in seeing how this all shakes out. In the meantime, here's a simple take on dynamic styles that supports both class-level styles and instance-level styles that seems to meet my needs. Any feedback is much appreciated.
import { inject } from 'mobx-react'
import { Component } from 'react'
import { jss } from 'react-jss'
import { compose, createEagerElement, getDisplayName } from 'recompose'

const InstanceSheetInjector = BaseComponent => class extends Component {
  static displayName = 'applyTheme-instanceSheet';
  instanceSheet;

  constructor(props) {
    super(props);
    this.attachSheet();
  }

  componentWillUpdate({themeStyles}) {
    this.detachSheet();
    this.attachSheet();
  }

  componentWillUnmount() {
    this.detachSheet();
  }

  render() {
    const {themeStyles: _, ...rest} = this.props;
    const {classes} = this.instanceSheet;
    return createEagerElement(BaseComponent, { classes, ...rest });
  }

  attachSheet() {
    this.instanceSheet = jss.createStyleSheet(this.props.themeStyles, {
      link: true,
      meta: getDisplayName(BaseComponent) + '-instanceSheet'
    }).attach();
  }

  detachSheet() {
    jss.removeStyleSheet(this.instanceSheet);
    this.instanceSheet = undefined;
  }
};

const ClassSheetInjector = BaseComponent => {
  let
    classSheet,
    instanceCount = 0,
    updateId = 0;

  return class extends Component {
    static displayName = 'applyTheme-classSheet';
    updateId = 0;

    constructor(props) {
      super(props);

      if (instanceCount === 0) {
        this.attachSheet();
      }
      instanceCount++;
    }

    componentWillUpdate({themeStyles}) {
      if (this.updateId === updateId) {
        this.detachSheet();
        this.attachSheet();
        updateId += 1;
      }
      this.updateId = updateId;
    }

    componentWillUnmount() {
      instanceCount--;
      if (instanceCount === 0) {
        this.detachSheet();
      }
    }

    render() {
      const {themeStyles: _, ...rest} = this.props;
      const {classes} = classSheet;
      return createEagerElement(BaseComponent, { classes, ...rest });
    }

    attachSheet() {
      classSheet = jss.createStyleSheet(this.props.themeStyles, {
        link: true,
        meta: getDisplayName(BaseComponent) + '-classSheet'
      }).attach();
    }

    detachSheet() {
      jss.removeStyleSheet(classSheet);
      classSheet = undefined;
    }
  }
};

export const applyTheme = ( mapThemeToStyles = () => ({}), mapThemeToProps = () => ({}), {sheetPerInstance = false} = {} ) => compose(
  inject(({themeStore: {theme}}, props, context) => ({
    ...mapThemeToProps(theme, props, context),
    themeStyles: mapThemeToStyles(theme, props, context)
  })),
  sheetPerInstance ? InstanceSheetInjector : ClassSheetInjector
);

Closing this for now as I don't know what to do.

That's fine. I was just looking for some help making jss more dynamic. I've
got a working solution now. Thanks for your input.
Jay
On Sat, Dec 31, 2016 at 12:00 PM Oleg Slobodskoi<EMAIL_ADDRESS>wrote:

Closed #64 https://github.com/cssinjs/react-jss/issues/64.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/cssinjs/react-jss/issues/64#event-908571155, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADgUyuy-x7n8BYjofjp5-vsgVKKRfCv-ks5rNrRbgaJpZM4LVIEb
.

@jcheroske - thanks a lot of starting this thread! It really helped, and saved a lot of hours of reading code. You really rock!

Thread is very old, we switched to counters based class name generator!

Thanks @kof! I will follow the other discussion and improvements, that you shared. This discussion helped to get me started.


install issue with pip3

I'm using Mate 20.04 with python3.8 and earlier releases.
I had to use pip not pip3 for the install to work.
If I used pip3, I get the error when using md2pptx
ModuleNotFoundError: No module named 'pptx'
For reference, here's some output
$ pip3 install python-pptx
Requirement already satisfied: python-pptx in /home/mikeg/.local/lib/python3.8/site-packages (0.6.18)
Requirement already satisfied: lxml>=3.1.0 in /usr/lib/python3/dist-packages (from python-pptx) (4.5.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in /home/mikeg/.local/lib/python3.8/site-packages (from python-pptx) (1.3.7)
Requirement already satisfied: Pillow>=3.3.2 in /usr/lib/python3/dist-packages (from python-pptx) (7.0.0)
$ pip install python-pptx
Collecting python-pptx
  Using cached python-pptx-0.6.18.tar.gz (8.9 MB)
Requirement already satisfied: lxml>=3.1.0 in /home/mikeg/.local/lib/python3.7/site-packages (from python-pptx) (4.4.1)
Requirement already satisfied: Pillow>=3.3.2 in /home/mikeg/anaconda3/lib/python3.7/site-packages (from python-pptx) (7.0.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in /home/mikeg/anaconda3/lib/python3.7/site-packages (from python-pptx) (1.2.7)
Building wheels for collected packages: python-pptx
  Building wheel for python-pptx (setup.py) ... done
  Created wheel for python-pptx: filename=python_pptx-0.6.18-py3-none-any.whl size=275703 sha256=22b1ff963ef5599a2a7a0bed09e31b878c07b36854bb94e9124d4bcd09127559
  Stored in directory: /home/mikeg/.cache/pip/wheels/68/99/55/8f6d0c128a214c26ac5b9f75ea68f6387feec407055458af1e
Successfully built python-pptx
Installing collected packages: python-pptx
Successfully installed python-pptx-0.6.18

Very strange: pip3 install python-pptx worked for me.
My guess is you're saying that at runtime md2pptx doesn't find python-pptx. Please confirm this or help me understand.
I'm not yet sure how to debug from here.

I'm going to close this issue.  I don't think it's worth figuring out since it likely has something to do with my anaconda set up.

OK. Thank you @mikegilchrist!
if you get more evidence please feel free to reopen.


Add watches page

[x] Add a watches page (Depends on #63)
[x] Make pair a watch button
[x] Populate watches page with registered devices
[x] Split currently connected watch and "all watches"
[x] Show not connected when no watches are connected
[x] Show the status of each watch - Dependent on #65 to work properly
[x] Fix a bug where devices got added to the PairedStorage on each pair attempt
[x] Allow user to tap on watch and be given options (disconnect, connect, forget)
[ ] Allow user to update watch from options popup - Blocked by #23
[x] Show watch's software version - Blocked by #72
[x] Show watch's model (by using the correct icon) Blocked by #72
Fixes #24
Fixes #72

@AliceGrey Have you ever used hooks (either on Flutter on or React) or Riverpod?
I've started using it recently on the calendar part of this app and I think it would be useful if all of us started using it. Partially because consistency is good, but also because I feel they make UI development significantly easier and cleaner.
Idea is that all of the logic is moved from widgets into providers and then widgets only get the data from the provider and display it. That way there is a clean separation between UI and logic. They have a pretty good documentation: https://riverpod.dev/docs/getting_started/
I've took the liberty of converting PairedDevices and your MyWatchesTab to the riverpod+hooks here: https://github.com/matejdro/rebble-mobile-app/commit/59137cadd114ce64ec0004e5b2604e61eaeb90d0 . Feel free to use it as a reference.

@matejdro and @crc-32 this is ready to review :)

@matejdro and @crc-32 this is ready to review :)

Requests from @pidgheperson
[ ]Fix popup settings card color to elevated
[ ]Make the popup cover the nav bar
[ ]Don't round the bottom corners
[ ]Make sure popup watch background isn't green when connecting
[ ]Make the popup a column that's height unconstrained max 1/3rd size on open

Requests from @pidgheperson
[ ]Fix popup settings card color to elevated
[ ]Make the popup cover the nav bar
[ ]Don't round the bottom corners
[ ]Make sure popup watch background isn't green when connecting
[ ]Make the popup a column that's height unconstrained max 1/3rd size on open

@DreadBoy Any chance you could review this? You are probably the most knowledgeable with this Flutter thing :)

@DreadBoy Any chance you could review this? You are probably the most knowledgeable with this Flutter thing :)


Loading Solo and Bolt in Pinocchio 2.6.4

From @Danfoa at https://github.com/robot-descriptions/robot_descriptions.py/issues/6#issuecomment-1305407777:
STL: ASCII file is empty or invalid; no data loaded
Hint: the mesh directory may be wrong.
...
  File ".../envs/robotics/lib/python3.7/site-packages/pinocchio/robot_wrapper.py", line 21, in initFromURDF
    model, collision_model, visual_model = buildModelsFromUrdf(filename, package_dirs, root_joint, verbose, meshLoader)
  File ".../envs/robotics/lib/python3.7/site-packages/pinocchio/shortcuts.py", line 45, in buildModelsFromUrdf
    geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs)
ValueError: Argument geometry_model should be a GeometryModel

Hmm I'm not sure what's going on as they load fine for me:
$ python examples/load_in_pinocchio.py solo
Robot successfully loaded as <pinocchio.robot_wrapper.RobotWrapper object at 0x7f6fc75ff070>
$ python examples/load_in_pinocchio.py bolt
Robot successfully loaded as <pinocchio.robot_wrapper.RobotWrapper object at 0x7f76dccd3070>

@Danfoa do you get the same exception from the load_in_pinocchio example? (Also perhaps you can try in Pinocchio 2.6.10 which is now on PyPI?)

Follow-up from https://github.com/robot-descriptions/robot_descriptions.py/issues/15, maybe try again with Pinocchio 2.6.12?

So I cleared .cache, and checked that I was not using any previous clone of the robot_propeties_<bolt/solo> repositories, and I am still finding these issues:

Pinocchio 2.6.4: Both solo and bolt fail with similar error trace:

Caught: Could not load resource [...]/.cache/robot_descriptions/example-robot-data/robots/solo_description/meshes/stl/solo12/solo_12_base.stl
STL: ASCII file is empty or invalid; no data loaded
Hint: the mesh directory may be wrong.
Traceback (most recent call last):
  File "examples/load_in_pinocchio.py", line 40, in <module>
    robot = load_robot_description(args.name)
  File "[...]/Projects/robot_descriptions.py/robot_descriptions/loaders/pinocchio.py", line 59, in load_robot_description
    module = import_module(f"robot_descriptions.{description_name}")
  File "[...]/anaconda3/envs/robotics/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'robot_descriptions.solo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "examples/load_in_pinocchio.py", line 42, in <module>
    robot = load_robot_description(f"{args.name}_description")
  File "[...]/Projects/robot_descriptions.py/robot_descriptions/loaders/pinocchio.py", line 72, in load_robot_description
    root_joint=root_joint,
  File "[...]/anaconda3/envs/robotics/lib/python3.7/site-packages/pinocchio/robot_wrapper.py", line 17, in BuildFromURDF
    robot.initFromURDF(filename, package_dirs, root_joint, verbose, meshLoader)
  File "[...]/anaconda3/envs/robotics/lib/python3.7/site-packages/pinocchio/robot_wrapper.py", line 21, in initFromURDF
    model, collision_model, visual_model = buildModelsFromUrdf(filename, package_dirs, root_joint, verbose, meshLoader)
  File "[...]/anaconda3/envs/robotics/lib/python3.7/site-packages/pinocchio/shortcuts.py", line 45, in buildModelsFromUrdf
    geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs)
ValueError: Argument geometry_model should be a GeometryModel

Okay. Can you check that the file ~/.cache/robot_descriptions/example-robot-data/robots/solo_description/meshes/stl/solo12/solo_12_base.stl exists and is not corrupted?
Its size should be about 268K and its md5sum:
$ md5sum solo_12_base.stl
9a3ed18f59f49101af22bac01470b118  solo_12_base.stl

Nevermind, I'm able to reproduce your issue in a python:3.7 Docker container. The file does exist but is not loaded properly.
I believe this is an issue related to Pinocchio version 2.6.4 in particular, that has been fixed in more recent versions. You can see it in the line pointed at by the ValueError: Argument geometry_model should be a GeometryModel exception:
In Pinocchio 2.6.4:
            geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs)

In Pinocchio 2.6.12:
            geom_model = pin.buildGeomFromUrdf(model, filename, geometry_type, package_dirs = package_dirs)

This fix avoids the argument type mismatch.

Even applying this fix, the error persists though:
ValueError: Could not load resource /root/.cache/robot_descriptions/example-robot-data/robots/solo_description/meshes/stl/solo12/solo_12_base.stl
STL: ASCII file is empty or invalid; no data loaded
Hint: the mesh directory may be wrong.

This error comes from hpp-fcl, which Pinocchio uses to load its meshes. The STL files for Solo are binary rather than ASCII, perhaps that was the issue. At any rate, it seems it was fixed in more recent distributions of Pinocchio.
To feed back this issue into robot_descriptions, I'll bump the minimum version of Pinocchio to 2.6.10 in optional/testing dependencies.

This issue was mentioned in the CI :see_no_evil: and the corresponding descriptions (four of them, including Solo and Bolt) were skipped in Pinocchio tests. This issue was also previously noted to have been fixed in Pinocchio 2.6.9: https://github.com/robot-descriptions/robot_descriptions.py/blob/bbb9d11c844776455c2beeb524beaa72749694cf/tests/test_pinocchio.py#L85
I've removed the test skips, so that the CI validates that Solo and Bolt now load successfully with pin >=2.6.10.
@Danfoa Thanks for your report that prompted fixing this blind spot!


Allow support for horizontal rule () in content component

The <hr> should have spacing when used within the .pf-c-content component.

from @mceledonia

let’s start with 8px spacer above and below, color (on white bg) should be…. the same as our gray background color


add armor

adds some of the missing armor
like $$$$ armor and gift armor and most importantly superhero armor

please let me know where you got those ids, i can merge if you update to latest also

please let me know where you got those ids, i can merge if you update to latest also

good changes, thanks!


Fix: create back button in DKImageExtensionGallery lazily

We've had a super strange issue on iOS 13.2 built by Xcode 11.1 (builds for iOS 12 worked just fine): back bar button item in DKImageExtensionGallery loses its target and becomes untappable. I suppose that's a compiler issue. This issue goes away if the bar button item is created lazily
Unfortunately, I did not succeed reproducing this issue on Example project, even adding iPad multi window support so I guess the real cause is some bug in UIKit or Xcode, but initialising bar button item lazily fixes the issue.

Thanks for your PR!!!


Guard villager with crossbow moving at speed of light

The other villagers with other weapons do not experience this, but the crossbow villagers just runs twice the speed of base running speed

Sorry for the small necro, but I'm having a similar issue with the latest version of the mod for the 1.20.1 version of minecraft.
I tried tuning the settings of the guards in the config files but turning off guard formation and lowering the speed doesn't seem to change the crossbowmen speed when chasing an enemy mob.


Adding repository test

Purpose
Adding junit test class for repository CRUD methods using in memory H2Database
Does this introduce a breaking change?

[ ] Yes
[ x] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ x] Other... Please describe: Unit test

Thanks a lot @yshameer !


Content checker, outside docs relative links

add check to verify relative links to content outside of docs folder. The large PR to update content checker has been merged.
comment from Mack,
"It's 99% code-complete, with one case left to validate: relative links to content outside of the root docs folder. All other cases are covered."
https://github.com/onflow/developer-portal/issues/735#issuecomment-1310779507

This has been resolved, docs author needs to use absolute links for content outside the scope of directory's docs-flow.json configuration.


Cannot run program "SureMap-IndexBuilder": error=2,no such file or directory

I placed SureMap-IndexBuilder and Reference file in FASTA format in the same directory as IMOS.jar.But the problem "Exception in thread "main" java.io.IOException: Cannot run program "SureMap-IndexBuilder": error=2,no such file or directory"hapened.Why is this happening?

Thank you for your feedback. I changed the codes of IndexBuilder. I hope it works correctly now. Please download IMOS.jar again and let me know if it works for you as well.
Please do not hesitate to report any further issues.

Thank you for your feedback. I changed the codes of IndexBuilder. I hope it works correctly now. Please download IMOS.jar again and let me know if it works for you as well.
Please do not hesitate to report any further issues.

Thank you for your reply. I copyed the SureMap-IndexBuilder file to the bin folder and run the program successlly after I posted the issue yesterday. I hope the issue can help you make it works better.


[Driver] -c with LTO should still emit bitcode

@swift-ci please test

@davidungar @artemcm  Does this need to be fixed in the new driver?

@davidungar @artemcm Does this need to be fixed in the new driver?

Thanks for catching this. Yeah, I think it does.
https://github.com/apple/swift-driver/pull/410 should do the job.

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - b09d20cb82e5e294f875792bde51d1a1ab6c1de7

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - ea31c043404fad8286638d2512fc3c66f58206d6

@swift-ci please test