[WIP] SVG: Implement initial server-side support

Summary
Here is a POC for what SVG uploads could. This PR, is hidden behind a feature flag for now. To test, simply enable.
Relevant Technical Choices
This PR, enabled image/svg+xml files to be uploaded. It use XML parser to get height and width attributes ( and viewBox ), so save the height and width in post meta, in the format the WordPress requires.
It also adds a check for script tags embedded in content of SVG. If SVG has a script tag and user doesn't have unfiltered uploads, the svg is rejected.
I also cache the size of the svg in post meta. This will improve performance a little and keeps inline with a future core change.
SVG parsing can be extensive, so it is cached in a array. In one request, a svg parsing can be requested 3 times.
So SVGs are encoded as image/svg. This was pretty common in my testing. The correct type is image/svg+xml. I have added a workaround for this.
To-do

[ ] Unit tests
[ ] Add check for XML ext is enabled.

User-facing changes

Testing Instructions

Sample data.

Fixes #5474

Was assets/src/edit-story/icons/add.svg deleted by accident?

There is a workaround for this issue with the core library https://github.com/darylldoyle/svg-sanitizer/pull/42

Looks like the sanitizer library isn't fully PHP8 compatible.
As per darylldoyle/svg-sanitizer#45 (comment), there will be a new release shortly. In the meantime we could use the master branch or apply that patch manually.

Good catch. I have patched our library here https://github.com/google/web-stories-wp/pull/5103/commits/89cd3f381518df89adb1e9b976d086291ec297fb

I think this can land in 1.3 even if it is behind a flag.


march: return errors when listing dirs

Was the change discussed in an issue or in the forum before?
Partially fixes #3172
What is the purpose of this change?
As described in linked issue errors in file system access are not returned when copying/moving. This change corrects that by catching any listing errors.
Checklist

[x] I have read the contribution guidelines.
[x] I have added tests for all changes in this PR if appropriate.
[ ] I have added documentation for the changes if appropriate.

[x] I'm done, this Pull Request is ready for review :-)

The build for this is failing on go1.9
# github.com/ncw/rclone/fs/march
fs/march/multierror.go:29:8: undefined: strings.Builder

I try to keep support for 2 years worth of go releases so that rclone can keep building for distros which are a bit behind.

Build failure is now different and vague I guess it needs another run.

Ok I replaced multierror with first occurring error and error count.
PTAL

That is perfect now - thank you very much :-)
I'll merge now.


access limit for side w/o data doesn't honor the reverse argument

gs_3$side.3$reverse is true, but the actual plot does not reflect this. Also, xlim(gs_3) has side.3 = c(NA,NA)
gs_3 <- gsplot() %>%
    points(1:10, 1:10) %>%
    axis(1, at = seq(0,10,by=0.1),labels=FALSE, tcl=0.15) %>%
    axis(3, reverse=TRUE)
gs_3

gs_4 <- gsplot() %>%
    points(1:10, 1:10) %>%
    axis(1, at = seq(0,10,by=0.1),labels=FALSE, tcl=0.15) %>%
    axis(3, reverse=TRUE)
gs_4

That's a pretty interesting case, and I am not sure what the expected behavior is. You don't have any data on axis 3, so reversing it is kind of misleading...not sure what to do in that case. warn?

Also @lindsaycarr the case where you want the limits of a side that has no data to take on the properties of the opposite side with data, you use xlim(gs_3, 1, set.undefined = TRUE) the set.undefined arg

Add warning that no data is associated with side=3, so it inherits side=1 args.
xlim(gs) should return 10,1 just like xlim(gs,3) does. Something weird with set.undefined is happeneing

Only gets to setting closest.side limits if there is a side specified because of if (!is.null(side) && length(side)==1){ on https://github.com/USGS-R/gsplot/blob/master/R/access-gsplot.R#L124

gs <- gsplot() %>%
    points(1:10,11:20, side=c(2,3))

You get:
ylim(gs,4)
[1] 0 1
xlim(gs,1)
[1] 0 1

But I would expect them to match the limits of the closest side:
ylim(gs,4)
[1] 11 20
xlim(gs,1)
[1] 1 10

@jiwalker-usgs and I decided we should actually expect NAs returned for non-existent sides

Fixed with #372


Upgrade checkout

Upgrade checkout, v3 is deprecated.

Thanks for submitting a pull request!
We will review it as soon as possible.

Hey @0xWDG,
Thanks for your contribution.
Your PR has been merged!
Your name will appear on https://auroraeditor.com/#contributors in a few moments, if you have contributed to the editor.
Thanks again for your contribution!
Kind Regards,
Aurora Editor Team.


mintKeyPair variable added in app.ts

Issue: 38
Short description of what this resolves:
Changes proposed in this pull request and/or Screenshots of changes:

@SanyamAgrawal07 there is a typo. Correct it .

@Srijan-crypto please check now

Good work @SanyamAgrawal07 . Keep up the spirit .


Implement event pattern and establish creep death events

Figure out an event pub/sub framework
Setup death event publication from the garbage collector
Move garbage collection to the top of the loop to ensure state is updated before other actions are taken
Update source manager to account for creep death re: assigned creeps.

This may also need to check for ruins for destroyed buildings...


Directory Error

Hi,
I've followed the directions in the readme, but I'm getting the following error:
_C:\Ai_Folder\Aesthetic score\food-aesthetics-main>run.py Users/Admin/Downloads/Marilyn/Test score
Traceback (most recent call last):
File "C:\Ai_Folder\Aesthetic score\food-aesthetics-main\run.py", line 20, in
args = parser.parse_args()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 1833, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 1866, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 2082, in _parse_known_args
stop_index = consume_positionals(start_index)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 2038, in consume_positionals
take_action(action, args)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 1927, in take_action
argument_values = self._get_values(action, argument_strings)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 2462, in _get_values
value = self._get_value(action, arg_string)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\argparse.py", line 2495, in get_value
result = type_func(arg_string)
File "C:\Ai_Folder\Aesthetic score\food-aesthetics-main\run.py", line 12, in dir_path
raise NotADirectoryError(string)
NotADirectoryError: Users/Admin/Downloads/Marilyn/Test

Hi @Rudy34160,
It looks like you are using a Unix (Linux/Mac) absolute path as the image folder path while you are on a Windows machine. So, you should use a Windows path instead. For example, if you have stored the images in an "Images" folder within your "Documents", you can use use "C:\Documents\Images" as an absolute path.
I hope this clarifies.
 So, you should use a Windows path instead. For example, if you have stored the images in an "Images" folder within your "Documents", you can use use "C:\Documents\Images" as an absolute path. I hope this clarifies.
Best, Alessandro

Thank you for the answer !
Is it possible to modify the run.py to be able to assign a score to images that are not in .jpeg format?

Dear @Rudy34160 ,
The code has been developed for working with .jpeg images. However, you may delete line 29 from the run.py file, and check whether it works with .png images.
However, for more robust results, my suggestion is to convert your images to .jpeg.
I hope this clarifies.
Best,
Alessandro


[Bug]: Deleting .obsidian files doesn't work.

What happened?
Somehow when I used Remotely Save it saved 8 versions of my workspace.json file, causing my ribbon to annoyingly change every time I open obsidian. I checked and these files were in my vault before I switched to Remotely Secure.
So I tried to delete it and sync. However, once the sync finishes it adds the files back from the remote provider. Not letting me delete them.
I was also having a similar issue with Remotely Save trying to delete plugins. I'd have to go onto my cloud service, delete them there first then delete them locally and sync. I can't do that now though since everything is encrypted, so I don't know what files what.

Might be related to #40.
What OS are you using?
Windows
What remote cloud services are you using?
OneDrive for personal
Version of the plugin
0.4.20
Version of Obsidian
1.4.16
Using password or not

[X] Yes.

Ensure no sensitive information

[X] I ensure that no sensitive information is submitted in the issue.

Thanks for reporting this one.

I am very grateful that someone can continue to update this plugin. Initially, I switched to Livesync due to syncing issues with the plugin. The plugin cannot delete files during syncing, and sometimes it even syncs back to an older version. This is fatal when the plugin needs to frequently update data.

RE the main issue in this folder:
This occurs because of item 3 in sync algorithm explanation. Deletions outside of obsidian are not tracked, which is a problem due to not being able to see the folder by default.
This might be solvable by using something similar to https://github.com/proog/obsidian-trash-explorer - and extending it to include the .obsidian folder. Otherwise I don't see a good way to solve this without keeping track of things better in a sync manifest, which has its own challenges.

This occurs because of item 3 in sync algorithm explanation

Ah okay makes sense. I also found this happens with css snippets on remotely save, I assume it's because obsidian doesn't have a feature for deleting them, so I was doing it in the file explorer. It's not a huge deal, I ended up redoing the set up for my vault so I just deleted the duplicated files before I initially synced.

Just for information: same problem here in my vault with the remotely-save original, some folders and files are just multiplicated / added with some sort of counter (and some other problems mentioned in the issues list here).
Deletion of the  files is also ignored, i'm just somewhere understanding the plugin code and trying to isolate the problem.
I've found this fork yesterday so I'll first of all switch and then, debug any further.

Yeah this is because deletion of files outside of Obsidian isn't tracked at all.
In theory we could do something like 1) scan the Vault 2) note the scan & last sync dates 3) if new scan shows files removed, delete them and sync the delete. Currently this isn't done, though, but would be happy to merge a PR for this type of behavior!

Even some additional "forced mark for sync deletion" in the file browser menu would make sense.
I don't understand the remotely-save code enough to do contributions but I am reading.
Holiday may be helpful ;)
(And I have to first cleanup my general plugin list because currently, Obsidian on mobile is crashing seconds after start when indexing even without sync/remotely save......)

I think we will have to store a form of the last sync dates somewhere for #43
Could be done in it's own file or a part of this feature or metadata.
At most it would just have to be an array of objects with a boolean success and a Date object. Unless there is more information we need to convey in the sync history? We can always just drop the success part and only show each run.

Sync history data will probably have to be seperate since each last synced for this feature would be per file right? Unless the sync history data is stored per sync and then each file sync data contains an index for the sync history array pointing to a sync time?
Let me know if that makes sense. I can provide a code snippet to help visualise what I'm saying.

I have to think about the structure of this more but definitely makes sense to me. I think sync history will be a different data structure based on how you described it, but this is more for the latest sync.

Closing in favor of #56. Also note the current workaround is using the "Reset Sync Metadata" option in settings which should let you delete files and have that sync (to use it click the button, close obsidian, then delete files and reopen).

Reset sync metadata is not work for me, I reset the metadata, and reopen obsidian, it still download the files on the remote

I noticed an issue where it takes a minute or so to reset and it's easy to miss the notice for when it's done. There is also no notice saying when it starts so it seems like the button doesn't work.
You could be experiencing that. I'll look into it and fix it.

Hi @bytemain. The next update should be more clear when it starts and finishes resetting the metadata file. Please tell me if you are still having this issue when the next update comes out.


Migrate to Docker Compose

Closes #18
Using the docker-compose command should make docker management much more easier. You no longer have to manually specify which container to run or even use the Docker Desktop GUI (maybe).
This also has the added benefits of scaling our backend services better, as eventually we would want to run the database, server, and other services on docker to emulate a production environment locally as much as possible.
There are really just two commands to remember to start/stop the backend services:
docker-compose up -d and docker-compose down.
I’ve added instructions in the README on how to update the database image whenever it’s outdated. I’ll probably ping the teams chat whenever there’s an update to the database .sql files.
Known issues

Existing MySQL installations might conflict with ports (3306)
Docker does not start on some computers
As a workaround, using your existing MySQL installation and running the server manually should be fine.

ready for review - not going to bother making a container for back-end server until much later into the project


[c#] Rearrange nuspec files by target

The intent is to make merging easier when we add/remote target
frameworks in the future.

List target first so everything going to the same target can easily be
sorted together.
Sort lines and split into logical sections.

I did the rearranging with the Emacs regexp search/replace of
<file \(src=.+\) \(target=.+\) /> to <file \2 \1 />
I then used sort-lines (with sort-fold-case set to nil) to sort the files sections before adding blank lines between each target.


Table Alignments Don't Match Data

Using the documentation sample code (images converted to strings for simplicity) I do this (try is wrapped in do/catch in my full code):
        let document = PDFDocument(format: .usLetter)
        let table = PDFTable()

        try table.generateCells(data: [
            [nil, "Name", "Image", "Description"],
            [1, "Waterfall", "test", "Water flowing down stones."],
            [2, "Forrest", "test", "Sunlight shining through the leafs."],
            [3, "Fireworks", "test", "Fireworks exploding into 100.000 stars"],
            [4, "Fields", "test", "Crops growing big and providing food."],
            [1, "Waterfall", "test", "Water flowing down stones."],
            [2, "Forrest", "test", "Sunlight shining through the leafs."],
            [3, "Fireworks", "test", "Fireworks exploding into 100.000 stars"],
            [4, "Fields", "test", "Crops growing big and providing food."],
            [nil, nil, nil, "Many beautiful places"]
            ],
            alignments: [
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                [.center, .left, .center, .right],
                ])

    document.addTable(table: table)
    do {
        let file = try  (PDFGenerator.generateURL(document: document, filename: "example.pdf"))
    } catch { //*****ERROR BEING CAUGHT HERE*****
        print(error)
    }

I am catching the following error:
tableStructureInvalid("Data and alignment for row with index 0 does not have the same amount!")
That seems to tell me that my first Row (Index 0) does not have a matching number of data and alignments. In the above case, Index 0 in both arrays has 4 elements. Am I doing something wrong?

PR merged. Thank you!


Create Basic Django App

Create Basic Django App

[x] Add basic structure
[ ] Add installation instructions to the README
[ ] Add Hello World Text

Closing because of structural change of project


Extract :dependency-management codecs from :configuration-cache

Reviewing cheatsheet
Before merging the PR, comments starting with

❌ ❓must be fixed
🤔 💅 should be fixed
💭 may be fixed
🎉 celebrate happy things

The merge queue build has failed. Click here to see all failures.


Check start <= end in isBetween

Check List:

Fixes #994
Unit tests : YES
Javadoc with a code example (API only) : NA

Thanks @epeee, @PascalSchumacher or I will review that soonish.

Thanks! :+1:


Internationalization support

Has anyone any experience in supporting multiple languages for pages and templates ? Does it have to be made as plugin or we already have some existing mechanism in place?

Check out: https://github.com/segmentio/metalsmith/issues/70


Add an option to set a Dismissble as 'active'

Attempt to disable the Dismissible() behavior by setting .direction = null causes assert at https://github.com/flutter/flutter/blob/6d134e0c866ce90a4dc7a02af6a8f1079c2a4fdc/packages/flutter/lib/src/widgets/dismissible.dart#L337
This is a feature enhancement to simplify customer code, not a code fault.
Setup
Flutter version 0.11.9
Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
Engine revision 5c8147450d
Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
Platform android-27, build-tools 27.0.3
Repo Scenario

ListView containing many Dismissible()
Dismissible's contain a card
Sometimes, all these cards can not be dismissed. There should be no sliding possible
Sometimes, all these cards can be dismissed. Slide to remove them.

It would be desired to use the Dismissible.direction field to set the means to be dismissed. With flutter v0.11.9,  we can set that field to any choice of DismissDirection but unfortunately not to null. Naturally, null as a .direction would indicate there is no direction in which it can be dismissed...making the Dismissible a noop.
Support for null as a value to Dismissible.direction will simply customer code. Rather than using a condition expression and duplicating the child widget code, it can more easily be done by just setting the direction to null.
Today's unhappy duplicate code 😐
Listview.builder(...
  itemBuilder:
    return isDisabled ?
      CardWidgetAndCode(
        ...
      )
    : Dismissible(
      child: CardWidgetAndCode( //  <-- duplicate code and/or function call
        ...
      )
    )
)

Future happy simplified code 🙂
Listview.builder(...
  itemBuilder:
    Dismissible(
      direction: isDisabled ? null : DismissDirection.horizontal,
      child: CardWidgetAndCode(
        ...
      )
    )
)

Log of assert
package:flutter/src/widgets/dismissible.dart': Failed assertion: line 337 pos 12: 'widget.direction != null': is not true

Doctor
[√] Flutter (Channel beta, v0.11.9, on Microsoft Windows [Version 10.0.17763.165], locale en-US)
    • Flutter version 0.11.9 at C:\Users\dale\.flutter
    • Framework revision d48e6e433c (5 days ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\dale\.android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\Users\dale\.android\Sdk
    • Java binary at: C:\Program Files\Android\android-studio-preview\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\android-studio-preview
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code, 64-bit edition (version 1.29.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.20.0

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

• No issues found!

Created a pull request for this issue: #36613

Based on the PR feedback, I'm going to re-open this and re-name it for the newly proposed api change. Feel free to continue discussing here and thanks for the input! :)

Hi,
Why not just add a DismissDirection.none ?
Regards,

Regarding the code duplication issue mentioned earlier, here's a simple technique that can be used
as an alternative:
class ExampleWidget extends StatelessWidget {
  final DismissDirectionCallback? onDismissed;
  final String text;

  const ExampleWidget({
    required this.text,
    this.onDismissed,
    super.key,
  });

  @override
  Widget build(BuildContext context) {
    // Define the core widget
    var item = Container(
      padding: const EdgeInsets.all(10),
      color: Colors.blue,
      child: Text(text, style: const TextStyle(color: Colors.black)),
    );

    // Conditionally wrap in Dismissible
    if (onDismissed != null) {
      return Dismissible(
        key: ObjectKey(text),
        onDismissed: onDismissed,
        child: item,
      );
    }

    return item;
  }
}

This approach demonstrates how to avoid duplicating widget code when conditionally applying
a Dismissible wrapper. By assigning the core widget to a variable first, we can easily return
either the wrapped or unwrapped version without repeating the widget's definition.
While this doesn't solve the original issue, I think it is a somewhat neat and
clean way to achieve effectively the same thing.
If anyone knows of any reasons why this approach should not be used (e.g., performance issues,
potential bugs this might cause), please feel free to correct me.

@HelgeSverre thanks for the interesting example. I don't have a current Flutter project to experiment with it.
The issue seems to be one that appears more than once, and your example may be workaround for the ongoing core gap in feature/functionality.


fix(flake8_boolean_trap): add whitelist for dict methods

This commit enables the skipping of FBT003 based on two conditions:

function name must be explicitly whitelisted (for now, common dict methods). In the future, more could be added based on user requests.
argument in function call must be one of the first two. The idea is to skip only things like {}.get(False, "default") or {}.get(key, True). Other method signature with a name in the whitelist can still potentially generate FBT003.

fixes #893

https://github.com/charliermarsh/ruff/issues/893
@obi-jerome,

Upstream doesn’t raise FBT003 for method calls at all:
https://github.com/pwoolvett/flake8_boolean_trap/blob/7783a47196411de1ca0d0670e9acf1be88829764/src/flake8_boolean_trap.py#L189


Meta: stop marking ajaxedPagesHandler as complex

> xo && stylelint source/*.css

  source/content.js
  ...
  ⚠  162:1  Function ajaxedPagesHandler has a complexity of 30.  complexity

  ...

  3 warnings

  43 passed

This does nothing and nothing can be done about it except moving the filters inside each feature, which is something I've been doing in some features.

While the code is not really complex the complexity checker shows me it may be time we do it with a simple map of a checker function to an array of features to enable. Refactoring it like that would limit the code to do one thing and prevent contributors from adding more custom logic in that file.

Yeah but the refactor isn’t coming. That warning has been there for a long time 😃


Simplify envelopes

Q
A

Is bugfix?
❌

New feature?
❌

Breaks BC?
❌

This PR simplifies the Envelope concept. The main changes are:

EnvelopeTrait is converted into AbstractEnvelope class.
If an envelope uses the new abstract class, there is no more envelope stack, which requires recursive data search. There is always a single envelope around a message.

With these changes it's dimpler to debug an application with envelopes. It's also becomes simple and meaningful to use unique method of envelopes be envelope creation in place like this, because there is no more a deep envelope stack with a recursive data search:
$id = IdEnvelope::fromMessage($message)->getId();

Trait to abstract class conversion is moved to #231, other changes slow down this package too much


Support HA with LeaderElection

We only have one replica for controller right now.

/kind feature
/help

https://github.com/InftyAI/llmaz/blob/b6141a4d32172f2f6500afdd483958c5407797c6/cmd/main.go#L77-L94
hi, from the code point of view, LeaderElection is currently supported to support HA. Are there any other requirements? would you mean to add more replica nums?

Thanks @qinguoyi for pointing it out, that's true. Then what we left is just make it configurable with helm chart, as well as the Replicas of the controller, here's the values.yaml: https://github.com/InftyAI/llmaz/blob/main/chart/values.global.yaml
Would you like to finish the work? That would be really appreciate, I think it wouldn't take a lot of time.

Thanks @qinguoyi for pointing it out, that's true. Then what we left is just make it configurable with helm chart, as well as the Replicas of the controller, here's the values.yaml: https://github.com/InftyAI/llmaz/blob/main/chart/values.global.yaml
Would you like to finish the work? That would be really appreciate, I think it wouldn't take a lot of time.

tks, i push a PR here,https://github.com/InftyAI/llmaz/pull/168

Solved by #168
/close


Add checks for encryption and refresh token

Task/Issue URL: https://app.asana.com/0/488551667048375/1206868882992217/f
Description
See task
Steps to test this PR
See task

#4327  👈
develop

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @marcosholgado and the rest of your teammates on  Graphite


Edit scheduled export

Scheduled Actions
Exports
click on item to edit

probably related to codinguser/gnucash-android#919


[Snyk] Security upgrade sanitize-html from 1.4.2 to 2.0.0

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):

package.json

Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Arbitrary Code Execution SNYK-JS-SANITIZEHTML-585892
  291

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Arbitrary Code Execution

:tada: Snyk checks have passed. No issues have been found so far.
:white_check_mark: code/snyk check is complete. No issues have been found. (View Details)


Rely on the BIDS schema for validation (and filename generation)

The schema and its doc is here:
https://github.com/bids-standard/bids-specification/tree/master/src/schema
There are some basic tools to interact with it that could be used: https://github.com/bids-standard/bids-specification/tree/master/tools/schemacode
Taylor who is the main person behind this is planning to turn that code into an actual package.
The goal in the long run is to use the schema for the BIDS validator and also have schema based way to generate filenames too.
Plus for the BEP, there will need to be a change in the schema so it could help to start with that building block.

Thanks!
As we discussed this morning, we're probably not gonna dive into updating the BEP032tools checker script so that it uses this schema coz we believe the added value would be weak for this temporary tool (as it will be "replaced" by the official BIDS validator after BEP032 is merged into BIDS). But it's good to have the info of where the schema lives! So we can let this issue open for future reference ;)


Enable Swedish language

Description
Small PR to enable the Swedish language pack contributed by @jokermanse in #1673
Instructions for Reviewers
I've already tested this locally & it works.  It's a very minor default configuration change to ensure that Swedish (Svenska) appears as an option in the language menu. I'll merge it immediately once tests all pass.

Merging as this is just a simple configuration change. Tested locally & it works.  Also passes all tests.


Tips for making animated webp?

I'm curious if you have any tips on making animated webp files? I've searched around npm for a direct "multiple webp images" -> "animated webp image" package, but this is the best I've found so far. However, the intermediate conversion into a gif reduces quality substantially (at least with the default settings).
Any tips on either:

using this library to created animated webp images from an array of webp images without losing quality or
finding or making my own package similar to this one that doesn't convert to a gif in the middle of the webps -> animated webp conversion.

Regardless, at least I've got a prototype up and running using this package. Thanks!

Maybe you can try node-webpmux.
const WebP = require("node-webpmux");

(async () => {
  let img = new WebP.Image();
  await img.load(`frames/0000.webp`);
  img.convertToAnim();
  for (let i = 0, frameCount = 6; i < frameCount; i++) {
    img.frames[i] = await WebP.Image.generateFrame({
      path: `frames/000${i}.webp`,
    });
  }
  img.save("animated.webp");
})();

Thanks for the tips!
I just tried out node-webpmux and it somehow produced worse looking outputs! I'm not sure why. After playing with its settings for ages, I'm giving up and sticking with sharp-gif2, despite losing some color range.
(webp-converter is deprecated and contains known vulnerabilities)
Thanks for this great library!


[ALLUXIO-3263]Use static imports for standard test utilities for class SpaceReserverTest

https://alluxio.atlassian.net/browse/ALLUXIO-3263

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/274/
Test FAILed.


Added web3 start command

It might be simpler (and faster) to have web3 manage the accounts itself and ask the node to fund them. It could even recognize that WEB_PRIVATE_KEY is set, and automatically fund that account.

Is that maybe a different issue?  This is just a short hand for running the docker command.

Is that maybe a different issue? This is just a short hand for running the docker command.

To be useful, it would have to parse the output from the docker logs for the user to reenter. I'm proposing that be avoided by setting the --local.fund flag instead, which can take already existing accounts or newly created ones.

Are you saying the docker command that's currently in the README isn't useful either? This does the exact same thing.

Running detached would hide info. The readme isn't detached so the relevant info shows. Using local.fund makes this a non-issue though, and allows for other tricks.

This doesn't run it detached, where do you see that?

This doesn't run it detached, where do you see that? It's an option, but not default.

Why provide an option that they can't use? Regardless, why not provide them a better option in the first place? Using local.fund is a better user experience, and allows detaching to be the default: they don't have to find new keys in the logs to set flags or env vars; the ones they are already using can be directly funded, or new accounts can be created on the fly and logged plainly and w/o other noise (no extracting them from docker log output).

Regardless, why not provide them a better option in the first place? Using local.fund is a better user experience, and allows detaching to be the default: they don't have to find new keys in the logs to set flags or env vars; the ones they are already using can be directly funded, or new accounts can be created on the fly and logged plainly and w/o other noise (no extracting them from docker log output).

Can you explain step by step how this option would work from a user perspective?

Current user perspective:
No WEB3_PRIVATE_KEY + attached:
After starting, user must copy keys from logs to use. They will probably ignore the rest of the logs.
No WEB3_PRIVATE_KEY + detached:
They must additionally open the docker logs first, then copy the keys.
With WEB3_PRIVATE_KEY set:
Doesn't matter, they must still get keys from the logs first.
Proposal using local.fund:
Docker is always detached (but still available with full logs).
No WEB3_PRIVATE_KEY:
Keys are logged cleanly to the console in whatever format we want. No other logs are in the way.
With WEB3_PRIVATE_KEY set:
Account is automatically funded, and user can immediately begin running signing commands. Other accounts could optionally be created or not - this becomes a web3 level option, instead of a gochain level option.

So step by step, something like this:
web3 create account
# copy private key returned
export WEB3_PRIVATE_KEY=X
web3 start --local.fund

Something like that?

Yes, basically. The user wouldn't have to pass any extra options to web3 start. WEB3_PRIVATE_KEY can be automatically noticed and funded transparently behind the scenes. If it's not there, then web3 creates an account and still uses local.fund, and the user gets the private key to set afterwards. Both paths are faster and simpler than letting gochain create the accounts itself.

Ok, sounds fine. So fund the current WEB3_PRIVATE_KEY + create 9 more accounts, pass those into the docker run command to get funded then print them to the console.
If no WEB3_PRIVATE_KEY, make 10 accounts.

Or even just fund a single account by default for speed, and add a flag for requesting more funded accounts. Related, I created: https://github.com/gochain-io/gochain/issues/360

wip, don't look yet. :)  just switching computers.

Alright, now it all works.


Unable to provide site access to the model running on Ubuntu Virtual Machine

I installed Ollama desktop in my ubuntu VM and ran the following commands:
$ OLLAMA_ORIGINS=https://webml-demo.vercel.app OLLAMA_HOST=<IP_ADDRESS>:11435 ollama serve
Then, in another window:
$ OLLAMA_HOST=<IP_ADDRESS>:11435 ollama pull mistral
But am unable to access the webpage.

Do you see the ollama server in netstat -tuln | grep 11435?

Yes I can see it. Attached is the screenshot of the same.

What webpage are you referring to? What exactly is the error?

Could you please help me understand what the following command is doing:
OLLAMA_ORIGINS=https://webml-demo.vercel.app/ OLLAMA_HOST=<IP_ADDRESS>:11435 ollama serve

It starts the ollama server and configures it bind to localhost port 11435 and allows webml-demo.vercel.app, a third-party web app, to communicate with the server.

Once I execute the command, how do I test this connection from the URL?


Old docs for https://material-ui.com

Hi, I'm using the old material-ui.com and can't find the docs anymore and don't want to upgrade into MUI, but when I go to material-ui.com it always redirects to mui.com, those docs, icons or demos are completely not suitable for my current version, is there any docs for the old version?

https://v4.mui.com/


Add Redis modules

I'm looking for a way to load the Redis stack modules (primarily the Redis JSON module).
Is there a way this could be accomplished with the library as it is? (Perhaps through instance.args?) If not, any tips on how this would most easily be accomplished if I were to create a fork?

It seems like you should be able to accomplish this using instance.args:
new RedisMemoryServer({
  instance: {
    args: ['--loadmodule', '/path/to/module/target/release/librejson.so']
  }
})

Of course, you will need to have the librejson.so file already built on the machine.


[Snyk] Security upgrade puppeteer from 20.9.0 to 22.5.0

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to fix 1 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):

package.json

Note for zero-installs users
If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠ Warning
```
Failed to update the yarn.lock, please update manually before merging.
```

Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Server-Side Request Forgery (SSRF) SNYK-JS-IP-7148531
  119

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Server-Side Request Forgery (SSRF)

👷 Deploy Preview for stalwart-kulfi-7bc69f processing.

Name
Link

🔨 Latest commit
7d837f15028ea0d2d36fa6875f05355cf6e814be

🔍 Latest deploy log
https://app.netlify.com/sites/stalwart-kulfi-7bc69f/deploys/6656ee6c7410900008bbf6c9

👷 Deploy Preview for sprightly-pony-a06b5f processing.

Name
Link

🔨 Latest commit
7d837f15028ea0d2d36fa6875f05355cf6e814be

🔍 Latest deploy log
https://app.netlify.com/sites/sprightly-pony-a06b5f/deploys/6656ee6c92ee0e00085cf7ea

❌ Deploy Preview for sprightly-pony-a06b5f failed.

Name
Link

🔨 Latest commit
7d837f15028ea0d2d36fa6875f05355cf6e814be

🔍 Latest deploy log
https://app.netlify.com/sites/sprightly-pony-a06b5f/deploys/6656ee6c92ee0e00085cf7ea


Allow writing to gl_FragDepth in GLES2

Looks like @QbieShay forgot to add it in #22800...

Damn.. its can be not supported on gles2 platforms like android.. sorry wrong PR


delete Java directory and move all the program from Java directory to JAVA directory

Java/PasswordCreater.java

assign it to me

@Saikat I would like to work on this issue. Please assign it to me.
THank you!


Add did:web entry for Participate

This also updates the URL for the did:key we (Participate) used for Plugfest, since plugfest.participate.com is no longer active.

Closing in favor of https://github.com/digitalcredentials/issuer-registry/pull/16


Feature/currency api

An updated screenshot of the application is included in this request.

good to go...


Support cabal/stack/nix shebangs

All three tools support writing a self-contained haskell script with a shebang at the top which describes
what package dependencies the Haskell script has.

Cabal syntax
Cabal
Cabal syntax looks like this: https://github.com/nrolland/helloNixShebang/blob/master/cabal_hello.hs
#! /usr/bin/env cabal
{- cabal:
index-state: 2019-01-02T10:01:10Z
with-compiler: ghc-8.0.1
build-depends: base, type-level-sets
-}

and is documented ... here i guess?

Stack syntax
Stack
Stack syntax looks like this
#!/usr/bin/env stack
-- stack --resolver lts-14.20 script

-- or
{- stack
  script
  --resolver lts-14.20
  --package turtle
  --package "stm async"
  --package http-client,http-conduit
-}

-- this script makes use of the http-client library, which is in stackage

or like this
#!/usr/bin/env stack
-- stack --resolver lts-14.20 script --package type-level-sets
-- (the package type-level-sets is not in stackage)

and is documented here: https://docs.haskellstack.org/en/latest/GUIDE/#script-interpreter

Nix syntax
Nix
Nix syntax looks like this: https://github.com/nrolland/helloNixShebang/blob/master/nix_hello.hs
#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])"
#! nix-shell -I nixpkgs=channel:nixos-18.03

and is documented here (and here)

I would love to have support for any of the three formats in ghcide, whichever is easiest to implement.
The nix support could probably be implemented by having the process relaunch itself (or the ghci instance) in a nix-shell with the parameters from the nix-shell shebang line, excluding the -i runghc part. I don't know if stack/cabal support would require any extra support from stack/cabal or if everything we need is already available.

Cabal

Firstly, iirc, the fields index-state and with-compiler are ignored by cabal.
What we need is cabal to support giving us the compilation flag for scripts. This can be done by implementing any of these issues/prs

https://github.com/haskell/cabal/issues/6149
Extend https://github.com/haskell/cabal/pull/6241 to work on scripts

Stack

That used to work, but apparently there was some regression? E.g. when stack repl ./Script.hs works (it used to, but with <IP_ADDRESS> it seems not to), hie-bios can load it.
We would need proper support from stack to support scrtips.

Nix

Is there a way to get the ghci arguments from nix that are used to compile this script?

I would love to have support for any of the three formats in ghcide, whichever is easiest to implement.

Could we implement it first for one that works natively in all operating systems, please? 😄

@fendor

Nix

Is there a way to get the ghci arguments from nix that are used to compile this script?

I think by default it doesn't use any arguments to ghci. It just creates a ghc installation with the relevant packages installed, sets the environment variables to point to that ghcWithPackages and puts it in path and runs ghci scriptname.hs or runghc scriptname.hs. Normal shebangs don't allow passing arguments to the interpreter and I don't think the nix-shell syntax supports that either.
Another option for nix could be to fetch the environment variables that nix creates the same way that direnv does it.

@jneira What do you mean with "natively"? Is WSL ok? If so, I would assume that all three should work in all three major environments (Linux, Mac, Windows), but I haven't tested it on Windows yet. Does shebangs work on windows at all without WSL?

What do you mean with "natively"? Is WSL ok?

In fact i wanted to exclude it. 😉

Does shebangs work on windows at all without WSL?

Yeah, in a msys2 console, for example.
But it does not support nix and it seems it never will be.

I think by default it doesn't use any arguments to ghci.

Probably true, this makes it very complicated for us to know how to compile the given file.
Without further support from nix, I dont think this will be easy to integrate at all.

@fendor Why does not needing command line arguments make it difficult? I am not familiar with the internals of how hie-bios works. Why is not environment variables sufficient?
If all we need is a ghci with the right environment, this should work:
nix-shell -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])" --run "ghci NameOfFile.hs"

But I assume something more is needed for the ide to work?

Why does not needing command line arguments make it difficult?

Because hie-bios by design asks the build-tool how it should compile a given file. It tells these options to ghcide/hls, which use them to load and compile the given file. I dont really see how this workflow can integrate a nix-shell, since hie-bios would need to open the shell, but ghcide / hls will eventually use the options to compile the flag and they are not within the nix-shell anymore.

Why is not environment variables sufficient?

What information is given in environment variables?
We need the exact flags that are necessary to compile the given file.

What information is given in environment variables?
We need the exact flags that are necessary to compile the given file.

I was going to say "no flags are needed" again, but apparently there are flags, they are just sneakily applied through a wrapper shell script.
The only relevant environment variable seems to be PATH, which includes a link to the generated GHC installation. This installation contains wrapper shell scripts for all the ghc* binaries. Here is for example the generated ghc wrapper for the example above.
$ cat /nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/bin/ghc
#! /nix/store/nfd458cwwymmqpy5qb1q7a92zqp7mqsz-bash-4.4-p23/bin/bash -e
export NIX_GHC='/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/bin/ghc'
export NIX_GHCPKG='/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/bin/ghc-pkg'
export NIX_GHC_DOCDIR='/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/share/doc/ghc/html'
export NIX_GHC_LIBDIR='/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/lib/ghc-8.8.3'
exec "/nix/store/02v06008rx2kw6rjp149y3gf822hmwgx-ghc-8.8.3/bin/ghc"  "-B$NIX_GHC_LIBDIR" "$@"

and here is the generated ghc-pkg
$ cat /nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/bin/ghc-pkg
#! /nix/store/nfd458cwwymmqpy5qb1q7a92zqp7mqsz-bash-4.4-p23/bin/bash -e
exec "/nix/store/02v06008rx2kw6rjp149y3gf822hmwgx-ghc-8.8.3/bin/ghc-pkg"  --global-package-db=/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/lib/ghc-8.8.3/package.conf.d "$@"

I guess we could parse these generated files to extract the arguments from that, or I could see if there is a more direct way to get the arguments.

Here is the file that generates the wrapper-scripts: https://github.com/NixOS/nixpkgs/blob/f5b6ea126f0f85cd2126984607e95151daf9a859/pkgs/development/haskell-modules/with-packages-wrapper.nix
But maybe we can see nix-shell as a build tool and simply forward nix-shell -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])" --run ghci to ghcide/hie? I don't know if that would break a ton of assumptions? I guess I can try that for myself and see what happens.

simply forward nix-shell -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])" --run ghci to ghcide/hie?

No, because this runs the shell, but HLS/ghcide itself is responsible for the ghci session.

Some of these options seem helpful. Maybe we can craft a bios cradle that does what we want.

Ah, right. We ask cabal/stack about the command line flags by feeding it a fake ghc that just prints its arguments here: https://github.com/mpickering/hie-bios/blob/2ac11025a109e5f09693c3f328cf05994f9fbb9d/src/HIE/Bios/Cradle.hs#L436-L439
I see. Yes, the same trick wouldn't quite work with nix-shell since the ghc it uses is hard coded in the script. So I guess we would either have to parse the shell script or just extract the base path and assume the relative path stays the same (except for ghc-version number). Or add some tool to ghcWithPackages in nix which just prints out the command line flags needed.

Btw, I tried using cradle: {direct: { arguments: ["-B","/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/lib/ghc-8.8.3"]} }, but it complained that ghcide: target ‘-B’ is not a module name or a source file. What am I doing wrong?

You probably need:
cradle:
  direct:
    arguments: ["-B/nix/store/c36yvssdnv05sgcszsmm5fj9iky7impx-ghc-8.8.3-with-packages/lib/ghc-8.8.3"]

since it is a single option, not two.

No. That is not the problem. It seems like it doesn't accept flags for some reason. Only a "module name or a source file". :/

A thing that I think would work for stack at least is to detect if there's a stack project and then use stack ghc or stack exec ghc instead of whatever ghc is on the path.

@wraithm If there is a stack project, then we basically do this already.

@fendor In my experience, if there isn't an explicit component listed in the hie.yaml, then the file won't get loaded.
For example, I can do stack repl <my file>, but I get the following from hie-bios check:
$ hie-bios check ./<my file>
hie-bios: ghc: readCreateProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

I don't have a ghc installed globally. I'm only using stack. But even if I put the stack installed ghc into my path, it can't find the libraries I reference.
It seems like it's trying to open the file with the "direct" cradle, but that doesn't work for my case.
$ hie-bios version
hie-bios version 0.5.1 compiled by GHC 8.8.3

Maybe you've fixed this in a newer version?

I see what you mean and indeed, we do not default to the stack cradle ever, except when we find a "stack.yaml" (assuming stack can be found).
Out of interest, does it work if you have a hie.yaml such as:
cradle:
  stack:
    component: "<path/to/File.hs>"

I think it opens it a "Default" Cradle which also needs a "ghc" on the $PATH.

With that specific hie.yaml

So, firstly, I'm opening this file inside of a stack.yaml project. This haskell file is actually in the same directory as the stack.yaml and it's still trying to open the file with the direct cradle.
If I do the hie.yaml as you specified above, I get:
hie-bios: AesonException "Error in $.cradle: Expected an object with path and component keys"

I assume this means that the path field is required. If I use this as my hie.yaml:
cradle:
  stack:
    - path: "."
      component: "File.hs"

I get:
hie-bios: ghc: readCreateProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

Which again seems to be trying to use the direct cradle.


"NULL" values in openhab2

First of all, I think your work as awesome and I would like to say thanks for all your effort.
I'm trying to get the deamon running with openhab2. I'm using Mosquitto and everything seems to be working fine, except for the openhab side.
I've already subscribed to my Mosquitto broker with a external MQTT client (MQTTlens) and I can see the messages coming in perfectly fine.
Also I can see openhab connect to the broker:
New client connected from ::1 as be50527e-cf77-4ddb-b94b-30057bdcbeca (c1, k60, u'openhabian').
However when I try to define a dummy component in HABPanel, it keeps saying "NULL".
My configurations for the mqtt binding and openhab are as follows:
services/mqtt.cfg:
mosquitto.url=tcp://<IP_ADDRESS>:1883
mosquitto.user=openhabian
mosquitto.pwd=xxx
mosquitto.qos=1
mosquitto.retain=true
mosquitto.async=false

items/miflora.items:
Group gMiFlora "All Mi Flora sensors and elements" (gAll)
Group gLightIntensity "Mi Flora Sunlight Intensity elements" (gAll, gMiFlora)
Group gAirTemperature "Mi Flora Air Temperature elements" (gAll, gMiFlora)
Group gSoilMoisture "Mi Flora Soil Moisture elements" (gAll, gMiFlora)
Group gSoilConductivity "Mi Flora Soil Conductivity/Fertility elements" (gAll, gMiFlora)
Group gBattery "Mi Flora Sensor Battery Level elements" (gAll, gMiFlora)

// Mi Flora "Groot" (C4:7C:8D:65:C1:AA)
Group gGroot "Mi Flora Sensor Groot" (gMiFlora)
Number Groot_LightIntensity "Groot Sunlight Intensity [%d lux]" <text> (gGroot, gLightIntensity) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.light)]"}
Number Groot_AirTemperature "Groot Air Temperature [%.1f °C]" <text> (gGroot, gAirTemperature) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.temperature)]"}
Number Groot_SoilMoisture "Groot Soil Moisture [%d %%]" <text> (gGroot, gSoilMoisture) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.moisture)]"}
Number Groot_SoilConductivity "Groot Soil Conductivity/Fertility [%d µS/cm]" <text> (gGroot, gSoilConductivity) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.conductivity)]"}
Number Groot_Battery "Groot Sensor Battery Level [%d %%]" <text> (gGroot, gBattery) {mqtt="<[mosquitto:miflora/Groot:state:JSONPATH($.battery)]"}

Any suggestions?
Thanks in advance!

Hey Bart 👋
thanks for the encouragement! ;)
First of all, please check with this Tutorial to cover the basis: https://community.openhab.org/t/mqtt-binding-v1-11-getting-started-101/33958
Remove the settings qos, retain and async. They are not needed, the default is okay. After going through the Tutorial you should be confident everything is ready.
You should now compare the data you are seeing in your standalone client and your openHAB log. Are values published to the broker also stored in the respective Items? If not, why? That should be easy to figure out.
Btw. Love your plant name ;)

Hmmm I didn't know about the log viewer yet, good to know!
It seems that my events.log isn't being created at all....  It's showing up empty in the log viewer and it doesn't exists in /var/log/openhab2/. I tried searching the forums and setting the log lever in the Karaf shell, but couldn't get it to generate.

Hi. may be this topic not rightfor my question, but after reboot Pi miflora service did'n start with openhab.
sudo systemctl status miflora.service
:[sudo] password for openhabian:
● miflora.service - Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Loaded: loaded (/etc/systemd/system/miflora.service; enabled)
Active: failed (Result: exit-code) since Wed 2017-09-06 22:12:51 MSK; 4min 46s ago
Docs: https://github.com/ThomDietrich/miflora-mqtt-daemon
Process: 440 ExecStart=/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py (code=exited, status=1/FAILURE)
Main PID: 440 (code=exited, status=1/FAILURE)
Status: "Sep 06 22:12:51 - MQTT connection error. Please check your settings in the configuration file "config.ini"."
Sep 06 22:12:50 openHABianPi systemd[1]: Starting Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon...
Sep 06 22:12:51 openHABianPi miflora-mqtt-daemon.py[440]: [2017-09-06 22:12:51] MQTT connection error. Please c...ni"
Sep 06 22:12:51 openHABianPi systemd[1]: miflora.service: main process exited, code=exited, status=1/FAILURE
Sep 06 22:12:51 openHABianPi systemd[1]: Failed to start Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon.
Sep 06 22:12:51 openHABianPi systemd[1]: Unit miflora.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
How to make miflora service start with the system?(I new with *nix system, but wona now how it work) Because after command:
sudo systemctl start miflora.service
All start work fine!
Can you push me in right way?

Finallyyy I got it working.
According to the last post in this thread: https://community.openhab.org/t/problem-with-mqtt-jsonpath-transformation/32833/7
There are some errors with openhab installations that have been updated. Therefore deleting the /var/lib/openhab2/config/org/openhab/mqtt.config resolved it.
For anyone else reading this:
This all had to do my openhab installing and nothing with this extremely powerful tool.
@ThomDietrich I think it would be nice add the installation of the JSONPATH transformation to the readme.
Thanks a lot mate!

Hey @bartvollebregt,
sorry I missed to answer in time - but I'm glad you got it working! I'll add a note regarding JSONPATH to the README. Additionally I've added the issue with the mqtt.config to the Tutorial linked above. Thanks for reminding me.
Last thing: I'm always intrigued to improve the functionality and usability of this tool. So if you ever see something that you think could be changed or added, don't hesitate to open an issue ticket ;)

@Nickolay40 could you please open a new issue with the message from above?


Compressed stream of an original with runOnDemand

Which version are you using?
v1.9.2
Which operating system are you using?
Linux amd64 Docker
Describe how to replicate the issue
Hi,
First of all congratulations for this great project.
Since my server has limited resources I'm trying to expose a compressed version of an original with "original" always running and the "compressed" only OnDemand.
Before I used the Nginx rtmp solution and I got it to work but I tried to implement the solution here: https://github.com/bluenviron/mediamtx/issues/1541 and I can't.
Can anyone suggest me a working solution?
Here's my original working version but always with runOnReady.
paths:
compressed:
original:
runOnReady: >
ffmpeg -rtsp_transport tcp -i rtsps://localhost:8888/$MTX_PATH
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k
-max_muxing_queue_size 1024 -af aresample=async=1 -rtsp_transport tcp -f rtsp rtsps://localhost:8888/compressed
runOnReadyRestart: yes
#runOnDemandRestart: yes
all_others:
Thanks.
Server logs
No response
Network dump
No response

Hi again,
Maybe I solved using this config.
Not sure if it's the optimal solution but it seems to work.
paths:
compressed:
runOnDemand: >
ffmpeg -rtsp_transport tcp -i rtsps://localhost:8888/original
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k
-max_muxing_queue_size 1024 -af aresample=async=1 -rtsp_transport tcp -f rtsp rtsps://localhost:8888/compressed
runOnDemandRestart: yes
all_others:
Thanks.


Change monitor order?

It seems that chunkwm wants/expects monitors to be laid out in a 1, 2, 3 order with 1 being my MacBook's built-in monitor and 2 and 3 being external. This is fine except I have my monitors arranged so an external monitor is on each side of my MacBook in a 2, 1, 3 order which makes setting my window_focus_cycle to all slightly confusing. Is there any way to change the order of my monitors in chunkwm's logic so it can cycle focus on my setup "properly"?

I currently have no idea how hard that would be. Right now use the arrangement returned to us directly by the macOS APIs. As far as I know, this is the same ordering that shows up in display preferences, where you can make some other monitor your main monitor and so on.

Ah. I hadn't even thought of changing my main monitor. I set my main monitor to my leftmost one and now all works as expected. Thanks!


Content Size Category not being applied

Passing in a prefferedContentSizeCategory into traits doesn't change the image that's outputted.
Is there any additional setup required to get this to work?
Thanks

Hi @zeusmedina! Thanks for the report! We have tests in the code base that exercise this:
https://github.com/pointfreeco/swift-snapshot-testing/blob/4d426f65da1eb4b8f8c7fe2b108ad380ceded10f/Tests/SnapshotTestingTests/SnapshotTestingTests.swift#L378-L397
And a couple example outputs:

Extra small: https://github.com/pointfreeco/swift-snapshot-testing/blob/4d426f65da1eb4b8f8c7fe2b108ad380ceded10f/Tests/SnapshotTestingTests/Snapshots/SnapshotTestingTests/testTraits.iphone-se-extra-small.png
Accessibility extra extra extra large: https://github.com/pointfreeco/swift-snapshot-testing/blob/4d426f65da1eb4b8f8c7fe2b108ad380ceded10f/Tests/SnapshotTestingTests/Snapshots/SnapshotTestingTests/testTraits.iphone-se-accessibility-extra-extra-extra-large.png

Can you attach some code that reproduces the issue or submit a PR with a failing test case?

Thank you for the speedy response! Below is the code I'm using. The outputted image shows the labels without the content size category being applied
assertSnapshot(matching: vc, as: .image(on: iPhoneX, traits: .init(preferredContentSizeCategory: .accessibilityExtraExtraExtraLarge)))

Does the view controller handle dynamic content size changes via traitCollectionDidChange?

We currently leverage adjustsFontForContentSizeCategory. Our labels are automatically scaled when larger text is enabled.

To provide further context, I'm testing a table view. My cells have two labels, both with adjustsFontForContentSizeCategory set to true (changing the text size in the emulator works as expected). I also tried overriding traitCollectionDidChange and calling setNeedsLayout and updateConstraintsIfNeeded.

@zeusmedina Hm, I wonder if adjustsFontForContentSizeCategory is just going to be incompatible with trait collection overrides since it's going to depend on an uncontrollable global notification.
Did overriding traitCollectionDidChange work for you? As long as you re-style the fonts inside that method, you should be able to get fonts rendering differently per trait collection.

@zeusmedina I just was able to use adjustsFontForContentSizeCategory and things rendered just fine. Here's a sample test:
  func testContentSizeCategory() {
    #if os(iOS)
    let label = UILabel()
    label.adjustsFontForContentSizeCategory = true
    label.font = .preferredFont(forTextStyle: .headline)
    label.frame.size = .init(width: 320, height: 160)
    label.text = "What's the point?"
    [
      "extra-small": UIContentSizeCategory.extraSmall,
      "small": .small,
      "medium": .medium,
      "large": .large,
      "extra-large": .extraLarge,
      "extra-extra-large": .extraExtraLarge,
      "extra-extra-extra-large": .extraExtraExtraLarge,
      "accessibility-medium": .accessibilityMedium,
      "accessibility-large": .accessibilityLarge,
      "accessibility-extra-large": .accessibilityExtraLarge,
      "accessibility-extra-extra-large": .accessibilityExtraExtraLarge,
      "accessibility-extra-extra-extra-large": .accessibilityExtraExtraExtraLarge,
      ].forEach { name, contentSize in
        assertSnapshot(
          matching: label,
          as: .image(traits: .init(preferredContentSizeCategory: contentSize)),
          named: "iphone-se-\(name)"
        )
    }
    #endif
  }

Can you attach some failing code to reproduce the issue you're having? Sounds like it should be working just fine.

Hi @stephencelis, I'm having a similar problem. Your code works fine since you are setting the frame manually:
label.frame.size = .init(width: 320, height: 160)

but if you let the UILabel decide for itself using label.sizeToFit() it won't work because the images will have the same resolution instead of scaling accordingly

We use Autolayout to size our labels, maybe that's the problem?

I'm not using Auto Layout but just the sizeToFit() func, if this can help

Any news on this @stephencelis?

@giulio92 Sorry, lost track of this! Were you ever able to resolve?

👋 hi @stephencelis. I am hitting the same issue and noticed that the order of operations seem to break snapshots.
In my code I use custom fonts and rely on adjustsFontForContentSizeCategory property to adjust font sizes for Dynamic Type, e.g.
   lazy var label: UILabel = {
     let label = UILabel()
     label.translatesAutoresizingMaskIntoConstraints = false
     label.text = "Hello"

     // [1] instruct UILabel to adjust font size based on dynamic type
     label.adjustsFontForContentSizeCategory = true

     // [2] set font
     label.font = .preferredFont(forTextStyle: .body)
     // or
     let customFont = UIFont(name: "MyAwesomeFont-Regular", size: 20)!
     label.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: customFont)

     return label
   }()

It works perfectly find in Simulator and on real devices, however with swift-snapshot-testing when testing with custom preferredContentSizeCategory, it only works if I set the font first and then set the adjustsFontForContentSizeCategory to true. And the issue seem to be limited to only cells in UITableView.
Here is how I run the test:
        let vc = MyViewControllerWithTableViewInside()

        let size = CGSize(width: 480, height: 3000)

        let traits: [String: UITraitCollection] = [
            "small": .init(preferredContentSizeCategory: .small),
            "extraExtraLarge": .init(preferredContentSizeCategory: .extraExtraLarge),
            "accessibilityExtraExtraExtraLarge": .init(preferredContentSizeCategory: .accessibilityExtraExtraExtraLarge),
        ]

        traits.forEach { (traitName, trait) in
            assertSnapshot(matching: vc, as: .image(size: size, traits: trait),
                           named: "\(traitName).\(Locale.current.languageCode!)")
        }

I've added a test case to reproduce this issue in my fork of swift-snapshot-testing: https://github.com/shadone/swift-snapshot-testing/commit/0e354c51440306348977fef95d3099ca37d310b6
I am out of ideas, how would you suggest to investigate this issue further - is it a limitation of UIKit or is it a bug swift-snapshot-testing?

I'm running into this issue as well. My best guess is that adjustsFontForContentSizeCategory relies on the UIContentSizeCategoryDidChangeNotification to work. This notification is only sent when UIApplication.shared.preferredContentSizeCategory is changed but not when a view controller has it's trait collection overridden as snapshot testing does using setOverrideTraitCollection.
I was able to workaround by wrapping my test like:
//Create UITraitCollection you want to use
traits.performAsCurrent {
    let view = MyView(model: MyModel())
    assertSnapshot(matching: view, as: .image()))
}

In my case the issue is similar but if I calculate size of the label manually, using AttributedString.boundingRect and dynamic font the size is calculated as if the trait collection was default, but then it is rendered with the correct font size. performAsCurrent does not seem to help either.
I imagine that the library could provide a workaround by allowing to inject a closure that would calculate the size of the view instead of accepting already calculated size of the view, and use it to update size before actually making snapshot but after view was placed in the view hierarchy and trait collection was set.

Hi, is there any update on this issue? It would be really great to have this support.

Hi, I was experiencing same issues and after a lot of debugging I made it work!
I solved this issue by firstly creating a profile that doesn’t overrides the UIContentSizeCategory. Keep in mind that all the default ViewImageConfig profiles there are already using UIContentSizeCategoryM and that might conflict with your own request.
  public static func iPhone8(_ orientation: ViewImageConfig.Orientation)
    -> UITraitCollection {
      let base: [UITraitCollection] = [
//        .init(displayGamut: .P3),
//        .init(displayScale: 2),
        .init(forceTouchCapability: .available),
        .init(layoutDirection: .leftToRight),
        .init(preferredContentSizeCategory: .medium), //   <===== We don’t want this here
        .init(userInterfaceIdiom: .phone)
      ]
      switch orientation {
      case .landscape:
        return .init(
          traitsFrom: base + [
            .init(horizontalSizeClass: .compact),
            .init(verticalSizeClass: .compact)
          ]
        )
      case .portrait:
        return .init(
          traitsFrom: base + [
            .init(horizontalSizeClass: .compact),
            .init(verticalSizeClass: .regular)
          ]
        )
      }
  }

So I created a profile that does not include any traits (because I would use my own array of traits iterating for each content size category and each user interface style), like iPhoneXNeutral
.init(safeArea: safeArea, size: size, traits: .init()) // no traits
After I’ve got my profile created I’ll simply iterate on an array of UITraitCollections composed with my own requirements, in my case I used a combination of all UIContentSizeCategory and UIUserInterfaceStyle (for dark/light modes). And create the snapshots by making on each iteration a Snapshotting with these traits and the neutral profile.
let snapshotting = Snapshotting<UIViewController, UIImage>.image(
      on: .iPhoneXNeutral,
      traits: traitCollection // make sure this is holding my desired traits (size, light/dark)
)

As last check, you need to make sure that your views and components are changing their sizes accordingly to detect the new trait change by using traitCollectionDidChange… and I used Combine to also refresh upon initialization to the right content size category.
traitCollection.publisher(for: \.preferredContentSizeCategory).sink…
Hope this also help you!

Hi, I've tried every solution offered, but none of them worked without changing the order font > adjustsFontForContentSizeCategory. Is there any update on this issue?


fix: update machine learning models download intructions

Description

To Update machine learning models download instruction for updated models and new added models.

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[ ] I've confirmed the contribution guidelines.
[ ] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The Reviewers must check the checkboxes below before approval.

[x] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@esteve @mitsudome-r
Since current download instructions is duplicated with autoware artifacts download instruction, as internal discussion with @kminoda and @miursh we would like to replace  by reference link to reduce the maintain costs and ensure users are always directed to the latest models.
So I made update at commit https://github.com/autowarefoundation/autoware-documentation/pull/589/commits/e22939b6c6539e651660b9ec02415ab1d01e54d0
Could you review this PR again?


Add parameter and role cleanup to cleanup_e2e_resources script

Environment information
N/A

Description
Parameters for secrets during E2E testing are not properly cleaned up if E2E tests fail to properly tear down the project after each run (e.g. E2E test was stopped before tear down). We should include parameters in the E2E cleanup script to cleanup these additional resources as well.
Roles with policies attached cannot be deleted. Currently we have to manually detach the policies then the roles can be deleted. We should have the script automate this work as well for roles created by E2E tests.

If it's useful, here's a quick a dirty script I used to clean up the roles and policies:
import {
  IAMClient,
  ListRolesCommand,
  ListAttachedRolePoliciesCommand,
  DetachRolePolicyCommand,
  DeleteRoleCommand,
  DeletePolicyCommand,
  ListRolePoliciesCommand,
  DeleteRolePolicyCommand,
} from "@aws-sdk/client-iam";

const iamClient = new IAMClient();

const deleteAttachedPolicies = async (roleName: string) => {
  try {
    const inlinePolicies = await iamClient.send(
      new ListRolePoliciesCommand({ RoleName: roleName })
    );

    for (const policyName of inlinePolicies.PolicyNames || []) {
      console.log(`deleting inline policy ${policyName}`);
      iamClient.send(
        new DeleteRolePolicyCommand({
          RoleName: roleName,
          PolicyName: policyName,
        })
      );
    }

    // Get a list of attached policies for the role
    const attachedPolicies = await iamClient.send(
      new ListAttachedRolePoliciesCommand({ RoleName: roleName })
    );

    // Detach and delete each attached policy
    for (const policy of attachedPolicies.AttachedPolicies || []) {
      console.log(`detaching policy ${policy.PolicyArn} from role ${roleName}`);
      await iamClient.send(
        new DetachRolePolicyCommand({
          RoleName: roleName,
          PolicyArn: policy.PolicyArn,
        })
      );

      if (policy.PolicyArn?.startsWith("arn:aws:iam::aws:policy")) {
        // it's a policy managed by AWS so we can't delete it
        continue;
      }

      console.log(`deleting policy ${policy.PolicyArn}`);
      await iamClient.send(
        new DeletePolicyCommand({ PolicyArn: policy.PolicyArn })
      );
    }
  } catch (error) {
    console.error("Error deleting attached policies:", error);
  }
};

const deleteRoles = async () => {
  try {
    // Get a list of IAM roles with names starting with "amplify-"
    const roles = await iamClient.send(new ListRolesCommand({}));

    // Iterate through the list of roles
    for (const role of roles.Roles || []) {
      if (role?.RoleName?.startsWith("amplify-")) {
        await deleteAttachedPolicies(role.RoleName);
        console.log(`deleting role ${role.RoleName}`);
        await iamClient.send(
          new DeleteRoleCommand({ RoleName: role.RoleName })
        );
      }
    }
  } catch (error) {
    console.error("Error deleting roles:", error);
  }
};
deleteRoles();

Role cleanup https://github.com/aws-amplify/amplify-backend/pull/1065

Parameter cleanup https://github.com/aws-amplify/amplify-backend/pull/1066


Unmarshal to single struct

Currently jsonapi doesn't seem to allow unmarshalling to a single struct instead of a []UnmarshalIdentifier, but according to the spec:

The request MUST include a single resource object as primary data

you are right, this is confusing. We should add the possibility to use a single struct as well.

we had a slice for it because in a previous specification it was possible to create multiple objects. I will open a PR soon that allows to use a struct directly. I would like to support both because of this idea here #112. From a client perspective (if we will implement that too) it is still required to unmarshal multiple objects.

Yes, I agree with supporting both. The standard can be a single object and then we can have a for example UnmarshalManyToJSON() for multiple objects.


Examples are vulnerable to script injections

All the examples including https://github.com/stefanbuck/github-issue-parser#setup and https://github.com/stefanbuck/ristorante/blob/main/.github/workflows/order.yml contain
- run: echo '${{ steps.issue-parser.outputs.jsonString }}'

and it can be used to run arbitrary code with full access to repositories unless permissions are restricted explicitly. For example in https://github.com/evverx/ristorante/issues/2 "Number of Pizza's": '$(date)' led to
2022-06-23T19:34:30.4915792Z shell: /usr/bin/bash -e {0}
2022-06-23T19:34:30.4916018Z ##[endgroup]
2022-06-23T19:34:30.5006883Z {
2022-06-23T19:34:30.5007522Z   "flavour": "Veg Tikka",
2022-06-23T19:34:30.5008735Z   "size": "Small",
2022-06-23T19:34:30.5008978Z   "toppings": "Tomato",
2022-06-23T19:34:30.5009299Z   "count": "Thu Jun 23 19:34:30 UTC 2022",
2022-06-23T19:34:30.5009513Z   "confirm": true
2022-06-23T19:34:30.5009712Z }

cc @jamacku

Indeed, this is not good. Maybe best to add a warning like GitHub does in their docs. The example should be easy to fix by escaping the user input. I'll look into this

GitHub released intermediate variables see also https://twitter.com/github/status/1560682584652365824
There is some work needed on my end to make work. This will be part of v3.


Removed explicit loop start in reconnect handler.

A fix for #27

Codecov Report

Merging #28 into master will increase coverage by 0.18%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   75.95%   76.13%   +0.18%
==========================================
  Files           7        7
  Lines         420      419       -1
  Branches       14       14
==========================================
  Hits          319      319
+ Misses         98       97       -1
  Partials        3        3

Impacted Files
Coverage Δ

sdc/rabbit/consumers.py
48.14% <ø> (+0.25%)
:arrow_up:

Continue to review full report at Codecov.

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


Could not find adapter type spark!

When I try a fresh new install of dbt and deploy it to my Docker environment, my container gives this error:
'  Credentials in profile "default", target "dev" invalid: Runtime Error' '    Could not find adapter type spark! Defined profiles:  default'
Steps that I've taken locally:

pip install dbt-spark
dbt init <projectname> --adapter spark

Then DBT generates a profiles.yml. I included this file in my project. First everything hard-coded to debug, in a later stage I will replace these by environment secrets.
default:
  outputs:

    # Use this if connecting to a hosted spark (e.g. Databricks)
    dev:
      type: spark
      method: http
      schema: dev
      host: "westeurope.azuredatabricks.net"
      organization: "<org id>"    # Azure Databricks ONLY
      port: 443
      token: "<token>"
      cluster: "<cluster>"
      target: dev

My Dockerfile (the profiles.yml is located in the /build/ folder):
FROM fishtownanalytics/dbt:0.17.2
USER root
ENV DBT_PROFILES_DIR=/dbt/build/
ENV DBT_TARGET=None
COPY ./ /dbt/
WORKDIR /dbt
RUN ls -la ./*
#RUN dbt deps --profiles-dir /dev/null
#RUN apt update && apt install -y libsasl2-dev
#RUN pip3 install dbt-spark==0.17.2

Even with installing dbt-spark==0.17.2 in the Dockerfile, (the last line of my Dockerfile) I get the same error.
When I have built the container I will see all my files correctly. When I run a dbt debug in the container I get this message. Also when I run dbt debug --profiles-dir =. /Build/ I get the same message.
My dbt_project.yml:
# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: '<projectname>'
version: '1.0.0'

config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'default'

# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
source-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
data-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target"  # directory which will store compiled SQL files
clean-targets:         # directories to be removed by `dbt clean`
    - "target"
    - "dbt_modules"

# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models

# In this example config, we tell dbt to build all models in the example/ directory
# as tables. These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
  <projectname>:
      # Applies to all files under models/example/
    marts:
      schema: dm
      materialized: table
    staging:
      schema: stg
      materialized: ephemeral
    frontend:
      schema: dm
      materialized: view

I cannot figure out what is wrong. Can someone test whether he / she also gets this message? Or that maybe something is wrong with me.

@datasharkNL First off, great GitHub handle.
I want to confirm that everything runs fine locally—that you're able to install dbt-spark in your local python env, cd into the project directory, and dbt run—and that you're only seeing this issue when you're trying to run via Docker. Is that right?
With the benefit of the full picture here, a few new things are standing out: It looks like your base image is dbt v0.17.2 on Docker Hub. Is that right? If so, that Docker image does not include dbt-spark, only dbt-core and the "core four" adapters. Now, I'm still not sure why RUN pip3 install dbt-spark==0.17.2 would fail to successfully install it on top of the dbt parent image... but I'm thinking that may the culprit here.
Could you try spinning up a blank image (FROM scratch), RUN pip3 install dbt-spark==0.17.2, and see if that gets you anywhere?
In the medium-term future, we do plan to start maintaining blessed dockerfiles for dbt-spark versions, along with other dbt plugins.

I fixed the issue, so this one can be closed.
The final files when it succeed where:
<projectname>:
  target: <targetname>
  outputs:
    # Use this if connecting to a hosted spark (e.g. Databricks)
    dev:
      type: spark
      method: http
      schema: <schemaname>
      host: "westeurope.azuredatabricks.net"
      organization: "<orgCode>"    # Azure Databricks ONLY
      port: 443
      token: "<token>"
      cluster: "<token>"

And the Dockerfile:
FROM fishtownanalytics/dbt:0.18.0
USER root
ENV DBT_PROFILES_DIR=/dbt/build/
COPY ./ /dbt/
WORKDIR /dbt
RUN ls -la ./*
RUN apt-get update && apt-get install -y libsasl2-dev gcc
RUN pip3 install dbt-spark==0.18.0
RUN dbt deps --profiles-dir /dev/null
RUN chown -R root /dbt && chmod -R u+rw /dbt

ENTRYPOINT [ "dbt" ]

Thanks @datasharkNL! Glad you were able to get this working


[camera] fix camera example

fixes https://github.com/flutter/flutter/issues/79475

fixed video initialization/disposal that was throwing
removed scaffold key in favor of ScaffoldMessanger
close current snackbar when new is shown, so they won't stack up
changed layout a bit + padded it from bottom so snackbars mostly wouldn't prevent taps on buttons
updated formatting

original PR https://github.com/bottlepay/plugins/pull/1
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
[x] I signed the CLA.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@nt4f04uNd try flutter format

i'm not asking how to auto format the code
why is this there?

[ ] I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides."

these rules explicitly say not to use an auto formatter
can you please clarify on why plugins do not line up with the style guide of the flutter reporsitory and recommend using it at the same time?

@nt4f04uNd The template is updated :)
Also, do you mind formatting the code.

I will close this as it's quite stale at this point


Different compatibility score with two similar PRs

👋  I have just found that even with the similar security patches, the compatibility score shows differently.
Here is color-string 1.5.3 -> 1.5.5 , while here is the color-string 1.5.4 -> 1.5.5 .
Thanks!

I admit that I'm seeing both are the same here--do you maybe have screenshots when they were different?
As for the differences--it's likely because we're calculating them all individually, and so a different number of folks are testing/merging them. I wouldn't expect that each update is going to be the same.
Going to close this as WAI, though given a large enough N I'd expect that they should converge to roughly the same value when they're close like that.


Update nsxt-topologies.html.md.erb

PKS 1.3 introduced Large size NSX-T load balances with Bare Metal NSX-T edge nodes

LGTM, thanks

Thanks @jarekgajewski!


Change default devise tokenAttributeName to token

Changes the default devise tokenAttributeName to token.
Works out of the box with the rails implementation of HTTP token authentication and the  authenticate_with_http_token method from the current README.
See #387 for more details.

@marcoow: as minor as it is, I think this PR warranted a bump to 0.8. Took me a few hours today to track this down as the source of failing API requests. (I was using the previous default value of tokenAttributeName: 'user_token').

Yeah, 0.8.0 was changed to 0.7.3.

0.8 seems more appropriate. Why change back to 0.7.3?

On 2015. febr. 9., at 13:22, Marco Otte-Witte<EMAIL_ADDRESS>wrote:
Yeah, 0.8.0 was changed to 0.7.3.
—
Reply to this email directly or view it on GitHub.

Because the bigger changes I hadn't planned didn't make it into the release and only smaller fixes remained.


This page type has no Block Areas configured

Whatever I do in config.yml, I always get in the Blocks tab of the pages:
This page type has no Block Areas configured.
Tried (my theme is called main):
BlockManager:
themes:
main:
BlockArea:
Sidebar: true
BlockManager:
themes:
main:
area:
Sidebar: true
BlockManager:
themes:
main:
area:
ContentBlock: true
etc. etc.
SilverStripe 3.3.1

did you add variables in your template as example below ?
`
$BlockArea(BeforeContent)
<% if $Content %>
$Content
<% end_if %>
<% if $Form %>
$Form
<% end_if %>
$BlockArea(AfterContent)

`

Yeap none of those will work. Read the documentation, there are very clear examples ;)

Well, when I follow the documentattion exactly, the Blocks tab at the pages disappear and didn't set exclude_from_page_types for any page type.

Update: when I use version 1.0.7. everything is working well. But with version 1.0.8. and dev my experience is that the Blocks tab disappears once you add an area to the page type. I experience this in SilverStripe 3.2.1 and 3.3.1.

Hmm... I've just done a test with 1.0.8 and was unable to replicate the issue. Can you paste in your config for me and I'll test with that

I can replicate this issue when I have not set the theme I use for blocks in my config.yml but only in the cms.
This has been set after a fresh installation of SilverStripe 3.3.1 without selecting the Simple theme:
SSViewer:
  theme: 'tutorial'

I then installed the blocks module, created a new theme and selected it via the CMS. Then I followed the documentation and configured the blocks module (1.0.7). The blocks tab is shown but I get the message "This page type has no Block Areas configured". I then set the theme in config.yml to my new theme and it worked.
But when I install 1.0.8 or 1.0.9 the Blocks tab is not visible.


COI: Content changes for before you begin tab

Acceptance Criteria

[ ] Hyperlink this "Disclosing a Conflict of Interest: Political Staff Guideline & Disclosure Form"

[ ] change content

You can edit the form after submission. It can be accessed in the Submitted forms tab. However, no edits will be allowed after your supervisor reviews and submits your form for documentation

[ ] change content

After you submit your supervisor will receive an email informing them that your disclosure is available for review

After your supervisor reviews, your form will be automatically sent to the AskMyHR team for documentation. Your supervisor will receive a confirmation email from AskMyHR with the information of the service request.

ready to test

Looking great - thanks Jerry!

looks good!
"After your supervisor ~reviews~ submits, your form will be automatically sent to the AskMyHR"
has context menu


endDrag function on component not being called when item is removed from DOM

I'm using react-dnd for a kanban board app (trello like), and when moving a card to another list (thus unmounting source component during drag), the endDrag function is not called, as the listeners for DragDropStore are removed on unmount.
As a workaround, I've added a _lastDraggedItem and getLastDraggedItem to DragDropStore, and subscribed to DragDropStore on parent component, handling the endDrag there. As we clear the variables in DragDropStore before firing the DRAG_END event, I couldn't find any other way to get dragged item.
The reason I'm not using DROP event is, it's not fired when the item is dropped outside of browser window, only DRAG_END is fired.
It works but it's messy, breaking the beginDrag & endDrag symmetry.
Are there any other ways to trigger a function on endDrag, with access to dragged item?
Or if is this a valid usecase for others, should we add my workaround to the repo?

I'll need some time to think on that, will look later in the evening.

Pardon for dragging my feet on this. I'm a bit busy with work stuff at the moment.
Is this urgent?

No problems, not urgent at all. I'm already the hacky way I mentioned, it works for my usecase.

OK, let me know if you have other ideas for fixing this as well.
I'll try to find some time next week to look into this!

Here is the a brain dump:
I see two different things here.
1- When source component is unmounted during drag, the endDrag defined on source component becomes irrelevant. Removing the source component may not be a common case, but for trello like functionality, I couldn't come up with any other solutions (Moving an item from one container to other). I thought about not removing, but hiding the source item while dragging, but couldn't find a reliable way of doing it.
While the action looks like moving an item, I'm essentially removing the item in one container, and adding a new one with same properties in another container. I also thought about if I can somehow carry the source item to another component without unmounting it, but haven't tried it, and don't know if it's even possible or feasible.
2- Assuming unmounting the source component during drag is the only way, I need to run a function when drag finishes. I'm achieving that by subscribing the DragDropStore of react-dnd in the parent component, and reacting to changes there. There isn't any way to get dragged item from the DRAG_END event, thus I added the lastDraggedItem stuff.
If there is way to solve 1 (endDrag defined on source item not working if it's unmounted while dragging), 2 becomes irrelevant (at least for this usecase).
This isn't a big problem for me, as subscribing to the DragDropStore is trivial.

On further thought, if unmounting the component while dragging is common enough usecase, may be we can offer some alternative syntactic sugar to define beginDrag & endDrag on parent component, and passing to child via props, and using them in DragDropMixin on child component.
I'm not sure if this is feasible or worth the effort either.
I'll give it some more thought.

I thought about not removing, but hiding the source item while dragging, but couldn't find a reliable way of doing it.

render() {
  var { isDragging } = this.getDragState(ItemTypes.CARD);
  if (isDragging) {
    return null;
  }

  ...
}

?

I'm sorry, I should have been more clear on that. The problem is not with hiding, but the application logic becomes becomes complicated with hiding, breaking the one way data flow.
On my usecase with trello-like app, when card is moved over to another list while dragging, I just fire an action to stores, removing it from one list and adding to another. React + Flux takes care of the rest.
There was all sorts of different usecases that my users came up with, user can drag card to another list first, than moving to original position without dropping, and than moving again etc. It's doable with hiding it, but becomes a lot more complicated than just handling it React + Flux.
Here is a short video of it in action: https://www.dropbox.com/s/852c0dyribbtykf/react-dnd-is-awesome.mov?dl=0
I'll think about it more tho.
Thanks.

Your example makes total sense.
I think we should fire endDrag ourselves if component is removed.
Why does this line not help us?
https://github.com/gaearon/react-dnd/blob/master/modules/utils/NativeDragDropSupport.js#L99

@nelix had a similar problem while implementing the mousemove backend (#53).
He tried to make a trello-like example and noticed that, once card is moved into another column, it no longer “knows” it's the one that is being dragged.
Here's the workaround I proposed in Gitter chat:

Add key property to dragSource protocol (let's think later if we want to make it a breaking change, warn when it's missing, or use something like _nextId++ by default). It needs to be a string. The key uniquely identifies drag source in component tree, so even if component is removed and added in some other part of component tree, we can still recognize it as the current drag source.

When drag begins, put that dragSource.key as draggedItemKey along with draggedItemType in action (and thus in Store). Read it from store in getStateFromDragDropStore so it gets into state.

Change createDragDropMixin#getDragState to compare this._dragSources[type].key === this.state.draggedItemKey instead of looking at ownDraggedItemType.

When component mounts, if we're in the middle of a drag and its type and key match draggedItemType and draggedItemKey, we need to establish it as “resurfaced” component instance for this particular drag source. We may want the backend to change its component reference to it. We need to ensure all events that were firing on previous component instance, now fire on this one.

To reiterate, I suggest that drag source can “jump onto” another component if that component has same _dragSources[type].key and original component is dead. We should probably fail hard if there are two components mounted at the same time with the same key (not sure).
I think this should also solve your issue. In your case, the card in another column will receive endDrag, although physically it's a different component.

Okay, I thinK I figured it out.
We will follow react-router's lead and make configureDragDrop static. Each method will accept component as first argument.
If drag source is uncounted while dragging, we will call endDrag with a null component argument.

Changes to the api to make it static are here #56

Fixed in 0.7.0.
@hakanderyal Can you give it a go?

I'm sorry that I couldn't join you guys, crunch time at work for the past week.
I'm hoping to try the new stuff and help wherever I can in a few days.

No problem. Thanks for bringing this to our attention :-)

@gaearon has there been a regression on this?  I'm using 2.3.0 and dragging doesn't work when I unmount the drag source or reorder the children containing the drag source.

@gaearon I'm having almost the same issue as this one. I have a simple sortable list that gets controlled by Redux. The sorting of the list is done almost the same way as this example.
Except the problem is, items can get removed from that list. The state gets updated with a complete new list retrieved from the store with less items. The unmount of the items happens and the dragEnd is not triggered.

Your example makes total sense.
I think we should fire endDrag ourselves if component is removed.
Why does this line not help us?
https://github.com/gaearon/react-dnd/blob/master/modules/utils/NativeDragDropSupport.js#L99

how can we fire endDrag ourselves?

May this can help.

Maybe this can help.


aarch64: mask rotation counts and share more codegen

Given an integer size N, a left rotation of K
places is the same as a right rotation of N - K places. This means we
can use right rotations to implement left rotations too (a left rotation of 32/64 bits operands is now two instructions instead of 5).
The Cranelift's rotation semantics are inherited from WebAssembly, which
mean the rotation count is truncated modulo the operand's bit size. Note
the ROR aarch64 instruction has the same semantics, which is nice (and the reason why only left rotations were incorrect).
@cfallin PTAL!

(The CI failure looks to be from the filetest matching the synthesized sequence that was changed, but that should be an easy fix)

I went ahead and updated the filetest as part of my checkup on test status today -- feel free to steal this:
https://github.com/cfallin/wasmtime/commit/81fcc2d2fe16af9fd584015aaf931b944654a58f


Small improvements / fixes to toxicity example

Changed defaults to match the run that is in the docs, fixed some config entries.

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

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


Bump Netty from 4.1.73.Final to 4.1.84.Final

Why are the changes needed?

Bump Netty to latest version.
https://github.com/netty/netty/pull/12146 explained that netty-tcnative-classes should be optional, otherwise will cause https://github.com/netty/netty/issues/12101
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Thanks, merging to master

cherry picked to branch-1.6 as it is required for https://github.com/apache/incubator-kyuubi/issues/3776