text:
addHTML image quality

When I use rasterizeHTML to render the page as a canvas, then use jsPDF's addHTML, the image quality is variable.
If I don't use the option "pagesplit", it renders one PDF page in good quality.  If I set pagesplit to true, then it renders the entire page but the image quality on each page is dramatically reduced.
Also, I found that the default code was stretching or compressing the images.  I made some changes to the code.  This is the code from line 1779.
var crop = function() {
                    var cy = 0;
                    while(1) {
                        var canvas = document.createElement('canvas');
                        canvas.width = Math.min(W*K,obj.width);
                        canvas.height = Math.min(H*K,obj.height-cy);
                        var ctx = canvas.getContext('2d'),
                            scaledHeight = obj.height * canvas.width / obj.width;
                        ctx.drawImage(obj, 0, cy, obj.width, obj.height, 0, 0, canvas.width, scaledHeight);
                        var args = [canvas, x,cy?0:y,canvas.width/K,canvas.height/K, format,null];
                        this.addImage.apply(this, args);
                        cy += (obj.width * (canvas.height / canvas.width));
                        if(cy >= obj.height) break;
                        this.addPage();
                    }
                    callback(w,cy,null,args);
                }.bind(this);

Basically, I added 'scaledHeight' so the drawImage height is normal, then I changed the 'cy' amount.
I also checked already, bypassing the part where it takes the canvas and does .toDataUrl('image/png') does not improve the image quality.

has this been merged into jspdf? Im using addHTML on a div of tables, and it's still producing blurry pdfs.

Nope, last I heard they completely rewrote some logic and that this change
isn't necessary anymore.
On Thu, Mar 26, 2015, 9:23 AM ragefuljoe notifications@github.com wrote:

has this been merged into jspdf? Im using addHTML on a div of tables, and
it's still producing blurry pdfs.
—
Reply to this email directly or view it on GitHub
https://github.com/MrRio/jsPDF/issues/339#issuecomment-86538410.

am I doing something wrong perhaps? Here's what I'm calling:
var pdf = new jsPDF('l', 'in', 'letter');
pdf.addHTML(exportbuffer, 0,0, {pagesplit: true}, function(){
var pdfDataURL = pdf.output('datauristring');
var base64 = pdfDataURL.replace(/^data:(image|application)\/(png|jpg|pdf);base64,/, "");
exportFolder.file(exportdate+"_table.pdf",base64,{base64:true});

Hmm I'm unfamiliar with some of the functions you are calling so someone
else may have to help you.
It looks like you're taking the output the PDF produces, grabbing the
base64 data and exporting that using a different export tool.  Why not save
using jsPDF's API?
Although it doesn't make too much sense why that'd make it not blurry.
The original issue is that the math to convert everything to a canvas was
wrong.  It would either stretch or squish the content very slightly.  I'd
recommend resizing the window to really wide and really small.  See if it
looks stretched or squished.  If it does then the issue is still there.
Also, I have some plnkr links above.  Try to grab the version of jsPDF that
I use there and see if that helps.
On Thu, Mar 26, 2015 at 9:27 AM ragefuljoe notifications@github.com wrote:

am I doing something wrong perhaps? Here's what I'm calling:
var pdf = new jsPDF('l', 'in', 'letter');
pdf.addHTML(exportbuffer, 0,0, {pagesplit: true}, function(){
var pdfDataURL = pdf.output('datauristring');
var base64 = pdfDataURL.replace(/^data:(image|application)/(png|jpg|pdf);base64,/, "");
exportFolder.file(exportdate+"_table.pdf",base64,{base64:true});
—
Reply to this email directly or view it on GitHub
https://github.com/MrRio/jsPDF/issues/339#issuecomment-86540461.

Ok will give your plnks a try. If it's the ones I tried before, the one with "new hotness" wasn't working for me.
I'm outputting some other pdfs in a folder that I need to deliver zipped up, but like you said, I don't see why that would affect the blurriness of the pdf.

Per the comment by @diegocr about issuing a PR to html2canvas, there are a number of issues there reporting blurry output:
https://github.com/niklasvh/html2canvas/issues/340
https://github.com/niklasvh/html2canvas/issues/158
https://github.com/niklasvh/html2canvas/issues/312
https://github.com/niklasvh/html2canvas/issues/206
it would be great if the work here could be contributed to that repo! :+1:
I could really use a bug fix. Thanks!

Hi
I found a issue when generate PDF using jspdf. in pdf background color is coming black,
Is there any solution for remove background color.
Thanks
Nitin

If I don't use the option "pagesplit", it renders one PDF page in good quality. If I set pagesplit to true, then it renders the entire page but the image quality on each page is dramatically reduced.
IS THIS ISSUE SOLVED? If so can anybody please provide me the code, I have been having this issue for a while and I couldn't figure out how to solve this. Thanks in advance

The issue with "pagesplit" still exists I think, just tried it with my web application with multiple scalable tables.
@nitin0708
use
pdf.addHTML(document.documentElement, function() {
pdf.save(test.pdf');
});
basically you have to use "document.documentElement" instead of "document.body" to avoid black background with the most recent html2canvas

@subashboss29
A method to solve the poor quality problem is not using the 'pagesplit', you can use codes below.

function printbypage(pdf, k){
if(k >= $('.my_show').length)
{
pdf.output('dataurlnewwindow');
}
pdf.addHTML($('.my_show')[k], function(){
if(k < $('.my_show').length - 1)
{
pdf.addPage();
}
printbypage(pdf, k + 1);
});
};
function print_myshow() {
var pdf = new jsPDF('p', 'mm', 'a4');
printbypage(pdf, 0);
};

@zhangzhishan
Could you make a jsfiddle example for the solution above please?

I have close to 500 images which will be generated dynamically and those images are in a foreach loop. I have tried adding these images to pdf using addImage and it generated me a pdf of size 15mb and using SLOW param i tried to reduce the size and it worked but unfortunately instead of 500 different images it is showing only one image 500 times. could any one help me in this issue.
Thanks in advance!

Great contribution the problem but the only drawback is that it depends on the size of the screen that is displayed.They have some form of fix

Great! But as I use an id ? it's possible? I do not have a selector main

"If I don't use the option "pagesplit", it renders one PDF page in good quality. If I set pagesplit to true, then it renders the entire page but the image quality on each page is dramatically reduced. "
Could someone tell me how to fix this?  Thanks so much.

@bpmckee
hi , I tried your export2 codes, that's cool.
But still I have a problem afer using the export2 codes, the page now is splited, (on PDF)but only on one page 1 I can see conents , on page 2 and page 3 there are blank. Could u pls give me some help?

I tested the export2 codes with firefox ,IE10+ and chrome, on IE10+ and chrome, all are fine, PDF is properly splited, but on firefox , the output PDF only has contents on page 1, on page 2 or 3 there are blank. Could someone throw some light how to fix it? I just got caught by this issue for quite long time and don't konw how to do.

@drizzt00s I haven't looked at this issue in a long time, but I remember firefox being a huge pain.
I mentioned in one of the comments that there were errors that did not make any sense at all with firefox.
For example:
// this isn't working in firefox??
var test = 0;
canvas.drawImage(img, 0, test, img.height, img.width);

// but this is????
canvas.drawImage(img, 0, 0, img.height, img.width);

Things were very very strange and all seemed to happen around the canvas.drawImage and canvas.toDataUrl.
Unfortunatly I don't have very much time to look into the issue but if it's anything like it was before, it's something with one of those two functions that firefox doesn't like sometimes.

I think I know what's wrong with firefox . in Your method
function canvasToImage (canvas){
    var img = new Image();
    var dataURL = canvas.toDataURL('image/png');
    img.src = dataURL;
    return img;
};

The problem with method is: when you set   img.src = dataURL;, this is asynchronous， so on the next line when the method return img, on firefox the img has not been fully loaded.

@bpmckee
I think this is why the bug happens, but I am not 100% sure

@bpmckee
hi, ignore my previous two comments.

in the method canvasShiftImage
change this line:
ctx.drawImage(imgPreload,0, shiftAmt, imgPreload.width, imgPreload.height, 0, 0, imgPreload.width, imgPreload.height);
to:
ctx.drawImage(imgPreload,0,shiftAmt,imgPreload.width,imgPreload.height-shiftAmt,0,0,imgPreload.width,imgPreload.height-shiftAmt);
It will fix the bug on firefox. All browsers are fine now.

Does anyone know where pagesplits quality is fixed because i use 1.0.272 and there it is bad, i cant use the newest version becaus of any other issues

Ok i found a solution :
Use
@bpmckee change for the crop
+
Change the Scale factor it is to low
var I = this.internal, K = I.scaleFactor, W = I.pageSize.width, H = I.pageSize.height;

K <-- to a 7 or 8 example.
if you have to scale your content do it on the DOM before "sending" it to the pdf plugin I do it with a clone of the element

I have found a workaround as well.
// change the font size of everything in the area you want to print to a much larger size (mine by default was 12px, so I'm changing it to 22px
$("#iframe").contents().find("*").css("font-size", "22px");
// clone it
var printClone = $("#iframe").clone();
// get the width and height of all of the content
var contentHeight = $("#iframe")[0].scrollHeight;
var contentWidth = $("#iframe")[0].scrollWidth;
// we have where we create a new div to stuff the content into
$("#printOutput").append("

");
// set the new div height and width to the calculated ones above
$(".pdfDiv").height(contentHeight);
$(".pdfDiv").width(contentWidth);
// add the div to the clone
printClone.appendTo(".pdfDiv");
// add the html
pdf.addHTML($(".pdfDiv")[0],function() {
        // save it
	pdf.save('pdf.pdf');
        // reset the font size
	$("#iframe").contents().find("*").css("font-size", "");
        // remove the div
	$("#pdfDiv").remove();
});

So has anyone come up with one definitive answer as to how best to use addhtml, output a pdf, and not have it blurry!!?

I think mine is good enough.

On Mar 11 2016, at 2:37 am, David Kivlehan <notifications@github.com>
wrote:

So has anyone come up with one definitive answer as to how best to use
addhtml, output a pdf, and not have it blurry!!?

—
Reply to this email directly or [view it on GitHub](https://github.com/MrRio/j
sPDF/issues/339#issuecomment-194994582).![](https://github.com/notifications/b
eacon/AFcwiewi9DM2k-uPjrYnO-wvxyIDlIXgks5psGTpgaJpZM4CaLrf.gif)

Nope, 0% improvement in my single page pdf using your above method. Gunna switch to a new library, try out some server-side solutions I think.

I had a problem with retina and blurry fonts i solved it with this workaround for A4:
var w = 794;
var h = 1145;
var canvas = document.createElement('canvas');
canvas.width = w * 2;
canvas.height = h * 2;
canvas.style.width = w + 'px';
canvas.style.height = h + 'px';
var context = canvas.getContext('2d');
context.scale(2, 2);
//scale end
pdf.addHTML(document.getElementById(that.createId("iframe")).contentWindow.document.body.firstChild, -2, -6, { canvas: canvas }, function() {

I solved it with the following steps:

on every getContext call set the following (specific browser) (jspdf and html2canvas)

var ctx= canvas.getContext('2d');
ctx.mozImageSmoothingEnabled = false;
ctx.webkitImageSmoothingEnabled = false;
ctx.msImageSmoothingEnabled = false;
ctx.imageSmoothingEnabled = false;

This will resolve the blurry output in most cases. This hack was refused since this hasn't worked for some people.

set options.pagesplit to true for html2canvas call (or remove the condition from jspdf) and apply the snippet from bpmckee of the first post to jspdf (or the addHtml plugin)
you now call html2canvas to get the canvas
use addImage (use the alias!) and addPage to split the canvas onto multiple pages

(used versions jspdf 1.0.272 and html2canvas 0.4.1)
good luck

Hi Billy and Dominik,
Thanks for sharing this method to convert the HTML page to PDF.Above approach worked fine for me :) accept one problem through which I am currently going through.
I have implemented this on a button click(similar to you) but want to ignore the button from the generated pdf(as it is provided in fromHTML method of jspdf through elementhandler).Could you please guide me how I can ignore button from the PDF using above approach?

Hi Bill and Domnik,
I am fetching the images from CMS(Contentful) in my HTML and then trying to generate PDF of that HTML.
But in the generated PDF, images are missing.(seems to be an issue of cross origin).
Please suggest me how can i get rid of this issues.
Below is my code-:
function downloadPDF() {
var canvasToImage = function(canvas){
var img = new Image();
var dataURL = canvas.toDataURL('image/png');
img.crossOrigin = "Anonymous";
img.src = dataURL;
return img;
};
var canvasShiftImage = function(oldCanvas,shiftAmt){
shiftAmt = parseInt(shiftAmt) || 0;
if(!shiftAmt){ return oldCanvas; }
var newCanvas = document.createElement('canvas');
newCanvas.height = oldCanvas.height - shiftAmt;
newCanvas.width = oldCanvas.width;
var ctx = newCanvas.getContext('2d');
ctx.mozImageSmoothingEnabled = false;
ctx.webkitImageSmoothingEnabled = false;
ctx.msImageSmoothingEnabled = false;
ctx.imageSmoothingEnabled = false;

var img = canvasToImage(oldCanvas);
ctx.drawImage(img,0, shiftAmt, img.width, img.height, 0, 0, img.width, img.height);

return newCanvas;

};
var canvasToImageSuccess = function(canvas){
var pdf = new jsPDF('l','px'),
pdfInternals = pdf.internal,
pdfPageSize = pdfInternals.pageSize,
pdfScaleFactor = pdfInternals.scaleFactor,
pdfPageWidth = pdfPageSize.width,
pdfPageHeight = pdfPageSize.height,
totalPdfHeight = 0,
htmlPageHeight = canvas.height,
htmlScaleFactor = canvas.width / (pdfPageWidth * pdfScaleFactor),
safetyNet = 0;
while(totalPdfHeight < htmlPageHeight && safetyNet < 15){
var newCanvas = canvasShiftImage(canvas, totalPdfHeight);
pdf.addImage(newCanvas, 'png', 0, 0, pdfPageWidth, 0, null, 'NONE');
// var alias = Math.random().toString(35);
// pdf.addImage(newCanvas, 0, 0, pdfPageWidth, 0, 'png', alias, 'NONE');
  totalPdfHeight += (pdfPageHeight * pdfScaleFactor * htmlScaleFactor);

  if(totalPdfHeight < htmlPageHeight){
      pdf.addPage();
  }
  safetyNet++;

}
var pageName = document.location.pathname.match(/[^/]+$/)[0];
pdf.save(pageName + '.pdf');
};
html2canvas($('body')[0],
{
onrendered: function(canvas){
canvasToImageSuccess(canvas);
}
});
}

How can one compress the output file?

`$(document).ready(function () {
$("#btnPrint").on('click', exportTwo);
        function exportTwo() {
            var canvasToImage = function (canvas) {
                var img = new Image();
                var dataURL = canvas.toDataURL('image/png');
                img.src = dataURL;
                return img;
            };
            var canvasShiftImage = function (oldCanvas, shiftAmt) {
                shiftAmt = parseInt(shiftAmt) || 0;
                if (!shiftAmt) { return oldCanvas; }

                var newCanvas = document.createElement('canvas');
                newCanvas.height = oldCanvas.height - shiftAmt;
                newCanvas.width = oldCanvas.width;
                var ctx = newCanvas.getContext('2d');

                var img = canvasToImage(oldCanvas);
                ctx.drawImage(img, 0, shiftAmt, img.width, img.height, 0, 0, img.width, img.height);

                return newCanvas;
            };

            var canvasToImageSuccess = function (canvas) {
                var pdf = new jsPDF('l', 'px'),
                    pdfInternals = pdf.internal,
                    pdfPageSize = pdfInternals.pageSize,
                    pdfScaleFactor = pdfInternals.scaleFactor,
                    pdfPageWidth = pdfPageSize.width,
                    pdfPageHeight = pdfPageSize.height,
                    totalPdfHeight = 0,
                    htmlPageHeight = canvas.height,
                    htmlScaleFactor = canvas.width / (pdfPageWidth * pdfScaleFactor),
                    safetyNet = 0;

                while (totalPdfHeight < htmlPageHeight && safetyNet < 15) {
                    var newCanvas = canvasShiftImage(canvas, totalPdfHeight);
                    pdf.addImage(newCanvas, 'png', 0, 0, pdfPageWidth, 0, null, 'NONE');

                    totalPdfHeight += (pdfPageHeight * pdfScaleFactor * htmlScaleFactor);

                    if (totalPdfHeight < htmlPageHeight) {
                        pdf.addPage();
                    }
                    safetyNet++;
                }

                pdf.save('test.pdf');
            };

            html2canvas($('.pgePreview')[0], {
                onrendered: function (canvas) {
                    canvasToImageSuccess(canvas);
                }
            });
        }
    });`

Exception occurred: Uncaught (in promise) Invalid unit: px -
I referred the this link http://plnkr.co/edit/nNSvHL8MZcT6nNKg9CG9?p=preview

So did anyone find the best solution for rendering html to pdf with good quality? I've been stuck with this for a month already.

We are closing this issue, because we will not support any longer fromHTML and addHTML.
Explaination:
We are working on a new html2pdf plugin, which will be based on html2canvas and our context2d plugin. This should lead to more reliable results for your projects. And it will give us the time to focus on the core functionality of pdf-generation because we will not use our energy for writing/supporting/extending 2 html plugins. If you still want to use addHTML or fromHTML you can still use jsPDF 1.4.1.
Best Regards

authors: Dikay900 MLuis77 TA2k arasabbasi bpmckee chip drizzt00s fonsecapontes funzeye gauravmishra24 ggxt greggmojica joshterrill mplibunao neridonk nitin0708 pradeepvempati ragefuljoe ramkumary subashboss29 zhangzhishan


text:
Created calculator using pyhon

Created a GUI for calculations using tkinter library in python
Type of change

[ ] Added new project
[ ] Bug fix
[x] New features
[ ] Enhanced documentation

Changes proposed in this pull request

Project name :

Short description :

Checklist

[x] The code is Python 3 compatible
[x] I have added relevant comments in my file to make code understandable
[x] I have added my project in a folder which includes all the necessary files

Hey @Mrinank-Bhowmick
Could you please check!

Looks good , thanks for contributing 👍

Looks good , thanks for contributing 👍
Could you please add hacktoberfest's label :)

sure

source: gharchive/pull-request

license: MIT

license_type: permissive

license_source: github-api


text:
Added MuBeam splitter FCL file

This FCL file splits the muon beam output into mu+ and mu-.

Hi @soleti,
You have proposed changes to files in these packages:

JobConfig

which require these tests: build.
@Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main.
:hourglass: The following tests have been triggered for 6525d7bdd202dd05ce2a6e6041535ba09871558f: build  (Build queue is empty)
About FNALbuild. Code review on Mu2e/Offline.

:sunny: The build tests passed at 6525d7bdd202dd05ce2a6e6041535ba09871558f.

Test
Result
Details

test with
:white_check_mark:
Command did not list any other PRs to include

merge
:white_check_mark:
Merged 6525d7bdd202dd05ce2a6e6041535ba09871558f at bb889f281a18edb8e6fc7af6bf0b0446df4099c3

build (prof)
:white_check_mark:
Log file. Build time: 11 min 41 sec

ceSimReco
:white_check_mark:
Log file.

g4test_03MT
:white_check_mark:
Log file.

transportOnly
:white_check_mark:
Log file.

POT
:white_check_mark:
Log file.

g4study
:white_check_mark:
Log file.

cosmicSimReco
:white_check_mark:
Log file.

cosmicOffSpill
:white_check_mark:
Log file.

ceSteps
:white_check_mark:
Log file.

ceDigi
:white_check_mark:
Log file.

muDauSteps
:white_check_mark:
Log file.

ceMix
:white_check_mark:
Log file.

rootOverlaps
:white_check_mark:
Log file.

g4surfaceCheck
:white_check_mark:
Log file.

FIXME, TODO
:white_check_mark:
TODO (0) FIXME (0) in 0 files

clang-tidy
:white_check_mark:
0 errors 0 warnings

N.B. These results were obtained from a build of this Pull Request at 6525d7bdd202dd05ce2a6e6041535ba09871558f after being merged into the base branch at bb889f281a18edb8e6fc7af6bf0b0446df4099c3.
For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

@FNALbuild run build test

:hourglass: The following tests have been triggered for 2dc4b5510fccdc44e51e1860eb6012107fd33530: build  (Build queue is empty)

:sunny: The build tests passed at 2dc4b5510fccdc44e51e1860eb6012107fd33530.

Test
Result
Details

test with
:white_check_mark:
Command did not list any other PRs to include

merge
:white_check_mark:
Merged 2dc4b5510fccdc44e51e1860eb6012107fd33530 at bb889f281a18edb8e6fc7af6bf0b0446df4099c3

build (prof)
:white_check_mark:
Log file. Build time: 11 min 59 sec

ceSimReco
:white_check_mark:
Log file.

g4test_03MT
:white_check_mark:
Log file.

transportOnly
:white_check_mark:
Log file.

POT
:white_check_mark:
Log file.

g4study
:white_check_mark:
Log file.

cosmicSimReco
:white_check_mark:
Log file.

cosmicOffSpill
:white_check_mark:
Log file.

ceSteps
:white_check_mark:
Log file.

ceDigi
:white_check_mark:
Log file.

muDauSteps
:white_check_mark:
Log file.

ceMix
:white_check_mark:
Log file.

rootOverlaps
:white_check_mark:
Log file.

g4surfaceCheck
:white_check_mark:
Log file.

FIXME, TODO
:white_check_mark:
TODO (0) FIXME (0) in 0 files

clang-tidy
:white_check_mark:
0 errors 0 warnings

N.B. These results were obtained from a build of this Pull Request at 2dc4b5510fccdc44e51e1860eb6012107fd33530 after being merged into the base branch at bb889f281a18edb8e6fc7af6bf0b0446df4099c3.
For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

authors: FNALbuild brownd1978 soleti


text:
Trkqual changes

restructures the trkqual branch such that it is similar to the dem branch.
more to follow for other similar branches

solves https://github.com/Mu2e/TrkAna/issues/146


text:
123

123456

114514

repo: MuChengZJU/MilkTeaStore


text:
MudTreeView: Use ParameterState

Description
TODO
How Has This Been Tested?
TODO
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[ ] I've added relevant tests.

Commented out the TreeView_OtherTest() for now, as it's using BL0005

Removed protected bool IsChecked, replaced with the _selectedState.Value and SetSelectedAsync.
Removed ArrowExpanded, replaced by the Expanded State.

@ScarletKuro I know it's kind of a little unrelated here, but while you are working on MudTreeView, I do not understand why pull request #4556 was closed, but the Items Type is still Hashset instead of IReadOnlyCollection like suggested by @henon.
Is this off topic for V7?

if we do same for Activated:
+private readonly ParameterState<bool> _activatedState;

+_activatedState = RegisterParameterBuilder<bool>(nameof(Activated))
+	.WithParameter(() => Activated)
+	.WithEventCallback(() => ActivatedChanged)
+	.WithChangeHandler(OnActivatedParameterChangedAsync);

-public bool Activated
-{
-	get => _isSelected;
-	set
-	{
-		if (_isSelected.Equals(value)) return;
-
-		_isSelected = value;
-	}
-}
+public bool Activated { get; set; }

protected override async Task OnAfterRenderAsync(bool firstRender)
{
-	if (firstRender && _isSelected)
+	if (firstRender && _activatedState.Value)

-public override async Task SetParametersAsync(ParameterView parameters)

+private Task OnActivatedParameterChangedAsync(ParameterChangedEventArgs<bool> arg)
+{
+	if (MudTreeRoot is null)
+	{
+		if (MudTreeRoot is not null)
+		{
+			await MudTreeRoot.Select(this, previousActivatedValue);
+		}
+		return Task.CompletedTask;
+	}
+
+	return MudTreeRoot.Select(this, arg.Value);
+}

-if (item.Activated)
+item.GetState<bool>(nameof(MudTreeViewItem<T>.Activated))

other changes replacing _isSelected on _activatedState.Value

Then at first glance it seems to work, but when playing with MultiSelection="false"
You will notice than sometimes you need to double click for the note to be activated, and the test
TreeView_WillUnselectItems_WhenNotMultiSelect shows that bug as it fails. if you add second
comp.FindAll("div.mud-treeview-item-content")[4].Click();

then it will pass.
It was really late for me, and I haven't found the reason yet.

@ScarletKuro I know it's kind of a little unrelated here, but while you are working on MudTreeView, I do not understand why pull request #4556 was closed, but the Items Type is still Hashset instead of IReadOnlyCollection like suggested by @henon.
Is this off topic for V7?

No, we'll change to IReadOnlyCollection just like in MudChipSet which I just reworked the same way.

Hi @belucha,
Thanks for you interest.

I do not understand why pull request #4556 was closed

This PR was created in 2022 when breaking changes were not acceptable, therefore it was closed, also. This PR is also now not against the latest changes.
Now we are working on next version where breaking changes are acceptable

but the Items Type is still Hashset instead of IReadOnlyCollection like suggested by @henon.

Because we only started to work on new version, obviously we can't change everything at once. We address things by the matter of the priority.

@henon great!
If you need help. I can support.

If you need help. I can support.

@belucha I made the breaking changes and fixed all selection issues by a clean re-implementation of the selection mechanisms. I removed the dual selection property MudTreeItem.Activated as it made no sense to me. MudTreeItem.Selected remains and represents whether the item is selected in all selection modes. Do you know why there was a separate Activated parameter and what its function was? I don't want to remove some sensible functionality out of ignorance.

Renamed the badly named ExpandedIcon parameter to ExpandButtonIcon, same for ExpandedIconColor which is now ExpandButtonIconColor.
Added new feature IconExpanded that will be shown instead of Icon when expanded.

Haha, yeah, I just "fixed" that.

Another one in the "Item Template", when you unfold the Categories, the icon left icon disappears

Btw, remember talking about state comparers and collections? I am about to push a CollectionComparer that just does that: comparing readonly collections.

All done. This PR closes almost all TreeView issues

Added to v7.0.0 Migration Guide #8447

hmm, actually, functionality is done but test coverage could be improved too. maybe not merge yet, I'll see what I can cover.

hmm, actually, functionality is done but test coverage could be improved too. maybe not merge yet, I'll see what I can cover.

Nah, the uncovered lines are all early returns and errorhandling. It is not worth it

Small bug

Actually, I don't see the point of having these protected event handlers. TreeView is too complex a machine that overriding these in a derived type will allow you to modify the behavior. And the examples show how you can modify the behavior with templating, so I made them all private.

Ready to merge from my side.

New example

I will re double check everything at night

Btw, remember talking about state comparers and collections? I am about to push a CollectionComparer that just does that: comparing readonly collections.

Keep it mind, that if you will hot swap the Comparer and the SelecteValueS it will not work as expected as the special case I mentioned before will not work with this () => new CollectionComparer<T>(Comparer)
We would need to add something like this
public RegisterParameterBuilder<T> WithComparer<TFrom>(Func<IEqualityComparer<TFrom>> comparerFromFunc, Func<IEqualityComparer<TFrom>, IEqualityComparer<T>> comparerToFunc, [CallerArgumentExpression(nameof(comparerFromFunc))] string? comparerParameterName = null)
{
	_comparerFunc = () => comparerToFunc(comparerFromFunc());
	_comparerParameterName = comparerParameterName;

	return this;
}

.WithComparer<T?>(() => Comparer, x=> new CollectionComparer<T>(x));

But I would also need to store somewhere the TFrom info and the transform lambda somewhere in the InternalParameterState
https://github.com/MudBlazor/MudBlazor/blob/0eaecb2706a40fc9983e2d6aeb4fb853e1021f75/src/MudBlazor/State/ParameterStateInternalOfT.cs#L140
otherwise this line will just throw with cannot convert from IEqualityComparer<IReadOnlyCollection> to something something.
This is kind of troublesome.

Why not? Sorry I don't understand and I didn't understand the special case you are talking about.

I described it here https://github.com/MudBlazor/MudBlazor/pull/8629 in the Support for Func<IEqualityComparer>  and there is even SS and bUnit tests that
a) proves that the problem exist
b) proves that my code solves this problem partially (just not your case)

Don't you call the func for every comparison?

Yes, that's what func does. However, when the HasParamterChanged fires, it fires before the base.SetParametersAsync this means that Blazor did not update the actual properties yet (to be specific the Comparer and others), they change is only reflected in the ParameterView. They only will be when base.SetParametersAsync is called. The key problem is that the HasParamterChanged decides whatever the handler should fire or not, so you might end up in situation when the handler didn't fire when it should and vice versa. Ofc the first one is the worst scenario, because when the handler fires it does already have the updated Comparer and all other methods like SetValueAsync etc does have the updated one.

oh, so instead of calling the func you try to find the comparer in the parameterview to get the latest value?
In that case I think I'll just use the collection comparer manually in the handler event. In that case, however, it might be best it it were possible to disable the equality check mechanism for the state object. After all, I will abort anyway if I find out that the new collection and the existing collection are equal.

... or if you don't find the comparer in the view just call the func. This whole thing is a very carefully crafted academic problem that will never ever happen in reality. nobody switches comparers in the middle of the life-time of the object and we could even forbid it to make sure. Then the problem is limited only to initialization where it can be handled by simply consolidating the initial parameter values with the Comparer in OnAfterRender.

it might be best if it were possible to disable the equality check mechanism for the state object

I think this would be the best and easiest.

or if you don't find the comparer in the view just call the func

It's already doing so.

This whole thing is a very carefully crafted academic problem that will never ever happen in reality

Yes, this is what I wanted to say, this is a very niches problem that is very unlikely to happen, so you shouldn't worry about it. But I just wanted to let you know, so there not just me who knows the nuances :)

This is kind of troublesome for now.

I don't want to make it more complicated than it should be

After sleeping over with this, I found relatively easy solution how the implementation can look like without overhauling directly theParameterStateInternal.
I came up with an easy hot swappable wrapper for IEqualityComparer instead of the current Func<EventCallback<T>>, well it does implement Func<EventCallback<T> but it's a little more smarter than that, and I can add more generics to it without adding this information to ParameterStateInternal.
In short it adds an new overload that looks like this
public RegisterParameterBuilder<T> WithComparer<TFrom>(Func<IEqualityComparer<TFrom>> comparerFromFunc, Func<IEqualityComparer<TFrom>, IEqualityComparer<T>> comparerToFunc, [CallerArgumentExpression(nameof(comparerFromFunc))] string? comparerParameterName = null)
{
	_comparer = new ParameterEqualityComparerTransformSwappable<TFrom, T>(comparerFromFunc, comparerToFunc);
	_comparerParameterName = comparerParameterName;

	return this;
}

And instead of this usage:
.WithComparer(x=> new CollectionComparer<T>(Comparer));

It's:
.WithComparer(() => Comparer, x=> new CollectionComparer<T>(x));

When you don't need any transformation the old syntax stays
.WithComparer(() => Comparer);

And the unit tests shows that it does solve the problem and doesn't break the existing logic.
I will later make an PR after some cleanup etc.

Just wanted to chime in here with a few questions:

With new selection logic, will we be able to select a tree node by the item value rather than the MudTreeViewItem wrapper object itself? E.g., If my tree view was given a list of  IReadOnlyCollection<Thing> _things;, can I say _myTree.Select(_things.First()), or something along those lines? I guess what I'm suggesting is that if we are passing in a collection (i.e., not defining MudTreeViewItem children explicitly), we won't have references to the MudTreeViewItem children such that we can pass one to a Select method. Therefore we'd need a way to select based on what we do know: an object from the collection we passed in.
Do the new changes open the doors for things like automatic parent node expansion upon programmatically selecting a node? E.g., if I select a node a few levels deep, it could expand the parents above it to reveal its location.

Apologies if any of this was obvious from previous discussion, I haven't really had time to dive in yet. This weekend I plan to get versed in MudBlazor contribution so I can make better sense of this stuff. Thanks, and nice work!

With new selection logic, will we be able to select a tree node by the item value rather than the MudTreeViewItem wrapper object itself?

Yes. But not via Select( ), I made that internal but rather via @bind-SelectedValue. There isn't much difference. All you need to do is set the variable you bound to SelectedValue and call (treeview(IMudStateHasChanged)).StateHasChanged().

Do the new changes open the doors for things like automatic parent node expansion upon programmatically selecting a node?

This PR doesn't. But I think this is a very useful functionality and we can implement it fairly easily in a follow-up PR.

call ((IMudStateHasChanged)treeview).StateHasChanged()

That part should be unnecessary since Blazor should do it automatically.

_myTree.Select(...)

I think such public API should be prohibited in most cases, and it's good thing we removed them.
Developers should use two way binding for selection as henon mentioned.

@ScarletKuro

I think such public API should be prohibited in most cases

I would agree. Bit of an oversight on my part. This would be ideal for sure. Looking good!

call ((IMudStateHasChanged)treeview).StateHasChanged()

That part should be unnecessary since Blazor should do it automatically.

Of course, when the bound variable is set by another component via two-way binding or in an event handler of a blazor component. There are other cases (in a background thread, timer, etc), where you need to start a render manually in order to update the selected value after setting the variable you bound to SelectedValue.

Do the new changes open the doors for things like automatic parent node expansion upon programmatically selecting a node? E.g., if I select a node a few levels deep, it could expand the parents above it to reveal its location.

@kelltom I just PRed auto-expansion #8762

authors: ScarletKuro belucha henon kelltom

repo: MudBlazor/MudBlazor


text:
Any plans for backporting to api 14+?

I haven't checked the library's internal code but have seen the demo app & its good!
I need the same type of functionality for my App but it supports 14+.
so any plans for backporting to 14+ or any Info. that can be helpfull for me to backport?

Hi. No there are no plans of supporting backwards API's.
You are welcome to fork it and make your own version

source: gharchive/issue

authors: ItzNotABug Muddz

repo: Muddz/PixelShot


text:
[FEAT] ✨ Create 404 page

Fixes #28

@Kunalpal215 Can you share the screenshot?

repo: MultiEmail/frontend


text:
6.3 , 6.4

Are you planning to work on making your plugin compatible with 6.3, 6.4?

this seems to be working with my 6.4.12 just updating pom.xml file with the new jira and amps version numbers

Hello,
It's working with Jira 6.4. And now we use 7.2.7 with this plugin.
@valeriominetti :+1:

authors: r0mdau roozbehk valeriominetti

license_source: bigquery


text:
Maps before mounting, input prefix

Using the following:
local Input = require('nui.input')

local popup_options = {
  border = {
    style = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' },
    highlight = 'FloatBorder',
    text = {
      top = ' Git ',
      top_align = 'left',
    },
  },
  position = '50%',
  size = {
    width = '80%',
    height = '60%',
  },
  opacity = 1,
}

local input = Input(popup_options, {
  prefix = 'Push to branch master? [y/N]: ',  -- Does not work
  default_value = '',
  on_close = function()
    print('Input closed!')
  end,
  on_submit = function(value)
    print('Value submitted: ', value)
  end,
  on_change = function(value)
    print('Value changed: ', value)
  end,
})

-- Does not work (as expected based on the code as the window isn't mounted), but putting these after :mount() doesn't work either, might be a prompt-buffer thing?
input:map('n', 'y', input.input_props.on_submit, { noremap = true }, true)
input:map('n', 'n', input.input_props.on_close, { noremap = true }, true)

input:mount()

there are two things that I haven't been able to get to work and have questions on.

When running luafile % on the above text in a buffer, it results in an error noting that the popup must be :mount()-ed before calling :map(). However, if I move the :map() call to after the :mount() call, the mappings aren't applied. It seems like this might be a byproduct of the :h prompt-buffer window, but wanted to confirm that I'm not doing something wrong.
The prefix notably doesn't show up, and the Input popup ends up looking like this:

when ideally (as noted for the :h prompt-buffer) the prefix text would be a non-editable prefix, but it doesn't actually show up.

Hey, I really appreciate you trying this out. 😃

When running luafile % on the above text in a buffer, it results in an error noting that the popup must be :mount()-ed before calling :map(). However, if I move the :map() call to after the :mount() call, the mappings aren't applied. It seems like this might be a byproduct of the :h prompt-buffer window, but wanted to confirm that I'm not doing something wrong.

We need the buffer id bufnr to apply the keymaps, so mounting the component before mapping is necessary.
Input was not really designed to behave like you need it here. The initial mode is INSERT after the component is mounted. As you're mapping for "n" normal mode, it's not working.
There will eventually be a dedicated component to for your exact usecase, where you press a specific key to choose a option (YES/NO).
For now  you can try something like this with Input
  local input = Input(popup_options, {
    prompt = "Push to branch master? [y/N]: ",
    default_value = '',
  })

  input:mount()

  input:map("i", "y", function()
    input.input_props.on_submit()
    vim.api.nvim_command("stopinsert")
    print("YES")
  end, { noremap = true }, true)

  input:map("i", "n", function()
    input.input_props.on_submit()
    vim.api.nvim_command("stopinsert")
    print("NO")
  end, { noremap = true }, true)

or you can use the base Popup to implement the desired behavior. In case you decide to use the base Popup compnent, it'll be really helpful if you can drop a link to your implementation here 😃 ]

The prefix notably doesn't show up, and the Input popup ends up looking like this:

Sorry about that. The README has a typo. It should be prompt instead of prefix.

Didn't even think twice about the n map option, that makes complete sense.
Want me to leave this open to fix the documentation @MunifTanjim? Otherwise I'll go ahead and close it.

Want me to leave this open to fix the documentation @MunifTanjim? Otherwise I'll go ahead and close it.

I'd love contributions from people 😃 I already fixed this one tho.
Before you go, here's another idea:
local content = " Push to branch master? [y/N] "

local popup_options = {
  enter = true,
  border = {
    style = { '‚ï≠', '‚îÄ', '‚ïÆ', '‚îÇ', '‚ïØ', '‚îÄ', '‚ï∞', '‚îÇ' },
    highlight = 'FloatBorder',
    text = {
      top = ' Git ',
      top_align = 'left',
    },
  },
  highlight = "Normal:Normal",
  position = '50%',
  size = {
    width = #content,
    height = 1,
  },
  opacity = 1,
}

local popup = Popup(popup_options)

popup:mount()

vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, { content })
vim.api.nvim_buf_set_option(popup.bufnr, "modifiable", false)
vim.api.nvim_buf_set_option(popup.bufnr, "readonly", true)

popup:map("n", "<esc>", function()
  popup:unmount()
end, { noremap = true })

popup:map("n", "y", function()
  popup:unmount()
  print("YES")
end, { noremap = true })

popup:map("n", "n", function()
  popup:unmount()
  print("NO")
end, { noremap = true })

I like it!
I was thinking about doing virtual text, where CursorMovedI would clear it and then it would be reinstantiated it when on_change input prop value is empty, etc.
Either way, thanks for the help. I'm sure I'll be back as I continue migrating all my own personal jank-window handling over to this :wink:

authors: MunifTanjim levouh


text:
install gsettings

Fixes #722

Not required anymore. It was fixed on flatpak side

repo: Murmele/Gittyup


text:
Demo [−∞,3] fails with empty error message

I no longer repro this

I still do

Curious. I get

if i put any number of spaces after the comma it works fine

If you turn on configuration option "emit default intents", it works. I uploaded a fix so that it works if this option is disabled. Thanks for spotting this.

authors: MurrayIII berrymot

repo: MurrayIII/UnicodeMathML


text:
EXIF dialog off-screen on Samsung

Great website, but there are a few issues.
...

EXIF dialog appears off-screen and I had to scroll way down and over to find it.

Mushroomobserver.org Mail - [MO] Question From jim.clack@gmail.com.pdf

I can't replicate this on iPhone xR.

repo: MushroomObserver/mushroom-observer


text:
Fixes some screen size issues.. Removes unused CSS files/

Makes smaller screen use the full width. Causes an issue with the pop out on the left not appearing correctly, but will fix this when I fix the popout buttons and search bar being too wide on small screens.

Coverage remained the same at 83.92% when pulling 18353924916be02ab366eb0163c1b0e85f72175c on raysuelzer:ror4 into 43c21c93e2344b4586a482928f800d51d11ecee3 on MushroomObserver:ror4.

authors: coveralls raysuelzer


text:
僵尸粉检测问题

issue规范

MacOS版本 : 11.4
微信版本 : 3.1.1
小助手版本 : 2.9.2
BUG描述 : 僵尸粉检测问题
操作场景 : 使用僵尸粉检测结果给我所有的朋友都发了一条类似于阿拉伯文的消息，结果我现在收到一堆问号，一个一个的还得道歉解释，人傻了

这个好像被一个关注度挺高的自媒体放出来了……

是这个问题的  我还手动发了这个消息 根据某些公众号提供的信息

反正现在这个僵尸粉检测都别用了，对方会收到消息的

我是安卓手机，用autojs检测僵尸账户。
相当于手动发红包测试，几百个好友，插上电源，晚上睡觉的时候，一个多小时就检测完了。
有人直接弄了一个app，叫清理微信僵尸粉。github就有。

repo: MustangYM/WeChatExtension-ForMac


text:
Channel close transactions are not being broadcasted.

I closed 9 channels.
And I can't find the transaction ID's in the mempool...

That's the channel ID, not the transaction ID.
I would do what the text says and wait a few days when force closes occur.

repo: MutinyWallet/mutiny-web


text:
My on-chain balance is now 0 and I do not receive any sats in my on-chain wallet.  Is this normal?  Thanks.

          My on-chain balance is now 0 and I do not receive any sats in my on-chain wallet.  Is this normal?  Thanks.

Originally posted by @paisalk in https://github.com/MutinyWallet/mutiny-web/issues/365#issuecomment-1638108747

Could use some logs if you have that. It looks like it would have been a force close channel and that may take a few days on chain to be redeemed. But the logs would help confirm that. When you click on the "channel close" button, does it show the reason for the close?

Please refer to #365 .  I have already uploaded the log there with description of channel force close.  Thanks.

Also can you give your node it? It is in settings -> admin
In all likelihood, running two browsers at the same time with the same seed caused this issue and we will probably have to pass this request off to the LSP to see where the funds are. It could have been in a terrible state that caused them to sweep the funds. Do not run multiple browsers at the same time with the same seed.

Yes, I will never run multiple browsers again.
Here is the log and node ID.  Thanks a lot.
Node ID : 03a92ae85c7872a2265863f5eeec63f95613615396357fb1d7da9b1be818bfb5a6
mutiny-logs (2).txt

Okay, these logs weren't very detailed either, probably all the information was on the other instance. No worries, we should be able to dig up stuff just from the node id. Will report back once we learn something.

Thank you so much.  Really appreciate your support.

So the good news is that it looks like the entirety of it went back to the LSP: https://mempool.space/tx/3ff3decb23a693acd022ab5f16fa1c300d145178fc436c165c81633f56d156fc
Now we just gotta figure out what portion should have gone back to you. I think in your case, it closed pretty suddenly after you were doing this? Did you happen to send or receive any payments before the channel closed?

Yes, it closed suddenly. I did not send any payment before the channel closed.

Okay that looks accurate on the LSP side as well. Mind if you send a bitcoin address in a DM to me or the mutiny account on nostr? Or join our matrix and DM me there?
https://matrix.to/#/#mutiny-community:lightninghackers.com

Thanks.  I just sent my bitcoin address to the Mutiny Wallet account on nostr.  Thank you very much.

Sent on chain. Sorry this happened again but glad we were able to recover it. Let us know in another issue if there's any further problems you have. Thanks!

authors: TonyGiorgio paisalk


text:
Error

https://gist.github.com/anonymous/ec80967e4e4df9cf1c44aadc95d83fc9
http://www.rubukkit.org/threads/antibot-botfilter-zaschiti-svoj-server-ot-botov-analog-gameguard-obnovleno-06-08-2017.137038/
BungeeCord. Plugins:

Error:
[15:00:07] [Netty Epoll Server IO #1/ERROR]: java.util.ConcurrentModificationException
[15:00:07] [Server thread/INFO]: NikaRey lost connection: Internal Exception: io.netty.handler.codec.EncoderException: us.myles.ViaVersion.exception.InformativeException: Please post this error to http://github.com/MylesIsCool/ViaVersion/issues
{Type: MetaData List, Source #0: us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1$8 (Anonymous), Data: [Pair{Type|VarInt, 8146}], Packet ID: 59}
Actual Error:
[15:00:07] [Server thread/INFO]: NikaRey left the game

Could you enable debug=true in server.properties and then hastebin/pastebin the error?

See previous message if you want this fixed.

Already there is no error

authors: AlexMashiro MylesIsCool

repo: MylesIsCool/ViaVersion

license: mit


text:
Don't unload chunks twice

You unload it here:
https://github.com/MylesIsCool/ViaVersion/blob/master/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/types/ChunkType.java#L131-L134
And over here:
https://github.com/MylesIsCool/ViaVersion/blob/master/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java#L119-L125
That was not the case in 0.6.7
@gigosaurus Could you test if #338 still happens?

The commit in this PR doesn't appear to make any difference whatsoever.

Thank You

authors: Matsv gigosaurus


text:
Access joint limit violation force without using xml sensors.

Hi everyone,
several people have approached me to ask how to implement joint limit violation forces, as used in my recent preprint
My implementation uses limit force sensors embedded in the xml files. These are quite inconvenient and it's not always possible to edit the xml files for every model.
I'm wondering if there is a programmatic way of accessing this information? I think it would be a great service to the community to implement a function like
force_value = get_limitfrc(joint_name)
But I'm a bit unsure how to do it. I tried starting with efc_type and efc_force, but it's unclear how you would relate this to the joint name.

One suggested way in this issue here, might help. Essentially, you measure the joint torque with qfrc_constraint and qfrc_smooth in the joint data structure, then manually check if your joint exceeds the limits.

This would get you the total force acting on the joint, right? It’s a proxy, but not perfect.

The posted solution works when there ar eno additional constraints, e.g. an arm that is suspended in the air. Still have to test in the case of contact forces etc

Got it:
def get_limitfrc(joint_name, mj_model, mj_data):
    non_joint_limit_efc_idxs = np.where(mj_data.efc_type != mujoco.mjtConstraint.mjCNSTR_LIMIT_JOINT)[0]
    only_jnt_lim_efc_force = mj_data.efc_force.copy()
    only_jnt_lim_efc_force[non_joint_limit_efc_idxs] = 0.0
    joint_force = np.zeros((mj_model.nv,))
    mujoco.mj_mulJacTVec(mj_model, mj_data, joint_force, only_jnt_lim_efc_force)
    return joint_force[mj_model.joint(joint_name).dofadr]

A version for Myosuite environments can be found below. Note that sim.model._model needs to be called to pass in the underlying structure for mj_mulJacTVec()
def get_limitfrc(self, joint_name):
    non_joint_limit_efc_idxs = np.where(self.sim.data.efc_type != self.sim.lib.mjtConstraint.mjCNSTR_LIMIT_JOINT)[0]
    only_jnt_lim_efc_force = self.sim.data.efc_force.copy()
    only_jnt_lim_efc_force[non_joint_limit_efc_idxs] = 0.0
    joint_force = np.zeros((self.sim.model.nv,))
    self.sim.lib.mj_mulJacTVec(self.sim.model._model, self.sim.data._data, joint_force, only_jnt_lim_efc_force)
    return joint_force[self.sim.model.joint(joint_name).dofadr]

authors: P-Schumacher elladyr

repo: MyoHub/myosuite


text:
Do not block on barrier in remote mode

Without this, we block the barrier in the main thread which stops execution. Also, fix the computation of request delay.

Why wait on the barrier at all then?

Why wait on the barrier at all then?

Because to unblock the wait() on the barrier outside the if condition and the barrier is initialized with 2. This seemed clean enough to me.

authors: bmwill sadhansood

repo: MystenLabs/sui


text:
Raw Input register multiple joysticks help!

Hi, I am trying to print axis information for multiple joysticks but I can not figure out how, I'm assuming I need to add to the folowing code somehow
// Register devices

	RAWINPUTDEVICE deviceList[2];
	deviceList[0].usUsagePage = HID_USAGE_PAGE_GENERIC;
	deviceList[0].usUsage = HID_USAGE_GENERIC_GAMEPAD;
	deviceList[0].dwFlags = RIDEV_INPUTSINK;
	deviceList[0].hwndTarget = hwnd;
	deviceList[1] = deviceList[0];
	deviceList[1].usUsage = HID_USAGE_GENERIC_JOYSTICK;

For example:
deviceList[2].usUsage = HID_USAGE_GENERIC_JOYSTICK_NUMBER_TWO;
Obv HID_USAGE_GENERIC_JOYSTICK_NUMBER_TWO is not an actual term. I'm really not sure where to go from here, any help would be greatly appreciated!
Thanks.

Registering for devices here will register for ALL devices that have the specified HID Usage. If your controllers are generic joysticks or gamepads, you will get raw input notifications from all that are connected.

Registering for devices here will register for ALL devices that have the specified HID Usage. If your controllers are generic joysticks or gamepads, you will get raw input notifications from all that are connected.

But how can I differentiate between different axis's? It just prints them all on the same value.
Cheers

authors: LeehamElectronics MysteriousJ

repo: MysteriousJ/Joystick-Input-Examples


text:
🛑 Mysteryexe is down

In 3489306, Mysteryexe (https://mysteryexe.xyz) was down:

HTTP code: 403
Response time: 965 ms

Resolved: Mysteryexe is back up in d376801 after 11 minutes.

repo: Mysteryexe/uptime-checker


text:
New small version checkpoint cannot load correctly

Hi,   I update your new code and load the classification checkpoint vssm_small_0229_ckpt_epoch_222.pth, but the error happened:

Could you pls help to find the reason, thanks.

Can you help me? Thans a lot!

I think you may got the wrong model, as the patch embedding is 3x3 rather than 4x4 in vmamba small 0229 (while we can see in your log is 4x4).
Check the config file you use and try again.

Hi， I have checked my model： it is the latest version (vmamba.py) from the classification folder.  and indeed, the error shows the patch_embed in the 0229 pth file is 3*3 patch_size, but the model is 4.   However,
(1) when I change the patch_size from 3 to 4, New errors happened:

(2) and then, when I change the dims from 96 to 48, New errors happened:

it  seems something wrong inside?  thanks.

Please follow the config I provide strictly, and try again.
Or you can refer to detection/configs/vssm1/mask_rcnn_vssm_fpn_coco_small.py
==========================
The config of vssm1/vssm_small_0229.yaml writes:
MODEL:
  TYPE: vssm
  NAME: vssm1_small_0229
  DROP_PATH_RATE: 0.3
  VSSM:
    EMBED_DIM: 96
    DEPTHS: [ 2, 2, 15, 2 ]
    SSM_D_STATE: 1
    SSM_DT_RANK: "auto"
    SSM_RATIO: 2.0
    SSM_CONV: 3
    SSM_CONV_BIAS: false
    SSM_FORWARDTYPE: "v3noz"
    MLP_RATIO: 4.0
    DOWNSAMPLE: "v3"
    PATCHEMBED: "v2"

# 50.4 + 8.6 + 90min/e + 36G

Yes! the problem is fixed.  Thanks very much.

authors: JinxiaXie MzeroMiko mywebinfo65536

repo: MzeroMiko/VMamba


text:
Run UI e2e tests with given aerie/gateway docker tags when provided in PR body

___REQUIRES_AERIE_PR___="1540"
___REQUIRES_GATEWAY_PR___="107"
Description
Supporting this issue: https://github.com/NASA-AMMOS/aerie/issues/1538
This PR allows the aerie-ui PR e2e test suite to use different Docker image tags, published by PR(s) on their respective repos, for the aerie & aerie-gateway containers when testing, instead of develop as they usually do. The aerie/gateway PR(s) must first be opened and labeled with the "publish" label in github, which will cause them to publish images tagged eg. pr-1540. (see https://github.com/NASA-AMMOS/aerie/pull/1540 & https://github.com/NASA-AMMOS/aerie-gateway/pull/107 )
Once this is done, you can add the flag(s) at the top of this PR (___REQUIRES_AERIE_PR___ and/or ___REQUIRES_GATEWAY_PR___) to your aerie-ui PR to indicate the PR branches to be tested with.
Verification
This PR itself demonstrates the workflow:

The Test workflow re-runs when the PR body is modified (to check for flags)
The flags in the PR body are parsed by the workflow
You can see in the workflow logs that the correct docker image tags were pulled (pr-1540 for aerie and pr-107 for gateway)
I've also tested removing these flags to make sure the workflow still works correctly for PRs not passing them

Thanks @skovati - I considered that too... I think I'd prefer to keep the process of "how to build aerie backend" out of this UI repo if possible, from a separation of concerns/maintainability perspective. This way gives me slightly better assurance that the backend images I'm testing with will be exactly the same as the final published images, since they're created via the same process in the aerie repo. If we built here, we'd have to keep the build process in sync with aerie, and if we miss a small change to the process, we might be testing with a subtly different build than the final aerie build. We'd also have to do the same thing for aerie-gateway.
I think if you're OK with this method, let's do it this way for now, but I'm definitely open to talking about improving this process/general workflow for our different repos in future.

For your tests, have you tested only having a Gateway PR and not the Backend and vice versa?

For your tests, have you tested only having a Gateway PR and not the Backend and vice versa?

Yep! I tested backend without gateway yesterday, I just tested gateway with backend now and that appears to work correctly too:

Please clean up the commit history before merging, but the work itself LGTM

Thanks - done on this and other PRs. Will merge when tests pass again 👍

authors: Mythicaeda dandelany

repo: NASA-AMMOS/aerie-ui


text:
Vectorizable matrix class

Adds a new matrix class VectorMatrix that organizes the matrix data for vectorization.
Includes common matrix policy tests that are applied to Matrix and VectorMatrix
Specializes the ProcessSet::AddForcingTerms() function for VectorMatrix using a Vectorizable concept with custom loops over the matrix data. I think this is an acceptable way to do this, but maybe there is a better solution.

Codecov Report
Patch coverage: 96.10% and project coverage change: +0.74 :tada:

Comparison is base (d0cba32) 92.24% compared to head (6eb3475) 92.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
+ Coverage   92.24%   92.98%   +0.74%
==========================================
  Files          17       18       +1
  Lines         967     1098     +131
==========================================
+ Hits          892     1021     +129
- Misses         75       77       +2

Impacted Files
Coverage Δ

include/micm/solver/rosenbrock.hpp
86.32% <82.60%> (ø)

include/micm/util/vector_matrix.hpp
97.84% <97.84%> (ø)

include/micm/process/process.hpp
94.44% <100.00%> (ø)

include/micm/process/process_set.hpp
99.13% <100.00%> (+0.29%)
:arrow_up:

include/micm/solver/chapman_ode_solver.hpp
93.00% <100.00%> (ø)

include/micm/solver/state.hpp
100.00% <100.00%> (ø)

include/micm/util/matrix.hpp
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@mattldawson I checked out your branch on Gust but I could not build it with the NVHPC compiler. It failed with an error I reported to @K20shores before and I thought it should be resolved by his recent PR #84.

@mattldawson I checked out your branch on Gust but I could not build it with the NVHPC compiler. It failed with an error I reported to @K20shores before and I thought it should be resolved by his recent PR #84.

Are you able to build the main branch after PR #84 was merged?

@mattldawson I checked out your branch on Gust but I could not build it with the NVHPC compiler. It failed with an error I reported to @K20shores before and I thought it should be resolved by his recent PR #84.

Are you able to build the main branch after PR #84 was merged?

@mattldawson , yes, I just checked out the latest main branch and could build it on Gust with NVHPC/23.1. All the tests pass within 0.01 second.

Hi @sjsprecious - I think this branch should compile and pass the tests on Gust with nvc++ now. Could you give it a try at some point and let me know?
I bypassed the function that is optimized for VectorMatrix when C++20 is not supported. We can decide after your testing if we want to make this available for the GPU code or not. If we do, we could ask CISL about getting the issue with the older g++ compilers fixed on Gust/Derecho

@mattldawson I checked out your branch on Gust but I could not build it with the NVHPC compiler. It failed with an error I reported to @K20shores before and I thought it should be resolved by his recent PR #84.

Are you able to build the main branch after PR #84 was merged?

@mattldawson , yes, I just checked out the latest main branch and could build it on Gust with NVHPC/23.1. All the tests pass within 0.01 second.

Hi @sjsprecious - I think this branch should compile and pass the tests on Gust with nvc++ now. Could you give it a try at some point and let me know?
I bypassed the function that is optimized for VectorMatrix when C++20 is not supported. We can decide after your testing if we want to make this available for the GPU code or not. If we do, we could ask CISL about getting the issue with the older g++ compilers fixed on Gust/Derecho

Hi @mattldawson , thanks for your update and efforts. I could confirm that I am able to build MICM on Gust with your develop-vector-matrix branch and nvhpc/23.1 module now.
Which version of GCC do you need for C++20 support? Gust has gcc/12.2.0 installed.

repo: NCAR/micm


text:
Encoder block cipher in Python

Basic Python block cipher Encoder. Hopefully, we can implement these into rust to encode and decode the ciphers.

Oh I already made one. Sorry I should have shared it with you.

The good thing about knowing Python is that iterators in Python and Rust work the same way. You write a chain or iterator adapters to do something for each of something else, such as decrypt a block for every 16 bytes of data, then "collect" them all in to a Vec (like a typed Python list). That isn't to say you need to call the decryption function on each block manually (as opposed to using the library), but if that is what you decide to do it won't be hard to use iterators.
Using OpenSSL is probably the approach you'd use in real life, while using a low level library like this will probably teach you more about how it works. I've been having technical difficulties with OpenSSL so I actually think useing the cipher library might be easier. At least, I know the cipher library will be reasonably easy, while OpenSSL could be easier or harder.


text:
PEAR-1835: Responsive homepage header

Description
Checklist

[N/A] Added proper unit tests
[N/A] Left proper TODO messages for any remaining tasks
[N/A] Scanned for web accessibility with aXe, and mitigated or documented
flagged issues

Screenshots/Screen Recordings (if Appropriate)

looks ok to me. 👍

authors: paribartandhakal wteouchicago

repo: NCI-GDC/gdc-frontend-framework


text:
PEAR-2198+2095: Table Pagination Issues

Description
https://gdc-ctds.atlassian.net/browse/PEAR-2198
https://gdc-ctds.atlassian.net/browse/PEAR-2095
Checklist

[N/A] Added proper unit tests
[N/A] Left proper TODO messages for any remaining tasks
[N/A] Scanned for web accessibility with aXe, and mitigated or documented
flagged issues

Screenshots/Screen Recordings (if Appropriate)

looks good 👍


text:
Contributing guidelines should recommend one vignette per pull request

Having multiple vignettes in a pull request makes managing edits/corrections to each one more difficult and potentially confusing.

Do we need more to close this than #27?

I think for now, we can close the issue. If this crops up again, we can reopen it.

authors: hlapp zkamvar

repo: NESCent/popgenInfo


text:
ERROR Error: [@ant-design/icons-angular]: the icon arrow-left-o does not exist or is not registered.

Reproduction link
https://stackblitz.com/edit/ng-zorro-antd-start?embed=1&file=package.json
Steps to reproduce
根据官网快速上手一步步创建，在使用图标的时候错误。
What is expected?
能够显示图标
What is actually happening?
ERROR Error: [@ant-design/icons-angular]: the icon arrow-left-o does not exist or is not registered.

Environment
Info

ng-zorro-antd
7.3.2

Browser
Chrome

原因：
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
版本7.3.2install后node_moudle没有/@ant-design/icons-angular/src/inline-svg/目录

重新安装即可解决。

@BruneXX Please read the doc https://ng.ant.design/components/icon/en#static-loading-and-dynamic-loading. You need to register icons (import icon resources in another word). The error is quite explicit IMHO.

PR is welcome! @BruneXX

Hi! I received this error when running tests. Icons is dynamically linked under "ant" namespace. Can you help me?

@olegdeezus In test environments, I strongly recommend you to write a IconTestingModule and provide all icons in the module. And import that module when you are configuraing tests.
You can use this as a reference. https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/icon/testing/nz-icon-test.module.ts
Hope this helps.

@wendzhue Thank you!

Hi,
Thanks for the answers above,
I am Using Angular Universal and I should mention that for my case it seems the error was displayed but the svgs were displayed as  HTTP remote calls was loading them. It seems the error showing on the console is therefore a false alarm, since its not aware that they are dynamically loaded.
Now its quite strange to wire my mind to ignore the error messages displayed

Hi,
Thanks for the answers above,
I am Using Angular Universal and I should mention that for my case it seems the error was displayed but the svgs were displayed as HTTP remote calls was loading them. It seems the error showing on the console is therefore a false alarm, since its not aware that they are dynamically loaded.
Now its quite strange to wire my mind to ignore the error messages displayed

I'm facing the same issue. Is there any solution to get rid of those ugly error messages on the console?

Hi,
Thanks for the answers above,
I am Using Angular Universal and I should mention that for my case it seems the error was displayed but the svgs were displayed as HTTP remote calls was loading them. It seems the error showing on the console is therefore a false alarm, since its not aware that they are dynamically loaded.
Now its quite strange to wire my mind to ignore the error messages displayed

I am facing the same in Angular Universal.

重新安装即可解决。

Hope you are here to help me?
File : package.json
`  "dependencies": {
"@angular/animations": "~10.0.2",

"@angular/common": @ #"~10.0.2",

"@angular/compiler": "~10.0.2",

"@angular/core": "~10.0.2",

"@angular/forms": "~10.0.2",

"@angular/platform-browser": "~10.0.2",

"@angular/platform-browser-dynamic": "~10.0.2",

"@angular/router": "~10.0.2",

"@ant-design/icons": "^4.2.2",

"@ant-design/icons-angular": "^10.0.1",

"ng-zorro-antd": "^10.0.2",

"rxjs": "~6.5.5",

"tslib": "^2.0.0",

"zone.js": "~0.10.3"`

When I want to add an icon :

It runs but

Error:
http://localhost:4200/assets/outline/menu-fold.svg 404 (Not Found)
ERROR Error: [@ant-design/icons-angular]:the icon menu-fold-o does not exist or is not registered.
Thanks you

Fix this here!
https://giai-ma.blogspot.com/2021/05/ant-designicons-angular-icon-reload-o.html

This issue solved with installing @ant-design/icons-angular and add " {
"glob": "**/*",
"input": "node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}"
in angualr.json.
Thank you

In my particular case if I use:  the following error arise:
Can't bind to 'nzType' since it isn't a known property of 'i'
but when I'm using  the specific error displayed here appears:
ERROR Error: [@ant-design/icons-angular]: the icon menu-fold-o does not exist or is not registered.
I've extracted that from the documentation page and nothing of above tried seems to work.

Please add import { NzButtonModule } from 'ng-zorro-antd/button'; to app.module and then add NzButtonModule to the list of imports.
That should do the trick.

In my particular case if I use:  the following error arise:
Can't bind to 'nzType' since it isn't a known property of 'i'
but when I'm using  the specific error displayed here appears:
ERROR Error: [@ant-design/icons-angular]: the icon menu-fold-o does not exist or is not registered.
I've extracted that from the documentation page and nothing of above tried seems to work.

I have come across the same problem as you. I did as the documention says, but it didn't work.
Can you help me ? thank you

我也遇到过同样的问题，删除node_modules之后重新下载依赖之后就好了，仅供参考

@wendzhue Thank you

Hi all,
I m facing the same issue when I try to run ng test.
I've tried all the solutions above but I still cannot run ng test without getting many errors saying the following message:
ERROR Error: [@ant-design/icons-angular]: the icon arrow-left-o does not exist or is not registered.
My version of ng-zorro-antd is 13.0.0

As wzhudev says above
1：Create a new file . eg: import { NzIconTestModule } from '@shared/nz-icon-test.module';
You can use this as a reference. https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/icon/testing/nz-icon-test.module.ts
2: Introduce it in your test file eg: beforeEach(async () => { await TestBed.configureTestingModule({ imports: [ NzIconTestModule //here
now , is OK！

Thanks chenweihan.
I already implemented that but nothing has changed.

@dimitriadisat
please check it again, because this file is the file in the official test case.
https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/icon/testing/nz-icon-test.module.ts.

This issue solved with installing @ant-design/icons-angular and add " { "glob": "**/*", "input": "node_modules/@ant-design/icons-angular/src/inline-svg/", "output": "/assets/" }" in angualr.json. Thank you

thank you this is working

Create a new icons-provider in the directory at the same level as app, and type the icons you need, and then introduce app.config.ts
import {EnvironmentProviders, importProvidersFrom} from '@angular/core';
import {
  BookOutline,
  EnterOutline,
  LockOutline,
  LoginOutline,
  MenuFoldOutline,
  MenuUnfoldOutline,
  PlusOutline,
  RollbackOutline,
  SearchOutline,
  UserOutline
} from '@ant-design/icons-angular/icons';
import {NzIconModule} from 'ng-zorro-antd/icon';

const icons = [PlusOutline, UserOutline, BookOutline, LoginOutline, MenuFoldOutline, MenuUnfoldOutline,
  EnterOutline, LockOutline, SearchOutline, RollbackOutline];

export function provideNzIcons(): EnvironmentProviders {
  return importProvidersFrom(NzIconModule.forRoot(icons));
}

authors: 1stcoderXiaoLin HCenggel aniketthumar babarinde chenweihan cs24k1993 devpei dimitriadisat id1945 kamran-mushtaq madumal7 mobinakhalilzade olegdeezus s2t4nv0k venkateshatfrudev wendzhue wsambian

repo: NG-ZORRO/ng-zorro-antd


text:
antd provide no interface to clear an input?

What problem does this feature solve?
better user experience
What does the proposed API look like?
embeded in nz-input

Ref https://ant.design/components/input-cn/#components-input-demo-allowClear.


text:
feat(module:form): nz-form-label support nzFormTooltip

close #5905
PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CONTRIBUTING.md#commit
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
[ ] Yes
[ ] No

Other information

@hsuanxyz 这样的话，nzFormTooltip  只是加一个 class 吗？那好像意义也不是很大？不使用这个 API 代码量也差不多。
我认为可能更多的使用方式还是这种更好些？
<nz-form-label [nzFormTooltip]="{ title: 'title', icon: 'info-circle'}">
  Label
</nz-form-label>

如果还有更复杂的需求的话，用户就不用这个 API ，完全自己手写好了。:eyes:

@danranVm 现在看是只有一个 class，不过用对象的话 icon 本部分就没办法全局配置了，要不两个 @Input ？

@hsuanxyz 好、那就在全局配置里加一个 tooltipIcon: string | { type: string, theme: sting } ?
👀, 是我 vue 写多了嘛？怎么老搞这种联合类型出来。

@danranVm 😂 一个也行，只是 merge 的时候要多判断一下

authors: danranVm hsuanxyz


text:
Pulsar Search - QFT + Grover

Can we use QFT + Grover (amplitude amplification) to get a binary classifier for the pulsar search ?

probably no and QML approaches for pulsar detection have already been published


text:
请问如果想做复杂地名的识别的话，需要做些什么改进呢？

目前ansj可以识别如：上海市/ns
但如何做到识别：中国上海市杨浦区华佗路23号。这种地名呢？
希望大家提供一下思路。或者有没有类似的工具

自己写规则吧...也没好的办法..

分词+字典+正则吧

@ansjsun 感谢,果然最后还是要上规则

authors: BigInventor ansjsun symsimmy


text:
hdf5 installation issue

...
/usr/local/include/h5tb_const.mod -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/h5tb_const.mod
/usr/local/include/h5vl.mod -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/h5vl.mod
/usr/local/include/h5z.mod -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/h5z.mod
/usr/local/include/hdf5.h -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/hdf5.h
/usr/local/include/hdf5.mod -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/hdf5.mod
/usr/local/include/hdf5_hl.h -> /usr/local/Cellar/hdf5-mpi/1.12.0_1/include/hdf5_hl.h
Error: Could not symlink share/hdf5_examples/README
Target /usr/local/share/hdf5_examples/README
is a symlink belonging to hdf5-mpi. You can unlink it:
  brew unlink hdf5-mpi

To force the link and overwrite all conflicting files:
  brew link --overwrite hdf5-mpi

To list all files that would be deleted:
  brew link --overwrite --dry-run hdf5-mpi

% brew list
==> Formulae
autoconf	bison		freetype	git		hdf5		isl		libevent	libpng		m4		mpfr		nghttp2		openssl@1.1	pcre2		slicot		trilinos
automake	c-ares		gcc		gmp		hdf5-mpi	jansson		libffi		libtasn1	metis		ncurses		numpy		p11-kit		pkg-config	sqlite		unbound
bash-completion	cmake		gdbm		gnutls		htop		jemalloc	libidn2		libtool		mingw-w64	netcdf-mpi	open-mpi	parmetis	python@3.9	swig		xz
bdw-gc		emacs		gettext		guile		hwloc		libev		libmpc		libunistring	mpdecimal	nettle		openblas	pcre		readline	szip		zstd

repo: NLeSC/homebrew-nlesc


text:
Log to working / current directory

Hi,
I cannot believe I'm the first who has this question/problem. How to configure NLog to write log files to working (current) directory, please?
Each time, when I call MyApp.exe (located in C:\Apps folder) from C:\Data\Dec folder, log files are created in C:\Apps folder. It does not matter if I use ${basedir} or not.
C:\Data\Dec> C:\Apps\MyApp.exe
NLog version: 4.4.12
Platform: .Net 4.6.1
Current NLog config & code
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <targets>
  <target name="logfileA" xsi:type="File" fileName="fileA.txt" />
  <target name="logfileB" xsi:type="File" fileName="${basedir}/fileB.txt" />
  <target name="logfileC" xsi:type="File" fileName="${basedir}\fileC.txt" />
 </targets>
 <rules>
  <logger name="*" minlevel="Info" writeTo="logfileA" />
  <logger name="*" minlevel="Info" writeTo="logfileB" />
  <logger name="*" minlevel="Info" writeTo="logfileC" />
 </rules>
</nlog>

class Program
{
    private static NLog.Logger log = NLog.LogManager.GetCurrentClassLogger();

    static void Main(string[] args)
    {
        log.Debug("debug message");
    }
}

All the times, all three files are created in C:\Apps folder.

The basedir is where your .exe lives, so this is expected.
I think your are looking for the "processDir" option,
e.g.
 ${basedir:processDir=true}

See https://github.com/NLog/NLog/wiki/Basedir-Layout-Renderer

Thank you for your reply.
No. I do not want to have log files stored in MyApp.exe folder (app domain), but relatively in my current/working folder(C:\Docs\dec).
I understand the meaning of ${basedir}. It is described here: https://github.com/nlog/nlog/wiki/Logging-troubleshooting. Especially chapter Troubleshooting steps, paragraph 6.

If you don't use a fully qualified name of the file (such as c:\logs\log.txt, or ${basedir}\log.txt your logs may be written to the working directory, which is not necessarily the same directory as where the application resides.

I have not path to fileA fully qualified, but nevertheless it appears in MyApp.exe folder instead of C:\Data\dec).
I'm pretty sure, my working directory is C:\Docs\dec. The log file appears in C:\Apps :(
C:\Data\Dec> C:\Apps\MyApp.exe
using of ${basedir:processDir=true} has the same behavior. It does not make sense. I do want to base logger to process dir.
Thanks a lot!

@frunta You can register your own custom layout renderer that returns current directory:
https://github.com/NLog/NLog/wiki/How-to-write-a-custom-layout-renderer
string startupDirectory = System.IO.Directory.GetCurrentDirectory();
LayoutRenderer.Register("currentdir", (logEvent) => startupDirectory);

Then use it like this:
<target name="logfileC" xsi:type="File" fileName="${currentdir}\fileC.txt" />

authors: 304NotModified frunta snakefoot

repo: NLog/NLog


text:
readthedocs?

(@snakefoot)
I was experimenting with readthedocs for NLog (see first example https://docs.nlog-project.org/)
Why? Because the docs in wiki are difficult to search and to structure, also the layout is not that good (too small for code examples IMO)
Pro readthedocs

Search!
Really quick build times after push (<1 min)
generation of TOC
possible to style (inject css in possible)
custom domain, including SSL
works better on mobile compared to Github wiki
"edit on github" link is nice
versioning of docs

Cons

No wiki anymore
We need to move to restructuredtext (RST) for TOC and other advanced features (but there is a converter)
Syntax of RST is much complexer compared to MarkDown (IMO)
Conversion and rendering of Markdown is incomplete (e.g. tables, headings syntax, internal link syntax), so we have to check every file (203 files)
Not sure if we could like all documents (e.g. all targets) in one page dynamically (but I could write a tool for that)
Not fully integrated into website (https://nlog-project.org)
No WYSIWYG
How to setup a redirect? (for old links on Google etc)

Other options are: GitHub pages (https://www.mkdocs.org/), custom page online (e.g. Wordpress),  https://www.siteleaf.com/
@snakefoot please your opinion

I find that quality of documentation comes from the people writing it, and seldom from the platform for hosting the documentation. Of course if the platform is completely impossible to use (No editor, No history, etc) then it might be a stopper.
Regarding search then I guess most people google or use stackoverflow, and will ignore any local search engines.
I find the Github-wiki okay. So it has be some very good arguments to change, as there will be a lot of broken links

This is also nice, https://dotnet.github.io/docfx/ :)

I think it would be nice if there was one clear "getting started" (with all the variants, asp.net core, non-core etc). Now it's on different places.


text:
LogLevel Implements IEquatable

LogLevel class now implements IEquatable. This can
potentially help slightly the performance is certain cases as no object
boxing is required.
Private default constructor was removed as it was obsolete.
Unit tests added to cover Equals(Object) and Equals(LogLevel) methods.

Merged manually in fdfa3337749f529ea62f83d789187f9c64b4aa00

authors: Xharze ie-zero


text:
Data storage

Summary
Store data in central location (AWS s3, ...)
Comments/Notes

Marking this as complete for IMS data

repo: NOAA-HES-Capstone/icedyno


text:
[5pt] Eval_plots error: min arg is an empty sequence

Eval plots is erroring out with a ValueError of "min() arg is an empty sequence.
The following AHPS sites are considered "BAD_SITES":  baki3, cart2, eagi1, efdn7, erwn6, grfi2, kcdm7, ksdm7, levk1, lkcm7, loun7, lrlm7, mcri2, mtao1, roun6, rwdn4, vcni3
The following query is used to filter AHPS:  not flow.isnull() & masked_perc<97 & not nws_lid in @BAD_SITES
Traceback (most recent call last):
  File "//foss_fim/tools/eval_plots.py", line 1036, in <module>
    eval_plots(metrics_csv=m, workspace=w, versions=v, stats=s, spatial=sp, fim_1_ms=f, site_barplots=i)
  File "//foss_fim/tools/eval_plots.py", line 728, in eval_plots
    barplot(
  File "//foss_fim/tools/eval_plots.py", line 327, in barplot
    axes = sns.barplot(
  File "/usr/local/lib/python3.10/dist-packages/seaborn/categorical.py", line 2755, in barplot
    plotter = _BarPlotter(x, y, hue, data, order, hue_order,
  File "/usr/local/lib/python3.10/dist-packages/seaborn/categorical.py", line 1532, in __init__
    self.establish_colors(color, palette, saturation)
  File "/usr/local/lib/python3.10/dist-packages/seaborn/categorical.py", line 707, in establish_colors
    lum = min(light_vals) * .6
ValueError: min() arg is an empty sequence

root@421deec6b5a0:/# ^C
It has been seen against against a couple of different pipeline tests including a huc set of "07080103 07080208 12040101 12040103 12090301". Between the combination of those HUCs, they cover all five of the different test_case types.

07080103 (ras2fim, ifc)
07080208 (ras2fim, usgs)
12040101 (nws, ble)
12040103 (ble, nws, usgs)
12090301 (ble, ifc, nws, and usgs)

I ran fim_pipeline on the same set of HUCs ("07080103 07080208 12040101 12040103 12090301") on my EC2 using the dev image but didn't get the error. I'll try on prod3.

This is a duplicate of 1303. I will close this one and roll some of these notes into that card. We saw it a few times in the past few days during some testing.

See comment above

authors: RobHanna-NOAA mluck

repo: NOAA-OWP/inundation-mapping


text:
Gridded AORC BMI model with Jinjabmi

[Short description explaining the high-level reason for the pull request]
Additions
data/example_realization_config_jinja_aorc.json
data/forcing/cat-298118_2015-12-01.csv
gridded_bmi_aorc_python/AORC_bmi_model.py
gridded_bmi_aorc_python/AORC_model.py
gridded_bmi_aorc_python/AORC_run_bmi_model.py
gridded_bmi_aorc_python/init.py
gridded_bmi_aorc_python/main.py
gridded_bmi_aorc_python/bmi_grid.py
gridded_bmi_aorc_python/catchment_data.geojson
gridded_bmi_aorc_python/config.yml
gridded_bmi_aorc_python/jinja_grid_source.yml
gridded_bmi_aorc_python/jinja_grid_to_scalars.yml
gridded_bmi_aorc_python/nexus_data.geojson
Removals

Changes

Testing
Unit tests
Ran python AORC_run_bmi_model.py
Ran ngen test
Screenshots
Notes

Todos

Checklist

[x ] PR has an informative and human-readable title
[x] Changes are limited to a single goal (no scope creep)
[x ] Code can be automatically merged (no conflicts)
[x ] Code follows project standards (link if applicable)
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[ ] Reviewers requested with the Reviewers tool :arrow_right:

Testing checklist (automated report can be put here)

Target Environment support

[x ] Linux

Similar to #525, this doesn't really belong in the ngen repo, it probably belongs in ngen-forcing, or elsewhere. I think once we get #533 done, we can use this PR's code to run some simple tests, then figure out its final disposition more clearly.

Same as #525 , closing in cleanup. Newer version of this module is being integrated now.

repo: NOAA-OWP/ngen


text:
Modularize/Test raw conversion utility so its easier to maintain and less epic dependant

raw->pandas->netcdf (epic or CF)

See project EcoFOCIpy


text:
New additions

[x] Add Auto-generated structs
[x] Add Serialization
[x] Add De-serialization
[ ] Add Test

[x]  Add Auto-generated structs
[x]  Add Serialization
[ ]  Add De-serialization
[ ]  Add Test

We discussed supporting serialize/deserialize using JSON schema to support loading in/from other languages

[x]   Add Auto-generated structs
[x]   Add Serialization
[ ]   Add De-serialization
[ ]   Add Test

We discussed supporting serialize/deserialize using JSON schema to support loading in/from other languages

I have no problem with that, I or Rodrigo didn't remember that bit so we went ahead with this for now. Plus this should allow us to start working on the simulation side.

authors: jd-lara sourabhdalvi


text:
Update "Download Electric Load" macro when OpenEI Updates

The End-Use Load Profiles for the U.S. Building Stock project aims to have new load data available by October 2021 or January 2022.
When this data is available, we will need to update the Download Electric Load macro to download the new data.
SAM currently downloads data from the OpenEI Commercial and Residential Hourly Load Profiles for all TMY3 Locations in the United States dataset.

Note this related issue about OpenEI load data starting on Sunday vs SAM starting on Monday: https://github.com/NREL/SAM/issues/91.

As of May 27, a temporary (~6 months) redirect was put in place so the macro continues to work until the next SAM release:
old:
https://en.openei.org/datasets/dataset/commercial-and-residential-hourly-load-profiles-for-all-tmy3-locations-in-the-united-states
new:
https://data.openei.org/submissions/153

A page describing the new data lake is here: https://www.nrel.gov/buildings/end-use-load-profiles.html
Discussion at 11/2 SAM meeting was to delay updating the macro until the first patch.

See https://arrow.apache.org/docs/cpp/parquet.html for native C++ conversion of Parquet to CSV.

authors: brtietz cpaulgilman

repo: NREL/SAM


text:
Fortress pve

Fortress Whip and Shift ability are still missing.
New minimap blips for the fortresses would be good too.
Fortress Shade ability got imported from twilites mod.

Twilites shade ability mod will be merged correctly once we are satisfied with it after a playtest and know there wont be any updates


text:
ENH: Add tiff export function factory.

@sbillinge @timoHMM This is how I would implement TIFF export.
In [2]: from bluesky.broker_callbacks import exporter_factory

In [3]: f = exporter_factory('img', 'test/{h.start.scan_id}_{N}.tiff')

In [4]: header = db['0b96536a']  # example data with 20 images in a field named `'img'`

In [6]: !mkdir test

In [7]: f(header)

In [8]: !ls test
1_0.tiff   1_11.tiff  1_14.tiff  1_17.tiff  1_2.tiff   1_5.tiff   1_8.tiff
1_1.tiff   1_12.tiff  1_15.tiff  1_18.tiff  1_3.tiff   1_6.tiff   1_9.tiff
1_10.tiff  1_13.tiff  1_16.tiff  1_19.tiff  1_4.tiff   1_7.tiff

As you can see, it is simple to customize the filename based on any piece of metadata. It's all contained in the Header. See docstring for more.

cc @pavoljuhas

I think the example should say
In [3]: f = exporter_factory('pe1_image_lightfield', 'test/{h.start.scan_id}_{N}.tiff')

Is this intended for end users, ie, people with a little Python/command-line knowledge, possibly stressing out at 3AM at the beamline?  If so I would recommend some bells and whistles from the TiffSaver, i.e.,

support for dry-run that would let users check output names before writing.
exporter should have an attribute for filename-template that could be checked or changed without
having to instantiate a new one.
timestamping of the written tiff files by the scan time.
ability to overwrite wrongly-named files identified by the same timestamp.
dark image subtraction.  Possibly a boolean flag for carrying it out or not.

Is there a potential for the factory to support more output formats?  If it will be tiff-only, perhaps the factory might be renamed to tiff_exporter_factory or make_tiff_exporter.

My example was applied to example data on my computer, generated from
databroker.examples.sample_data. Your example makes sense for XPD's pe1.
+1 on the rename and any bells, whistles people want. I'm just suggesting
this pattern.
On Fri, Oct 23, 2015 at 3:56 PM Pavol Juhas notifications@github.com
wrote:

I think the example should say
In [3]: f = exporter_factory('pe1_image_lightfield', 'test/{h.start.scan_id}_{N}.tiff')
Is this intended for end users, ie, people with a little
Python/command-line knowledge, possibly stressing out at 3AM at the
beamline? If so I would recommend some bells and whistles from the
TiffSaver
https://github.com/NSLS-II-XPD/ipython_ophyd/blob/master/uiophyd/tiffsaver.py,
i.e.,

support for dry-run that would let users check output names before
writing.
exporter should have an attribute for filename-template that could
be checked or changed without having to instantiate a new one.
timestamping of the written tiff files by the scan time.
ability to overwrite wrongly-named files identified by the same
timestamp.
dark image subtraction. Possibly a boolean flag for carrying it out
or not.

Is there a potential for the factory to support more output formats? If it
will be tiff-only, perhaps the factory might be renamed to
tiff_exporter_factory or make_tiff_exporter.
—
Reply to this email directly or view it on GitHub
https://github.com/NSLS-II/bluesky/pull/239#issuecomment-150675074.

Factory pattern is nifty and would be very useful if there were several exporter types, for example for several output formats.  I am however not sure what is its benefit for a single exporter type.  The factory call seems to be the only way of configuring the exporter and I don't see any way of accessing its configuration later.  It feels a bit clunky having to pass all of exporter parameters to the factory if user needs to change just one.  Am I perhaps missing something?

Did you notice that the configuration is a template on h? If I call f repeatedly, using several different headers, each header's metadata fills in the template.
There are only two things to configure here -- which field (which in your case will probably never change) and which template, as in 'test/{h.start.scan_id}_{N}.tiff'. I emphasize that h is a stand-in for any Header, not a specific Header. If you need to modify the template, you'd have to retype it anyway, right?
I don't expect non-sophisticated or overtired users will need to customize the template very often either, so all-purpose f could be defined in the IPython profile, ready to use. The simplicity of a function appeals to me.

New commits add a dryrun argument to the exporter function. Also, the function now always returns a list of filepaths to the files it wrote (or, if dryrun would write).
I like the idea of the timestamps -- can you open up a PR to incorporate that since you've done it before?
The rest, particularly exporting processed data, is a more complex task, out of scope for this light-weight utility. The functionality is needed, but I'd like to build it separately.

P.S. One useful thing I want to highlight: it is possible to hook this up to bluesky subscriptions such that TIFFs are automatically exported at the end of a scan. Users don't have to intervene or know anything about how it works.

Useful notebook. I already sent this over email, but I'm posting the link on github so we can find it later. http://nbviewer.ipython.org/gist/anonymous/a3ee62067986e73b2d2b

That notebook should go into our examples or something.

See #13

Took a while to get to this.  See #263.

authors: danielballan pavoljuhas tacaswell

repo: NSLS-II/bluesky


text:
AMX/FMX/NYX lacking synchweb user right

In api-staging, the users list for the proposal/??????/directories endpoint contained 'synchweb': 'r', but this seems to have been lost for this endpoint, as well as the beamline/??????/proposal-directory-skeleton

Was that the correct behaviour ? What permissions do we want for synchweb ? Do they just need to be specified for the top level proposal directory or all the subdirs in the skeleton ?
@danielballan @nmaytan thoughts ?
How do we know that a beamline is using synchweb ? Where should we configure this ?

There was a section in the old API code (https://github.com/NSLS-II/nsls2-api.git , api/proposal_api.py, line 243) where AMX, FMX, NYX, LiX had the 'synchweb': 'r' right added.
As far as I can see, this information is not stored anywhere explicitly, but the add_ispyb_db_users.yml playbook does have AMX, FMX, and NYX hosts that need to access the ISPyB database.

Good catch, @JunAishima!
Since we were re-reviewing the security posture of these directories, I touched based with our ISO just to confirm that this is still a good approach. He agreed.
So, the goal is to get the same result we got before in terms of permissions on these directories. @stuartcampbell Let us know if you want any additional guidance on the implementation. Seems like you have it in hand.

Does this look correct ?
response_1707748517727.json

@JunAishima Does this look correct ? response_1707748517727.json

The synchweb right seems correct, but I think we had the lsdc-tla right available for LiX as well (hence I would have expected it in the first directory entry there).
This might give you a way to simplify this work - you could tie the synchweb right to lsdc-tla, if that is possible within the code.

Just looked at the database and LIX doesn't have a lsdc service account defined and so it shouldn't assign any permissions to that account

authors: JunAishima danielballan stuartcampbell


text:
PR - oppdatere readme

oppdatert dokumentasjon. Må oppdateres en gang til når alt er på plass.

har oppdatert docs litt. dokumenten skal sikkert utvides i tiden. hvis dere syns det mangler noe, bare hent branchen og legg til det som trengs

repo: NVE/Designsystem