Can not convert file encoding of to GBK, it was saved as UTF-8 instead

Can not convert file encoding of test.txt to GBK, it was saved as UTF-8 instead:
'gbk' codec can't encode character '\xa5' in position 226: illegal multibyte sequence

Warning when I try to save a modified file (Chinese characters added)

Could you attach the saved file for investigation?

How can I find the "position x"? The file is rather large.

Position starts with 0, and every character including control characters (tab, new line, etc) is counted.
BTW, \xa5 represents for Unicode ¥ sign, which is not supported by GBK. You can use ￥ as an  alternative, its code is \uFFE5.
Hope this helps.

The issue seems to be caused by ' somehow replaced by ¡¯.
Is there a way to jump to position x?

You can use Goto Anything (Ctrl + P) and type ::226 in the panel to jump to position 226.


Missing build environment documentation

EDI.net appears to now be using .net Core (RC2) ?
It would be useful to add some short notes on the development environment required in order to be able to work on and build the source e.g.

Visual Studio version
External dependencies required e.g. .net Core
Any other tools, libraries or NuGet packages expected

If you do not have .net core installed you will get a message such as this, which does not really tell you what the root cause of the problem is - luckily Google will yield the root cause !
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the  declaration is correct, and that the file exists on disk.
reason : https://github.com/NuGet/Home/issues/2616

Hi @cwhellams,
I agree and will address this soon. What I don't know yet is the minimum requirements for VS and nuget in order to run dotnet core 1.0 RTM. My guess would be VS 2012 but will have to check this out first.


Update scalatest to 3.2.10

Updates org.scalatest:scalatest from 3.2.9 to 3.2.10.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (3.2.9).
You might want to review and update them manually.
build.sbt

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalatest", artifactId = "scalatest" } ]

labels: library-update, semver-patch, old-version-remains

Codecov Report

Merging #550 (a30196d) into main (f91a416) will decrease coverage by 0.13%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #550      +/-   ##
==========================================
- Coverage   90.10%   89.97%   -0.14%
==========================================
  Files          15       15
  Lines         758      758
  Branches       43       40       -3
==========================================
- Hits          683      682       -1
- Misses         75       76       +1

Impacted Files
Coverage Δ

core/src/main/scala/io/iteratee/Enumeratee.scala
99.14% <0.00%> (-0.43%)
: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 f91a416...a30196d. Read the comment docs.


Automatic annotations and tagging

Use --profile ml for some goodies.

Sample bom for java-sec-code with automatic tags.
bom-full.json

ghcr.io/owasp-dep-scan/depscan:v5.5.0
bom.json


[FEATURE REQUEST]  When selected commit changed, auto select first changed file in Changes tab

When selected commit changed, auto select first changed file in Changes tab

Version 8.21

https://github.com/sourcegit-scm/sourcegit/issues/63

Currently there's no plan to add features like:

auto select the current branch in local branch tree
auto select HEAD in histories view
auto select the first changes in commit details panel with CHANGES tab actived
auto select the first file in commit details panel with FILES tab actived
....


Question: IOC Test Class Instantiation

I'm wondering if there is a way to mimic xUnit's Shared Context feature in Fixie. What I would like to do is share some dependencies between test classes and have them be injected via the test framework using dependency injection. Is there a way to accomplish this?
Below is a very contrived example of what I've tried to do to get this to work in Fixie, though this code fails with the error: Cannot dynamically create an instance of type 'AccountingService.Tests.AssemblyTests'. Reason: No parameterless constructor defined.. I'm guessing under the hood Fixie is still trying to instantiate the test classes via Activator despite that not being explicitly done here.
public class Execution : IExecution
{
    public async Task Run(TestSuite testSuite)
    {
        await using var services = new ServiceCollection()
            .AddTransient<ICalculator, Calculator>()
            .AddTransient<AssemblyTests>()
            .BuildServiceProvider();

        foreach (var testClass in testSuite.TestClasses)
        {
            await using var scope = services.CreateAsyncScope();

            foreach (var test in testClass.Tests)
            {
                var instance = scope.ServiceProvider.GetRequiredService(testClass.Type);

                await test.Run(instance);
            }
        }
    }
}

public class AssemblyTests(ICalculator calculator)
{
    public void Test()
    {
        calculator.Add(1, 2).Should().Be(3);
    }
}

public interface ICalculator
{
    int Add(int a, int b);
}

public class Calculator : ICalculator
{
    public int Add(int a, int b)
    {
        return a + b;
    }
}

At first glance, I'm surprised.

Can you include a full stack trace for that exception, so we can see exactly "who" is complaining about it? The message itself doesn't come from Fixie. (The only occurrence of the text in this repo is in the self-testing assertion that we get that message from the framework when we provoke it indirectly.)

Can you show me whether this IExecution is actually running? Do you have an ITestProject implementation in your test project that explicitly opts into this IExecution type? If this Execution class isn't really running, then the default behavior would try to construct the class for you, with zero args. See https://github.com/fixie/fixie/wiki/Customizing-the-Test-Project-Lifecycle#custom-conventions and the following section for how ITestProject gives you an "anchor" to get explicit about your customizations.

There are only a few places where Fixie attempts test class construction itself:

TestClass offers a Construct(...) method, which you are (rightly!) not calling here.
Test does call it on your behalf, but only when the given instance is null and the test method is nonstatic. Since you're calling GetRequiredService, I think you're already safe from accidentally passing in a null.

See also a proof of concept for this general idea over in https://github.com/fixie/fixie.integration/tree/main/src/CustomConvention.Tests (the ioc container implementation is fake, but comparing all the files in this folder against your real code might reveal some difference worth looking into).

D'oh! Your skepticism is warranted as it looks like I have neglected to include an ITestProject implementation in the project to assign my custom IExecution with the IOC logic. Including the following in the assembly does in fact allow my tests to run as expected:
public class Project : ITestProject
{
    public void Configure(TestConfiguration configuration, TestEnvironment environment)
    {
        configuration.Conventions.Add<DefaultDiscovery, Execution>();
    }
}

Apologies for the false alarm and I appreciate the quick response 🙂. Fixie strikes me as an incredibly neat project and I'm looking forward to working with it more.

Awesome! I want back and forth a few times in Fixie's history regarding whether or not it should be enough to just drop an IExecution into the project. By being explicit here with ITestProject, that enables folks to reuse IExecutions across project references.


Surgery option to "Draw Blood" that increases "Blood Loss" hediff each time - produces blood bags

A late-game / mid-game research could unlock a new feature of bloodstem that allows it to be combined with another resource to produce blood bags - an almost unlimited source of blood for blood IV's. This'd make it far easier to produce blood bags as it's likely that it'd require significant time or resources otherwise.

Done. Hediff is added if not already present at 0.15 severity. Every time blood is drawn after the severity increases by 0.15.
0.6 severity is severe blood loss.
0.7/0.8 is extreme
1.0 is fatal
This means 7/8 times blood can be drawn from a single pawn before death. Blood bags need texture - further balancing could be required.


RTM changes to MvcRouteHandler (and should I use it at all)

Hi,
When upgrading my ASP.NET Core project from RC2 -> RTM I ran into a lot of changes done to the MvcRouteHandler.  In RC2 there was an empty constructor but in RTM there is not. I had to change my code like this to use the new constructor: https://github.com/pbering/Lightcore/commit/937a7fe8cd04264110a2252fbc4ee367e3e4ed1f#diff-9529c98fccc3007ae662fcd2a5fb226c
It is working now but my question is more like, is this the correct way to execute a controller action and capture the  output added to the response body? My solution to this feels a bit dirty also since the MvcRouteHandler lives in the Microsoft.AspNetCore.Mvc.Internal namespace.
Anyone has any advice on this?

For your usage I'd suggest using the IActionSelector and IActionInvokerFactory directly. The main tasks that the route handler does are adapting these APIs to the routing system, and diagnostics/logging.
var routeContext = ...;
var candidates = _actionSelector.SelectCandidates(context);
if (candidates == null || candidates.Count == 0)
{
    // No match for the route data - handle this however you want
    return;
}

var actionDescriptor = _actionSelector.SelectBestCandidate(context, candidates);
if (actionDescriptor == null)
{
    // No match for IActionConstraints (like HTTP verb) - handle this however you want
    return;
}

var actionContext = new ActionContext(context.HttpContext, routeData, actionDescriptor);

// IActionContextAccessor is an optional service, you don't need these lines if you're not using it.
if (_actionContextAccessor != null)
{
    _actionContextAccessor.ActionContext = actionContext;
}

var invoker = _actionInvokerFactory.CreateInvoker(actionContext);
if (invoker == null)
{
    // This will only happen if your system is misconfigured - handle this however you want
    return;
}

await invoker.InvokeAsync();

I think your code will be simpler in the end. For instance if you already have the action descriptor of the thing you want to invoke, you could skip the action selector entirely.
Let me know if this doesn't do what you need or if I missed something.
=======
Regarding .Internal - anything in there is subject to change in a future release. We also might make those classes really internal in the future. Some things are there because we know it's not baked yet, and we don't want to live with a bad extensibility point for years. Other things are there because we don't think they are useful outside the framework. So let us know if you feel like something you need to do is blocked by something being .Internal - feel free to just open an issue and show us what you're doing like this one.

Thank you for taking your time to giving me such thorough answer and for giving me a direction for the best way to solve this. :+1:
I will try it out asap, thanks again and have a nice day :)

it works, but the IActionInvokerFactory is also in the internal namespace, is there an alternative for that?

The alternative would be to inject IEnumerable<IActionInvokerProvider> but that API is a bit confusing, you'd end up making a copy of the code inside the invoker factory. I'm going to log an issue to move it to public.


include JSQMessagesViewController into a UIScrollviewcontroller

Hi!
I was wondering if there is a way to include JSQMessagesViewController into a UIScrollviewcontroller ?
Kind regards,
Antoine

there's nothing that would prevent you from doing this, but it sounds like it would probably be a bad idea.


[Do Not Merge] NetStandard Upgrade: Update NuSpec & Raw NuGets

Should now install in just about every application

@onovotny can you validate my changes here.

Also, do you want dependency groups for Xamarin tvOS and watchOS?

I think this library itself is still actually a PCL which is really odd, I am going to change it over to .NET Standard 1.1 and then add tvos/watchos

Alright @onovotny I think this should be good now, I have created a new .NET Standard 1.1 project and added in the references needed.

I think that once Bitrise upgrades to the latest stable it will build up.

@jamesmontemagno if you're going that approach, you can just use the pack targets too -- dotnet pack. All of the info in the nuspec have equivalent properties in the csproj. The only reason to really split out the dependency groups as you have them would be to potentially minimize pain on people using packages.config with older project types.

I have been working on a new version of this that builds using .NET Core on Bitrise.
I'm making good progress! Let's switch to there.
https://github.com/praeclarum/sqlite-net/pull/561


Dot Sourced variables only exist within context of current Requirement

I've only just started using this module in the past few days, so I'll apologize in advance if this is something that's already covered in the documentation that I just haven't seen.
I've created an external file named ResourceVariables.ps1, so that anybody using my script can easily plug in their own variables without having to make any changes to the actual requirements script file (CreateResources.ps1)
Within CreateResources.ps1, I'm dot sourcing ResourceVariables.ps1 to import it's variables.  However, the variables only exist within the current Resource block, ie:
@(

	@{
		Describe = "First Requirement"
		Set = { . .\ResourceVariables.ps1;
				Write-Host "Import Variables block value of var1 is $var1"
				}
	}

	@{
		Describe = "Second Requirement"
		Set = { Write-Host "Use Variables block value of var1 is $var1" }

	}
) | Invoke-Requirement | Format-Verbose

In the above example, only "First Requirement" has a value for $var1, but "Second Requirement" does not.
If I declare $var1 within CreateResource.ps1 instead, then both requirements have access to the $var1.  But similarly, if I set the value of $var1 within "First Requirement", then "Second Requirement" does not see that value.
I presume this has something to do with requirement nesting, which is no longer supported.  But I don't see anything in the Patterns section that would help resolve this issue.
Can anybody give me some guidance on where I'm going wrong ?

Typical, just as I posted this I found #73 which pretty much answers my question.
I think I'll just have to do the dot sourcing at the top of my CreateResources script rather than doing it as a requirement


Issue-174 Add necessary data to propose bounty

Additional data that are mentioned here is added to the bounties summary.
proposeBounty is not added. Please refer to this comment.

The gql schema could also be something like following:
Bounties {
  ...all necessary data
  list: [Bounty]
}

But for now I have added these data to the summary. I think this is also good for now.


[BUG] torch._C._LinAlgError: linalg.cholesky always raised

Describe the bug
Hi, @PanQiWei @TheBloke
Thanks for all contributions in quantization.
Recently, I try quantize a llama-style model with 16B params and 32k length，but unfortunately an Exception raised when quantize model at the 43-th layer.   More detailed error msg is shown below .
I tried some solutions to solve it with more calibration examples and damp_percent:

tried the number of calibration examples: 128, 256, 512, 1024
tried damp_percent: 0.01, 0.1, 0.15, 0.2

But no matter what combination of the two params, torch._C._LinAlgError: linalg.cholesky is always raised when quantize model at the 43-th layer.   More detailed error msg is shown below.
Any help would be appreciated.

Hardware details
GPU: A800
RAM: 400G
Software version
autogptq: 0.7.0+cu118
torch:  2.0.1
cuda: 11.8
python: 3.10

I got the same error. have you solved the error now?

Hi @1649759610 @Kk1984up seem to be the same issue: https://github.com/IST-DASLab/gptq/issues/8#issuecomment-1494791079
Here's Elias suggestion: https://github.com/IST-DASLab/gptq/issues/8#issuecomment-1494905057

The same error.
But why calibration dataset can cause the Hessian Matrix not positive-definite?

Ran into same issue. Semi-resolved in https://github.com/AutoGPTQ/AutoGPTQ/pull/640/commits/636293f260c9610c3b8ba6089ef3920eb829aef4 : give user a hint to bypass error with ref to this issue


Discord fix when a channel is not found.

Proposed handling for when the bot.get_channel(int(self.channel))method returns none

looks like we have no actual changes at this point? I know this is still draft, assuming something is in progress?


fix(sidebar): set fixed width for image container

Before this commit, when no image was selected, the placeholder wouldn't
span the width of the container. After this commit, with or without an
image in the container, the placeholder background spans the width of
the container.

Current dependencies on/for this PR:

next

PR #311   (this PR)

This comment was auto-generated by Graphite.


[v1.0.5] [TASC v8.4.6.Alpha] TASC Command UI v1.0.5 incompatible with TASC 8.4.6.Alpha

As the title describes: v1.0.5 is incompatible with TASC 8.4.6.Alpha.
I know v1.0.3 was compatible with TASC 8.4.6.Alpha, that's the version I upgraded from.

The latest official version of TASC is 8.4.5, so that's what I should've been targeting. Change the version string in mod_info.json and it'll work.


removed maruku & fixed errors

maruku is no longer available in jekyll 3 ; and Jekyll::FatalException is now Jekyll::Errors::FatalException

Sorry, I closed this because it was a bit premature.


Store interpreter name in metadata of nb

For #13788
Fixes a bug where we were not remembering the selected kernel for raw kernels in native notebooks.
Need to fix tests, guaranteed it will fail

Codecov Report

Merging #13790 into main will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main   #13790   +/-   ##
=======================================
  Coverage   59.88%   59.88%
=======================================
  Files         678      682    +4
  Lines       37867    37942   +75
  Branches     5458     5466    +8
=======================================
+ Hits        22675    22721   +46
- Misses      14034    14044   +10
- Partials     1158     1177   +19

Impacted Files
Coverage Δ

...rc/client/datascience/notebookStorage/baseModel.ts
64.02% <0.00%> (-3.40%)
:arrow_down:

src/client/datascience/crossProcessLock.ts
79.41% <0.00%> (-11.77%)
:arrow_down:

src/client/common/utils/platform.ts
56.00% <0.00%> (-8.00%)
:arrow_down:

src/client/linters/pydocstyle.ts
86.66% <0.00%> (-2.23%)
:arrow_down:

src/client/datascience/debugLocationTracker.ts
76.56% <0.00%> (-1.57%)
:arrow_down:

src/client/common/process/proc.ts
14.49% <0.00%> (-0.73%)
:arrow_down:

src/client/logging/levels.ts
61.11% <0.00%> (ø)

src/client/logging/logger.ts
62.74% <0.00%> (ø)

src/client/logging/formatters.ts
53.57% <0.00%> (ø)

src/client/logging/transports.ts
65.11% <0.00%> (ø)

... and 14 more

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 f5ab698...2465c6a. Read the comment docs.


Add first and last composite examples

Proposed changes
Adds examples for making composites using first and last
Checklist

[X] Remove any unused Python packages from Load packages
[X] Remove any unused/empty code cells
[X] Remove any guidance cells (e.g. General advice)
[X] Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended).
[X] Include relevant tags in the final notebook cell and re-use tags if possible
[X] Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated

Possible issues:

Pulling in functions from xarray internals (xarray.core.duck_array_ops)
Not showing examples of using these functions for groupby and resample, because I can't think of any use cases
In the final 2 plots, I don't know how to add titles with rgb, so I'm doing an ugly print statement
Haven't found a time period that shows a good example for before and after
Need to add into text to Time-based composites and Most-recent composite sections
Need to add to top Description

This looks like a fantastic notebook @andrewdhicks , will be great to have this in DEA Notebooks too. Just a question for my own benefit: are the "Before and after composites" composites calculated per-pixel (e.g. the latest valid observation per pixel accounting for missing/invalid data), or based on the entire time-step acquisition time (just the closest previous/subsequent timestep)?

@robbibt The composites are per-pixel, filling in nodata. That's something I should add to the description!
I was thinking about if it also needed to show facet plot over time of the inputs, but the other composites worked alright without it. It would be good to be able to generate a per-pixel age plot, to show the sources of the composite.
I think there are going to be quite a few notebooks to come out of the DEAfrica uplift that will need to get ported over to DEA.

Awesome! Those kinds of compositions are potentially a super powerful technique, but might be a bit confusing for new users who aren't as familiar with multidimensional arrays. A per pixel age plot (maybe with age in days?) would be really nice, and would illustrate the concept really well I think!
There's an issue here to try and keep track of things to port back to DEA-notebooks, feel free to update it as you come across anything you think that should be on both repos! https://github.com/GeoscienceAustralia/dea-notebooks/issues/533


Totals retirement page - first version

Description
This is the first version of the Totals retirement page.
See details in this ticket https://github.com/KlimaDAO/klimadao/issues/402
Please take a look and let's discuss the open questions:

[x] subgraph returns unknown tokenAddress which are not included in the costants files
=> some links to the Single Retirement pages do not show the correct type of token next to the value
✅  => FIXED in this PR
[x] if the subgraph returns correct values => wen can remove the contract method getRetirementTotalsAndBalances and use subgraphs queries solely to generate this Page. Good Idea? Yes/No?  => YES new ticket https://github.com/KlimaDAO/klimadao/issues/436
[x] Shall we paginate longer list of retirements? > 10 => generate more pages? => NO
[x] better design ideas? ✅  => done, see below

Preview URL:
Please fill in your data:
https://klimadao-site-git-totals-retirement-page-klimadao.vercel.app/retirements/<WALLET-ADDRESS>
Related Ticket
Resolves https://github.com/KlimaDAO/klimadao/issues/402
Checklist

[x] Building the site with npm run build-site works without errors
[x] Building the app with npm run build-app works without errors
[x] I formatted JS and TS files with running npm run format-all

@Atmosfearful All done.
I would do the refactoring with replacing the contract method and using the subgraph queries only for this page in a follow-up PR.

looks great! Two nitpicks, merge when ready. I'm willing to make these available on production.

Will open another PR with the release of this page


Add PolyMC To Application List

Can someone add PolyMC to the application menu. Because I like PolyMC more than any other minecraft launcher and there is a misinformation that PolyMC is a virus which it isn't. If anyone adds this to the pull requests that would be much appreciated.

I'm not sure where you've heard that it's a virus, but ChrisTitusTech please don't add polymc, as the maintainer is malicious by doing a hostile takeover of the project.

@Snomwan Prism Launcher was already added which is a fork of PolyMC just with less politics involved in the software.

I can see why. But I still prefer PolyMC.
But thanks for replying!

@Snomwan Prism Launcher was already added which is a fork of PolyMC just with less politics involved in the software.


New Panel Directive

Closes issue #29
Code coverage 100%, vet passes
In addition, update to uifCommandBar to allow for the recalculation of the visible
items via broadcast i.e. in circumstances where the shown items are
required to be updated but a window.resize has not fired. This was required for the panel, as the uifCommandBar is hidden on load, therefore a 0 width - hiding all items

PR incorrectly going to master, closing

Coverage increased (+0.01%) to 98.389% when pulling aa2341d6aecd52d2fa5ff1e9731094e9085c0253 on tobiaswest83:issue-29 into 09b89bccb6fafe51b8f65a3258783b22e6d062e1 on ngOfficeUIFabric:master.

Coverage increased (+0.01%) to 98.389% when pulling aa2341d6aecd52d2fa5ff1e9731094e9085c0253 on tobiaswest83:issue-29 into 09b89bccb6fafe51b8f65a3258783b22e6d062e1 on ngOfficeUIFabric:master.


Why

Why when I modify the channel through the database it has no effect on the bot? I have to reboot for the channel to be changed...

come to the support server for further assistance...

Can u tell me more information like what service you were using (twitter, reddit etc)

Twitter

Can u tell me more information like what service you were using (twitter, reddit etc)

hi

hi

Yes?

I'm on holiday so I can't check the code

Did you check the code? any news?

I'll check/fix it tonight

I'll check/fix it tonight (UK time)

Ok! Thank you

found the problem @Spiderjockey02 ?

hello?

?????????

Please join support for assistance https://discord.gg/QMt3TXke

sad

sorry for the wait being busy with life things, it should be fixed now

Not fixed, channel change still only takes effect when restart the bot

will you fix this someday?

will you fix this someday?

You can look into the code yourself to try to fix the issue


Define scope and approach of the vocabulary provider

There are different sources af already existing vocabularies, e.g. including the IDSA InformationModel.
Is the "vocabulary provider" a shared concept, or a central component?

Closed by #193


Ft view jobs under different departments 155965543

What does this PR do?
Enables team members to categorise checks under different departments
Description of Task to be completed?
This task enables checks to be categorised in departments
Each team member can therefore view all the checks that fall within a particular department
What are the relevant pivotal tracker stories?
#155965543
Screenshots

Pull Request Test Coverage Report for Build 222

104 of 132 (78.79%) changed or added relevant lines in 17 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.06%) to 79.766%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

hc/front/views.py
15
16
93.75%

hc/api/management/commands/sendalerts.py
6
10
60.0%

hc/api/views.py
8
14
57.14%

hc/api/models.py
13
20
65.0%

hc/accounts/views.py
2
12
16.67%

Files with Coverage Reduction
New Missed Lines
%

hc/api/views.py
2
83.16%

Totals

Change from base Build 220:
0.06%

Covered Lines:
1636

Relevant Lines:
2051

💛  - Coveralls

@MarloneA Do you have any screenshots?

@MarloneA Resolve this.


page.waitForFunction() Evaluation failed: EvalError: Refused to evaluate a string as JavaScript

Calling the code bellow:
page.waitForFunction("selector => document.querySelectorAll(selector).length === 0", "div[aria-label='Loading timeline']");
results in the error:
Exception in thread "main" com.microsoft.playwright.PlaywrightException: Error {
  message='Evaluation failed: EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' https://*.twimg.com   https://www.google-analytics.com https://twitter.com https://app.link https://apis.google.com/js/platform.js https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js  'nonce-OTFjOTIzODItM2ViZi00NDQ0LWFhYWYtMTZhZjUwN2FjNjA5'".

    at eval (<anonymous>)
    at predicate (eval at evaluate (:303:29), <anonymous>:3:35)
    at eval (eval at evaluate (:303:29), <anonymous>:18:78)
    at onRaf (<anonymous>:1667:37)

Alternatively, i can code the logic like this and it works:
Object pageLoaded = Boolean.FALSE;
while (pageLoaded == Boolean.FALSE) {
    pageLoaded = page.evaluate("selector => (document.querySelectorAll(selector).length === 0)",
            "div[aria-label='Loading timeline']");
    customWait(500);
}

but i still need to know why the first function does not work.

Is your site publicly available? We would be happy to take a look then. It seems like like they have CSP headers set which prevent you from executing JavaScript functions using evaluate.


Add conditional requests and cache-control headers on the 'users' endpoints

Applies to the following endpoints:
GET /users
GET /users/:id

Include the cache-control response header with a reasonable amount of time.
For GET /users, the Last-Modified response header should be based on the most recent update time of the users, and the ETag value should be a hash based on concatenation of the value used to generate of each user's ETag.

Reopening as the commit was reverted. Will look into a simpler patch that does not involve the user/identity refactoring that was initially proposed.


Why [ [x] * 3] * 3 is not the same as [[x, x, x], [x, x, x], [x, x, x]] ?

My python shows both as equal:
>>> [[None] * 3] * 3 == [[None, None, None], [None, None, None], [None, None, None]]
True

Why do you say they're not the same?

Fascinating!. Here's the short explanation in code (and later in english):
>>> a = [[None] * 3] * 3
>>> a[0][0] = 'a'
>>> a
[['a', None, None], ['a', None, None], ['a', None, None]]

Turns out Python's * n operator creates a new reference to the same structure, instead of creating a new list. Thus every change to the original list reflects in all 3 lists which breaks the game.
The solution is to use list comprehension, which causes python to create new lists as described here:
http://stackoverflow.com/questions/6688223/python-list-multiplication-3-makes-3-lists-which-mirror-each-other-when
And the code:
self.data = [[None] * 3 for x in range(3)]


If you are sure that no Kontena Masters exist on this machine, remove folder: /Users/kimmo/.kontena/vagrant_master/

Actually a bit tricky to fix since the prompt for name comes from before_load hooks.


Online Compiler

This is a simple code editor created using HTML, CSS, Javascript, Judge0 api.
Project Specification

Get the Judge0 api key from the link provided in the code.
Specify the correct ids for different coding languages.
Type the code in the online code compiler or editor.
Click on "Run".
An interactive output is shown to the user on the right side.
The user can select any programming language from the drop-down list.

I have contributed towards hacktoberfest'2021. Kindly review the code, accept my pr and add the tag.
@ron2111

Merging, Star the repo if you like it.


refactor: simplify overriding submodule name

Motivation
I want to create submodule-s with custom names so that submodule-s have meaningful names in docs.
I believe the submodule name isn't particularly descriptive.
Current solution
My current solution in this PR is incorrect because it doesn't account for the global context.
Context
Currently, in submoduleWith,  a name isn't a parameter (link) and it's used in a couple of places (1, 2, 3).
Besides, the submoduleWith is used inside the definition of submoduleWith (1, 2). Hence, it's hard to correctly override name in all places.
Additionally, I see the "submodule" string is used:

In modules.nix
https://github.com/NixOS/nixpkgs/blob/af105fd3758230351db538ade56e862ac947f849/lib/modules.nix#L650

In a nixos-option.cc
https://github.com/NixOS/nixpkgs/blob/af105fd3758230351db538ade56e862ac947f849/pkgs/tools/nix/nixos-option/nixos-option.cc#L274

Alternative solution

Add an alias attribute in option types.

Use name as a stable type name.
The alias is a pretty type name.
The alias should default to name.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Moved to https://github.com/NixOS/nixpkgs/issues/300664


DB Convention does not cover batch/multi/envelope operations

Our API has a small alphabet of relatively simple operations key-value operations (get, put, delete, &c.) For these, the operation names seem clear. We also have a set of operations that support bulk/batching of operations. these can be homogeneous or heterogeneous. For example, batch can accept a set of any combination of get, put, delete, &c. We also support a generic system for server-side compare-and-mutate, where some predicate based on a query over existing data is provided, and when the predicate returns true, some operation is applied — that operation can be a simple or a batch operation. for these collections of heterogenous operations, how should be annotate the span?

Assuming there is just one bulk operation that deals with batch as a whole, I can think of the following solutions:
E.g bulk operation consists of ["get foo", "delete bar"].
Option 1. Attributes with array values

db.operation = bulk
db.mydb.sub_operations = [get, delete],  and db.mydb.some_other_attribute= [foo, bar] ...

Cons:

bulk operations are common and we should consider defining sub-operation attributes in top db namespace
the relationship between elements in attribute arrays is based on index (if we record more than one attribute per sub-operation) which is subtle and error prone
bulk operations with a lot of sub-operations might be too long for some backends that have low limits on the attribute length

Option 2.  Events/logs

db.operation = bulk
Plus I emit an event for each sub-operation that contains grouped attributes describing that operation

We do something similar in messaging (with links though):

if a batch of messages is sent, send operation should have links to all messages being sent and their unique per-message properties should be on the link.
if there is just one message its properties should be recorded either on the link or on the span.

DB operations don't have an individual trace-context, so links are not suitable here, but events could work. Then it should also be easier to enable/disable sub-operation reporting depending on the needs. the drawback is that events/logs could go to a different backend
Cons:

if we don't have a case for multiple attributes describing one operation, this seems like an overkill and Option 1 would be a better choice.

Option 3. Creating artificial spans per sub-operation
Cons:

misleading
costly (both perf and volume)

Additional things to consider:

we should have an attribute that records the size of a batch (in case of messaging it's called messaging.batch.message_count)
metrics:

we should consider having a metric that measures number of sub-operations (since  db.operation.duration would not  provide a count for bulk operations)
bulk duration could be a different metric (e.g. with different histogram boundaries)

Cosmos DB is currently creating a string attribute db.cosmosdb.batch_operations with each operation type in the batch and the count for that type. Adding an attribute to the convention would be useful to standardize this.
We should be able to capture:

Overall count for batch
Operations in batch
Optionally: more information for each batch operation according to each db's requirements (count, status code etc.)

I prefer the simplicity of Option 1. Attributes with array values, but agree it creates a challenge for additional information about each batch operation. The most important piece of additional information for Cosmos DB is operation count, so maybe something like the following could work: db.batch.count = 6 db.mydb.sub_operations = [get:2, delete:4] . Capturing information beyond operation count may be too clunky in this format though

@lmolkova isn't that conflating "batch" with "bulk", by proposing db.operation = bulk for something containing two things (get and delete)? The standard naming for this seems to be batching, where a bulk command usually corresponds to a command that changes multiple records (like a SQL UPDATE statement).
Regardless, the commands contained in a batch are typically the same in every aspect as a standalone command not executed in a batch; each command has a SQL (so db.statement), a db.operation (select, insert...), a set of parameters (something not currently represented in the semantic conventions, but which could/should), and any other attributes which a specific database may add. For me this strongly points towards represents the batched commands as spans, which would allow querying/interpreting them just like commands which aren't batched. Introducing a new way to represent batched commands may seem simpler on first look, but actually creates two ways to represent the same logical thing, and makes the data more difficult to interpret. In effect, a batch is conceptually is just a container for commands.
Note that it's true that certain attributes must be the same across all commands in the batch, e.g. the hostname, network info, etc. So these attributes could optionally be lifted up to the span representing the batch, leaving on the command only attributes which can vary (e.g. SQL, parameter info).

@roji one difference between batch operations and standalone operations is the duration. If you add each operation in a batch as its own span, is the duration of each sub operation the same as the parent? Is it 0? This could also create confusion because it may make those operations appear either abnormally quick or abnormally long

@jcocchi that's true indeed... I don't know if there are other OTel cases where a larger "logical container" span wrap nested spans as in this case, and how that's best represented...


Layout/   is empty

Hi!
When click "SOURCE" in  "Layout" the page is empty.
https://blazor.radzen.com/layout
Thanks!

It is fixed now.


[WIP] Enable accounts ui tests

@kulmann I removed the pdf viewer

I fixed some selector issues in the UI tests.

Would be cool to simplify the ci pipeline. Looks like code duplication.. but that can happen later on in a separate PR.

Would be cool to simplify the ci pipeline. Looks like code duplication.. but that can happen later on in a separate PR.

Yes, some duplication is happening. But the two contexts are slightly different.
I didn't want to blow up the config. We will add settings UI tests also in a following PR and then can optimize.


Client parameters don't set body when model is an enum

Problem statement
If the client body is an enum, the body doesnt get serialised by WriteToRequest.
Swagger specification
swagger: '2.0'
info:
  version: "1.0.0"
  title: "Test enum serialisation"
paths:

  /example:
    put:
      parameters:
      - name: "something"
        in: "body"
        description: "PUT enum example"
        required: true
        schema:
          $ref: '#/definitions/MyEnum'
      responses:
        202:
          description: "PUT OK"
        500:
          description: "Error"

definitions:

  MyEnum:
    type: "string"
    enum:
    - SOMEVALUE
    - SOMEOTHERVALUE

Steps to reproduce
swagger generate client -f ./swagger.yaml
Note that put_example_responses.WriteToRequest() never calls r.SetBodyParam().
Environment
swagger version: master
go version: 1.10.2
OS:  osx
Fix
Looks like the following in the template needs to include enums:
  {{ if or .Schema.IsInterface .Schema.IsStream (and .Schema.IsArray .Child) (and .Schema.IsNullable (not .HasDiscriminator)) }}if {{ .ValueExpression }} != nil {

Looks related to #1490

OK the issue looks like it is here.
I have not tinkered with the client so far, but it looks to me that it is more a matter of properly nesting the {{ if ... }} guarding the null param to SetBodyParam(...) than adding more and more stuff there.
Something like this don't you think?
{{- if .IsBodyParam}}
  {{- if or .Schema.IsInterface .Schema.IsStream (and .Schema.IsArray .Child) (and .Schema.IsMap .Child) (and .Schema.IsNullable (not .HasDiscriminator)) }}
    if {{ .ValueExpression }} != nil {
  {{- end }}
    if err := r.SetBodyParam({{ .ValueExpression }}); err != nil {
      return err
    }
  {{- if or .Schema.IsInterface .Schema.IsStream (and .Schema.IsArray .Child) (and .Schema.IsMap .Child) (and .Schema.IsNullable (not .HasDiscriminator)) }}
  }
  {{- end }}
}
{{- end }}

@fredbi great - that seems to fix it for me. PR here: https://github.com/go-swagger/go-swagger/pull/1514


[OOBE] Shortcut Guide: Shortcut incorrect

In oobe we have write a incorrect shortcut for Shortcut Guide. It must be only "Win".
https://github.com/microsoft/PowerToys/blob/b98dda9be43a3941bf35ff001c6b3f83e3ceebd6/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw#L1043

My mistake. Shortcut is correct.


Service reporting upgraded after first container

Rancher versions:
rancher/server: v1.6.0
rancher/agent: v1.2.2
Infrastructure Stack versions:
healthcheck: v0.3.1
vxlan: v0.11.2
network-services: metadata: v0.9.1, manager: v0.7.0
scheduler: v0.7.5
kubernetes (if applicable):
Docker version: (docker version,docker info preferred)
2 x 17.03.0-ce
3 x 17.03.1-ce
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
5 x Debian 8: uname -r: 3.16.0-4-amd64
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
Bare-metal
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
single node rancher
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Cattle w/ vxlan
Steps to Reproduce:
Create a stack with 5 of the same image services each service is set to start all containers on one host
Service1 -> host1
Service2 -> host2
...
Set each service to 20 containers
Start a upgrade on several of the services.
Results:
Some of the upgrades will report 'upgraded' after the first container on the host, this container never starts just stays stopped. and the only way to progress the upgrade is to click 'Finish upgrade' causing the ability to rollback to be lost

I've seen this behavior as well

Probably fixed by https://github.com/rancher/rancher/issues/12084, let me know if it happens on the latest version.


[CP] Fix memory leak in overlay surface host buffers.

Issue Link
flutter/flutter#154549
Target
stable
Cherry pick PR Link
https://github.com/flutter/engine/pull/55056
Changelog Description

fix memory leak in overlay surfaces created when rendering platform views.

Impacted Users
iOS impeller
Impact Description
Applications may run out of memory is lots of UI is rendered over platform views
Workaround
Disable Impeller
Risk
low
Test Coverage
yes
Validation Steps
Attached unit tests

@zanderso could you take a look at this cherry-pick request?

It's based on 55036 but does not have the bug I fixed in 55087


WEBSELECT

Description of the new feature / enhancement
Hi,  can you add the webselect enhancement ?
https://mspoweruser.com/microsoft-edge-web-select/
Scenario when this would be used?
https://www.bing.com/videos/riverview/relatedvideo?&q=webselect+edge&&mid=0181907E3F9CBC8D1FCF0181907E3F9CBC8D1FCF&&FORM=VRDGAR
Supporting information
https://www.bing.com/videos/riverview/relatedvideo?&q=webselect+edge&&mid=0181907E3F9CBC8D1FCF0181907E3F9CBC8D1FCF&&FORM=VRDGAR

Hi @Tribu33, this functionality exists in Advanced Paste and Snipping Tool, so I will close this with "not planned"


chore(ci): notify in Slack if scheduled CI run fails

Posts notices to our team alert Slack channel about any failure of a scheduled run (read: not manually triggered or from a PR).
Very open to changing the copy, but this felt 'fine' to me.

To see the specific tasks where the Asana app for GitHub is being used, see below:

https://app.asana.com/0/0/1208492094472234

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

Project coverage is 78.64%. Comparing base (59b9cb7) to head (5e3e62a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
- Coverage   78.70%   78.64%   -0.07%
==========================================
  Files          86       86
  Lines        6133     6133
==========================================
- Hits         4827     4823       -4
- Misses        972      976       +4
  Partials      334      334

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


Fixes 3490: update distributions for create/update templates

Summary
This creates/updates/deletes distributions in pulp when a template is created or updated (and repositories are added/removed).
See the JIRA card for the breakdown of the distribution paths. In summary, distributions are created under a path associated to each template. And the paths for red hat repos and custom repos are different.
Testing steps

These testing steps are just a starting point, there's a lot of cases to test here.
Sync 2 repositories.
Create a template and include the first repository.
After the template is created, grab the distribution_href from the "templates_repository_configurations" table. Query pulp for that href. Make sure it is created and that the path matches the requirements of the JIRA card.
Patch the template, including the first and second repositories in the request. Check that the old repository's distribution persists and that a new one is created for the second repository.
Patch the template again, removing the second repository. The distribution for that repository should be deleted.
If you have the means to host your own repositories, you'll also want to test changing the date of the template. I'm not sure how to test this otherwise.

Checklist

[ ] Tested with snapshotting feature disabled and pulp server URL not configured if appropriate

https://issues.redhat.com/browse/HMS-3490

/retest

few comments, otherwise looks good.  doing some testing

seeing an issue where i tried to simulate having snapshots of different dates by:

creating a custom repo, letting it snapshot
change the url and let it snapshot again
run this sql command (or similar) to update the first snapshot's created_at date:

Create a template and change the date to the 19th, or the 21st.  I'd expect the contents of the template path for that repo to change, but i don't see them change.  I added some debugging and it seems like the distribution is being updated with the same publication no matter which date i picked.  It always picks the one from the 19th

I thought it might be an issue with the FetchSnapshotsModelByDateAndRepository method, but when i call the api that uses it, that seems fine:

####
POST http://localhost:8000/api/content-sources/v1.0/snapshots/for_date/
x-rh-identity: eyJpZGVudGl0eSI6eyJvcmdfaWQiOiIxNzY4NDYzOCIsICJ0eXBlIjoiVXNlciIsInVzZXIiOnsidXNlcm5hbWUiOiJmb28ifSwiYWNjb3VudF9udW1iZXIiOiIxNzY4NDYzOCIsImludGVybmFsIjp7Im9yZ19pZCI6IjE3Njg0NjM4In19fQo=
Content-Type: application/json

{
  "repository_uuids": ["5079621c-c97c-4120-9aeb-60d68d3dcc29"],
  "date": "2024-03-20"

}

  {
    "repository_uuid": "5079621c-c97c-4120-9aeb-60d68d3dcc29",
    "is_after": false,
    "match": {
      "uuid": "67c68114-0a6e-4f50-a6f3-5d09e9419eaf",
      "created_at": "2024-03-21T06:08:49.060373-04:00",
      "repository_path": "cf98e9d7/5079621c-c97c-4120-9aeb-60d68d3dcc29/4866867f-3fe0-4c20-99f3-a0b342964bfa",
      "content_counts": {
        "rpm.package": 1
      },

/retest

i noticed that if i select a repo that has no snapshots, i get an error:
1:25PM ERR recovered panic in worker with error: runtime error: index out of range [-1] error="runtime error: index out of range [-1]" request_id=vWLyHErsQHhairrylRETYxAZixLBEyKE task_id=c78c02f7-676d-4fd8-a0f9-b258143fde3e task_type=update-template-distributions

Its probably a situation we should warn against in the ui, but ideally the task wouldn't error and would just skip that repo

just the issue with the error, otherwise this is working great!


Customizing color themes for individual windows

Customizing color themes for individual windows allows each window to have its own unique appearance, improving visual distinction and helping users organize their workspace more effectively.

/question
You already can set workbench.colorTheme in workspace settings (select Wokrspace tab in settings editor of manually create/edit .vscode/settings.json file in project folder).
Alternatively you can use workbench.colorCustomizations in Workspace settings to override colors of separate parts of interface.
For later approach it's probably better to use [Peacock] (https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock) extension to customize them for you.


I can not load austraits data from zenodo

I have been using the load_austraits() function from the austraits package. This function is intended to load the austraits dataset from Zenodo. While it was working fine a few days ago, it suddenly stopped functioning properly since yesterday. It's throwing an error stating, "Cannot open the connection to the Zenodo URL".
In the browser, I also cannot access this URL 'https://zenodo.org/api/records/?q=conceptrecid:3568417&all_versions=true'. It returns a '404 Not Found' error. How can I get it to work again?
# install the AusTraits R package from GitHub, then load it
remotes::install_github("traitecoevo/austraits")
#> Skipping install of 'austraits' from a github remote, the SHA1 (53b637cb) has not changed since last install.
#>   Use `force = TRUE` to force installation
library(austraits)
#> Loading required package: RefManageR
#> Thanks for showing interest in `austraits`! Please consider citing this package - citation('austraits')

# use the load_austraits() function to get the austraits data from Zenodo
austraits <- load_austraits(version = "4.1.0")
#> Warning in open.connection(con, "rb"): cannot open URL
#> 'https://zenodo.org/api/records/?q=conceptrecid:3568417&all_versions=true':
#> HTTP status was '404 Not Found'
#> Error in open.connection(con, "rb"): cannot open the connection to 'https://zenodo.org/api/records/?q=conceptrecid:3568417&all_versions=true'

@ShunyiYang, you can download the latest version direclty from here:
https://zenodo.org/records/8353840
If you've been using the database already, you should also have saved versions on your laptop. You only need to download it once. You can review the AusTraits documentation to see how this works.


Update covalent-m3.json

Description
removing the % sign in the tokens naming.
What's included?

removing mention of % in light/dark tokens

Test Steps

[ ] npx build tokens
[ ] then view the output in build/libs/tokens

General Tests for Every PR

[ ] npm run start still works.
[ ] npm run lint passes.
[ ] npm run stylelint passes.
[ ] npm test passes and code coverage is not lower.
[ ] npm run build still works.

:tada: This PR is included in version 8.20.0 :tada:
The release is available on:

v8.20.0
GitHub release

Your semantic-release bot :package::rocket:


Added distinct() around all alb_ingress_cidrs concats to defend again…

…st duplicates.

@schaluva
How to Test

In terraform.tfvars, set sg_ingress_cidrs = ["SAME_CIDR_BLOCK_AS_VPC"]
i. Without distinct(), deployment should fail on PAT step.
ii. With distinct(), deployment should succeed.

FYI
Problem expressed itself on  the var.flag_private_tower_without_eice == true && var.flag_use_existing_vpc == true ? .... line but I realized the same problem could happen on any of the concat options so I changed them all for safety.


Remove web interface component

The maintence of the web interface is too expensive for the value provided. So we're going to remove the interface.

Web interface removed in bdaa4bb7c650aff310d80ed8db603a3279bca499


Incompatible with IntelliJ IDEA 2024.2

Hi!
Unfortunately recent release of IDEA reports incompatibility with concord plugin.

Not compatible with the version of your running IDE (IntelliJ IDEA 2024.2)
Compatible with IntelliJ IDEA (Ultimate, Community), Android Studio, AppCode, Aqua, CLion, Code With Me Guest, DataGrip, DataSpell, GoLand, JetBrains Client, MPS, PhpStorm, PyCharm (Professional, Community), Rider, RubyMine, RustRover, WebStorm, Writerside

The new version, compatible with IntelliJ IDEA 2024.2, will be available in a few days. It is now pending JetBrains' review and approval.

PR closed as advised. Thank you very much for such a quick fix. I see that lots of changes were needed unfortunately.

Built it locally and it works really well. Thank you. Looking forward to jetbrains review.

Is there anything missing in the plugin? What additional functionality would be useful? Any ideas are welcome:)

Version 0.7.0 (with IDEA 2024.2 support) of the Concord plugin has been approved by JetBrains and is now publicly available

Amazing, thanks! Closing the ticket. Will reach out with any improvement ideas when they occur (:


Typescript support

Awesome! Suggest to support the typescipt, it will better!

Thanks for your suggestion, @echoulen!
I have also received similar feedbacks from my peers.
Let me work on it over the next couple days.


Request option to create PDF version for tutorial series

Customer would like to have PDF for series - like "Intro to MVC" and the upcoming EF7/MVC6 series.

https://readthedocs.com/projects/aspnet-mvc/downloads/pdf/latest/


DependsOn with api()

Is it possible to do something like this.
Multiselect::make('School', 'school')
            ->singleSelect(),

Multiselect::make('Course', 'course')
            ->dependsOn('school')
            ->api('schools/{school}/courses', Course::class)

+1  here


can't printHeapHistogram dump when OOM heap exhaust happen

@glyn
I build jvmkill-1.1.0.so library from forked repository https://github.com/llv22/jvmkill (without any change), and forked replace-killjava-script-with-jvmkill-agent-114796351 branch from https://github.com/cloudfoundry/java-buildpack into branch jvmkill-agent-114796351  of https://github.com/llv22/java-buildpack.
with setting printHeapHistogram=1 in https://github.com/llv22/java-buildpack/blob/jvmkill-agent-114796351/lib/java_buildpack/jre/jvmkill_agent.rb.
Now application onto cloud foundry could get HeapHistogram, when thread overflow happened.
However, when heap overflow happened using the following code:
public static void heapOOM() {
    new Thread( () -> {
        final List<JavaOOMTriggerUtil> list = new ArrayList<JavaOOMTriggerUtil>();
        while(true) {
            list.add(new JavaOOMTriggerUtil());
        }
    }).start();
}

in error stream, I can only get information:
{"cc_partition"=>"default", "droplet"=>"c2a99602-08ec-4904-bb3d-3550936bbd68", "version"=>"5374253e-3df8-456f-966e-9740520407e0", "instance"=>"5876495d438d49249b6865b2e6429a46", "index"=>0, "reason"=>"CRASHED", "exit_status"=>255, "exit_description"=>"out of memory", "crash_timestamp"=>1476005982}
without any heap histogram for this case.
could you help us take a look for this?
or give me some suggestions for how to get heap histogram or callstack in this case.

The heap histogram should appear in the application logs, so make sure you are tailing those before provoking the OOM.
To make sure your options are being passed through to the agent correctly, try adding an invalid option alongside printHeapHistogram and make sure you get a warning in the application logs.

Since there's been no response on this issue in a couple of months, I'm going to close it.  If you'd like to see it re-opened, please comment on the issue and I'll reopen it.


Allow dependent docker images to brought up (without testing or installing ansible on them)

Issue Type

Feature request

Molecule and Ansible details
ansible 2.5.3

molecule, version 2.14.0

Molecule installation method (one of):

pipenv

Ansible installation method (one of):

pipenv

Desired Behavior
Hi, I'd like to be able to specify extra docker images to be brought when running molecule (similar to https://github.com/metacloud/molecule/issues/338 ). I understand we can specify extra instances under platforms and then only target specific instances, however by default molecule will install ansible onto every instance declared. This takes a lot of time and also could break certain containers (ie installing ansible & python on a redis docker image).
Perhaps there could be a boolean under platforms which specifies whether or not to build the docker image?
Thanks!

Perhaps there could be a boolean under platforms which specifies whether or not to build the docker image?

Sounds reasonable.  Could you provide a little more information about your use case?

Yeah sure! So its basically an alternative to using docker-compose.
I'm using app_role to bring up an application service which depends on redis, I want to test that the playbook provisioning the application service works, so I need to bring up a redis container too. I don't want or need to run ansible on redis.
Currently, I have a docker-compose.yml in my default scenario directory
---
version: '3'

services:

  redis:
    image: redislabs/rejson
    ports:
      - 6379:6379
    networks:
      - app_role_molecule

networks:
  app_role_molecule:
    external: true

In create.yml I've added an extra task to bring up this network
    - name: Boot docker-compose dependent images
      command: docker-compose up --force-recreate -d

And subsequently destroying it in destroy.yml
    - name: Down docker-compose network
      command: docker-compose down

This works, but its a little annoying. I have to manually edit the create/destroy tasks, I have an extra docker-compose file and I have to connect the networks together.
If there was an option in platforms, I could just have the extra instances with a build:false flag, so they'll be brought up with the other platforms, but won't be built with them
platforms:
  - name: instance
    image: solita/ubuntu-systemd:latest
    command: /sbin/init
    privileged: true
    capabilities:
      - SYS_ADMIN
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
  - name: redis
    image: redislabs/rejson
    build: false

Thanks so much for your help!

That also means if you have build set to false, you also don't want Molecule to converge it, correct?

name: Boot docker-compose dependent images
command: docker-compose up --force-recreate -d

In all honesty, this isn't horrible.  Thats actually one of the big reasons I have the playbooks dumped into the role, so that users can modify them for their unique use cases.
I'm a bit on the fence with this one, b/c It's pretty simple to skip the image building.  However, that also means I need to skip converging ansible on these instances.  I could see this being abused where users would want to skip the build process, but still want ansible to be run.  So it seems like we would need build: false and converge: true which is the part I'm a little hesitant with.

Yeah I see what you mean about having to manage build: false and converge: false.
All I was trying to do was have docker-compose like functionality with the tests and not have to add in any extra steps. Its kind of hacking that functionality into molecule and so I can see how that differs from what you want it to be doing (which is fair enough). Thanks for your comments - I'll use the extra docker-compose step for now, I don't think there'll be too many cases which will require extra non-ansible managed docker instances.
Thanks!

Going to close this for now.  Not something we are looking to implement at this time.  Thank you for bringing up the issue @cam-fulcrum.


JOSS submission: Spelling in reference

On lines 70-71, do "Jin Guo Liu" and "Jin-Guo Liu" refer to the same person? If so, please spell consistently, so the references appears as "Liu et al., 2022; Liu et al. 2021".

https://github.com/openjournals/joss-reviews/issues/5700

Nice catch! Should now be fixed by c982b5283b1e4272aa99b600ba5c1ecc9f2ba472.


Sass Challenges [WIP]

Here are most of the "baseline" Sass challenges:

CSS with Superpowers (Intro to pre-processors)
Storing Data with Sass Variables
Nesting your CSS
Mixing the Cake
Using if and else
Continuing with for
Expanding with each
Wrapping up with while
Partials (haven't made this yet, waiting on multi-tab editor)
Extend your CSS styles

Hopefully we can expand this to be a comprehensive path to learning Sass.

Sorry :joy:, i'm so fussy...

@atjonathan @erictleung Thank you both for going through this! Do you guys have any opinions on what topic needs expanding on? Or what should be added?

@AkiraLaine thanks for your work on adding these challenges! Unfortunately, I'm not actually well versed in preprocessors yet but I've already learned a bit from your lessons 😃  I'll leave @atjonathan to give better suggestions on what to add. I can help look at grammar.

@erictleung No problems, glad to know they taught you a bit :D Thanks for your help.

@AkiraLaine, great work on these challenges so far! You could consider adding Sass Operators. What about providing tutorials on build tools or sass compilation?

I will re-open this PR when we have everything ready


Feature request: transparent background

Original gruvbox had gruvbox_transparent_bg option for that.

This is, as far as I know and according to the readme, already supported. All options of the original gruvbox is.

Well, I just got that I saw this option in https://github.com/morhetz/gruvbox/pull/287, not in gruvbox itself. However, it's pretty useful as it's the only way to do transparent background, because any "highlight <...>" commands in init.lua doesn't take effect.

Try this and it doesn't work, it would be great to have this feature or if it's already added why doesn't it work? Am I doing something wrong?

Try this and it doesn't work, it would be great to have this feature or if it's already added why doesn't it work? Am I doing something wrong?

My PR isn't merged yet, so for solution on line 82 to work you'll have to apply my patch manually or to clone my PR's branch. Line 86 doesn't work at all, and that's the reason why I did this PR.

Sorry guys, the original repo and the community version on which this repo is based does not have that option so I would recommend for you guys that still want that behaviour to add the config manually in your configs.

Try this and it doesn't work, it would be great to have this feature or if it's already added why doesn't it work? Am I doing something wrong?

Hello. How did you achieve this italic font rendering?

@timsofteng Font Dank Mono Regular and Italic

@timsofteng Font Dank Mono Regular and Italic

I mean how to force gruvbox.nvim to display italic in cases as on your screenshot?
My main font is source code pro and I have full bundle including italic mono one. But in same case it render regular mono.
@ellisonleao
Maybe you have ideas?
And I still don't understand how to enable transparent background.

@timsofteng find all options that have "italic" in the name with Ctrl+f in the browser. https://github.com/morhetz/gruvbox/wiki/Configuration


pull request for e2e test at 11/25/2016 16:26:04

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


How to initiate actor backups

Is there any way to initiate the backups on the "ActorService" without having all my actors implement separate backup/restore methods?
I tried using the approach where i create a ServiceProxy, but i really have no idea what to feed it in input parameters (since there is no formal service for backup, just the actor service).

And just after having posted this I read the section on the Azure docs covering my issue.
But for anyone seing this in the future you would do something like:
var proxy = ActorServiceProxy.Create<IBackupRestoreService>( new Uri("fabric:/UrlTo/Actor"), ActorId.CreateRandom());
Which will give you a reference to the ActorService and not the actor instance.


changed names of motors

Before issuing a pull request, please see the contributing page.

wrong target branch


Hours dont get added on Fluency builder

Describe the bug
No matter how many attempts are made , on fluency product rosetta stonks stopped working , originally it was working good but lately this problem rised , I have done many attempts both on firefox and chrome changed lessons and even accounts buy the issue is still persistent
Browser

[ ] firefox
[x] chrome

version:
rosettastone product

[x] Fluency builder

To Reproduce
Steps to reproduce the behavior:

Go to any lesson on fluency builder
Start the extension and do the usual steps
Add hours
Hours won't count

I guess there is a problem right now with Rosetta Stone not only the extension even if you tried to work manually no time will be added

prepare yourself for 1000 hours added

I guess there is a problem right now with Rosetta Stone not only the extension even if you tried to work manually no time will be added

really? that explains why its like this , but it really is working pretty fine tho i mean with foundations


Rename target foundryx to foundry

Fixes #136

Is this comment this relevant?
https://github.com/runtimeverification/kontrol/blob/5554e427e65bfd81e55584434ec543a912661504/flake.nix#L70C10-L70C10

Is this comment this relevant?

This comment is informative as it explains why the Nix build is organized the way it is.
I updated it accordingly.


Clarification for v5 - single process only?

The v5 blurb says this:

What was dropped?
Single process only - optimized for multi thread (open file as exclusive mode)

It is a tad confusing, though I suspect that you mean that the file will be locked in the future and can be accessed by a single process only. Can you confirm?
If so, will it be possible for different class instances of LiteDatabase running in the same process to access the file?

Hi @kuiperzone,
Now, when your first LiteEngine instance open data file, this open occurs as exclusive write. No others can open same datafile. This exclusive locks was nedded to support WAL index implementation. Of course, this single LiteEngine support multiple threads access (and are optimized for that).
If you need open same datafile from many different processes (like open in shell + open in you application) you must use LiteDatabase with ConnectionMode = Shared. This option use a simple "open-read/write-close" LiteEngine implementation. It's not optimized becasuse every time you close/open a database, there are read overhead and no cache-reuse.

Thanks for the reply David. First of all, let me say that I can understand why you have made locking exclusive and I think it's probably the right choice for LiteDB.
However, your answer doesn't quite answer my question. If I were to write:
var ldb1 = new LiteDatabase("FileName= C:/temp/file");
var ldb2 = new LiteDatabase("FileName= C:/temp/file");
I'm guessing the second one will fail because the first has a full lock and, significantly, the stream instance is NOT shared between the two instances.
This would be fine, but I just wanted to confirm because I will need to make some code changes to support V5 in the future.
Andy

Hi @kuiperzone, yes, your ldb2 will fail because ldb1 open datafile in exclusive mode. In this case, you need a Singleton pattern do always reuse same ldb1 instance.

Thanks and all the best with V5.


[MNOE-1134] Organization name & description not appearing in Audit Log for subscription

@ouranos

The organisation_id is being set in the Subscription#to_audit_event with the following line:
event[:organization_id] = relationships.organization&.dig('data', 'id') if relationships.respond_to?(:organization)

I'll need to dig further into it and see why its not being passed correctly.


Link GitHub

PR Fixes:

1 Allows Users to link their GitHub.
2 Uses next-auth authentication

Resolves #1057
https://github.com/user-attachments/assets/70a60f05-b840-45c4-ac29-7b8b86759295
Checklist before requesting a review

[x] I have performed a self-review of my code
[x] I assure there is no similar/duplicate pull request regarding same issue

@devsargam if you can review.

@zenithexe , since you are using nextAuth github providers , it may also effect the real authentication . can you check the cookies after the github connect?

@Ashutoshpadhi629 I have handled the GithubProvider auth case differently in the signIn function. It's doesn't allow to form a new jwt. It just receives the github account details after authentication.
I have also verified the jwt before and after linking the account remains same.


move power-downs to storage

What's this about: power downs are kept in an array within the controller, but should be kept in the Storage.
Problems to tackle:

Storage is generic, PowerDown is not (it is a struct)
Gas costs


Build failed to generate .exe file in bin file

[Initial build] progress_finish(["progress_finish"], [])
[Initial build] Linking Static Library ==> modules\freetype\libfreetype_builtin.windows.opt.64.a
[Initial build] Ranlib Library         ==> modules\freetype\libfreetype_builtin.windows.opt.64.a
[Initial build] Linking Static Library ==> core\libcore.windows.opt.64.a
Ranlib Library         ==> core\libcore.windows.opt.64.a
[Initial build] Linking Program        ==> bin\godot.windows.opt.64.exe

b"C:/TDM-GCC-64/x86_64-w64-mingw32/include/setjmp.h:112:33: warning: type 'struct _SETJMP_FLOAT128' violates one definition rule [-Wodr]\r\n   typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {\r\n                                 ^\r\nC:/TDM-GCC-64/x86_64-w64-mingw32/include/setjmp.h:114:5: note: a type with different alignment is defined in another translation unit\r\n   } SETJMP_FLOAT128;
\r\n     ^\r\nlto1.exe: internal compiler error: Segmentation fault\r\nPlease submit a full bug report,\r\nwith preprocessed source if appropriate.\r\nSee <http://tdm-gcc.tdragon.net/bugs> for instructions.\r\nlto-wrapper.exe: fatal error: g++ returned 1 exit status\r\ncompilation terminated.\r\nC:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lto-wrapper failed\r\ncollect2.exe: error: ld returned 1 exit status\r\n"
=====
scons: *** [bin\godot.windows.opt.64.exe] Error 1
scons: building terminated because of errors.

Please fill the export template, we can't help you without any details on your environment.
But there the error tells you what to do:
lto1.exe: internal compiler error: Segmentation fault\r\nPlease submit a full bug report,\r\nwith preprocessed source if appropriate.\r\nSee <http://tdm-gcc.tdragon.net/bugs> for instructions.

"TDM-GCC" which you seem to be using (never heard of it before) has a bug, and you should report it to TDM-GCC.

TDM-GCC is basically a packaged mingw-64 which was popular before mingw-64 started building their own packages. I believe it's still used by Code::Blocks.


Error Not a PDF file though my input is pdf file

[info] running org.allenai.pdffigures2.FigureExtractorVisualizationCli ./input/Dynamic_Memory_Network_Sochar_QA.pdf
Error: File ./input/Dynamic_Memory_Network_Sochar_QA.pdf is not a PDF file
figure-extractor-visualize
I am getting the error above. Entire Console Output Below
[info] Loading settings for project pdffigures2-master-build from plugins.sbt ...
[info] Loading project definition from /Data/tanik/Multi-modalQA/pdffigures2-master/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to pdffigures2 (in build file:/Data/tanik/Multi-modalQA/pdffigures2-master/)
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] running org.allenai.pdffigures2.FigureExtractorVisualizationCli ./input/Dynamic_Memory_Network_Sochar_QA.pdf
Error: File ./input/Dynamic_Memory_Network_Sochar_QA.pdf is not a PDF file
figure-extractor-visualize
Usage: figure-extractor-visualize [options]
                  input PDF file
-s, --show-steps         Show all intermediate steps
-g, --show-graphic-clustering 0s
Show graphical elements found and how they were clustered
-x, --show-cleaned-figure-regions
Shows figure regions after being post-processed using the rasterized PDF at the given DPI
-e, --show-extractions   Show the bounding boxes of the text and graphics that were extracted
-r, --show-regions       Show the different regions the PDF was broken into
-c, --show-captions      Show the location of the captions
-t, --show-sections      Show the location of sections and paragraphs
-d, --display-dpi
DPI to display figures at (default 55)
-p, --pages       Pages to extract from (defaults to all), 1 is the first page
Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 1 s, completed 18-Mar-2022, 12:53:44 PM
Any idea how to resolve the issue?

Try passing the absolute path of the file instead.

From what I have seen in my case, the filename should not contain "-" nor "_". You can try renaming the file. Also, as @ranok92 said, you should also try passing the absolute path of the file.


Fix: missing return when token is null

Signed-off-by: Zhiyu Wang<EMAIL_ADDRESS>Description of your changes

Fixes #
I have:

[ ] Read and followed KubeVela's contribution process.
[ ] Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

/tag apiserver

@zhiyuone please help cherry-pick

@wonderflow how? 1.4 not need this fix, and i don't know why 1.5 fails.

make your local branch align with the release-1.5
checkout a new branch from release-1.5
cherry-pick the commit

git cherry-pick f7d3fbaeca253be88c0782aead4b8ee76f6c608c

send a pull request to the release-1.5 branch

everything goes the same except you're making a pull request to the release-1.5 branch.


Bump release to 0.27.1.

Draft release notes:
google-cloud-spanner 0.27.1

Pin dependency  google-auth >= 1.1.0 to fix use of google.cloud.spanner on GCE. (PR #3950, issue #3933)
Fix merge of partial timestamp and date field values. (PR #4015, issue #3981, #3998)
Restart streaming iterators from read / execute_sql operations after resumable error (PR #4016, issue #3775).

Internal housekeeping not included in release notes:

Suppress instance creation tests by default on CI (PR #3951)

@lukesneeringer I'm not sure if you intended to push this out as a 1.0 release:  if so, the Trove classifier should also be bumped to Development Status :: 4 - Beta.

Superseded by #4028.

Ha, sorry! (#4034 should make my intention clear on this.)


Add WITCH 5.4 aggregation witch20 for Tasks 1.3 and 5.3

Hi Daniel, Philip:
For the ECEMF database we need to add this model version and aggregation.
Let me know if you need any further detail.
Thanks a lot
Johannes

It seems tests passed no right? Can you please merge and in case also register this model version to the database somehow?
thanks a lot!
Johannes

Permissions added for the WITCH team to upload scenarios for the "WITCH 5.4" model


Google Authentication Not Working

Google authentication is hitting an error on the callback URL:
Error
   at /Users/Mitchell/Repository/easy-node-authentication/node_modules/passport-google-oauth20/lib/strategy.js:95:21
   at passBackControl (/Users/Mitchell/Repository/easy-node-authentication/node_modules/oauth/lib/oauth2.js:132:9)
   at IncomingMessage.<anonymous> (/Users/Mitchell/Repository/easy-node-authentication/node_modules/oauth/lib/oauth2.js:157:7)
   at emitNone (events.js:110:20)
   at IncomingMessage.emit (events.js:207:7)
   at endReadableNT (_stream_readable.js:1045:12)
   at _combinedTickCallback (internal/process/next_tick.js:138:11)
   at process._tickCallback (internal/process/next_tick.js:180:9)

For clarification, the only changes I made were swapping in my credentials from the Google Developers Console and the URL for my local mongodb server.

you might need to add google+ api to your project. In your google developers page, go to your dashboard, and click on enable api, then look for google+ api and select it, this will enable it.

If you are still having issues feel free to check out my repositories under nwen304-group-project > config > passport.js
This is a fairly recent implementation of oauth and how I set it up for my site. You are welcome to use it

@obrienstat Yes, that did it — thank you! Not sure if that was mentioned somewhere and missed it.

you might need to add google+ api to your project. In your google developers page, go to your dashboard, and click on enable api, then look for google+ api and select it, this will enable it.

Non-obvious solution! Creating the credentials in Google API is not enough - you also have to enable the Google+ API after creating the credentials.


Use OPTICS_NULL_LEVEL const from napalm-base

This constant already existed in napalm-base
But it was missed in https://github.com/napalm-automation/napalm-junos/pull/115
And I have introduced a duplicate constant.

Coverage remained the same at 85.445% when pulling 9edd78f12a04f9ed3c4731cd6f7ad3625bb12184 on REM-DUPLICATE into a8e8f78802c9f1babd49fa762d2bbcdd50c92bd7 on develop.

Coverage decreased (-0.02%) to 85.427% when pulling 9edd78f12a04f9ed3c4731cd6f7ad3625bb12184 on REM-DUPLICATE into a8e8f78802c9f1babd49fa762d2bbcdd50c92bd7 on develop.


Add display of the low and high dates of the baseline status

Here is what it looks like currently:

Instead of treating these two options like Columns (and casting as ColumnKey), we should create a new entity type. Call it something like ColumnOptionDefinition
type ColumnOptionDefinition = {
  nameInDialog: string;
  columnOptionKey: ColumnOptionKey;
};

export enum ColumnOptionKey {
  BaselineStatusHighDate = 'baseline_status_high_date',
  BaselineStatusLowDate = 'baseline_status_low_date',
}

const columnOptionKeyMapping = Object.entries(ColumnOptionKey).reduce(
  (mapping, [enumKey, enumValue]) => {
    mapping[enumValue] =
      ColumnOptionKey[enumKey as keyof typeof ColumnOptionKey];
    return mapping;
  },
  {} as Record<string, ColumnOptionKey>
);

Then we can modify the existing ColumnDefinition to optionally include that:
type ColumnDefinition = {
  nameInDialog: string;
  headerHtml: TemplateResult;
  cellRenderer: CellRenderer;
  options: {
    browser?: components['parameters']['browserPathParam'];
    channel?: components['parameters']['channelPathParam'];
    columnOptions?: Array<ColumnOptionDefinition>;
  };
};

Then in CELL_DEFS, the baseline entry would look like this:
  [ColumnKey.BaselineStatus]: {
    nameInDialog: 'Baseline status',
    headerHtml: html`Baseline`,
    cellRenderer: renderBaselineStatus,
    options: {
      columnOptions: [
        {
          nameInDialog: 'Show Baseline status low date',
          columnOptionKey: ColumnOptionKey.BaselineStatusLowDate,
        },
        {
          nameInDialog: 'Show Baseline status high date',
          columnOptionKey: ColumnOptionKey.BaselineStatusHighDate,
        },
      ],
    },
  },

You will want to create a similar method to parse the column options as we do the existing columns
export function parseColumnOptions(columnOptions: string): ColumnOptionKey[] {
  let colStrs = columnOptions.toLowerCase().split(',');
  colStrs = colStrs.map(s => s.trim()).filter(c => c);
  const colKeys: ColumnOptionKey[] = [];
  for (const cs of colStrs) {
    if (columnKeyMapping[cs]) {
      colKeys.push(columnOptionKeyMapping[cs]);
    }
  }
  if (colKeys.length > 0) {
    return colKeys;
  } else {
    return [];
  }
}

These options will live in QueryStringOverrides:
type QueryStringOverrides = {
  q?: string;
  start?: number;
  num?: number;
  sort?: string;
  columns?: string[];
  wpt_metric_view?: string;
  dateRange?: DateRange;
  column_options?: string[]; <--- new value
};

And update getContextualQueryStringParams to include this snippet using that new column_options
  const colOptions =
    'column_options' in overrides
      ? overrides.column_options!.join(',')
      : getColumnOptions(location);
  if (colOptions) {
    searchParams.set('column_options', colOptions);
  }

This should make renderDialogContent easier since we have the dedicated methods for column options:
  renderDialogContent(): TemplateResult {
    if (!this.location) return html``;
    const columns: ColumnKey[] = parseColumnsSpec(
      getColumnsSpec(this.location)
    );

    const columnOptions: ColumnOptionKey[] = parseColumnOptions(
      getColumnOptions(this.location)
    );
    const checkboxes: TemplateResult[] = [];
    for (const enumKeyStr of Object.keys(ColumnKey)) {
      const ck = enumKeyStr as keyof typeof ColumnKey;
      const columnId = ColumnKey[ck];
      const displayName = CELL_DEFS[columnId].nameInDialog;
      const cellColumnOptions = CELL_DEFS[columnId].options.columnOptions;
      const checkbox = html`
        <sl-tree-item expanded>
          <sl-checkbox
            class="column"
            value="${columnId}"
            ?checked=${columns.includes(ColumnKey[ck])}
          >
            ${displayName}
          </sl-checkbox>
          ${cellColumnOptions?.map(
            option => html`
              <sl-tree-item expanded>
                <sl-checkbox
                  value=${option.columnOptionKey}
                  class="column-option"
                  ?checked=${columns.includes(ColumnKey[ck]) &&
                  columnOptions.includes(option.columnOptionKey)}
                  >${option.nameInDialog}</sl-checkbox
                >
              </sl-tree-item>
            `
          )}
        </sl-tree-item>
      `;

      checkboxes.push(checkbox);
    }
    const tree = html`<sl-tree>${checkboxes}</sl-tree>`;
    return html`

${tree}

Instead of treating these two options like Columns (and casting as ColumnKey), we should create a new entity type. Call it something like ColumnOptionDefinition

Thanks.  I was thinking it would require something like this.  I hope all this will be useful for other applications.

The problem now is that the actual column_options from the URL are not passed to the cell rendering even though the specs of the column_options are passed via the column specs. They need to be passed in via the overview-table render method, since only the selected columns are mapped to the cell render method via the renderTableBody, and subsequently to the renderBodyWhenComplete.  It would appear that we have to modify every one of those renderBody* methods to add the columnOptions as well as the columns.  Got any idea how to simplify this?

The problem now is that the actual column_options from the URL are not passed to the cell rendering even though the specs of the column_options are passed via the column specs. They need to be passed in via the overview-table render method, since only the selected columns are mapped to the cell render method via the renderTableBody, and subsequently to the renderBodyWhenComplete. It would appear that we have to modify every one of those renderBody* methods to add the columnOptions as well as the columns. Got any idea how to simplify this?

Each CellRenderer method (i.e renderXxx), has access to routerLocation which has the column options. I have provided a suggestion that follows how another render method uses the routerlocation to read the url for data.

I am puzzled as to why these particular screenshots are in the PR, but the code looks good.

They were unrelated updates after fixing problems with the playwright tests.  Could have been separate, but oh well.


C89 API Proposal

Meant to be compatible with C++, so pure ANSI C.

How do the tracer and span objects get destroyed?

The spans and tracer need to be derived from the destructible interface. Not sure what I was doing here. Will fix.

Could we include a dynamic loading interface as part of the C API?
I think an app linking to the C-API but being able to dynamically load a C++ tracer with a C-C++ bridge would be a good scenario to support.

Definitely. I'll work on that too unless you want to do it. Another eventual goal would be to implement a bridge on top of the C++ implementation for C libraries looking to adopt a C++ client without wrapping it themselves.

About the dynamic linking @rnburn, I've taken a look at the C++ version which requires a C++ TracerFactory object be loaded from a shared library. That can't be done in a pure C library. What equivalent would you suggest?

Why not use your C inheritance model and return a pointer to some kind of tracer factory struct?
typedef struct opentracing_tracer_factory {
  opentracing_destructible base;
  int make_tracer(struct opentracing_tracer_factorty* factory, const char* config, opentracing_tracer** tracer_out, char** error_message);
};

I used a factory instead of creating a tracer directly to handle the case where you might want to reconstruct a new tracer with a different configuration.

That makes sense. Would you mind if I used a function instead? Like int opentracing_make_tracer(const char* config, opentracing_tracer* tracer); defined in the vendor library?

Yes, I think that would work.
One advantage of the struct is that it could allow you to support having different functions to construct a tracer, but if there's only one I think a function pointer works fine.

Builds failing until https://github.com/travis-ci/travis-ci/issues/9312 is fixed.

@rnburn I think I've addressed everything. Any comments? If you are ready, please accept.

Thanks for taking a look.

@rnburn I have a question regarding how to handle the invalid span context given that C has no dynamic_cast. How would the tracer check the validity of the type. Should the span context expose some sort of magic identifier to recognize its own span types? @yurishkuro curious at what you would suggest here too. Relates to https://github.com/opentracing/opentracing-cpp/issues/23.

@isaachier It only seems like RTTI is necessary if a user is linking in multiple tracer libraries and switching between them at runtime.
I'd be ok with having that be undefined behavior so that tracers could simply recast the span context without any checking.
But we could add a void* field to the span context that a tracer could set to point to a dummy static variable and later check against to verify the type.

@rnburn generally magic numbers are used for this sort of verification. I guess mostly for file format (i.e. ELF, Java, etc.), but protobuf-c does a similar thing to check that objects are true "derived" protobuf-c (https://github.com/protobuf-c/protobuf-c/blob/master/protobuf-c/protobuf-c.h#L236). Anyway, I'm fine with a void* but int will probably be the case for most C library implementations.

Isn't there a possibility of collision with magic numbers? I could see how they would make sense in a single project where you can control the numbers for all the classes, but a pointer would guarantee no collisions across separate projects without any need to synchronize.

I guess so. I can change it to a void pointer, but I realized while writing this that the magic number would only work with AI-compatible types. So casting from an old type definition to a new type definition would be a problem even within the same vendor (not sure how this would happen, maybe with dynamic loading). So I think I should just make a method like validate or something that could take a vendor with version number as string arguments.

Rethinking this yet again... A void pointer actually means nothing if we can't cast it to "check" for properties. I'm back to the magic number as the simplest solution. Consider this problem:
typedef struct base_type {
    const void* opaque_handle;
} base_type;

typedef struct derived_type_a {
    base_type base;
} derived_type_a;

static const char* type_a_id = "type a";

static int check_type_a(const base_type* base)
{
    return strcmp((const char*) base->opaque_handle, type_a_id) == 0;
}

static const int type_b_id = 2;

typedef struct derived_type_b {
    base_type base;
} derived_type_b;

static int check_type_b(const base_type* base)
{
    return type_b_info == *(const int*) base->opaque_handle;
}

int main()
{
    derived_type_a a;
    ((base_type*) &a)->opaque_handle = type_a_id;

    derived_type_b b;
    ((base_type*) &b)->opaque_handle = &type_b_id;

    base_type* base = &b;
    check_for_a(b);  /* Potential segfault */

    return 0;
}

This is the way I would see it working:
typedef struct dummy_type {
} dummy;

typedef struct base_type {
    const void* type_signature;
} base_type;

typedef struct derived_type_a {
    base_type base;
    int a;
} derived_type_a;

static dummy type_a_id;

static int check_type_a(const base_type* base)
{
    return  base->type_signature, &type_a_id;
}

static dummy type_b_id;

typedef struct derived_type_b {
    base_type base;
    double b;
} derived_type_b;

static int check_type_b(const base_type* base)
{
    return  base->type_signature == &type_b_id;
}

int main()
{
    derived_type_a a;
    ((base_type*) &a)->type_signature = &type_a_id;

    derived_type_b b;
    ((base_type*) &b)->type_signature = &type_b_id;

    base_type* base = &b;
    check_type_a(b);

    return 0;
}

OK so that is exactly what I saw in the StackOverflow question. I think it works here, seeing as we have no other RTTI. The only thing I saw there was that the address is unique as long as the module is loaded. Not 100% sure how that could affect this.

@rnburn are you okay the new proposal for a const void* along with length int so the caller can at least avoid accessing beyond the boundaries of the underlying type?

So not something that would affect the API at all, but would you consider following a directory structure where the installed headers are separated from the src directory and non-installed headers. IMO it makes it easer to browse the API since you only need to look at the include directory.
This is the directory structure used by all of the boost libraries (see for example boost/filesystem.

Hey @heyleke -- any thoughts on the C API?
It allows support for tracers completely in C and doesn't require C11, which is what I think you were originally interested in.

I get that. OTOH I find the use of an install directory a nuisance. There are projects with both styles.

@rnburn are you ready to accept? I know it would be better if others reviewed, but just your personal review?

@isaachier - the part I don't like is renaming the noop tracer to the null tracer, as noop is consistently used across all the other OT APIs.
But if there's others that buy into moving towards null instead of noop for the APIs, then I'd be ok with it.

If that is the only thing, I'm fine with changing it.

Done

This looks good to me.
The only question I had was whether we should be using the propagation_format argument since the consensus from https://github.com/opentracing/opentracing-go/issues/127 seemed to be that we should drop them. But I'll let you decide whether that's a good idea for OT-C or not.

Thanks for approving. I see what you are saying. Maybe I can just use an opaque carrier instead of a format enum.

@rnburn I updated the methods to account for all cases of the enum. Please let me know what you think when you have a chance.


Optimizes some verification operations

The chain verification verifies only from a given Digest, in case we trust blocks already stored
GetProof will get links up to the last one, instead of blocklinks, sparing blocks unmarshalling and verification

Fix https://github.com/dedis/dela/issues/238

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

25 of 29 (86.21%)  changed or added relevant lines in 4 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.01%) to 99.09%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

core/ordering/cosipbft/blockstore/disk.go
7
9
77.78%

core/ordering/cosipbft/types/chain.go
8
10
80.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.01%

Covered Lines:
12638

Relevant Lines:
12754

💛  - Coveralls

Added a benchmark. Turns out this is now 1.8x times faster 🚀
Dela optimization benchmark - Sheet3.pdf

And here is the profiling report:
profile001.pdf


Please reopen issue #11744

Issue #11744: This Issue was closed with the comment:

We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

However, as a non-member of this project I am unable to re-open issues.

@nils-a Closing this one as the issue is being tracked as part of #11744