New Feature: Check if template exists

It would be useful to expose a away to determine if a template exists or not. Instead of changing the RazorTemplateEngine, a new type could be introduced that encapsulates the logic in RazorViewToStringRenderer.FindView
I have a use case where I need to generate emails. Parts of an email that may need rendering are:

Subject
Plain Text Body
HTML Body

Some emails may have plain text, some may have html and some may have both. Being safely (without throwing an exception) able to check if a template exists can make this use case easier. I could create a naming convention like:
/views/<template>/subject.cshtml
/views/<template>/text.cshtml
/views/<template>/html.cshtml

Below is a basic non-working example of how this could be used
class EmailContent
{
    public string Subject { get; set; }
    public string? Text { get; set; }
    public string? Html { get; set; }
}

class EmailTemplate
{
    public EmailContent RenderEmailContent(string templateName, object data)
    {
        if (!TemplateExists(templateName, "subject")) throw ...

        EmailContent content = new EmailContent();
        content.Subject = RenderTemplate(templateName, "subject", data);

        if (TemplateExists(templateName,"text")) content,Text = RenderTemplate(templateName, "text", data);
        if (TemplateExists(templateName,"html")) content,Html = RenderTemplate(templateName, "html", data);

        if (string.IsNullOrEmpty(content,Text) && (string.IsNullOrEmpty(content,Html)) throw ...

       return content;
    }
}

var data = ....
EmailTemplate template = ...

EmailContent content = template.RenderEmailContent("ValidateEmail", data);

This could work, but we wound need to ensure the only reason it doesnt render is because the template doesn't exist. If there is a problem rendering it because of a bug (NullReferenceException I am looking at you), then those exceptions should still flow through. I wouldn't want it just to fail and return false because of any random error.

Ok, then we need to be more explicit on the method name. TryRenderIfViewExistsAsync() would be more appropriate. What do you think?

Would it make sense to create a ViewNotFoundException? This exception could inherit from in current InvalidOperationException to maintain backward compatibility. We would change the non "try" version to throw ViewNotFoundException. This helps to distinguish between the library unable to find the view and the user doing something that will throw InvalidOperationException (ie accessing the .Value of a nullable int).
Then keeping the original .TryRenderAsync(viewname, ...) function. Then the FindView function could be refactored or adjusted to be able to try to find the view. If not found, then allow it to throw ViewNotFoundException.
I think the original signature you proposed is a lot cleaner. If we can just adjust the behavior internally to avoid throwing exception internally in the correct flows. Also the ViewNotFoundException could make it easier to use.

That's a good idea! I'll think through it & get back to you.

Just to let you know that I've also stumbled over this. It would be handy to have a way of determining if a view exists or not instead of catching InvalidOperationException and checking if its Message starts with Unable to find view which is brittle.

Thanks for the shout @dradovic! I've been busy all these days due to a job change and other personal commitments. But I'll try to spend some time on this over the coming days or weeks.

Unrelated comment - thanks for a great library! 🥇

I guess this isn't release yet, or is it?

Hey @dradovic, this is not released yet. Required changes are already done but needs some minor cleanup. I'll probably do it this week.

Hey @dradovic @pbolduc
I've published a pre-release package. If anyone gets a chance please try it and let me know how it works for you.
https://github.com/soundaranbu/Razor.Templating.Core/releases/tag/v2.0.0-rc.1
The approach is pretty much similar to what @pbolduc suggested and there's a slight change in the contract. I'm returning a tuple because the out param is not supported in the async method.
Thanks for the support <3

It's too early for me to switch to .NET 9.0. Can you support .NET 8.0, too?

I second that. Not ready for .NET 9 yet.

that's interesting. I never updated any of the dependencies. I'll have a look @dradovic

I updated this sample project to use .NET 8 & v2.0.0-rc.1 of this library https://github.com/soundaranbu/Razor.Templating.Core/tree/main/examples/_RealWorldSamples/Invoice
But I don't find such exceptions. Could you please take a look at this sample & see what differs in your application? @dradovic

I just had a second look. It's all good and the feature works as expected! 🥇
Also, there's no regression according to our tests. So you can release your 2.0.0, AFAIC.
When I tried the last time, I was rushing too fast and instead of upgrading your package, I clicked on Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (as one can see in the error that I pasted above) - thus the NuGet error. My apologies for that.

Thanks @dradovic, I'll release this next week

Stable version has been released now https://github.com/soundaranbu/Razor.Templating.Core/releases/tag/v2.0.0
Thanks to everyone!


Introduce AMDFirmware structure

Firmware implementation and PSPFirmware object shoudl be coupled
together and passed together around: PSPFirmware is obtained from
Firmware, but when passing PSPFirmware around, most of the times
raw firmware bytes are necessary, so a reference to Firmware needs
also to be preserved.

Test plan consists in running sum command on AMD firmware blob:
$ go run cmd/pcr0tool/main.go sum ~/firmware.signed.rom
debugInfo: {
  "config_orig": {
    "Flow": 0,
    "FindMissingFakeMeasurements": false,
    "Registers": [],
    "PCR0DataIbbDigestHashAlgorithm": 4,
    "TPMDevice": 0
  },
  "config_result": {
    "Flow": 6,
    "FindMissingFakeMeasurements": false,
    "Registers": [],
    "PCR0DataIbbDigestHashAlgorithm": 4,
    "TPMDevice": 0
  },
  "detectedAttestationFlow": "LegacyAMDLocality3",
  "warnings": "errors: unable to collect measurement 'pcdFirmwareVendor_measured_data': unable to find the source of firmware vendor version"
}
measurements: [
  {
    "ID": "pcdFirmwareVendor_measured_data",
    "Data": [
      {
        "Range": {
          "Offset": 0,
          "Length": 0
        },
        "ForceData": "HvtrVAwdVUCkrU70vxe4Og=="
      }
    ]
  },
  {
    "ID": "DXE",
    "Data": [
      {
        "Range": {
          "Offset": 5644288,
          "Length": 7397376
        }
      }
    ]
  },
  {
    "ID": "separator",
    "Data": [
      {
        "Range": {
          "Offset": 0,
          "Length": 0
        },
        "ForceData": "AAAAAA=="
      }
    ]
  }
]
Set 0x -> 0x0000000000000000000000000000000000000003

Event 'pcdFirmwareVendor_measured_data': 1efb6b540c1d5540a4ad4ef4bf17b83a (*sha1.digest)
*sha1.digest(0x<PHONE_NUMBER>000000000000000000000000000003 C42FEDAD268200CB1D15F97841C344E79DAE3320) == 0x634B3E0535CC6A07546BAD47A462ABC427BA6D28

Event 'DXE':<PHONE_NUMBER>00000000000000000000007ac07354... (len: 7397376) (*sha1.digest)
*sha1.digest(0x 634B3E0535CC6A07546BAD47A462ABC427BA6D28 4EEC717ADB9E6DD739846C9936869AF72AB0C813) == 0x803156AF3F43DD8B61292C7688F76D1FA98EC6BE

Event 'separator': 00000000 (*sha1.digest)
*sha1.digest(0x 803156AF3F43DD8B61292C7688F76D1FA98EC6BE 9069CA78E7450A285173431B3E52C5C25299E473) == 0x96DD5DC07BB2C11AFB7D614CA43CF8250F62D71F

Resulting PCR0: 96DD5DC07BB2C11AFB7D614CA43CF8250F62D71F

Though, from what I understand this takes the Intel measurements path, so please recommend what's the best way to test AMD PCR0 recalculation.

Though, from what I understand this takes the Intel measurements path, so please recommend what's the best way to test AMD PCR0 recalculation.

I see it says:
"detectedAttestationFlow": "LegacyAMDLocality3",

And from the source code I see:
	case FlowLegacyAMDLocality3:
		return MeasurementIDs{
			MeasurementIDPCDFirmwareVendorVersionData,
			MeasurementIDDXE,
			MeasurementIDSeparator,
		}

So it looks legit.
Also you can enforce a specific flow with flag -flow, for example: -flow LegacyAMDLocality3 or -flow AMDLocality3. These are different flows:
	case FlowAMDLocality3:
		return MeasurementIDs{
			MeasurementIDPSPVersion,
			MeasurementIDBIOSRTMVolume,
			MeasurementIDMP0C2PMsgRegisters,
			MeasurementIDEmbeddedFirmwareStructure,
			MeasurementIDBIOSDirectoryLevel1Header,
			MeasurementIDBIOSDirectoryLevel1,
			MeasurementIDBIOSDirectoryLevel2Header,
			MeasurementIDBIOSDirectoryLevel2,
			MeasurementIDSeparator,
		}

Uh, I realize I forgot a func Firmware() Firmware implementation for AMDFirmware struct. I will add amend and add it, I don't think it requires additional review.

Though, from what I understand this takes the Intel measurements path, so please recommend what's the best way to test AMD PCR0 recalculation.

I see it says:

"detectedAttestationFlow": "LegacyAMDLocality3",

And from the source code I see:

	case FlowLegacyAMDLocality3:

		return MeasurementIDs{

			MeasurementIDPCDFirmwareVendorVersionData,

			MeasurementIDDXE,

			MeasurementIDSeparator,

		}

So it looks legit.
Also you can enforce a specific flow with flag -flow, for example: -flow LegacyAMDLocality3 or -flow AMDLocality3. These are different flows:

	case FlowAMDLocality3:

		return MeasurementIDs{

			MeasurementIDPSPVersion,

			MeasurementIDBIOSRTMVolume,

			MeasurementIDMP0C2PMsgRegisters,

			MeasurementIDEmbeddedFirmwareStructure,

			MeasurementIDBIOSDirectoryLevel1Header,

			MeasurementIDBIOSDirectoryLevel1,

			MeasurementIDBIOSDirectoryLevel2Header,

			MeasurementIDBIOSDirectoryLevel2,

			MeasurementIDSeparator,

		}

@rihter007 : Do we have auto-detection for Legacy/non-Legacy in AMD?

No, we don't, it is based on psp version and is done internally.
But I have to add a couple of amd specific measurements to the legacy flow


Swiper Slide Style Won't Bind

Awesome Swiper 4.1.1 Vue 2.6.12
When I go to another page and refresh it around 5 times and come back to the page that I used swiper in it, swiper slide style won't work.
normally it has a element style width that makes swiper to show 5 slide in it but when it doesn't apply it shows a big single slide with width of 100% that I applied to it.

@neokazemi can you provide a code sandbox example? It may be an issue with swiper initialization. You can try updating it in mounted hook, something like:
mounted() {
      this.$nextTick().then(() =>  this.mySwiper?.update())
    },

It didn't work, I fixed it with removing "display: flex" from it's parent element.

@neokazemi can you provide a code sandbox example? It may be an issue with swiper initialization. You can try updating it in mounted hook, something like:
mounted() {
      this.$nextTick().then(() =>  this.mySwiper?.update())
    },


Finish styling CPU chart on Dashboard

Align CPU and process tables correctly on main Dashboard

CPU chart styling on main dashboard is now complete


maven-publish-plugin adoption

This probably isn't good enough to be merged but I think it could do with some review. I'm happy enough with the individual modules but the shading logic bothers me. I'm starting to lean towards replacing the shadow plugin with something homegrown since it seems to be lacking somewhat when it comes to creating partial shades, and interacting nicely with other plugins (e.g. bnd).

maybe you shoudl add a specific commit for the new transaction module ?

Closing this aborted attempt.


replace glfw with winit

I think this would be a first step towards android/ios support, since winit already supports those platforms.

I'll look into it. Thanks for your suggestion

I took a stab at doing it myself. I'm having the issue that present is never called, if I replace clear_current with present it shows a FAB. Do any of the plugins need to be working for present to be called?

So the winit port works on wayland and x11. Getting it to work on android is going to be a chunk more work, the winit android backend is currently unmaintained and needs some attention.

Only thing missing is copying the assets from the apk to the fs before starting flutter. Will be opening pr's next week

Wow. Can't wait to try this on android. I have less experience on IOS. I wonder how much more work is needed to have this working on IOS?

winit/glutin currently have support for ios, but I haven't tried it. The flutter engine would need to be cross compiled with the embedder api enabled and there is a cargo plugin called cargo-lipo that would take care of building an ios app. Ideally very little code would be needed, just some platform specific loading of assets, but I've never used ios so I don't know.


Code samples in documentation don't match up with the template provided by VSC's Function Creation

Documentation:

Function creation:

Currently, the connection where any changes made to the code in the template should be reproduced in the docs is broken and these will be updated but that connection needs to be rebuilt/retained.

The templates used by VS Code come from here:
https://github.com/Azure/azure-functions-templates
And if you look at the doc site, it usually has a link to a GitHub repo at the bottom for filing an issue. Something like this:
https://github.com/MicrosoftDocs/azure-docs
I'm not sure which template is right or even if they need to be the same, but I would suggest filing an issue in one of those repos if you want them to match.

The templates used by VS Code come from here:
https://github.com/Azure/azure-functions-templates
And if you look at the doc site, it usually has a link to a GitHub repo at the bottom for filing an issue. Something like this:
https://github.com/MicrosoftDocs/azure-docs
I'm not sure which template is right or even if they need to be the same, but I would suggest filing an issue in one of those repos if you want them to match.

Thanks @ejizba I'll let the docs team know but right now a lot of the code samples are mismatched for https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python and the output/input bindings, and triggers.  Thanks!

Thanks @ejizba I'll let the docs team know but right now a lot of the code samples are mismatched for https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python and the output/input bindings, and triggers.  Thanks!


Remove deprecated CompileOptions.annotationProcessorGeneratedSourcesDirectory property

https://github.com/gradle/gradle/issues/15681

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

Some internal discussion here: https://gradle.slack.com/archives/CDYR952SH/p1660655402710799

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test this

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@gradle/bt-core - After updating this branch with the current state of master, I believe all the previous issues are resolved and it is ready to merge.

@bot-gradle test and merge

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test and merge

Your PR is queued. See the queue page for details.

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test and merge

OK, I've already triggered a build for you.

  We're not going to make it so Gradle 8.0 only works with the latest IntelliJ

Superseded by https://github.com/gradle/gradle/pull/23071


Improve tag_from_archive

This PR add a couple test and minor robustness improvements to the parsing of archive URLs.
It used to crash on empty archive fields and although this should not happen, better be safe than sorry.

lgtm, i've hit that empty archive crash myself!


context: Add cleanup function for kbfs socket

This first cleans up any existing socket files before trying to bind to it.
I'd like a review by @oconnor663 and one of the KBFS folks.

My plan will be to immediately (like, this afternoon) add in a short-circuit similar to this one: https://github.com/keybase/client/blob/173f21f/go/service/main.go#L721-L725
If that sounds ok to you, this LGTM.

That's fine, but I'd guess that it'll never be hit in KBFS.

That branch is always hit in the systemd configuration we're shooting for. Systemd will provide the listen fd the same way, whether the service is actually started through socket activation, or just with systemctl start .... As long as a .socket file exists for the service, systemd will always provide the socket.
I think you're right that we'll probably never sock-activate kbfs. But setting things up this way makes startup a little bit smoother (even though we're robust to it being racy), and it seems to be the way systemd wants it to happen, so I'm running with it :)

Sounds good. Please CC me on relevant reviews, I'm interested in following along.

With this change, does it mean we are not reusing existing socket file or systemd's socket activation?

@songgao see https://github.com/keybase/kbfs/pull/1300. In the systemd environment we'll skip this codepath entirely.


Added database engine and version to System Info (task #5473)

Codecov Report

Merging #488 into master will increase coverage by 0.27%.
The diff coverage is 92.3%.

@@             Coverage Diff             @@
##             master    #488      +/-   ##
===========================================
+ Coverage     30.23%   30.5%   +0.27%
- Complexity      851     854       +3
===========================================
  Files            80      80
  Lines          2891    2904      +13
===========================================
+ Hits            874     886      +12
- Misses         2017    2018       +1

Impacted Files
Coverage Δ
Complexity Δ

src/SystemInfo/Database.php
90.9% <92.3%> (+0.9%)
8 <3> (+3)
: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 f429e08...f66459b. Read the comment docs.


Back to form page

Is your feature request related to a problem? Please describe.
Some Bridges can have a quite complex configuration. Think for example FeedMerge.
It's quite common that I need to tweak the settings. However, I can't go easily go back to the form. For example, here is a link: https://rss-bridge.org/bridge01/?action=display&bridge=FilterBridge&url=https%3A%2F%2Frss.slashdot.org%2FSlashdot%2FslashdotMain&filter=foo.*asd%2F%2F(mp3)%3F&filter_type=permit&target_title=on&length_limit=-1&format=Html
now, how do you go back to the form page, so that you can change the regexp easily?
Describe the solution you'd like
I'd like the blue button which says  "← back to rss-bridge" to bring me to a form which is filled with the right information.
Describe alternatives you've considered
I tried just copy-pasting. This is not only very tedious, but requires urldecode() to be run on every value. That's just too boring :)

this is a known problem. see https://github.com/RSS-Bridge/rss-bridge/issues/2735
also a month later i also might want to reconfigure a feed in my feed reader.
perhaps the feed home_page_url should point to the html format output (which again links to reconfigure link)


Resubmit Under FS module extraction (Tachyon 221)

Resubmitting this yet again (previously #729)
Rebased yet again against latest master and addressed the Javadoc formatting issues

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

It feels like there is still some weirdness going on with line length

Does it make sense to use TachyonURIs to represent paths instead of strings?

First pass looks good to me. Makes the code easier to follow.
+1 for first drop

Please also update the end of this document: https://github.com/amplab/tachyon/blob/master/docs/Setup-UFS.md

@rvesse  Thanks for doing this! I did a pass and left some comments.

Closing until I have time to address PR comments, this will probably be next week


Hide resources (strings, ids, colors, etc) from autocomplete.

If you add the debug-artist to your project then you start seeing colors and ids in autocomplete for ids, for colors resouces, etc...

Good docs about it: https://www.youtube.com/watch?v=_Rox-HXhRfI&feature=youtu.be&t=144


Set sysroot/lib in dylib path when running custom subcommand

Problem
I have a cargo subcommand that depends on rustc-dev internals, to properly run these, users need to assure that the sysroots libraries are visible when executing the command as
cargo subcommand command
Proposed Solution
in https://github.com/rust-lang/cargo/blob/9fa2bba6791f9df06a13dbfe18bf7add9b9b2d1b/src/bin/cargo/main.rs#L176
do the same operation that cargo run does to set the dylib path. E.g add the active toolchains sysroot/lib to the path
Notes
I stumbled upon this developing cargo-whynot which uses rustc_driver etc to call rustc in a custom way. I did not have the sysroot libraries in path, so running cargo whynot could not load, but when in the local workspace cargo run -- whynot worked fine. In particular, I'm on windows, setting LD_LIBRARY_PATH to "$(rustc --print sysroot)/lib:$($env:LD_LIBRARY_PATH)" solved the issue.
cargo run -- subcommand sets the appropriate path, but cargo subcommand does not.

I don't think this is something cargo can do because it requires some non-trivial overhead. In order to discover the sysroot, cargo needs to run rustc --print=sysroot which can take tens or hundreds of milliseconds.  Additionally, assuming you mean you are linking against the rustc_driver shared library or similar, then the appropriate sysroot will depend on the toolchain used to compile your program, which often won't match the current sysroot due to rustup overrides. I'm not sure I have an answer, but I suspect you'll need to do some rpath shenanigans to get it to work reliably. You may want to ask on one of the user forums if and how people have gotten it to work. This I believe is how clippy and other tools do it.


task 1: 'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128)

While running task1a in ubuntu bash in windows 10 I am getting:

[I] DCASE2018 / Task1A -- Acoustic scene classification
[I]
[I] General information
[I] ========================================
[I]   Parameter set
[I]     Set ID                          : dcase2018_baseline
[I]     Set description                 : DCASE2018 baseline / Development setup
[I]   Application
[I]     Overwrite                       : False
[I]     Dataset                         : TUT-urban-acoustic-scenes-2018-development
[I]     Active folds                    : [1]
[I]
[I]   DONE
[I]
[I] Feature Extraction
[I] ========================================
[I]   DONE       [0:00:00.968335]
[I]
[I] Feature Normalization
[I] ========================================
[I]   Fold [1]
[I]   DONE       [0:00:00.000460]
[I]
[I] Learning
[I] ========================================
[I]   Fold [1]
[I]   DONE       [0:00:00.000478]
[I]
[I] Testing
[I] ========================================
[I]   Fold [1]
'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128)

Python 2 has no problem with this line. Is the code buile for python 2 or 3?
In python 2 I am getting:

[E] Uncaught exception  (logging.py:221)
Traceback (most recent call last):
File "task1a.py", line 1204, in
sys.exit(main(sys.argv))
File "task1a.py", line 234, in main
overwrite=overwrite
File "task1a.py", line 982, in do_testing
if keras_model.get_config()[0]['config']['data_format'] == 'channels_first':
KeyError: 0

Is this a versions issue?

Task1 baseline is no longer actively maintained as we are currently focusing on baseline systems for DCASE2019 challenge. Baseline systems were developed against versions defined in requirements.txt and newer versions might have breaking changes. The task1 baseline system should work equally well in python 2.x and 3.x. The system was tested in limited fashion on Windows, however, main development is done in Linux.
First issue is some unicode issue which cannot be tracked down based on current print out. Remove try/except block from main code file (https://github.com/DCASE-REPO/dcase2018_baseline/blob/master/task1/task1a.py#L1195) to see actual error.
Second issue is related Keras version, baseline system has been developed for v2.1.5 and v2.2.3 had breaking change for get_config method (https://github.com/keras-team/keras/releases/tag/2.2.3). In DCASE2019 task 1 baseline this has been solved, see > https://github.com/toni-heittola/dcase2019_task1_baseline/blob/master/task1a.py#L972


prime_factor

What the program do ?
it finds the prime factors of any number
In what programming language it is written?
it is written in python

This pull request do not contains files in specific folders. Please fix it and reopen


Issue in the search grid - HIP application

We have  a search functionality in HIP application which is built on top of NIMBUS. We have used @ViewConfig.Grid to display the sub rows in search results. After each search when we expand the sub row and then clear the results and search again - results are not getting rendered into UI. This is the exceptional scenario and back end logic is working and results are fetched and set to the front end but not get displayed. We can see this results when we go to some other screen and come back to member search. Please help us on resolving this issue

Team is not able to reproduce issue. A demo is needed.


Support conversion to MiniOCR

Minimal-noise OCR format for full text indexing https://dbmdz.github.io/solr-ocrhighlighting/formats/#miniocr

Moved to https://dbmdz.github.io/solr-ocrhighlighting/0.8.3/formats/#miniocr


Update Org Text

This patch updates the nav bar's organization text to read "{code} by Dell EMC". Related to codedellemc/rexray#770

Codecov Report

Merging #472 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #472      +/-   ##
==========================================
- Coverage   30.61%   30.55%   -0.06%
==========================================
  Files          29       29
  Lines        1777     1777
==========================================
- Hits          544      543       -1
- Misses       1175     1176       +1
  Partials       58       58

Impacted Files
Coverage Δ

api/types/types_localdevices.go
77.35% <0%> (-1.89%)
:arrow_down:

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 fb3bf2e...0ab9f21. Read the comment docs.


HDDS-8285. Eliminate leftover Guava Optional from CacheValue

What changes were proposed in this pull request?
HDDS-7969 improved CacheValue to avoid use of Optional.  It replaced the old constructor with the new factory methods only in a few places.  This change replaces all remaining usage, but keeps the deprecated constructor (can be removed in the future).
https://issues.apache.org/jira/browse/HDDS-8285
How was this patch tested?
Regular CI:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/4531321429

Thanks @szetszwo for reviewing and committing it.


Google not working

Describe the bug
When trying to login with google nothing happens.
It does not show that there is an error with the client_id or something else
"reactjs-social-login": "^2.0.1"

Sorry, My client_id on example web is invalid but it's working normally on this library


outFile option doesn't work

Hello,
i created the following gulp task:
gulp.task('compile', function () {
  return gulp.src(['dist/**/*.ts', 'typings/**/*.d.ts'])
    .pipe(tsCompiler({
      noImplicitAny: true,
      experimentalDecorators: true,
      outFile: 'output.js'
    }))
    .pipe(gulp.dest(paths.dist));
});

The output file doesn't contains my code. Here is the content:
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

If i remove the outFile option after compiling i get a correct Javascript file for every Typescrypt file, and all is ok.
But i would concatenate all JS into one file. So, what's wrong with outFile option?

Can you share your project?

Sure, what file do you need? Here is my gulpfile: http://pastebin.com/AwK4FRuC

Hello, any news?

Haven't had time to take a look at this, though it would be useful if you could upload a whole project, or create and upload a minimal example that reproduces this problem. You can upload a .zip file on GitHub.

Here is my whole project (it is my first Angular2 app):
myFirstApp.zip

The problem is that you cannot/should not set outFile when using the commonJS module system. CommonJS files cannot bundled in one file, the only thing that can be written is the __decorate function. outFile can only be used with module: "systemjs" or module: "amd". For CommonJS modules you have to remove the outFile option and use webpack, browserify or rollup to bundle your files.

I am migrating one javascript application that compiles just fine with browserify. It has an entry point app.js with several require calls to load my libraries and my Angular application.
Since tsc can compile javascript files and generate a single output file, I thought I'd better remove browserify at all. The problem, though is that using outFile option is not changing the behavior of the gulp-typescript plugin: the require does not make the compiler to include the required module.
I can compile to the single file using tsc directly on command line, so I think that maybe it's related to the plugin.

I'm not sure what you mean, but TypeScript can (currently) not bundle commonjs files (e.g., files with require, exports and module.exports). It can only bundle AMD and SystemJS files, and files with no module system. So I'm not sure what tsc does, can you give some concrete example? So a small example with the source files, tsconfig, and gulpfile.

Unfortunately, I cannot share enough code, due to licence constraints. Alternatively, could you, please, suggest any Gulp setup or pattern to avoid browserify and still generating a single bundle (js+map)?

You could use small, a module bundler that I wrote. It supports source maps. It's a bit experimental though. You can use it like this:
var gulp = require('gulp');
var typescript = require('gulp-typescript');
var small = require('small').gulp;
var sourcemaps = require('gulp-sourcemaps');

var tsProject = typescript.createProject('lib/tsconfig.json');

gulp.task('compile', function() {
	return gulp.src('lib/**/*.ts')
		.pipe(sourcemaps.init())
		.pipe(typescript(tsProject))
		.pipe(small('index.js', {
			externalResolve: ['node_modules']
		}))
		.pipe(sourcemaps.write('.'))
		.pipe(gulp.dest('static/scripts'));
});

Thank you for your example, @ivogabe, but I think you'd understand my reluctance to integrate a experimental plugin into my build process. The Typescript compiler, itself, does this job, so I expected gulp-typescript plugin would forward this functionality.

I'm not sure what you mean with 'the typescript compiler does this job', since TypeScript does not support the combination module: "commonjs", outFile: "...". gulp-typescript just passes these options to TypeScript, so that should give the same behaviour. Can you share your tsconfig file? Then I might have a better idea of what you mean.


Unable compare value from records array

I need to create a join of 2 BQ tables where one of them has an id field that has to be compared with the record id in the repeated field (array of records) of another one. I'm struggling with SQLAlchemy implementation of the SQL query that works fine. Tried to solve this problem in different ways, but nothing was successful, most relevant and similar to sql-like solution above. Probably, there are some troubles with sqlalchemy interpretation of SQL queries or result fetch either, aren't?
Environment details

OS type and version: MacOS, 12.0 beta
Python version: 3.9.1
pip version: 21.1.2
google-cloud-bigquery version: 2.22.1

Steps to reproduce

Create the BQ table Mock with fields:

name: mock_id | type: STRING | mode: NULLABLE

Create the BQ table AnotherMock with fields:

name: objects | type: RECORD | mode: REPEATED

name: object_id | type: STRING | mode: NULLABLE

Run code above (It gonna fail).

Run SQL above (it gonna success).

SQL example
SELECT *
FROM db.dataset.mock mock
INNER JOIN (SELECT another_mock_objects FROM db.dataset.another_mock, UNNEST(objects) as another_mock_objects) another_mock
ON mock.mock_id = another_mock.another_mock_objects.object_id

Code example
 subquery = session.query(
    func.unnest(another_mock_model.c.objects).label('another_mock_objects')
).subquery()

session.execute(
    select([]) \
        .select_from(
            mock_model
                .join(
                    another_mock_model,
                    subquery.c.another_mock_objects.object_id == mock_model.c.mock_id,
                )
        )
)

Stack trace
AttributeError: 'Comparator' object has no attribute 'object_id'

@fallncrlss could you please share the SQLAlchemy model definitions you used for the code examples?

@fallncrlss could you please share the SQLAlchemy model definitions you used for the code examples?

In my case, due to some limitations of business logic, I should define SQLAlchemy BQ models dynamically like the example below:
from sqlalchemy import create_engine, Table, MetaData

engine = create_engine('BQ_CONNECTION_URL', pool_size=POOL_SIZE)
SomeTable = Table('some_table_name', MetaData(bind=engine), autoload=True)

@fallncrlss please share the code you used to define Mock and AnotherMock (or whatever you actually named them).  I think I know what's going on, but being able to reproduce what you did exactly would help to be sure and reduce the chance of wasting everyone's time.

There are two issues.

Currently, record/struct data are exposed to SQLAlchemy as JSON.  So, to access your record fields, you need to use mapping syntax.
For example, given a table containing structs with an object_id field, to select find records with an object id of 'x':
select([mock_structs], mock_structs.c.object['object_id']=='x')

To use unnest, you have to use alias, rather than label:
subquery = session.query(
    func.unnest(another_mock.c.objects).alias('another_mock_objects')
).subquery()

However, there's a big in handling of unnest: #283

@fallncrlss please share the code you used to define Mock and AnotherMock (or whatever you actually named them). I think I know what's going on, but being able to reproduce what you did exactly would help to be sure and reduce the chance of wasting everyone's time.

Mock and AnotherMock model schemas define directly in BigQuery, and in the code I define them dynamically as in the example above using Table and the table names.

@fallncrlss please share the code you used to define Mock and AnotherMock (or whatever you actually named them). I think I know what's going on, but being able to reproduce what you did exactly would help to be sure and reduce the chance of wasting everyone's time.

Mock and AnotherMock model schemas define directly in BigQuery, and in the code I define them dynamically as in the example above using Table and the table names.

OK, fair enough. Then I think I reproduced your scenario.

More info on what I said about using alias:
Some references invoking functions like unnest:

alias, https://docs.sqlalchemy.org/en/14/core/functions.html#sqlalchemy.sql.functions.FunctionElement.alias
Note, in particular, the need to tack on .column, which is kind of weird.
An alternative...

column_valued , https://docs.sqlalchemy.org/en/14/core/functions.html#sqlalchemy.sql.functions.FunctionElement.column_valued

See: https://docs.sqlalchemy.org/en/14/tutorial/data_select.html#tutorial-functions-table-valued

1. Currently, record/struct data are exposed to SQLAlchemy as JSON.  So, to access your record fields, you need to use mapping syntax.

Well, that doesn't work either. :( https://github.com/googleapis/python-bigquery-sqlalchemy/issues/293

@fallncrlss see
https://github.com/googleapis/python-bigquery-sqlalchemy/blob/f6d27990e782f0630a60bbbed48efc987e0bbdf3/tests/system/test__struct.py#L158-L166
for an example of how to do what you want to do with sqlalchemy-bigquery 1.2.0 or later.
Note that dot notation now works if the name doesn't conflict with an internal name, so:
subquery.c.another_mock_objects.object_id == mock_table.c.mock_id
and if there's a chance of a conflict, you can use upper case to disambiguate:
subquery.c.another_mock_objects.OBJECT_ID == mock_table.c.mock_id


No disassembly for compressed instructions

The function used for disassembling is not implemented: https://github.com/CTSRD-CHERI/QuickCheckVEngine/blob/cea1f331cf821f3e1590bf455062d28b19a67ce3/src/RISCV/RV_C.hs#L213-L215

Addressed by https://github.com/CTSRD-CHERI/QuickCheckVEngine/pull/54. Thanks @elliotb-lowrisc! If people need any more elaborate compressed support, let's open more specific issues.


[Do NOT merge] Update cc API usage

This is the fix related to: https://github.com/bigchaindb/cryptoconditions/pull/15
We can merge as soon as cc was pushed to pipy.

I'm guessing the tests fail because of the cc version that's not created, hence not on pip

can you also have a look at docs/servers/python-server-api-examples.md ?

I'm guessing the tests fail because of the cc version that's not created, hence not on pip

right, they'll pass once cc was updated on pip and this branch's cc version is bumped

can you also have a look at docs/servers/python-server-api-examples.md ?

sure!

you may remove
https://github.com/bigchaindb/bigchaindb/pull/373/files#diff-aa177506e0b8b2feca9e5257590163e3R538

otherwise :+1:

if @r-marques approves, then you can merge

:+1:


Content-Type is text/x-go on go master branch, why?

What version of Go are you using (go version)?

$ go1.16\go1.15 is ok
$ go master branch is error

Does this issue reproduce with the latest release?
go master branch can reproduce
What operating system and processor architecture are you using (go env)?
go env Output
$ go env

What did you do?

here: https://github.com/gin-gonic/gin/blob/master/context_test.go#L1012
func TestContextRenderFile(t *testing.T) {
    w := httptest.NewRecorder()
    c, _ := CreateTestContext(w)

    c.Request, _ = http.NewRequest("GET", "/", nil)
    c.File("./gin.go")

    assert.Equal(t, http.StatusOK, w.Code)
    assert.Contains(t, w.Body.String(), "func New() *Engine {")
    assert.Equal(t, "text/plain; charset=utf-8", w.Header().Get("Content-Type"))
}

What did you expect to see?
Content-Type is text/plain; charset=utf-8
What did you see instead?
Content-Type is text/x-go; charset=utf-8

Can you debug your source code to find out where text/x-go; charset=utf-8 is from? Please note that mime type is system-dependent.
https://github.com/golang/go/blob/a72622d028077643169dc48c90271a82021f0534/src/mime/type.go#L92-L109
BTW, unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions

As mentioned above, the returned content type depends on the mime database installed on the host system


HTML autocomplete and intellisense not working in template files.

it not working in .blade.php file type.

intellisense not working but Emmet working great

We defer support for lesser known languages like this (and PHP) to extensions https://marketplace.visualstudio.com/vscode


Idempotence

This PR makes the role idempotent and fixes two small typo issues in the ssl_reload_command

Good job on this PR :ok_hand:. I have looked at the changes and they look good to me :)

Thanks for the amazing job, I merge it right now !


Update using-messages-and-message-queues.md

add syntax highlighting

@DJm00n : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

@hickeys is this already merged?

#sign-off


CBC Encryption with Fixed IV in Encrypt Function

Describe the problem
I've discovered that the CBC encryption mode implemented in the Encrypt function located in the crypt.go file (part of the github.com/netbirdio/netbird/management/server/activity/sqlite package) utilizes a static initialization vector (IV). This practice is known to compromise the security of the encrypted data, as using a predictable IV can lead to pattern leaks and potentially allow attackers to infer information about the plaintext.
Expected behavior
For security purposes, each encryption operation should utilize a unique and unpredictable IV, maybe it can derived from the key.
NetBird version
<=0.28.4
Screenshots
      var iv = []byte{10, 22, 13, 79, 05, 8, 52, 91, 87, 98, 88, 98, 35, 25, 13, 05}
      func (ec *FieldEncrypt) Encrypt(payload string) string {
          plainText := pkcs5Padding([]byte(payload))
          cipherText := make([]byte, len(plainText))
          cbc := cipher.NewCBCEncrypter(ec.block, iv)
          cbc.CryptBlocks(cipherText, plainText)
          return base64.StdEncoding.EncodeToString(cipherText)
      }

Hi @nyxfqq,
thanks for reporting this. We work on a migration to some authenticated encryption cipher with proper iv usage.


Web component: Card group - on mobile & tab cards are not stretched to full page.

Detailed description
Issue: On mobile & tab cards are not stretched to ends of screen size.
Additional information

#4379 seems to address this issue.


Migrate project to TypeScript

Related from https://github.com/vaadin/vaadin-router/issues/362#issuecomment-523023663:

Converting the router code itself to TS is on the roadmap, but is not a priority at the moment. It's going to be a considerable effort to rewrite the full code base.
The good thing is that the TypeScript compiler does accept untyped JS code so the change can be gradual.
The bad thing is that the API docs and demos on GitHub pages currently rely on polymer analyzer. And that would likely break when switching to TypeScript because it JSDoc-annotated JS code as input.
Generating the API docs and demos site from TypeScript is a separate task: #363. Once there is a working solution to it then conversion to TypeScript can proceed.

Migration

[ ] Convert tests - #362
[ ] Convert API docs and demos #363
[ ] Convert source code

Related from https://github.com/vaadin/vaadin-router/issues/362#issuecomment-523023663:

Converting the router code itself to TS is on the roadmap, but is not a priority at the moment. It's going to be a considerable effort to rewrite the full code base.
The good thing is that the TypeScript compiler does accept untyped JS code so the change can be gradual.
The bad thing is that the API docs and demos on GitHub pages currently rely on polymer analyzer. And that would likely break when switching to TypeScript because it JSDoc-annotated JS code as input.
Generating the API docs and demos site from TypeScript is a separate task: #363. Once there is a working solution to it then conversion to TypeScript can proceed.


Add new crc32 tests and optimized crc32 for POWER

Hi,
This PR adds an optimized version of the crc32 function for POWER processors. This is a port of madler/zlib#478 to zlib-ng. The algorithm is mostly intact, as originally developed by @racardoso and added to the original zlib by @grooverdan.
While preparing this PR, I also found some issues in the way $ARCH was detected on the CI using CMake, so I added a fix.
This PR also adds new crc32 tests that can be used by all targets.
I'm marking this as a Draft PR for a few reasons:

I had to slightly change the crc32_power8 function API to match zlib-ng's, but there may be still some small changes to be made. So I'd like some feedback on that (@racardoso).
I'm unsure about the correct line to setup the pointer for crc32_power8 on functable.c as it's not quite clear to me what if (sizeof(void *) == sizeof(ptrdiff_t)) is checking.
I kept the addition of the new tests + optimized function in the same commit as it was in the original PR. But I can split those into two if you prefer.

To measure the performance improvement, we used Chromium's zlib_bench.cc with input files from jsnell/zlib-bench.
The results below show compression and decompression throughput in MB/s using gzip wrapper, for all compression levels:
======== File 'executable' ========

 Wrapper 'gzip'

          |   compression throughput (MB)    |  decompression throughput (MB)   |
  | level | default | crc32-power |     gain | default | crc32-power |     gain |
  |     1 |    90.0 |       101.7 |  +13.00% |   187.1 |       254.7 |  +36.13% |
  |     2 |    59.9 |        65.2 |   +8.85% |   169.3 |       228.4 |  +34.91% |
  |     3 |    50.6 |        54.7 |   +8.10% |   174.3 |       237.4 |  +36.20% |
  |     4 |    46.0 |        49.3 |   +7.17% |   178.5 |       244.6 |  +37.03% |
  |     5 |    42.3 |        44.6 |   +5.44% |   180.0 |       247.4 |  +37.44% |
  |     6 |    36.2 |        37.9 |   +4.70% |   181.0 |       249.3 |  +37.73% |
  |     7 |    21.3 |        22.0 |   +3.29% |   182.5 |       251.9 |  +38.03% |
  |     8 |    14.1 |        14.4 |   +2.13% |   182.9 |       252.4 |  +38.00% |
  |     9 |     9.2 |         9.4 |   +2.17% |   183.1 |       252.8 |  +38.07% |

======== File 'pngpixels' ========

 Wrapper 'gzip'

          |   compression throughput (MB)    |  decompression throughput (MB)   |
  | level | default | crc32-power |     gain | default | crc32-power |     gain |
  |     1 |   128.5 |       159.6 |  +24.20% |   253.7 |       398.3 |  +57.00% |
  |     2 |   111.3 |       132.0 |  +18.60% |   265.8 |       430.4 |  +61.93% |
  |     3 |    81.1 |        92.3 |  +13.81% |   288.3 |       495.1 |  +71.73% |
  |     4 |    71.8 |        80.8 |  +12.53% |   286.4 |       490.3 |  +71.19% |
  |     5 |    54.9 |        59.3 |   +8.01% |   306.4 |       551.1 |  +79.86% |
  |     6 |    29.9 |        31.3 |   +4.68% |   327.0 |       617.9 |  +88.96% |
  |     7 |    16.7 |        17.1 |   +2.40% |   326.8 |       613.5 |  +87.73% |
  |     8 |     5.3 |         5.3 |   +0.00% |   331.3 |       631.0 |  +90.46% |
  |     9 |     2.5 |         2.5 |   +0.00% |   332.1 |       635.4 |  +91.33% |

======== File 'jpeg' ========

 Wrapper 'gzip'

          |   compression throughput (MB)    |  decompression throughput (MB)   |
  | level | default | crc32-power |     gain | default | crc32-power |     gain |
  |     1 |    56.7 |        62.0 |   +9.35% |   155.2 |       199.7 |  +28.67% |
  |     2 |    26.1 |        27.2 |   +4.21% |   527.7 |      2276.4 | +331.38% |
  |     3 |    26.1 |        27.2 |   +4.21% |   527.7 |      2270.9 | +330.34% |
  |     4 |    22.1 |        22.9 |   +3.62% |   527.8 |      2275.2 | +331.07% |
  |     5 |    22.1 |        22.9 |   +3.62% |   527.6 |      2269.5 | +330.16% |
  |     6 |    22.1 |        22.9 |   +3.62% |   527.8 |      2275.9 | +331.21% |
  |     7 |    25.6 |        25.6 |   +0.00% |   527.9 |      2278.2 | +331.56% |
  |     8 |    25.6 |        26.7 |   +4.30% |   527.5 |      2278.2 | +331.89% |
  |     9 |    25.6 |        25.5 |   -0.39% |   527.8 |      2277.3 | +331.47% |

======== File 'html' ========

 Wrapper 'gzip'

          |   compression throughput (MB)    |  decompression throughput (MB)   |
  | level | default | crc32-power |     gain | default | crc32-power |     gain |
  |     1 |    81.0 |        91.4 |  +12.84% |   164.2 |       215.1 |  +31.00% |
  |     2 |    61.9 |        67.9 |   +9.69% |   191.3 |       261.6 |  +36.75% |
  |     3 |    47.7 |        51.2 |   +7.34% |   199.5 |       277.4 |  +39.05% |
  |     4 |    45.9 |        49.0 |   +6.75% |   203.6 |       286.0 |  +40.47% |
  |     5 |    41.6 |        43.7 |   +5.05% |   205.5 |       289.1 |  +40.68% |
  |     6 |    34.6 |        36.3 |   +4.91% |   206.9 |       291.7 |  +40.99% |
  |     7 |    22.3 |        23.0 |   +3.14% |   202.4 |       283.5 |  +40.07% |
  |     8 |    15.7 |        16.0 |   +1.91% |   202.3 |       283.6 |  +40.19% |
  |     9 |    15.4 |        15.7 |   +1.95% |   202.1 |       283.5 |  +40.28% |

@nmoinvaz today the code is dual licensed (GPL / Apache). I'm checking to see what we can do in that regard.

All code should be licensed using zlib license, this avoids any viral effects of licenses like GPL.

Incorporated suggestions from @nmoinvaz and rebased against latest develop branch.

@mscastanho were you able to resolve the licensing issues?

@mscastanho were you able to resolve the licensing issues?

@nmoinvaz No updates on this so far =/ I believe this won't make to the first release.

@nmoinvaz No updates on this so far =/ I believe this won't make to the first release.

This needs a rebase.
Perhaps the crc32 tests could be split out into a separate PR? Looks like there is no licensing problem with that part, and it would be useful for all platforms.

@Dead2 Agreed. I'll split the tests into a separate PR and submit it.
Regarding the license issues for the optimization itself, I haven't been able to sort it out yet.

@Dead2

PR rebased against latest develop.
I was also able to relicense the code to zlib license.
Addition of the tests are in a separa commit now
Removed one commit that was not needed anymore

I believe everything is now ready for review.

Applied many styling changes suggested. I also realized crc32_constants.h could be simplified, as the original file was more generic and had some ifdefs to change the code for different scenarios. But for this case we were always using it the same way, so I removed the ifdefs and macros (REFLECT, CRC_XOR, POWER8_INTRINSICS) and left the corresponding code.

Rebased against latest develop branch.

@mtl1979 @nmoinvaz Do you have any other suggestions?

Rebase.

Sorry, needs another little rebase.

@Dead2 rebase done.

Just needs some approvals now 😉

@Dead2 The patch is quite big, so it takes a long time to review... I might know something about PowerPC/Power intrinsics and how they map to assembler instructions, but other people might be better at looking style inconsistencies...

@nmoinvaz I'm so sorry. I completely missed your last comments 🤦🏼
I  think I addressed all of them, and also rebased against current develop to fix some merge conflicts.

LGTM.

Gentle ping =)

This needs a minor rebase now, sorry 😉

@Dead2 Done =)


introduces mysql migration driver

This is an initial contribution of the MySQL Datastore implementation. It tries to decompose the submission into smaller PRs to help with the review.
What
Implements SpiceDB migration logic to support MySQL as backing datastore
Context
GitHub runs mysql schema migrations at scale using skeema (https://github.com/skeema/skeema) and gh-ost (https://github.com/github/gh-ost). The SpiceDB migration driver for MySQL is designed in a way it is compatible with migration workloads relying on those tools.
The main difference is how the MySQL migration driver maintains the metadata needed to know which version is currently running. The PSQL migration driver follows a pattern similar to what's proposed by SQLAlchemy's Alembic, with a table that keeps track of the migration run. Because Skeema does not support data migrations, and seeding the database
could be considered a data migration, we decided to encode the metadata into the database schema (DML) so we can expose the same information but only relying on schema migrations. As such the migration_version table
is empty, and maintains the running version in a table column. This turns every migration into a pure DML operations, which Skeema understands well.
The way we run these then is by executing spicedb migrate in development DB, and letting skeema detect the changes to the development database. These are then persisted, and deployed using our own internal migration automation build on top of skeema and gh-ost.
The other distinction with the PSQL migration driver is the support for table prefixes. This is necessary to align with our own internal conventions.
Contributors
These series of PRs are the result of the work from various current and former hubbers which I've added as co-authors, in alphabetic order:
@ams11
@chriskirkland
@hagould
@johnpreed
@sbryant

This is now merged as part of https://github.com/authzed/spicedb/pull/525
Closing!


[Request] Republish Lang command

As more functionality gets added etc, more language files get updated, and you dont always ways to republish certain things.
It would be good to get something like php artisan backpack::publish language - which could be extended into php artisan backpack::publish views etc making it more simple for developers to update

That would be nice, yes. But a big issue here is that we need to delete the old files in order to republish. And we don't know if the developer has made any modification to the language files - in which case we'd destroy his work.
I think a good alternative would be a combination of:

not publishing them by default. There has to be a way for us to use language files with fallbacks to the package files, but it didn't work for me. Needs more effort.
a db-backed langfile system, where all language strings are imported and where the developer or admin can translate the files; that way, he wouldn't need to modify the lang files at all and we can overwrite them; that's the LangFileManager rewrite I was talking about;

I did read about this here -> https://laravel.com/docs/5.3/localization#overriding-package-language-files maybe its just the files are stored in the wrong structure so the waterfall effect isnt working correctly.

guess the most annoying thing about that is migrations, unless you create a seeder to populate your langs, would be even more annoying to sync them :(

Ok, so I've spent too much time on this already. My conclusion is this: we can only fix the langfile loading problem in the next breaking change.
The fix is easy to implement, but difficult for updaters. Basically, the issue is that in every package, we're loading the langfiles with the same namespace (or hint), "backpack". So only the last installed package actually gets its langfiles loaded.
In order to fix this we need to:

In every package, change how translations are loaded in the service provider. For CRUD, for example:

- $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'backpack');
+ $this->loadTranslationsFrom(realpath(__DIR__.'/resources/lang'), 'crud');

- $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack')], 'lang');
+ $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack/crud')], 'lang');

In the views, change all language translation strings:

- {{ trans('backpack::crud.admin') }}
+ {{ trans('crud::crud.admin') }}

This will fix it for new users - translation strings will first be loaded from the published ones, then fall back to the ones in the package.
But we also need to instruct ALL existing users to:
3) Change the language translation strings in any views they've overwritten.

I am not happy at all with this solution. My main two reasons are:
A) I don't like it that you load translations strings by calling "crud" two times:
{{ trans('crud::crud.admin') }}

I don't like it at all. But I guess I can get over this.
B) It will be very very difficult for users to do this update to their views and translation directory structure, just because I messed up... So the only honest thing to do here would be to create a script to automate that for them. Four scripts, actually:

one that basically does replace_all in the views
one that basically nests the folders deeper in the lang directory

(each script in two flavours: unix and windows)

This does not sound like fun, but I'm afraid we need to fix this, because we'll be pushing new language lines in the package.
Does anybody have another solution? Please? Pretty please?

@tabacitu this needed for 3.2?

Yes, I think that's a good moment to do it too.

Added to consolidation list https://github.com/Laravel-Backpack/CRUD/issues/285


fix: Do not load widget if outside nb

Changes proposed in this pull request:

do not load js widgets and css things as a side effect of the import of hiddenupdate widget

@eendebakpt @peendebak  give it a shot

@giulioungaretti works fine here


Requesting configuration for Thinkpad A485

I am new to NixOS Community, finally made my jump from manjaro to nix. I am not able to find a profile ready to be used with my laptop Thinkpad A485. I am using Thinkpad T495  since they beling to same lineup. I am facing the problem where once the system is put to sleep, it will not wake up. It is a request to add one config for A485.

If you're able to to do Ctrl+Alt+F1 to get to the tty, this is likely a video driver issue.

Seeing as this is an AMD laptop, make sure your kernel is >=5.4

If you're able to to do Ctrl+Alt+F1 to get to the tty, this is likely a video driver issue.
It is getting restarted when trying to wake from suspend mode.

Seeing as this is an AMD laptop, make sure your kernel is >=5.4
Yes it is using 5.4.2 kernel version

researching on GitHub gave this link. https://github.com/savannidgerinel/nixos-thinkpad-x395
It seems to be solving the issue. I have to study it more to understand though.

If you can work out the pieces that fixes suspend, you can put them into this repository.

I haven't gotten to that point yet. Just made the system bootable with all the softwares I need. Still figuring out how to override the nixpkgs to get the latest ones. I will create a PR if I make it to work.

Any updates?

Any updates?

Now I am in Manjaro and using nix as package manager. sleep is working in recent versions. I am not sure what is the reason.

Seems like there is no one with the hardware.


feature: Allow for focusing main code window while a response is being streamed

Feature request
Currently when using Avante Ask the streaming response will "steal" focus in the main window as the model's text is populated in the buffer.
My preference would be to have the ability to navigate in the main code window while the response streams on the side. Right now this isn't possible because the cursor and focus jumps to the response buffer.
Example 1
While using Avante Ask, the response is streamed and each new bit of text causes the cursor to move away from the main window into the Avante Ask window.
Example 2
When using Avante Edit, the small prompt window steals focus. Instead of navigating the code, new keystrokes are appended to the prompt window even after the prompt has been sent.
Motivation
No response
Other
No response

fully agreed, there is very little utility to having the attention on the chat as a response is generated, even worse - you can't step out of the chat it keeps stealing the focus :)

Created PR 982 which should allow you to have this behavior.
The config should be updates this way:
  {
    "yetone/avante.nvim",
    ...
    opts = {
      ...
      behaviour = {
        auto_focus_sidebar = false,
      },
      ...
  },

If you would like to test it and provide feedback it would be nice :) Just switch the .local/share/nvim/lazy/avante.nvim to the branch in the PR, or wherever your packages are located


Click distance varies based on camera rotation

Describe the bug
Upon enabling GPU rendering and greater draw distances, I've noticed that the distance you can click on objects varies a little based on camera rotation.
Here I'm unable to click the bank window, as I'm too far away.

Yet here, standing at the same spot but the camera rotated, I'm able to click even the further bank window.

To Reproduce
Steps to reproduce the behavior:

Enable GPU rendering and greater draw distances for ease of testing.
Find anything static to click on and move a couple tiles too much away from it to be able to click.
Rotate the camera and try to click it again.

Expected behavior
Max click distance remains the same independent of camera rotation.
Environment (please complete the following information):

OS: Windows 10 64-bit
RuneLite version: <IP_ADDRESS>
Launcher version: 1.6.0

Reminds me of #6510 could be a similar root cause?

It is based on camera position, and this is intended behavior I think.

Per Adam's comment, this is intended.


Fix android root view group removal during instance re-creation

Summary:
This is my proposed solution to https://github.com/facebook/react-native/issues/41677.
Fixes https://github.com/facebook/react-native/issues/41677.
Changelog:
[ANDROID] [FIXED] - Fix android root view group removal during instance re-creation
Test Plan:
Both with fabric enabled and disabled (new architecture):

Clone repro repo: https://github.com/wschurman/rn-reload-repro
Build and run on android (I use android studio)
Click reload button, see timestamp doesn't change (indicating that the view is not removed)
Apply this PR as a patch.
Re-build and run.
Click reload button, see view is correctly disposed of and the new view is set.

This seems reasonable. Please also test this change with the new architecture and the original repro in https://github.com/facebook/react-native/pull/37004

@javache - tested, updated test plan

@wschurman Can you please help with this thread - https://github.com/facebook/react-native/issues/45217#issuecomment-2359950213 Will the changes done here cause a memory leak ?


CI performance fixes

Description
Chromuim (via puppeteer) was previously being downloaded on each CI run causing a massive spike in CI times.
This PR stores chromium in the .npm directory so it gets cached with the setup-node action, this should speed up the following workflows by around 4-5mins each

.github/workflows/code_checks.yml
.github/workflows/create_semantic_release.yml
.github/workflows/post_deployment_actions.yml

Previous npm ci took 5m 45s

After npm ci takes 52s (with cache)

Issue(s)
Fixes FEC-81

:tada: This PR is included in version 1.543.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


my powershell does not recognize the AZ cmedlets, help please

Type of issue
Code doesn't work
Feedback
PS C: \WINDOWS\system32> az ad user update -- id<EMAIL_ADDRESS>-- display-name hossam. hussein@andalusia. innovatio
net
az : The term 'az' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

az ad user update -- id<EMAIL_ADDRESS>-- display-name hossam

CategoryInfo

FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32>
..
: ObjectNotFound: (az:String) [], CommandNotFoundException
Page URL
https://learn.microsoft.com/en-us/cli/azure/ad/user?view=azure-cli-latest#code-try-9
Content source URL
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/ad/user.yml
Author
@dbradish-microsoft
Document Id
39842113-e499-d863-0f61-795089d844d9

Hello, @hossamhussein6055. This reference group is part of our Core components, so I'm wondering if you are running into a PowerShell scripting language issue. Please take a look at Considerations for running the Azure CLI in a PowerShell scripting language.
I also suggest running az ad user update with the --debug parameter. This will expose the API calls and parameter values as parsed by the PowerShell tool.

@hossamhussein6055, were you able to get the az ad user update reference command working? What did you do to handle the error message? (I'd like to add information to our troubleshooting guide if needed.)

Thanks for your dedication to our documentation. If  you feel that it's still a concern, please respond and let us know.


Adding supported python version to readme

Codecov Report

Merging #49 (7c26de9) into main (1558848) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #49   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           12        12
  Lines          364       364
=========================================
  Hits           364       364

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 1558848...7c26de9. Read the comment docs.


Should be "Could not find ..."

Hi,
Thank you for this contribution. ¿Would like to add you in the AUTHORS file?
Regards,

You're welcome.
It is a minor contribution but I hope it helps!
I was introduced to the tool answering a stackoverflow question.
It's a useful tool and I was able to help the person get their code working but it is not something that I am likely to use.


hifiberry DAC+ selection causes issues

I've just installed pimusicbox on my pi zero w with hifiberry dac+ zero 1.0.1. All is good and I can get into the menu on my mac and connect via airplay etc.. But when I change the output to the hifiberry dac+ setting and click apply (reboot) it goes wrong. On the monitor for the pi I can see it going round and round in cycles - every so often I see:
[FAIL] Stopping watchdog daemon... failed!
[FAIL] Starting watchdog keepalive daemon... failed!
with the FAIL and failed! in red. It's definitely the hifiberry setting that causes this as it's done it twice and turning the airplay on on its own is fine.
Does anyone have ideas on how to get this working?
Thanks

Hello, please try https://discuss.mopidy.com/t/boot-loop-enabling-dtoverlay-pi-dac/1816/10?u=kingosticks

Thanks kingosticks - that looks like it's me. I see the line you've put up - but what do I do with it, put it in the config file?

Thanks a lot - that solved it! However I now have a new problem, it doesn't seem to recognise the soundcard. I'll post a new thread on it as it's not relevant to this title...

Stopped the reboot loop in https://github.com/pimusicbox/pimusicbox/commit/7babeb5c76ca87337259bd3964884aea260e1537


TypeError: Concatenating 'str' and 'error' objects in altdns.py

Treat the error string and object type as separate entities, preventing the error "TypeError: Concatenating 'str' and 'error' objects."
Old:
root@0x3c:~/altdns# ./altdns.py -i test.txt -o data_output -w words.txt -r -s resolved_domains_big
[] 500/626767 completed
[] 1000/626767 completed
Traceback (most recent call last):
File "./altdns.py", line 209, in
main()
File "./altdns.py", line 206, in main
print("error: " + error)
TypeError: cannot concatenate 'str' and 'error' objects
New:
root@0x3c:~/altdns# ./altdns.py -i test.txt -o data_output -w words.txt -r -s resolved_domains_big
[] 500/626767 completed
[] 1000/626767 completed
error: can't start new thread
error: can't start new thread
error: can't start new thread

Nice catch! Accepted the pull request. Cheers.


No L2 Normalization for the output of the encoder network?

In the paper it is described that L2 normalization is performed on the output of the encoder as well as the output of the projection head. However, in the code I could only find the L2 normalization being performed on the output of the projection head. Could someone clarify this mismatch?

here it is: link

That's the normalization for the output of the projection head. I was asking about the normalization of the output of the encoder, which is a different thing.

sry, I don't think the original paper normalized the output of the encoder, would you point me where the paper says so? Maybe it's a typo.

Thanks for your quick reply. Any further clarification on this would be super helpful!

I'm replying via email because I could not find your question in the Github issue thread.
The normalization of the output of the encoder network is described under Section 3.1 Page 5 under the "An encoder network" bullet point.
It is mentioned as "...This representation layer is always normalized to the unit hypersphere in R^{D_E}...", where the quoted sentence is the 4th sentence on Page 5.
Hope we can get some clarification on this!

보낸 사람: Yonglong Tian<EMAIL_ADDRESS>보낸 날짜: 2020년 10월 17일 토요일 오전 1:20
받는 사람: HobbitLong/SupContrast<EMAIL_ADDRESS>참조: killawhale2<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>제목: Re: [HobbitLong/SupContrast] No L2 Normalization for the output of the encoder network? (#41)
sry, I don't think the original paper normalized the output of the encoder, would you point me where the paper says so? Maybe it's a typo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/HobbitLong/SupContrast/issues/41#issuecomment-710167587, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJPQQU37H2SGRP7OMMIKEJDSLBXFTANCNFSM4STAVBVA.

In the paper it is described that L2 normalization is performed on the output of the encoder as well as the output of the projection head. However, in the code I could only find the L2 normalization being performed on the output of the projection head. Could someone clarify this mismatch?

Hi, in the paper I didn't see the L2 normalization is performed on the output of the encoder, and I find that in their published code, they do not add l2 normalization on the output of the encoder too, could you please tell me which part of the paper in case I miss something :D

Sure.
The normalization of the output of the encoder network is described under Section 3.1 Page 5 under the "An encoder network" bullet point.
It is mentioned as "...This representation layer is always normalized to the unit hypersphere in R^{D_E}...", where the quoted sentence is the 4th sentence on Page 5.

Sure.
The normalization of the output of the encoder network is described under Section 3.1 Page 5 under the "An encoder network" bullet point.
It is mentioned as "...This representation layer is always normalized to the unit hypersphere in R^{D_E}...", where the quoted sentence is the 4th sentence on Page 5.

ahh, I know what happens, actually, we are talking about different papers.
I am focusing on the SimCLR paper where they did not use L2 normalization over the output of the encoder, but I think they do use normalization over the encoder in the SupContrastive paper :D

Sure.
The normalization of the output of the encoder network is described under Section 3.1 Page 5 under the "An encoder network" bullet point.
It is mentioned as "...This representation layer is always normalized to the unit hypersphere in R^{D_E}...", where the quoted sentence is the 4th sentence on Page 5.

ahh, I know what happens, actually, we are talking about different papers. I am focusing on the SimCLR paper where they did not use L2 normalization over the output of the encoder, but I think they do use normalization over the encoder in the SupContrastive paper :D

hi, I want to ask if you know the reason for using l2 regularization. When I don't use l2, the model will even explode in gradient 😭


Funkin Lua giving errors dispite not being edited

Describe your bug here.
funkin lua keeps giving me

these errors and i never touched that i only touched mods folder and the playstate folder for ratings
Command Prompt/Terminal logs (if existing)
source/FunkinLua.hx:342: lines 342-346 : Int should be Bool
source/FunkinLua.hx:342: lines 342-346 : ... For function argument 'f'

Are you modding a build from source or with Lua?
Source
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
playstate mods folder

Because you didn't install the new luajit

Because you didn't install the new luajit

i had no idea it changed weird