createnumbermask  - trailing zero padding for currency?

I am using createNumberMask in React (https://github.com/text-mask/text-mask/tree/master/addons#createnumbermask):
<MaskedInput
   {...props}
   className="form-control"
   mask={createNumberMask({
     allowDecimal: true,
     prefix: ''
   })}
/>

And was hoping that the values would always show 2 digits after the decimal, even if one or none were entered:
Examples:
1234 -> 1,234.00
1234.5 -> 1,234.50
Is this possible?

Thanks for this request @gthomas-appfolio. This is not implemented at the moment. I'll keep this issue open as a feature request.

Any progress on this issue? This would be the great feature. Any workaround for now?

@msafi Any progress on this issue?

Here is my version of workaround @gthomas-appfolio
function currencyMask(rawValue: string) {
    let numberMask = createNumberMask({
        prefix: '$',
        includeThousandsSeparator: true,
        allowDecimal: true,
        requireDecimal: true,
        allowLeadingZeroes: false
    });
    let mask = numberMask(rawValue);

    let decimalsRegex = /\.([0-9]{1,2})/;
    let result = decimalsRegex.exec(rawValue);
    // In case there is only one decimal
    if (result && result[1].length < 2) {
        mask.push('0');
    } else if (!result) {
        mask.push('0');
        mask.push('0');
    }

    return mask;
}

Thanks @chelaru-artur , do you think this could be a PR to add this feature?   I'll try out this out too, thanks.

I've posted in a different issue before noticing this as a feature request. Any news on this?

Building on the workaround from @chelaru-artur making it a little more generic:
function currencyMask(rawValue: string) {
    let numDecimals = 2;
    let numberMask = createNumberMask({
        prefix: '$',
        includeThousandsSeparator: true,
        allowDecimal: true,
        requireDecimal: true,
        allowLeadingZeroes: false
    });
    let mask = numberMask(rawValue);

    let decimalsRegex = /\.([0-9]{1,2})/;
    let result = decimalsRegex.exec(rawValue);
    // In case there is only one decimal
    let numZerosToAdd = 0;
    if (result && result[1].length < numDecimals)
       numZerosToAdd = numDecimals - result[1].length;
    else if (!result)
       numZerosToAdd = numDecimals;

    for (let i = 0; i < numZerosToAdd; i++)
       maskedValue.push('0');

    return mask;
}

Minor rewrite of @chelaru-artur's excellent work to avoid the perf hit from unnecessarily calling createNumberMask every time the function is executed:
const createCurrencyMask = (opts = {}) => {
  const decimalsRegex = /\.([0-9]{1,2})/;
  const numberMask = createNumberMask({
    prefix: '$',
    includeThousandsSeparator: true,
    allowDecimal: true,
    requireDecimal: true,
    allowLeadingZeroes: false,
    ...opts,
  });

  return rawValue => {
    const mask = numberMask(rawValue);
    const result = decimalsRegex.exec(rawValue);

    // In case there is only one decimal
    if (result && result[1].length < 2) {
      mask.push('0');
    } else if (!result) {
      mask.push('0');
      mask.push('0');
    }

    return mask;
  };
};

@lozjackson or @msafi I have submitted a PR (https://github.com/text-mask/text-mask/pull/737) to resolve this issue.  Please let me know what I can do to help expedite its approval.  Thank you!

Whenever I enter decimal point after typing few integers, a caret/underscore appears at the end of the typed number. Which I thinks is because of default decimal digits allowed(i.e 2) and "allowDecimal" set to "true".
I want to remove/disable the underscore coming at the end.
Any help?
e.g
Intially 0.00
Typed 2 Output 2.00
Typed 23 Output 23.00
Typed 23. Output 23.00_     (rawValue = 23..00)
Typed23.3 Output 23.30
Typed23.36 Output 23.36

This solution and the ones based on it don't quite work together with integerLimit.

I think @SimplerSoftware has a typo at the end of his snippit, maskedValue is not defined, I think he meant to use mask but I'm not sure

Is there any update about your PR, @joshlrogers?

Hey there! If I were to use a forked repo such as @joshlrogers ' locally, how would I do that? I'm setting up our package.json like https:...githubrepo/{library}/tarball/{branch} but in Angular we don't install 'text-mask' directly, but 'angular2-text-mask'  instead. Therefore. this repo's fork doesn't seem to work / have the right exports.
If someone offers any input it would be very much apprecciated! 😄

@tncho Similar thing for Ember - you need to also fork the wrapper library, and change the dependency in angular2-text-mask. More or less you need to get angular2-text-mask to use the different version - I would assume then you just use angular2-text-mask normally (probably don't need your repository to list the different text-mask package). - I don't have any serious angular2+ experience, so take this with a grain of salt

Thanks @devinrhode2 , got it working by forking the addons folder on a different repo and comitting my changes there (then, simply linking the package.json was enough) 😃

I think the issue with the workarounds here is that you cannot really enter something like .03 at the end.

Hi, has the feature been implemented ?

Minor rewrite of @chelaru-artur's excellent work to avoid the perf hit from unnecessarily calling createNumberMask every time the function is executed:
const createCurrencyMask = (opts = {}) => {
  const decimalsRegex = /\.([0-9]{1,2})/;
  const numberMask = createNumberMask({
    prefix: '$',
    includeThousandsSeparator: true,
    allowDecimal: true,
    requireDecimal: true,
    allowLeadingZeroes: false,
    ...opts,
  });

  return rawValue => {
    const mask = numberMask(rawValue);
    const result = decimalsRegex.exec(rawValue);

    // In case there is only one decimal
    if (result && result[1].length < 2) {
      mask.push('0');
    } else if (!result) {
      mask.push('0');
      mask.push('0');
    }

    return mask;
  };
};

Whenever I enter decimal point after typing few integers, a caret/underscore appears at the end of the typed number. Which I thinks is because of default decimal digits allowed(i.e 2) and "allowDecimal" set to "true".
I want to remove/disable the underscore coming at the end.
Any help?
e.g
Intially 0.00
Typed 2 Output 2.00
Typed 23 Output 23.00
Typed 23. Output 23.00_ (rawValue = 23..00)
Typed23.3 Output 23.30
Typed23.36 Output 23.36

Hi.. any solution ?

Hi, has the feature been implemented ?

Hi, just create a new customCreateNumberMask (which is the base function plus the @chelaru-artur workaround.
Create a new file and paste this
`const dollarSign = '$';
const emptyString = '';
const comma = ',';
const period = '.';
const minus = '-';
const minusRegExp = /-/;
const nonDigitsRegExp = /\D+/g;
const number = 'number';
const digitRegExp = /\d/;
const caretTrap = '[]';
export default function customNumberMask({
prefix = dollarSign,
suffix = emptyString,
includeThousandsSeparator = true,
thousandsSeparatorSymbol = comma,
allowDecimal = false,
decimalSymbol = period,
decimalLimit = 2,
requireDecimal = false,
allowNegative = false,
allowLeadingZeroes = false,
integerLimit = null,
alwaysShowDecimal = true
} = {}) {
const prefixLength = prefix && prefix.length || 0;
const suffixLength = suffix && suffix.length || 0;
const thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;
function numberMask(rawValue = emptyString) {
	const rawValueLength = rawValue.length;
	if (
		rawValue === emptyString ||
		(rawValue[0] === prefix[0] && rawValueLength === 1)
	) {
		// @ts-ignore
		return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));
	} else if (
		rawValue === decimalSymbol &&
		allowDecimal
	) {
		// @ts-ignore
		return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));
	}
	const isNegative = (rawValue[0] === minus) && allowNegative;
	if (isNegative) {
		rawValue = rawValue.toString().substr(1);
	}
	const indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);
	const hasDecimal = indexOfLastDecimal !== -1;
	let integer;
	let fraction;
	let mask;
	if (rawValue.slice(suffixLength * -1) === suffix) {
		rawValue = rawValue.slice(0, suffixLength * -1);
	}
	if (hasDecimal && (allowDecimal || requireDecimal)) {
		integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);

		fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);
		fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));
	} else {
		if (rawValue.slice(0, prefixLength) === prefix) {
			integer = rawValue.slice(prefixLength);
		} else {
			integer = rawValue;
		}
	}
	if (integerLimit && typeof integerLimit === number) {
		const thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : `${thousandsSeparatorSymbol}`;
		const numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;
		integer = integer.slice(0, integerLimit + (numberOfThousandSeparators * thousandsSeparatorSymbolLength));
	}
	integer = integer.replace(nonDigitsRegExp, emptyString);
	if (!allowLeadingZeroes) {
		integer = integer.replace(/^0+(0$|[^0])/, '$1');
	}
	integer = (includeThousandsSeparator) ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;
	mask = convertToMask(integer);
	if ((hasDecimal && allowDecimal) || requireDecimal === true) {
		if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {
			mask.push(caretTrap);
		}
		mask.push(decimalSymbol, caretTrap);
		if (fraction) {
			if (typeof decimalLimit === number) {
				fraction = fraction.slice(0, decimalLimit);
			}
			mask = mask.concat(fraction);
		}
		if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {
			mask.push(digitRegExp);
		}
	}
	if (prefixLength > 0) {
		mask = prefix.split(emptyString).concat(mask);
	}
	if (isNegative) {
		if (mask.length === prefixLength) {
			mask.push(digitRegExp);
		}
		mask = [minusRegExp].concat(mask);
	}
	if(alwaysShowDecimal) {
		let decimalsRegex = /\.([0-9]{1,2})/;
		let result = decimalsRegex.exec(rawValue);
		// In case there is only one decimal
		if (result && result[1].length < 2) {
			mask.push('0');
		} else if (!result) {
			mask.push('0');
			mask.push('0');
		}
	}
	if (suffix.length > 0) {
		mask = mask.concat(suffix.split(emptyString));
	}
	return mask;
}
numberMask.instanceOf = 'createNumberMask';
return numberMask;

}
function convertToMask(strNumber) {
return strNumber
.split(emptyString)
.map((char) => digitRegExp.test(char) ? digitRegExp : char);
}
function addThousandsSeparator(n, thousandsSeparatorSymbol) {
return n.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparatorSymbol);
}
`
try this and let me now if it works

Hi,
thanks for the code.
I need to change my input for which i need an event which will fire before mask runs?

Hi,
thanks for the code.
I need to change my input for which i need an event which will fire before mask runs?

I don't know how, this is basically a new addons, so if you need an event before the mask run I don't think that's the way to achieve it

Hi, just yesterday I had to patch this behavior too, the previous workaround was taken from here so I continued fixing it in similar way.
I fixed some issues like the mentioned above, among other things.

Typed 23. Output 23.00_ (rawValue = 23..00)

I think the issue with the workarounds here is that you cannot really enter something like .03 at the end.

I leave you my "solution" (angular 2+, typescript) in case it's useful for anyone who gets here looking for the same.
But be aware that this library is no longer mantained (45be5b5) since 2018 (I realized just today) and the suggested alternative has padFractionalZeros support (I haven't used it though).
<input type="text" [textMask]="{ mask: numberMask, pipe: maskPipe }">
  // ...
  this.numberMask = this.createCustomNumberMask();
  // ...
  createCustomNumberMask() {
    const numberMask = createNumberMask({
      prefix: '',
      suffix: '',
      includeThousandsSeparator: false,
      thousandsSeparatorSymbol: ',',
      allowDecimal: true,
      decimalSymbol: '.',
      decimalLimit: 2,
      integerLimit: null,
      requireDecimal: true,
      allowNegative: false,
      allowLeadingZeroes: false,
    });

    return rawValue => {
      const mask: any[] = numberMask(rawValue);

      if (/\.\./.test(rawValue) || /\.0$/.test(rawValue) || /^\.$/.test(rawValue)) {
        mask.pop();
      }
      if (/^\./.test(rawValue) && mask[0] === '[]') {
        mask.unshift('0');
      }
      if (!/\..{2,}$/.test(rawValue)) {
        mask.push('0');
        if (!/\.[1-9]$/.test(rawValue)) {
          mask.push('0');
        }
      }

      return mask;
    };
  }

  /**
   * Mask pipe for disabling manual input of the placeholder character
   */
  maskPipe = (conformedValue, config) => {
    return (config.rawValue as string).includes(config.placeholderChar) ? false : conformedValue;
  }


Introduce proxy container usable with reworked sultans/uluwatu

Tested on google cbd-tf-test:
http://<IP_ADDRESS>


Notebook: Descriptive statistics

See the spreadsheet for details

Content
Programming

DB
AO

Ideas/prereqs:
Central tendency, variability, aggregating per group (dplyr summarize), sampling, estimation error/error bars
Direct link
https://jupyter.olney.ai/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fmemphis-iis%2Fdatawhys-content-notebooks&subPath=Descriptive-statistics.ipynb&app=lab

V1 done with https://github.com/memphis-iis/datawhys-content-notebooks/pull/31

@sdflem @andrewtawfik reopening to initiate any discussion before releasing this Sat

@aolney , thanks for getting this starting. As I reviewed it, a couple of things that might help. I wonder if we have some standard things that might help with those that are new. Some potential options.

"What you will learn". This could essentially be some advanced Organizers to take advantage of the pretraining effect. It might be helpful to prime the learners about what follows. "In the section that follows, you will learn about descriptive statistics and how the following help us....

levels of measure
sampling
etc.

This could help w/ the cognitive load once something like sampling comes up about halfway.

Another thing that might be helpful is to include a section in the top with something like:

"When to use" or maybe "What this helps with"
and later
"What it doesn't do". This could be helpful to prime the learners that it doesn't make judgments about causality, statistical significant difference, etc. This could help with their schema formation and help when those topics do come later. Something like:
"While this is helpful to provide an overview of the data and provides some standardization, we need to be careful about how much we use it and the judgments we make because it does not..."

We had talked about the mental models developing and how quick it may have appeared. I don't know if it would be possible, but it might be really cool to have some kind of hover help and/or links.

For example, when they read the correlation notebook, there would be a line that says something like "This type of analysis requires the use of ratio data" and then hover over with a brief definition and possibly a link to the prior document. This could help with a flow theory perspective and maintain their train of thought, especially as things get more complicated

I agree with Andrew T. about the hover help.  I had thought about this earlier but we were so rushed to get everything ready.  In the description, where I thought a hover link would be good, I put the ideas in italics.
I like everything Andrew T. suggested except:  I don't  agree with the "what it doesn't do" section.  In my experience when you include this type of idea the students remember it but not necessarily as something they should NOT do.  Instead of making this an official section, maybe we could just include the information without emphasizing it as a formal section.  Just a thought.

I looked into the hover issue, and unfortunately this isn't something we can directly put into the notebooks without making the incompatible outside our system ( 1; 2 ).
@ddbowman would you like to take a crack at writing the sections you endorsed:

"What you will learn"
"When to use" or maybe "What this helps with"

?

Sure, I will work on it this weekend.

Sorry, I forgot you are trying to open these on Saturday.  I will work on it this afternoon

Thanks :) If it helps, I will probably send out Sat afternoon.

I added the two sections.  Can you take a look and see if it is too brief?  :)

@ddbowman I'm not seeing your changes. If you used the Jupyter link at the top of the issue, did you commit and push the changes afterwards?

Hi Andrew,
I am sorry but I don't know how to do that.  Can you walk me through it?  Here is what I added before the level of measure section.
Best,
Dale
What you will learn
In the sections that follow you will learn about descriptive statistics, in particular numerical EDA, and how they can help us learn about our data and what types of analyses may be appropriate.  We will study the following:

level of measure
measures of central tendency
measures of dispersion
sampling

When to use numerical EDA
Descriptive statistics, both numerical and graphical, are useful when you begin a data science project and you want to explore the data.  Often insights will be gained that can be useful in further analyses.

From: Andrew M Olney<EMAIL_ADDRESS>Sent: Friday, July 31, 2020 2:27 PM
To: memphis-iis/datawhys-content-notebooks<EMAIL_ADDRESS>Cc: Dale D Bowman (ddbowman<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [memphis-iis/datawhys-content-notebooks] Notebook: Descriptive statistics (#4)
@ddbowmanhttps://github.com/ddbowman I'm not seeing your changes. If you used the Jupyter link at the top of the issue, did you commit and push the changes afterwards?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/memphis-iis/datawhys-content-notebooks/issues/4#issuecomment-667312600, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOUET7SP2AQYYRE6DUROPPLR6MLLNANCNFSM4M2BZVZQ.

Looks great :) I'll add and save to the repo.


Ignite 2466 1.8.6 OutOfMemory when PRIMARY_SYNC mode is used

PR is not associated with a ticket. Apache Ignite issues are managed under Apache JIRA: https://issues.apache.org/jira/projects/IGNITE/
Please see how to associate ticket and PR in:
https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-Creation
Closing PR (which seems to be test-only) due to inactivity.
Feel free to reopen this PR if it is actual.


Add url_pattern to zuul.conf

If a url_pattern is set, zuul will use it to generate a link to the logs
in success and failure comments.
Signed-off-by: K Jonathan Harker<EMAIL_ADDRESS>

Starting gate_github jobs.


Question: Printing in WinUI 3 Desktop

Hi all
I'm looking for guidance on printing from WinUI 3 Desktop please.
I tried the PrintHelper from Community Toolkit 8 preview 4 and get a System.Runtime.InteropServices.COMException: 'Interface not registered (0x80040155)'  I put this down to issues with getting the Windows.Graphics.Printing.PrintManager as reported in #4375 and #4363.
So I suppose I'm trying to answer a few questions:

Is the PrintManager + PrintDocument combination going to be the preferred printing technique for WinUI 3 Desktop (as per UWP)
If not what is plan for WinUI 3 Desktop?
Is there a vision of when the capability will be available? there's nothing Print specific on the roadmap at the moment
Has anyone found workarounds/solutions to getting printing working in Preview 4?

I would welcome any thoughts, pointers etc. please. I know there's a huge amount of working going on to get the controls working properly, but Print has just got to the top of my stack and I'm a bit worried that it has fallen through the cracks which is going to cause issues as I can't ship without it.
BTW. We do have some fallback ideas, maybe WebView HTML generation or PDF generation, but to be honest I rather liked the UWP approach to printing and really hope it makes it through to WinUI 3 Desktop.
Thanks for your time, and all your hard work. I do think this unified approach is the right way to go and I can't wait to get away from NET Native and shipping modern apps with up-to-date backing tech (NET5/6 + WinUI)

I agree that at least adding printing APIs to the roadmap would be very helpful to plan for WinUI 3.0 adoption.

@MikeHillberg and @codendone do you have any insights here?

Thank your for opening this issue. I myself planned to do it some time ago, but back then I was busy and I forgot about it. AFAIK, there is the interface IPrintManagerInterop which has the methods: GetForWindow and ShowPrintUIForWindowAsync, which can take hwnds as parameters. Also, according to the docs, these are for desktop apps only. There is also this managed wrapper I found sometime ago, but if I recall correctly I was unable to make it work in a demo WPF app.

If it is the intended default, I hope the API sees improvements to large document handling. Printing a 100+ page document quickly leads to out-of-memory scenarios in UWP as you need to render all the pages up front and in-memory in XAML before handing off to be printed. Some form of "on demand" callback would help work around that.

I'm sorry, the PrintDocument API hasn't been updated for WinUI3 yet, and it's an accident that the API is showing up right now. I'll look into the roadmap, but it's not something we're actively working on yet.
@JohnnyWestlake, you should be able to hand off a page at a time rather than all 100 at onece. After each call to PrintDocument.AddPage you don't need the keep the pageVisual around.

I'm sorry, the PrintDocument API hasn't been updated for WinUI3 yet, and it's an accident that the API is showing up right now. I'll look into the roadmap, but it's not something we're actively working on yet.

Hi @MikeHillberg, do you have an update on where printing sits in the roadmap please. I really need to get some printed output from a Win UI 3 (Reunion 0.5) Desktop app and would appreciate guidance from the team please. Thanks

Hi, any updates on this, or is there any workaround? At now we try to find a way to print documents in our application

Hi @MikeHillberg, We are testing a port of an app from UWP to WinUI Desktop. PrintManager is also what we require too. It will be great to let us know what the future guidance for this is. Thanks.

Windows App SDK is now 1.0 stable and this bug still prevents printing (and using PrintHelper from Community Toolkit).
Any news?

@MartinRothschink et al.
You can vote on this and other things you want here:
https://portal.productboard.com/winappsdk/1-windows-app-sdk/c/50-support-printmanager-api

Thanks, voted.

Still no updates?

Working with WinUI and still waiting on PrintDocument to be updated to WinUI.

same

I just tested  (Windows 10 21H1) and PrintDocument works :

I just tested (Windows 10 21H1) and PrintDocument works :

can you maybe share your code for your testproject, so we can investigate what we maybe do wrong?

can you maybe share your code for your testproject, so we can investigate what we maybe do wrong?

 I tried to re-compile this project using VS2022 and I've got some errors "spacename Forms not found" while calling PrintDialog. Similarly, I've got an error with System.Drawing.Common, this could be resolved by installing a package via NuGet-PackageManager. For the Forms I cannot find any source and the assembly is marked with warn sign. Some SDKs are also marked with the warn sign, see below.
I would appreciate any help.

 I tried to re-compile this project using VS2022 and I've got some errors "spacename Forms not found" while calling PrintDialog. Similarly, I've got an error with System.Drawing.Common, this could be resolved by installing a package via NuGet-PackageManager. For the Forms I cannot find any source and the assembly is marked with warn sign. Some SDKs are also marked with the warn sign, see below. I would appreciate any help. !

I have put in comments (at beginning of MainWindow.xaml.cs) the links to the 3 Assemblys to add, depending on .NET 6 version
For example, I had .NET 6.0.3 and now I have .NET 6.0.4
So I must remove the 3 Assemblys ([Right-click][Remove] on each) and add them ([Dependencies][Right-click][Add COM Reference...][Browse] from :
"C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Drawing.Common.dll"
"C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Windows.Forms.dll"
"C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.4\System.Resources.Extensions.dll"

Could get it to work with your example @castorix, but with the PrintHelper from the Windows Community Toolkit, I still get the same error as the @bridgesquared

Ok, I've got it working, but... these are old-style dialogs, which I do not really want in my WnUI3(!) app 😊 So I will rather wait, until the PrintManager is working, similarly to UWP apps.

Instead of default dialogs, you can use your own windows
Test with random controls  + PrintPreviewControl :

Getting System.ArgumentException: 'Value does not fall within the expected range.'
On this line :
await PrintManagerInterop.ShowPrintUIForWindowAsync(hWnd)

Getting System.ArgumentException: 'Value does not fall within the expected range.'
On this line :
await PrintManagerInterop.ShowPrintUIForWindowAsync(hWnd)

Getting System.ArgumentException: 'Value does not fall within the expected range.' On this line : await PrintManagerInterop.ShowPrintUIForWindowAsync(hWnd)

The sample works for me on Windows 11 (21H2), but gives me the same System.ArgumentException as above when running on Windows 10 (21H2).  Is printing support intended to be for Windows 11 only?

Yes I'm in Windows 10 when I get this error.

Nop. It should be working on Windows10 too.  My team is investigating why these APIs don't work on Win10 given they were there since long time ago. Maybe there is some piece of the puzzle that we lost.

had to change the first line, instead of using "this" i used "App.StartupWindow"
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(App.StartupWindow);
printMan = PrintManagerInterop.GetForWindow(hWnd);
await PrintManagerInterop.ShowPrintUIForWindowAsync(hWnd)
At least the printUI does show up, but i got some problems with my dispatcher now...
Made my repo public, maybe someone can investigate this. Note I am a beginner.

So I was trying to print with System.Windows.Forms.PrintDialog and when I try to render a UIElement (page to print) to bitmap with RenderTargetBitmap I get the same error : Value does not fall within the expected range, in renderBitmap.GetPixelsAsync().
So I think the problem is in the WinUI UIElements.
Hope this can pinpoint the problem and you guys can help solve it.

@Redp87 @NoI3ody @FreddyD-GH It looks like there is a bug in Windows 10 that's preventing the IPrintManagerInterop solution from working. We're investigating servicing the fix downlevel, and will update here when we know more about that.

And following @krschau comments - Given the OS service updates process, I don't expect we can make it before September 2022.

Hi,
Any updates @marb2000 @krschau ?

Hi, Any updates @marb2000 @krschau ?

I ended up going with the method of creating an HTML document template that resembles a word document then modifying it using HTML agility pack and then opening it in Webview2 and calling the print function. The best part about this approach is that it also works on .net MAUI.

Hi. Any solutions ? Thanks

@marb2000 & @krschau
we are planning to integrate the below approach for printing in our application.
Is the approach provided here stable?
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
printMan = PrintManagerInterop.GetForWindow(hWnd);

await PrintManagerInterop.ShowPrintUIForWindowAsync(hWnd)

Sounds like this might be (finally) coming to Windows 10 in 19045.2788, which is currently in preview.
I have not tested printing there yet, but it is mentioned in the release notes and also here

This update affects applications that use the Windows UI Library in the Windows App SDK (WinUI 3). It makes printing for them possible on Windows 10 devices.

--
Note: I do not work for Microsoft and I am not affiliated with the WinUI / WinAppSDK in any way.

I tested in windows10(19045.2846,22H2). It show print preview dialog.

Is this issue still open? Any updates on this?

@marb2000 @krschau ?
With the provided solution (or workaround), is it possible to handle Print dialog close event? Because I want to run some code when user presses print & cancel buttons of print dialog.

@sethuramkumar

This is still an issue in the latest WinAppSDK 1.3.23x

Printing doesn't work with EntryPoint=Windows.PartialTrustApplication and without the <rescap:Capability Name="runFullTrust" />.
I'm working with an old UWP app that needs converting, and I cannot add the runFullTrust capability.
I'm trying to look if it's a capability missing, but no clue as of now because no exception or error are happening.

I get the same error.  Summarising the previous comment - it looks like printing is not possible in WinUI 3 desktop apps today unless they are also declare runFullTrust.  That makes them less secure and more difficult to publish to the Microsoft Store (very difficult?).  Like the previous commenter, I'm trying to port a UWP Microsoft Store app to WinUI3.  Thought I was nearly there!

I realize that few people still print to paper, but many of us need the ability to print to PDF or the like.
I wish someone would fix this, not sure how this feature was even tested properly at MS?

I get the same error. Summarising the previous comment - it looks like printing is not possible in WinUI 3 desktop apps today unless they are also declare runFullTrust. That makes them less secure and more difficult to publish to the Microsoft Store (very difficult?). Like the previous commenter, I'm trying to port a UWP Microsoft Store app to WinUI3. Thought I was nearly there! Maybe this can be re-categorised as an issue not a question?

@DaveAurionix I wouldn't consider it a workaround but an overall better solution than to use the built in printer is to use WebView2 and HTMLAgilityPack to make HTML printouts, they're instant to load and work cross platform on any app framework.

I cannot believe this is an issue, especially for this long.  WinUI will never be able to compete with WinForms for business applications if you cannot print a SfDataGrid, for example.  Our progress on our application just came to a complete stop thanks to this.

I cannot believe this is an issue, especially for this long. WinUI will never be able to compete with WinForms for business applications if you cannot print a SfDataGrid, for example. Our progress on our application just came to a complete stop thanks to this.

In desktop apps, any control can be printed (PrintManager or Win32 methods (GDI, GDI+, Direct2D))


enable jasmin report in console

fix for: https://github.com/NativeScript/android-runtime/issues/449
When the android unit tests are running the output is also printed in the logcat.

:+1:


GrammarKit generate different types than what is currently in gen/

@EBatTiVo, @as3boyan,
when I generate the haxe and hxml parsers from the command-line, I get differences in the types generated, a lot of them are wrapped in List.
For example HaxeBlockStatement becomes List.
I'm guessing this is because I don't use the right version of GrammarKit, I'm using 1.2.0, could you tell me which one do you use ? Thanks

The version I have is <IP_ADDRESS>
Even for me, it sometimes generates those List types.
At that time, I revert those changes... quit my IDE completely (not just closing the project) & relaunch it and try the same operation - it generates properly... weird but worked so far.

I use same version

Weird bug, I have the same with <IP_ADDRESS>,
do you have the same issue @as3boyan ?

no, @yanhick

@sganapavarapu1,
are you sure that when you relaunch the IDE, GrammarKit just skips compilation since "gen" already exists ? What happens if you remove "gen" before restarting the IDE ?

@yanhick If I delete "gen" - get same issue.

thanks,
do you guys think that the generated "List" make sense given the current state of the BNF ? I don't understand enough about it to know.

Perhaps typeTag may have multiple function types, each function may be corresponding to type or anonymous

@yanhick
I removed the "gen" directory and restarted my IDE - then regenerated the sources & rebuilt... I did 'not' run into the List issue. So, it seems that pre-existing "gen" directory isn't the issue.
FYI,
I happened to find out in past, confirmedly - that, entries in idea.vmoptions in your $IDEA_INSTALL_DIR/bin also influences what's generated.
e.g. this is what I have in my idea.vmoptions
-ea
-server
-Xms1g
-Xmx2g
-Xss16m
-XX:PermSize=256m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+UseAdaptiveGCBoundary
-XX:+HeapDumpOnOutOfMemoryError
-XX:+CMSClassUnloadingEnabled
-XX:+CMSParallelRemarkEnabled
-XX:CMSInitiatingOccupancyFraction=60
-XX:+UseSplitVerifier
-XX:CompileThreshold=10000
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-Dawt.useSystemAAFontSettings=lcd
Earlier, I used to have something similar to what Adolfo's comments have (at this URL): https://intellij-support.jetbrains.com/entries/23395793-Configuring-JVM-options-and-platform-properties
e.g. some of these affect how grammar kit generates code:
-XX:+UseFastAccessorMethods
-XX:+UnlockDiagnosticVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:+UseCompressedOops
-XX:+OptimizeStringConcat
-XX:+UseStringCache
-XX:+UseCodeCacheFlushing
even with stabler older versions of grammar kit.

I did find another problem though - when I removed my "gen" ... following files were not regenerated!
    deleted:    gen/com/intellij/plugins/haxe/hxml/HXMLParser.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLClasspath.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLDefine.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLLib.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLMain.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLProperty.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLQualifiedName.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLTypes.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/HXMLVisitor.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLClasspathImpl.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLDefineImpl.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLLibImpl.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLMainImpl.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLPropertyImpl.java
    deleted:    gen/com/intellij/plugins/haxe/hxml/psi/impl/HXMLQualifiedNameImpl.java
    deleted:    gen/com/intellij/plugins/haxe/lang/psi/HaxeConstructorName.java
    deleted:    gen/com/intellij/plugins/haxe/lang/psi/HaxeMacroMeta.java

I had to get them from git-hub repo.

@sganapavarapu1 They should be generated if you open hxml.bnf and trigger grammar generation for it

Thanks guys.
@as3boyan, we just discussed this at our standup, we'll file a bug on the GrammarKit project to ask why those extra List are generated.

@as3boyan Thanks,

Grammar-kit bug was filed: https://github.com/JetBrains/Grammar-Kit/issues/60

BTW, Grammar-Kit 1.1.x still works and doesn't have this bug.


beginAnimation of Dude does not work on latest Safari on iphone 6 / iphone 7

Regarding:
https://www.babylonjs.com/demos/bones/
This demo doesn't work well on latest safari on iphone 6 / iphone 7 (ios 10.3.3), tried latest Chrome on iphone 7, same thing.
Dude object always back to us :-) looks like beginAnimation doesn't work well.
I followed the sample code from this demo in my project, same issue.
Demo works well on Android devices like Samsung S7 (Chrome), and desktop computer Chrome.
Thanks for any idea.
Richard

Seems like they introduced another bug in latest ios... You can try with mesh.computeBonesUsingShaders=false

From: zhrichard<EMAIL_ADDRESS>Sent: Tuesday, August 1, 2017 6:18:54 PM
To: BabylonJS/Babylon.js
Cc: Subscribed
Subject: [BabylonJS/Babylon.js] beginAnimation of Dude does not work on latest Safari on iphone 6 / iphone 7 (#2618)
Regarding:
https://www.babylonjs.com/demos/bones/
This demo doesn't work well on latest safari on iphone 6 / iphone 7 (ios 10.3.3), tried latest Chrome on iphone 7, same thing.
Dude object always back to us :-) looks like beginAnimation doesn't work well.
I followed the sample code from this demo in my project, same issue.
Demo works well on Android devices like Samsung S7 (Chrome), and desktop computer Chrome.
Thanks for any idea.
Richard
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/BabylonJS/Babylon.js/issues/2618, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPtyPfQvbSC6oK0PUvmj7gQvvxN42pDks5sT85-gaJpZM4Oqe8D.

Thanks for quick help.
If I understand correctly, I added
newMeshes[0].computeBonesUsingShaders=false;
in importMesh callback function
Unfortunately no luck.
Thanks again.

you have to do it for all meshes

You are genius! Works now!
Thanks a lot!

I would have rathered post on the forum, but here goes.  I can reproduce
this error on an iPad Air.  Importantly, I am running 10.3.2.  Wanted to
check this before I went to 10.3.3.
What concerns me is I thought it was supposed to fallback automatically for
cpu skinning.  It is for the head mesh, and I see it in little bit of the
console visible in the debug layer.  I am just wonering out, since console
does not scroll, why only the head fell back?
On Wed, Aug 2, 2017 at 1:08 AM, zhrichard<EMAIL_ADDRESS>wrote:

Closed #2618 https://github.com/BabylonJS/Babylon.js/issues/2618.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/BabylonJS/Babylon.js/issues/2618#event-1188870558,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHjKY2hbwTMv7ubA4UqB9lS3Azof1daZks5sUARlgaJpZM4Oqe8D
.

I agree about the forum. Anyway, I agree it should farm back automatically but with safari nothing is sure

From: Jeff Palmer<EMAIL_ADDRESS>Sent: Thursday, August 3, 2017 7:33:04 AM
To: BabylonJS/Babylon.js
Cc: David Catuhe; Comment
Subject: Re: [BabylonJS/Babylon.js] beginAnimation of Dude does not work on latest Safari on iphone 6 / iphone 7 (#2618)
I would have rathered post on the forum, but here goes. I can reproduce
this error on an iPad Air. Importantly, I am running 10.3.2. Wanted to
check this before I went to 10.3.3.
What concerns me is I thought it was supposed to fallback automatically for
cpu skinning. It is for the head mesh, and I see it in little bit of the
console visible in the debug layer. I am just wonering out, since console
does not scroll, why only the head fell back?
On Wed, Aug 2, 2017 at 1:08 AM, zhrichard<EMAIL_ADDRESS>wrote:

Closed #2618 https://github.com/BabylonJS/Babylon.js/issues/2618.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/BabylonJS/Babylon.js/issues/2618#event-1188870558,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHjKY2hbwTMv7ubA4UqB9lS3Azof1daZks5sUARlgaJpZM4Oqe8D
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/BabylonJS/Babylon.js/issues/2618#issuecomment-319986810, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABPtyAMk7UVgnVgdzNZDFH63yqPXMozcks5sUdoegaJpZM4Oqe8D.


Prtest

:x: Validation status: errors

File
Status
Preview URL
Details

latest/docs-ref-autogen/network/nsg/rule.yml
:x:Error

Details

latest/docs-ref-autogen/batch.yml
:x:Error

Details

latest/docs-ref-autogen/webapp/config/ssl.yml
:x:Error

Details

latest/docs-ref-autogen/storage/container/lease.yml
:x:Error

Details

latest/docs-ref-autogen/storage/container/metadata.yml
:x:Error

Details

latest/docs-ref-autogen/vmss/nic.yml
:x:Error

Details

latest/docs-ref-autogen/mysql/server-logs.yml
:x:Error

Details

latest/docs-ref-autogen/billing/invoice.yml
:x:Error

Details

latest/docs-ref-autogen/iot.yml
:x:Error

Details

latest/docs-ref-autogen/dls/account/trusted-provider.yml
:x:Error

Details

latest/docs-ref-autogen/network/vnet-gateway/revoked-cert.yml
:x:Error

Details

latest/docs-ref-autogen/webapp/deployment/slot.yml
:x:Error

Details

latest/docs-ref-autogen/webapp/deployment/source.yml
:x:Error

Details

latest/docs-ref-autogen/group/deployment.yml
:x:Error

Details

latest/docs-ref-autogen/sql.yml
:x:Error

Details

latest/docs-ref-autogen/acr/repository.yml
:x:Error

Details

latest/docs-ref-autogen/ad/sp.yml
:x:Error

Details

latest/docs-ref-autogen/batch/location.yml
:x:Error

Details

latest/docs-ref-autogen/storage/container/policy.yml
:x:Error

Details

latest/docs-ref-autogen/vmss/extension/image.yml
:x:Error

Details

latest/docs-ref-autogen/network/public-ip.yml
:x:Error

Details

latest/docs-ref-autogen/dla/job.yml
:x:Error

Details

latest/docs-ref-autogen/postgres.yml
:x:Error

Details

latest/docs-ref-autogen/network/vnet-gateway/root-cert.yml
:x:Error

Details

latest/docs-ref-autogen/webapp/config/hostname.yml
:x:Error

Details

latest/docs-ref-autogen/functionapp/deployment/source.yml
:x:Error

Details

latest/docs-ref-autogen/batch/account/autostorage-keys.yml
:x:Error

Details

latest/docs-ref-autogen/managedapp.yml
:x:Error

Details

latest/docs-ref-autogen/network/route-filter.yml
:x:Error

Details

latest/docs-ref-autogen/snapshot.yml
:x:Error

Details

latest/docs-ref-autogen/sql/server.yml
:x:Error

Details

latest/docs-ref-autogen/dla/account/blob-storage.yml
:x:Error

Details

latest/docs-ref-autogen/cdn/profile.yml
:x:Error

Details

latest/docs-ref-autogen/functionapp/deployment/user.yml
:x:Error

Details

latest/docs-ref-autogen/batch/node/scheduling.yml
:x:Error

Details

latest/docs-ref-autogen/dla/catalog/external-data-source.yml
:x:Error

Details

latest/docs-ref-autogen/redis.yml
:x:Error

Details

latest/docs-ref-autogen/network/application-gateway/rule.yml
:x:Error

Details

latest/docs-ref-autogen/acs/kubernetes.yml
:x:Error

Details

latest/docs-ref-autogen/sql/db/audit-policy.yml
:x:Error

Details

latest/docs-ref-autogen/dla/catalog/table-type.yml
:x:Error

Details

latest/docs-ref-autogen/cognitiveservices/account.yml
:x:Error

Details

latest/docs-ref-autogen/keyvault/certificate.yml
:x:Error

Details

latest/docs-ref-autogen/dla/catalog/package.yml
:x:Error

Details

latest/docs-ref-autogen/dla/job/pipeline.yml
:x:Error

Details

latest/docs-ref-autogen/dla/job/recurrence.yml
:x:Error

Details

latest/docs-ref-autogen/functionapp/config/hostname.yml
:x:Error

Details

latest/docs-ref-autogen/storage.yml
:x:Error

Details

latest/docs-ref-autogen/dla/catalog/table.yml
:x:Error

Details

latest/docs-ref-autogen/storage/share/metadata.yml
:x:Error

Details

This comment lists only the first 50 files in the pull request.

latest/docs-ref-autogen/network/nsg/rule.yml

[Error] File latest/docs-ref-autogen/network/nsg/rule.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/batch.yml

[Error] File latest/docs-ref-autogen/batch.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/webapp/config/ssl.yml

[Error] File latest/docs-ref-autogen/webapp/config/ssl.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/storage/container/lease.yml

[Error] File latest/docs-ref-autogen/storage/container/lease.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/storage/container/metadata.yml

[Error] File latest/docs-ref-autogen/storage/container/metadata.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/vmss/nic.yml

[Error] File latest/docs-ref-autogen/vmss/nic.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/mysql/server-logs.yml

[Error] File latest/docs-ref-autogen/mysql/server-logs.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/billing/invoice.yml

[Error] File latest/docs-ref-autogen/billing/invoice.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/iot.yml

[Error] File latest/docs-ref-autogen/iot.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dls/account/trusted-provider.yml

[Error] File latest/docs-ref-autogen/dls/account/trusted-provider.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/network/vnet-gateway/revoked-cert.yml

[Error] File latest/docs-ref-autogen/network/vnet-gateway/revoked-cert.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/webapp/deployment/slot.yml

[Error] File latest/docs-ref-autogen/webapp/deployment/slot.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/webapp/deployment/source.yml

[Error] File latest/docs-ref-autogen/webapp/deployment/source.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/group/deployment.yml

[Error] File latest/docs-ref-autogen/group/deployment.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/sql.yml

[Error] File latest/docs-ref-autogen/sql.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/acr/repository.yml

[Error] File latest/docs-ref-autogen/acr/repository.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/ad/sp.yml

[Error] File latest/docs-ref-autogen/ad/sp.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/batch/location.yml

[Error] File latest/docs-ref-autogen/batch/location.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/storage/container/policy.yml

[Error] File latest/docs-ref-autogen/storage/container/policy.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/vmss/extension/image.yml

[Error] File latest/docs-ref-autogen/vmss/extension/image.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/network/public-ip.yml

[Error] File latest/docs-ref-autogen/network/public-ip.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/job.yml

[Error] File latest/docs-ref-autogen/dla/job.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/postgres.yml

[Error] File latest/docs-ref-autogen/postgres.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/network/vnet-gateway/root-cert.yml

[Error] File latest/docs-ref-autogen/network/vnet-gateway/root-cert.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/webapp/config/hostname.yml

[Error] File latest/docs-ref-autogen/webapp/config/hostname.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/functionapp/deployment/source.yml

[Error] File latest/docs-ref-autogen/functionapp/deployment/source.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/batch/account/autostorage-keys.yml

[Error] File latest/docs-ref-autogen/batch/account/autostorage-keys.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/managedapp.yml

[Error] File latest/docs-ref-autogen/managedapp.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/network/route-filter.yml

[Error] File latest/docs-ref-autogen/network/route-filter.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/snapshot.yml

[Error] File latest/docs-ref-autogen/snapshot.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/sql/server.yml

[Error] File latest/docs-ref-autogen/sql/server.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/account/blob-storage.yml

[Error] File latest/docs-ref-autogen/dla/account/blob-storage.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/cdn/profile.yml

[Error] File latest/docs-ref-autogen/cdn/profile.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/functionapp/deployment/user.yml

[Error] File latest/docs-ref-autogen/functionapp/deployment/user.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/batch/node/scheduling.yml

[Error] File latest/docs-ref-autogen/batch/node/scheduling.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/catalog/external-data-source.yml

[Error] File latest/docs-ref-autogen/dla/catalog/external-data-source.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/redis.yml

[Error] File latest/docs-ref-autogen/redis.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/network/application-gateway/rule.yml

[Error] File latest/docs-ref-autogen/network/application-gateway/rule.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/acs/kubernetes.yml

[Error] File latest/docs-ref-autogen/acs/kubernetes.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/sql/db/audit-policy.yml

[Error] File latest/docs-ref-autogen/sql/db/audit-policy.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/catalog/table-type.yml

[Error] File latest/docs-ref-autogen/dla/catalog/table-type.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/cognitiveservices/account.yml

[Error] File latest/docs-ref-autogen/cognitiveservices/account.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/keyvault/certificate.yml

[Error] File latest/docs-ref-autogen/keyvault/certificate.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/catalog/package.yml

[Error] File latest/docs-ref-autogen/dla/catalog/package.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/job/pipeline.yml

[Error] File latest/docs-ref-autogen/dla/job/pipeline.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/job/recurrence.yml

[Error] File latest/docs-ref-autogen/dla/job/recurrence.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/functionapp/config/hostname.yml

[Error] File latest/docs-ref-autogen/functionapp/config/hostname.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/storage.yml

[Error] File latest/docs-ref-autogen/storage.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/dla/catalog/table.yml

[Error] File latest/docs-ref-autogen/dla/catalog/table.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

latest/docs-ref-autogen/storage/share/metadata.yml

[Error] File latest/docs-ref-autogen/storage/share/metadata.yml with type UniversalReference doesn't have asset id. Please add UniversalReference mapping rule in type_mapping in .openpublishing.publish.config.json file.

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


[main] Upgrade to latest dependencies

Cron -knative-prow-robot
/cc knative-sandbox/networking-wg-leads
/assign knative-sandbox/networking-wg-leads
Produced by: knative-sandbox/knobots/actions/update-deps
Details:
bumping knative.dev/pkg 5f66ecf...6d71868:
  > 6d71868 Update community files (# 2600)
  > d1d5c84 Define a global for `reconciler.DefaultTimeout`. (# 2597)
  > df29e2a Avoid second lister fetch during finalizer reconciliation. (# 2596)
bumping knative.dev/hack d1317b0...6887217:
  > 6887217 Update community files (# 232)
  > 9b76387 output certificate as well (# 229)
bumping knative.dev/networking cefed20...c662540:
  > c662540 Update community files (# 713)

/lgtm
/approve


How to analysis the results?

I run the main.py like the command:python main.py. And I get a file :experiment-log-mle.csv. I don't know what those values mean. How to analysis it? And where the generated sentences are?

I don't understand also,someone can help us?

@Kinghup @mj2selina  have you found the solution?
I ran the main.py file and cannot find the generated sentences.


Not redirecting on TriggersEnter

Hey I have a method that should prevent users from entering the registration page if they already are logged in.
This is the code I am using:
FlowRouter.route('/registrer',{     triggersEnter: [isLoggedIn],     //What happens when you are getting routed     action(){         mount(LayoutMain, {             content: (<SignUp />)         })     } });
function isLoggedIn(context, doRedirect){     if (Meteor.user()) {         doRedirect('/');     } }
What can I do here to prevent a logged in user to access the registration page ?

Well, I think you want to redirect when there is no user, so
if (!Meteor.user()) { doRedirect('/'); }
However, FlowRouter.go('/') doesn't work inside triggersEnter.
What a more, I would expect that redirection will start immediately, but a code after doRedirect will be executed, please check
if (!Meteor.user()) {  console.log('before'); doRedirect('/');  console.log('after works as well'); }


tests are failing in 1.2.0

--- FAIL: TestNamedParams (0.10s)
	sqlite3_go18_test.go:34: Failed to call db.Exec: bind or column index out of range
	sqlite3_go18_test.go:45: Failed to db.Scan: bind or column index out of range
	sqlite3_go18_test.go:48: Failed to db.QueryRow: not matched results

What is 1.2.0? version of go?

Version of go-sqlite.
It looks like you haven't tagged since 2016.

fixed. https://travis-ci.org/mattn/go-sqlite3


This is a true fix for 285 and 286

The issues 285 and 286 were never truly fixed.  The root cause was that it was creating a user key instead of a machine key.  This fix also improves the error messages.
Hope this helps.

Thanks for this! I will merge it next time I work on this. I may reformat the strings a little, but otherwise, it looks great, and fixing Windows-specific problems like this likes outside my expertise.

Awesome, glad to hear it.  Great work on this project by the way.


Add Table of Contents for Projects

Adding a small table of contents for participating projects. This way it's easier to see at a glance which projects are participating this year, and to click directly to that project's ideas.

Thanks @mfdii!


Kb ssimcore 199

Working on JIRA issue SSIMCORE-199
Note: SyncroSim v2.3.10 internal release is required to run the changes in this branch

Looks good!


Update concept-mandatory-multifactor-authentication.md

adding message ID MC862873 for easy identification

@Justinha
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@LeandroRRocha thanks for adding this and sorry for delay. To work around the merge conflict, I added it on my side. #please-close


[HOLD] Refactor Workspace pages that use fetchFreePlanVerifiedBankAccount

@Expensify/pullerbear @nkuoch @MariaHCD
Replace all the uses of BankAccounts.fetchFreePlanVerifiedBankAccount in WorkspacePageWithSections. After looking and discussing the approach here. It makes sense to just get rid of WorkspacePageWithSections as a whole, as its only point is to pretty much call fetchFreePlanVerifiedBankAccount

[x] WorkSpaceSettingsPage  - link
[x] WorkspaceBillsPage  - link
[x] WorkspaceCardPage  - link
[x] WorkspaceInvoicesPage  - link
[x] WorkspaceReimbursePage – Already covered in PolicyAPI refactor, but need to get rid of WorkspacePageWithSections
[x] WorkspaceTravelPage  - link

Details

Fixed Issues

WorkspacePageWithSections case: https://github.com/Expensify/Expensify/issues/226858
Tests

[ ] Verify that no errors appear in the JS console

QA Steps
We need to test first with an account with a workspace that no VBBA. And second with an account with workspaces that has a VBBA. So please perform these tests without one setup, then again with one setup.
(You can follow these instructions to setup a VBBA https://stackoverflow.com/c/expensify/questions/342 )
WorkSpaceSettingsPage:

Navigate to Workspace-> Settings

Verify that you can change the workspace name
IF VBBA is setup, verify that currency picker is disabled
IF VBBA is NOT setup, verify that currency picker is not disabled. And verify changing currency

WorkspaceBillsPage:

Navigate to Workspace "Bills"
IF VBBA is setup, verify that you see the "Hassle Free Bills" section

IF VBBA is NOT setup, verify that currency picker is not disabled. And verify changing currency

WorkspaceCardPage:

Navigate to Workspace "Issue Cards"
IF VBBA is setup, verify that you see the "Hassle Free Bills" section

IF VBBA is NOT setup, verify that you see a "Connect Bank Account" button and it works by sending you down VBBA setup flow

WorkspaceInvoicesPage:

Navigate to Workspace "Send Invoices"
IF VBBA is setup, verify that you see the "Money bank, in a flash!" section and no connect bank account button

IF VBBA is NOT setup, verify that you see a "Connect Bank Account" button and the "Unlock online invoice collection" section

WorkspaceReimbursePage:

Navigate to Workspace "Reimburse expenses"
IF VBBA is setup, verify that you only see "Capture receipts" and "Track Distance" sections. Verify that you can change mileage rate and distance type (km vs mi)

IF VBBA is NOT setup, verify that you see a "Connect Bank Account" button below the two sections and that you can change mileage rate and distance type (km vs mi)

WorkspaceTravelPage

Navigate to Workspace "Book Travel"
IF VBBA is setup, verify that you don't see a connect bank account button

IF VBBA is NOT setup, verify that you see a "Connect Bank Account" button

PR Review Checklist

PR Author Checklist

[ ] I linked the correct issue in the ### Fixed Issues section above
[ ] I wrote clear testing steps that cover the changes made in this PR

[ ] I added steps for local testing in the Tests section
[ ] I added steps for Staging and/or Production testing in the QA steps section
[ ] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I included screenshots or videos for tests on all platforms
[ ] I ran the tests on all platforms & verified they passed on:

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

[ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[ ] I followed proper code patterns (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I followed the guidelines as stated in the Review Guidelines
[ ] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

Don't review just yet. Need to clean up the some of the props and need to finish reimburse page

Why is this issue on hold? Also when do you expect that conflicts will be resolved?

Its no longer, but I'm going to close this for another PR. I removed the WorkPageWithSections and we decided that wasn't necessary

PR coming up soon, as soon as I fix the ReimbursementAccountPage one

Gotcha, thanks for closing the loop!

Closing for https://github.com/Expensify/App/pull/12586


Workload append json doesn't work as expected

I am trying to extend gem5 resources with my own specialized workloads and running into problems. I'm not totally sure what's going on, and I haven't dug very deep on it.
Affects version
develop (for 23.1)
gem5 Modifications
No modifications.
I have created a new file npb-workloads.json by running the following python code.
template = """
        {{
            "id": "x86-npb-{benchmark}-{size}",
            "description": "NAS Parallel benchmarks - {Benchmark} - Class {Size}.",
            "function": "set_kernel_disk_workload",
            "resources": {{
                "kernel": "x86-linux-kernel-4.19.83",
                "disk_image": "x86-npb",
                "readfile_contents": "/home/gem5/NPB3.3-OMP/bin/{benchmark}.{Size}.x; sleep 5; m5 exit;"
            }},
            "additional_params": {{}},
            "architecture": "X86",
            "resource_version": "1.0.0",
            "gem5_versions": [
                "23.0"
            ]
        }},"""

res = """
{
    "resources": [
"""

for benchmark in ["bt", "cg", "ep", "ft", "is", "lu", "mg", "sp"]:
    for size in ["A", "B", "C", "D"]:
        res += template.format(benchmark=benchmark, Benchmark=benchmark.upper(), Size=size, size=size.lower())

res += """
    ]
}
"""

with open("npb-workloads.json", "w") as f:
    f.write(res)

To Reproduce
Steps to reproduce the behavior. Please assume starting from a clean repository:

Compile gem5 with command  scons build/ALL/gem5.opt
Modify configs/example/gem5_library/x86-npb-benchmarks.py to use board.set_kernel_disk_workload(obtain_resource("x86-npb-cg-a"))
Execute the simulation with  GEM5_RESOURCE_JSON_APPEND="npb-workloads.json" build/ALL/gem5.opt configs/example/gem5_library/x86-npb-benchmarks.py --benchmark cg --size A

Terminal Output
info: Using default config
info: Appending resources from npb-workloads.json
warn: Error getting resources from client GEM5_RESOURCE_JSON_APPEND: string indices must be integers
Exception: Resource with ID 'x86-npb-cg-a' not found.

At:
  src/python/gem5/resources/client_api/client_wrapper.py(151): get_resource_json_obj_from_client
  src/python/gem5/resources/client.py(152): get_resource_json_obj
  src/python/gem5/resources/resource.py(590): obtain_resource
  configs/example/gem5_library/x86-npb-benchmarks.py(204): <module>
  src/python/m5/main.py(630): main

Expected behavior
gem5 should download the npb resources and run CG
Host Operating System
Ubuntu 22.04
Host ISA
X86

Small correction: I don't think if using Workload you need to specify category (though you will when we have Issue #212 implemented and get Workload via obtain_resource).

Closing this issue. No action needs taken.


[9.0] website_sale_checkout_store - "State / Province" appears always after installing the module

The "State / Province" is always present after installing the website_sale_checkout_store module. Prior of installing the module, there's a condition whether to show in the QWeb or not, which no longer in the template.
I'm not sure if it's bug or intentional, but is there any way/control for deactivating it from the form?

this is not an issue, but a mistake we did. It just coincide with the test of this plugin.
Please excuse me for the "Not a Bug".


Uncaught Error: Could not call remote function 'bound '. Check that the function signature is cor...

[Enter steps to reproduce:]

...
...

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Ubuntu 16.04.2
Thrown From: Atom Core
Stack Trace
Uncaught Error: Could not call remote function 'bound '. Check that the function signature is correct. Underlying error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: window-event-handler.js:46:21.
Error: Could not call remote function 'bound '. Check that the function signature is correct. Underlying error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: window-event-handler.js:46:21.
at callFunction (/opt/atom/resources/electron.asar/browser/rpc-server.js:226:11)
at EventEmitter. (/opt/atom/resources/electron.asar/browser/rpc-server.js:307:5)
at emitMany (events.js:127:13)
at EventEmitter.emit (events.js:201:7)
at WebContents. (/opt/atom/resources/electron.asar/browser/api/web-contents.js:222:13)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)
At /opt/atom/resources/electron.asar/renderer/api/remote.js:210

Error: Could not call remote function 'bound '. Check that the function signature is correct. Underlying error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: window-event-handler.js:46:21.
Error: Could not call remote function 'bound '. Check that the function signature is correct. Underlying error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: window-event-handler.js:46:21.
    at callFunction (/opt/atom/resources/electron.asar/browser/rpc-server.js:226:11)
    at EventEmitter.<anonymous> (/opt/atom/resources/electron.asar/browser/rpc-server.js:307:5)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/opt/atom/resources/electron.asar/browser/api/web-contents.js:222:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)
    at metaToValue (/opt/atom/resources/electron.asar/renderer/api/remote.js:210:13)
    at undefined.remoteMemberFunction (/opt/atom/resources/electron.asar/renderer/api/remote.js:111:18)
    at ApplicationDelegate.module.exports.ApplicationDelegate.showSaveDialog (/app.asar/src/application-delegate.js:218:38)
    at Pane.module.exports.Pane.saveItemAs (/app.asar/src/pane.js:778:46)
    at Pane.saveItemAs (/app.asar/src/pane.js:3:59)
    at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:765:21)
    at Pane.saveItem (/app.asar/src/pane.js:3:59)
    at Pane.module.exports.Pane.saveActiveItem (/app.asar/src/pane.js:736:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/app.asar/src/workspace.js:693:35)
    at /app.asar/src/register-default-commands.js:225:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at /app.asar/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
    at /app.asar/src/window-event-handler.js:3:59)

Commands
     -1:31.5.0 intentions:highlight (input.hidden-input)
     -1:30.7.0 core:save (input.hidden-input)
     -1:28.8.0 intentions:highlight (input.hidden-input)
     -1:28.3.0 symbols-view:toggle-file-symbols (input.hidden-input)
     -1:25.4.0 run:file (input.hidden-input)
     -0:49.9.0 intentions:highlight (input.hidden-input)
     -0:49.6.0 core:save (input.hidden-input)
     -0:25 intentions:highlight (input.hidden-input)
     -0:24.6.0 core:save (input.hidden-input)

Non-Core Packages
atom-runner 2.7.1
autocomplete-python 1.8.62
busy-signal 1.3.0
file-icons 2.1.1
intentions 1.1.2
linter 2.1.2
linter-ui-default 1.2.1
platformio-ide-terminal 2.5.0
python-tools 0.6.9

Thanks for the report!  Can you confirm a few things for us?

what were you doing at the time of the error?
is the error is reproducible?
if reproducible, do you see the error in safe mode (atom --safe)?

Thanks again for your issue!
We haven't received a response to our question in this comment https://github.com/atom/atom/issues/14094#issuecomment-290485091. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.


ATTACK_NR == 4, inconsistent parameters

The parameters for "ATTACK_NR == 4" seem inconsistent between printk and the actual parameters.
#if ATTACK_NR == 4
printk("-t indirect -i shellcode -c funcptrstackvar -l stack -f memcpy");
attack.technique = INDIRECT; attack.inject_param = RETURN_INTO_LIBC; attack.code_ptr= FUNC_PTR_STACK_VAR; attack.location = STACK;  attack.function = HOMEBREW;
#endif
The printk says the inject_param should be shellcode, but it actually uses returnintolibc

You are right, it is a mistake in the printk.
Corrected.


[FEATURE_REQUEST] More informations on how the hashes are computed

Introduction
Currently it is a bit hard for the user to know on which files the hashes of tuples or objectives and datasets is computed w/o going into the code.
This can cause bad surprises when submitting twice slightly different objectives/datasets/tules.

Closing stale issue.


refactor: Gem Version Compatibility Checks

This PR is not intended to be merged. It is a spike to flesh out alternative implementations of instrumentation version compatibility.

@robertlaurin @ericmustin This is a first step in a multi stage refactoring to add some constraints around what versions an auto-instrumented library will support.
Before I proceed I would like to get your initial thoughts and feedback.
cc: https://github.com/open-telemetry/opentelemetry-ruby/issues/947

As a first step I added instance template methods and moved the evaluation logic into the Base class. I left the compatible block in place as a way to override the default behavior. The old logic assumed if no compatibility block was provided it would try anyway. Is that correct?
The next step here would be to implement the template methods in the instrumentations who currently do not declare min versions.
The last step would be to convert the template methods to instance variables and inject them using declarative class methods (A.K.A. DSLs)

The only headache here for me is the redundant VERSION constant as I am going to need it for our situation where RubyGem specifications are not available to us via loaded specs. This makes me wonder if I am going about this the wrong way and if we should rely on only the VERSION constant being present.
The other thing bouncing around in my head is reducing test friction. Would there be a way to validate the these constraints without combinatorial explosion of appraisals?
Also, how does the instrumentation semver relate to the target library?

broadly speaking i think what you've laid out here would work, but practically speaking i'm not sure it actually accomplishes too much beside making things more confusing for the benefit of a little bit of automagic on the compatibility check, especially since your use case of not wanting to rely on loaded_specs still isn't met. Additionally, it doesn't really help solve the idea of a max_version like discussed here https://github.com/open-telemetry/opentelemetry-ruby/issues/988.
Here's what I think we've gotten to

We want to be able to define a min and max version in some way that is clean and easy to understand
we want to have confidence about what versions an instrumentation supports
we want to be able to allow users to have a fallback that doesn't require loaded_specs[<gem_name>]

I think we could do this a few ways but the most straightforward way i could think of for now is just to

painstakingly go thru each instrumentation and update the compatibility check so it checks a min version against both loaded_specs and a fallback of <whatever constant exists in that gem that defines version, which is usually 'VERSION' but not always>. If we are feeling like we have bandwdith, we could also check against a max version in situations where we feel it's appropriate. we could set the max version as a constant MAX_VERSION. with those constants set we could perhaps more easily generate appraisals.

note: Yes, this approach would increase the number of test combinations significantly, but my 2 cents is I'd rather us have confidence in our tests and those tests take awhile to run, rather than not have a well tested gem. I think part of delivering a production quality observability gem is ensuring it's safe to use and attempting to reduce observer effect as much as reasonable, and if that means "our test suite takes 2 hours to complete" well, this is the business we've chosen

if we start introducing max versions, we may also want to give users the flexibility to say "i know what i'm doing, i dont need your stupid compatibility check" and let them toggle off the compatibility check either on a per instrumentation, or on a service wide basis. This way we could be pretty defensive about max supported versions, since we can always tell users "hey just toggle off the compatibility check if you are confident that this instrumentation works on the next major version, even though we haven't found time to explicitly test this compatibility yet"

kinda thinking out loud...wdyt?

broadly speaking i think what you've laid out here would work, but practically speaking i'm not sure it actually accomplishes too much beside making things more confusing for the benefit of a little bit of automagic on the compatibility check, especially since your use case of not wanting to rely on loaded_specs still isn't met. Additionally, it doesn't really help solve the idea of a max_version like discussed here #988.
Here's what I think we've gotten to

We want to be able to define a min and max version in some way that is clean and easy to understand
we want to have confidence about what versions an instrumentation supports
we want to be able to allow users to have a fallback that doesn't require loaded_specs[<gem_name>]

I think we could do this a few ways but the most straightforward way i could think of for now is just to

painstakingly go thru each instrumentation and update the compatibility check so it checks a min version against both loaded_specs and a fallback of <whatever constant exists in that gem that defines version, which is usually 'VERSION' but not always>. If we are feeling like we have bandwdith, we could also check against a max version in situations where we feel it's appropriate. we could set the max version as a constant MAX_VERSION. with those constants set we could perhaps more easily generate appraisals.

To confirm you are advocating that each auto-instrumentation define a MIN_VERSION and MAX_VERSION constant by convention and enforce pessimistic versioning. Is that right?
E.g.

module OpenTelemetry
  module Instrumentation
    module Sinatra
      class Instrumentation  < OpenTelemetry::Instrumentation::Base
          MIN_VERSION = "2.0.7"
          MAX_VERSION = "2.9"

          compatible do
             spec_version = Gem.loaded_specs["sinatra"]&.version || Gem::Version.new(::Sinatra::VERSION)
             Gem::Version.new(MIN_VERSION) <= spec_version && spec_version >= Gem::Version.new(MAX_VERSION)
          end
      end
    end
   end
end

That makes it possible to generate appraisals easier because we will be able to find the constants by convention. Is that right?

note: Yes, this approach would increase the number of test combinations significantly, but my 2 cents is I'd rather us have confidence in our tests and those tests take awhile to run, rather than not have a well tested gem. I think part of delivering a production quality observability gem is ensuring it's safe to use and attempting to reduce observer effect as much as reasonable, and if that means "our test suite takes 2 hours to complete" well, this is the business we've chosen

👍🏼 This may be a matter of changing how our test suite runs to parallelize execution in a more interesting and meaningful way.

if we start introducing max versions, we may also want to give users the flexibility to say "i know what i'm doing, i dont need your stupid compatibility check" and let them toggle off the compatibility check either on a per instrumentation, or on a service wide basis. This way we could be pretty defensive about max supported versions, since we can always tell users "hey just toggle off the compatibility check if you are confident that this instrumentation works on the next major version, even though we haven't found time to explicitly test this compatibility yet"

kinda thinking out loud...wdyt?

🤔 the advantage here is that we could test out compatibility with newer versions without requiring code changes right?

module OpenTelemetry
  module Instrumentation
    module Sinatra
      class Instrumentation  < OpenTelemetry::Instrumentation::Base
          MIN_VERSION = "2.0.7"
          MAX_VERSION = "2.9"

          compatible do
             spec_version = Gem.loaded_specs["sinatra"]&.version || Gem::Version.new(::Sinatra::VERSION)
             Gem::Version.new(MIN_VERSION) <= spec_version && (config[:enforce_max_version] && spec_version >= Gem::Version.new(MAX_VERSION))
          end
      end
    end
   end
end

There is something that still isn't sitting right with me and I cannot quite articulate what is wrong. Maybe I need to write down all of the references to versioning to help me formulate some thoughts...
ℹ We define a minimal supported gem version as a development dependency for development and testing:
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/mysql2/opentelemetry-instrumentation-mysql2.gemspec#L34
We add it as a development dependency to make it easier to include all dependencies without impacting the target applications runtime dependencies.
ℹ We sometimes define an appraisal for all gem versions we believe this gem supports
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/mysql2/Appraisals
ℹ We always exercise a test suite for the appraised versions on all of our supported platforms
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/.github/workflows/ci.yml#L15
ℹ We sometimes programmatically enforce compatibility constraints
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb#L24
ℹ We sometimes fallback to constant if the gemspecs were not loaded
https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/ruby_kafka/lib/opentelemetry/instrumentation/ruby_kafka/instrumentation.rb#L31
I wonder if there is something that we can do to declare the dependent versions in a single way and leverage them in all of the scenarios laid out above?
Is it possibly to do that using the declared library dependency version defined in the gemspec of the current instrumentation?

@ericmustin After doing a little research it looks like using Gem::Specification.find_by_name along with Gem::Requirement#satisfied_by?
irb(main):008:0> instrumentation_gemspec = Gem::Specification.find_by_name("opentelemetry-instrumentation-faraday")
=> Gem::Specification.new do |s|
...

irb(main):009:0> supported_gemspec = instrumentation_gemspec.development_dependencies.find { |spec| spec.name == "faraday" }

=> Gem::Dependency.new("faraday", Gem::Requirement.new(["~> 0.17.0"]), :development)

irb(main):010:0> requirement = supported_gemspec.requirement
=> Gem::Requirement.new(["~> 0.17.0"])

irb(main):019:0> installed_gemspec = Gem::Specification.find_by_name("faraday")
=> Gem::Specification.new do |s|
...

irb(main):021:0> installed_gemspec.version
=> Gem::Version.new("0.17.4")

irb(main):020:0> requirement.satisfied_by?(installed_gemspec.version)
=> true

I think what this will do is give us the ability to declare explicitly target gem requirements without having to create a separate declaration in the instrumentation source.

@arielvalentin I think I agree with all the ℹ's you've laid out. And looking at your example of Gem::Specification.find_by_name along with Gem::Requirement#satisfied_by?, It looks interesting but I'm not sure what you mean by

declare explicitly target gem requirements without having to create a separate declaration in the instrumentation source.

What would this look like exactly? are you saying we could possibly just determine the min/max requirements from the instrumentation's .gemspec , and then use that to determine compatibility?
I guess what's confusing to me is we're trying to do a few things at once here. Is there one of the issues that we've talked about that is most important to your use case or that you're blocked on? Or are you just interested in broadly improving/adding a DSL here? If it's the latter that's fine I just want to make sure i'm on the same page.

@arielvalentin I think I agree with all the ℹ's you've laid out. And looking at your example of Gem::Specification.find_by_name along with Gem::Requirement#satisfied_by?, It looks interesting but I'm not sure what you mean by

declare explicitly target gem requirements without having to create a separate declaration in the instrumentation source.

What would this look like exactly? are you saying we could possibly just determine the min/max requirements from the instrumentation's .gemspec , and then use that to determine compatibility?
I guess what's confusing to me is we're trying to do a few things at once here. Is there one of the issues that we've talked about that is most important to your use case or that you're blocked on? Or are you just interested in broadly improving/adding a DSL here? If it's the latter that's fine I just want to make sure i'm on the same page.

It sounds like I wasn't clear about what I was suggesting in my previous comment.
I am abandoning the idea of the versioning DSL as well as falling back on a constant in favor of comparing the instrumentation gemspec and the target library gemspec as the source for the compatibility check at runtime. This should reduce friction for engineers since they can be as specific as they need to in gemspec dependencies instead of defining specific constraints in code.
Using Gem::Specification works in my use case where the loaded_gemspecs is not populated.
The only thing we would need to developer to specific is the name of the target gem they are instrumenting. The Instrumentation::Base class can take it from there.
I will update the PR with an example of what I mean tomorrow.

@arielvalentin ah gotcha gotcha, yea I think that makes sense, we should prob still accept an optional compatibility block in the case that the logic is more complicated (maybe, based on platform or some other arbitrary thing that we cant plan for)

@arielvalentin ah gotcha gotcha, yea I think that makes sense, we should prob still accept an optional compatibility block in the case that the logic is more complicated (maybe, based on platform or some other arbitrary thing that we cant plan for)

I agree ... Circle gets the square!

@ericmustin I hacked together a spike to get some feedback from you. LMK if you think it looks good.

@arielvalentin i think this approach lgtm, off the top of my head my largest concerns are all addressed

[x] this is backward compatible + can be added to instrumentation gems iteratively.
[x] this plays nicely with compatible blocks. As far I can tell, this does, so all good.
[x] the auto-magic of using gemspec+instrumentation library name is robust and just works

I will ask for some feedback from the other folks on my team but my 2 cents is I really like this approach and i think it improves instrumentation compatibility definitions (by baking it into the gemspec), and also creates a path to more tightly define+test our gem compatibility in appraisals (since we can abstract out the major support versions for appraisals programmatically from the gemspec).
Maybe can split this work into

a PR for the instrumentation base class + 1 instrumentation + base tests,
then we can follow up with a sweep of the other instrumentation.

Wdyt?

Maybe can split this work into

a PR for the instrumentation base class + 1 instrumentation + base tests,
then we can follow up with a sweep of the other instrumentation.

Wdyt?

@ericmustin Yes that sounds good to me. I am on vacation for Thanksgiving week so let's allow this to sit for a bit to give others a chance at providing some feedback.

Closing this out in favor of https://github.com/open-telemetry/opentelemetry-ruby/pull/1025


Does anyone reproduce the wav2vec2 pre-train result? and How?

I'm new to wav2vec，can you introduce what dataset using to train, and what's the difference with fairseq?