Add version header with AMQPCPP_VERSION preprocessor symbol

A bit of cmake machinery that stamps out a "version.h" file based on the existing values in CMakeLists.txt.
The version_template.h file is used to construct the version header.  The initial "version.h" file is created in the build (binary) dir so as not to pollute the source tree.  It is installed into ".../include/amqpcpp/".

What would the recommended workflow be when we bring out a new version? Currently, after I brought out a new version, I already (manually) update the version numbers in Makefile and CMakeLists.txt to prepare for the next version.

Does anything change?
Presumably at the point where you’ve decided the release is ready, that’s the snapshot point where the values in the make files truly represent that version (as opposed to working towards).
You then set the tag to mark it.  After that you update the values for the next targeted version.
If I were to download, say, v4.3.20, the VERSION_XYZ values in its CMakeLists.txt file specify 4, 3 and 20.  So a cmake, make, make install will always be bound to those values.


CMake using Conan says 'GLFW/glfw3.h' file not found

Hi.
I'm trying to create a GLFW project from scratch following the guide from Conan Center for CMake build on MacOS.
When I execute the last command from that guide (cmake --build .) I'm getting the error:

fatal error: 'GLFW/glfw3.h' file not found

My conanfile.txt:
[requires]
glfw/3.3.7

[generators]
CMakeDeps
CMakeToolchain

My CMakeLists.txt:
cmake_minimum_required(VERSION 3.15)
project(glfw_project C)

find_package(glfw3)

add_executable(${PROJECT_NAME} src/main.c)

# Use the global target
target_link_libraries(${PROJECT_NAME} glfw)

The commands I'm executing:
$ conan install . --install-folder cmake-build-release --build=missing
$ cmake . -DCMAKE_TOOLCHAIN_FILE=cmake-build-release/conan_toolchain.cmake
$ cmake --build .

I have had the same issue after installing glfw3 using conan on linux. Try to explicitly add the inlcude directory path. Simply add the following line to your CMakeLists.txt:
target_include_directories(${PROJECT_NAME} PUBLIC ${glfw3_INCLUDE_DIRS})


New language request

I would really like to do a full translation into Swiss German. You are well loved here, and I think everybody (of us Swiss, I mean...) would love this. Any chance this would be acceptable?

@6dayspizza I believe you can go to contribution page which directs you to Crowdin and help translating.

@6dayspizza I have added Swiss German (I hope the lang code is correct, let me know if it isn't) to Crowdin so you can start adding the translations here  👇🏻 https://crowdin.com/editor/excalidraw/10/en-dech?view=comfortable&filter=basic&value=3 :)

@ad1992 Awesome, thank you!


Install dpdk during vpp build

if the base ligato image is too old there might be old dpdk install the current version

Coverage decreased (-0.07%) to 75.378% when pulling eee5c704a0429cb9b41fcf593963e8b0a5cfc4c5 on lukasmacko:master into d3383a4c6426ccc0f6dfe4e9b18f1e06612f542c on contiv:master.


KOGITO-6976 ProcessTest needs to extend BaseRestTest in order to get …

…random port injected

(tests) - kogito-examples job #1557 was: UNSTABLE
Possible explanation: This should be test failures
Test results:

PASSED: 452
FAILED: 1

Those are the test failures:

Build projects / org.acme.it.QueryAnswerServiceIT.queryAnswerProcessCycle
java.lang.AssertionError: 1 expectation failed.Expected status code <201> but was <400>.	at org.acme.it.QueryAnswerServiceIT.queryAnswerProcessCycle(QueryAnswerServiceIT.java:89)

Please look here: https://eng-jenkins-csb-business-automation.apps.ocp-c1.prod.psi.redhat.com/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-runtimes.tests.downstream.kogito-examples/1557/display/redirect


Make the project catalogue have a pretty error message

User story
As a user, I want to see a pretty error page if the project catalogue cannot retrieve data from ingest API.

@gabsie to change 404 text: "We’re sorry - we can’t find the page or file you requested.
It may have been removed, had its name changed, or be temporarily unavailable.
You might try searching for it."

@jacobwindsor would this show a nice error message for "ui freezing" projects mentioned in dcp-ingest-central#334?

@amnonkhen That is unrelated and not related to the catalogue

"We’re sorry - we can’t find the page or file you requested.
It may have been removed, had its name changed, or be temporarily unavailable.
You might want to go back to Homepage and try navigating from there."


Use aiohttp instead of requests

The PR check has completed successfully on Travis. GitHub does not seem to have noticed that, so am going ahead and merging.


Improved ApiPage bundle size

I improved bundle size. To improve bundle size, I moved the file that loads the data from ApiPage to the page for each language.
But other pages are loaded data file on common pages too.
Is there a reason for this ?
See the fallowing images for the bundle size.
Before:

After:

That's really awesome! 🥳  🥳  🥳
Could I please ask you a big favor? Could we please apply those changes to V6 branch to avoid all the conflicts in the next week? we are going to release v6 in 2 weeks' time.
if you are busy, that's fine as well. feel free to merge it in!

But other pages are loaded data file on common pages too.
Is there a reason for this ?

should totally do for other pages as well, i will come to them.

No problem! I'll try fixing the conflict :)

ty very much.

Too good! thank you again!


Migration from mat-contrast in Angular 14 to Angular 16 not possible

Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
14
Description
In Angular 14, it was possible to do the following:
mat-contrast($primary-palette, $notice-bg-hue);
$notice-bg-hue is variable that holds hue value, e.g. 500.
So with mat-color and mat-contrast it was possible to get color value for both 500 and 500-contrast from same variable.
However, with mat.get-color-from-palette it is not possible to do this if hue is stored within variable.
I understand that you can type:
mat.get-color-from-palette($primary-palette, 500);
and
mat.get-color-from-palette($primary-palette, '500-contrast');
But that is not real reproduction of previous mat-contrast implementation.
It would be logical to have something like mat.get-contrast-from-palette, but I can't seem to find any documentation on that.
Is there a way to do this properly?
Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
Expected Behavior
It should be possible to get contrast color from hue value stored in variable.
Adequate replacement for mat-contrast should exist.
Actual Behavior
Replacement for mat-contrast is not available.
Environment

Angular: 16.2.0
CDK/Material: 16.2.0
Browser(s): All
Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Hello,
I believe that mat-contrast is from version 12.
This is the implementation of mat-contrast that I found when looking at the source code for version 12.0.0.
// For a given hue in a palette, return the contrast color from the map of contrast palettes.
// @param $color-map
// @param $hue
@function mat-contrast($palette, $hue) {
  @return map-get(map-get($palette, contrast), $hue);
}

I think what you're looking for is mat.get-contrast-color-from-palette. Does that provide you what you need?
Best regards,
Zach

@zarend  Yes, that was exactly what I was looking for, thanks!
It would be very useful if that is mentioned on this page of documentation:
https://material.angular.io/guide/theming
I spent quite of lot of time searching for it, but clearly without success.
Thank you once more, you can close the issue as it has been resolved. :)


Fail to run WebDAV server

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'
Current thread 0x00002e68 (most recent call first):

Sorry that's not enough information


Camera + Skybox Components

Scene cameras and skyboxes should be serializable components. For now they are treated more implicitly.

Skyboxes (procedural and ibls) were added recently into dev. Cameras require a bit more thought and I'm going to defer implementation of them until I draft a few more samples.


Open3d tool

TODO:

[x] add saving of segmented planes to file
[x] add function: cancel last added points
[x] reformat main function, because at the moment we have two applications
[x] try to ensure that the window does not close after each plane segmentation (partially implemented)

example of starting MVP:
python -m src --path_to_bin_file data/000.bin --path_to_save_label_file data/labelFile.pcd.labels --path_to_save_object_file data/labelFile.pcd.objects --path_to_pcd_file data/000.pcd --distance_to_plane 0.06


[Task] add new module shenyu-sdk. #3925

[Task] add new module shenyu-sdk. #3925
ShenyuClient
fallback
fallbackFactory
And I run it with shenyu-examples-sdk-dubbo Successfully.

Codecov Report

Merging #4200 (e2b0ead) into master (ef05727) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #4200      +/-   ##
============================================
- Coverage     70.43%   70.38%   -0.06%
+ Complexity     7223     7213      -10
============================================
  Files           969      969
  Lines         27033    27033
  Branches       2407     2407
============================================
- Hits          19042    19026      -16
- Misses         6533     6551      +18
+ Partials       1458     1456       -2

Impacted Files
Coverage Δ

...ava/org/apache/shenyu/admin/utils/SessionUtil.java
78.94% <0.00%> (-15.79%)
:arrow_down:

...henyu/plugin/grpc/resolver/ShenyuNameResolver.java
54.25% <0.00%> (-8.52%)
:arrow_down:

...enyu/admin/service/impl/PermissionServiceImpl.java
34.61% <0.00%> (-6.42%)
:arrow_down:

...he/shenyu/plugin/grpc/client/ShenyuGrpcClient.java
8.00% <0.00%> (-4.00%)
:arrow_down:

...gin/apache/dubbo/cache/ApacheDubboConfigCache.java
74.41% <0.00%> (-1.17%)
:arrow_down:

...n/alibaba/dubbo/cache/AlibabaDubboConfigCache.java
77.01% <0.00%> (-1.15%)
:arrow_down:

...che/shenyu/sync/data/http/HttpSyncDataService.java
89.79% <0.00%> (+4.08%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@huanccwang  pls check your ci and update your branch


sdk splunk app is having restart issues

The issue ticket is created to track
-> sdk splunk application restart issues
-> sdk splunk application usage documentation add to github.
https://github.com/dell/iDRAC-Telemetry-Reference-Tools/tree/main/cmd/idracsdkapps/splunkapp

Moved to internal repo

Moved to internal repo


certificate creation error

hi, I ´ve following the steps to create certificates in my Azure Stack (integrated systems no SDK!!!) however the Get-AzureStackRootCert.ps1 command can´t find the Endpoint I fix it adding the IP and hostname to my hosts file.
Then I go forward to run the Create-AppServiceCerts.ps1 script  but It fails with errors as follows:
New-SelfSignedCertificate : Cannot bind parameter 'Signer' to the target. Exception setting "Signer": "Value cannot be null.
Parameter name: Signer"
At C:\appservice\Create-AppServiceCerts.ps1:38 char:140

... ocation Cert:\LocalMachine\My -DnsName $DnsName -Signer $root -Provid ...

                                                        ~~~~~

CategoryInfo          : WriteError: (:) [New-SelfSignedCertificate], ParameterBindingException
FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.CertificateServices.Commands.NewSelfSignedCertificateCommand

So there is another way to create certificates to enable App Services on my Azure Stack?  or there is something that I missed?
regards
S_

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 4b745d67-f3a8-3a4a-5b89-c0e5851ef5e0
Version Independent ID: 4d455fad-dc6a-ed4f-75c0-f8a6118aa07a
Content: Before you deploy App Service on Azure Stack
Content Source: articles/azure-stack/azure-stack-app-service-before-you-get-started.md
Service: azure-stack
GitHub Login: @apwestgarth
Microsoft Alias: anwestg

Documentation has been significantly update in the last 18 months to restructure based on a number of feedback items. #please-close


Using setTime() with a Date doesn't count up

While testing, I noticed this code doesn't count up at all:
var clock = $('#clock').FlipClock({
	countdown: false,
	clockFace: 'DailyCounter'
});

var now = new Date();
var test = new Date('2015/01/01');

// clock.setTime((now.getTime() - test.getTime()) / 1000); // This works
clock.setTime(test); // This doesn't
clock.start();

I got confused and thought setTime could take a Date as argument, but it can't. My bad. Would be nice if it were possible though.

I got confused and thought setTime could take a Date as argument, but it can't. My bad. Would be nice if it were possible though.


Fixed #24887 -- Removed one-arg limit from models.aggregate

Could you add a test for this? Also commit message should be in the past tense: Removed one-arg ....

@charettes https://code.djangoproject.com/ticket/24887#comment:5

@charettes I've updated this based on the comments on the ticket. I'm a little unsure of how to test this, though. How can I make source_expressions have more than just one element?

GROUP_CONCAT exists for sqlite and mysql (which takes multiple args), but doesn't for postgres or oracle. So you can invent a multiple-arg aggregate:
class MyMax(Max):
    def as_sql(...):
        self.set_source_expressions(
            self.get_source_expressions[0:1]
        )
        return super(MyMax, self).as_sql(...)

Model.objects.annotate(MyMax('field', 'other_field')  # fail due to no alias
Model.objects.annotate(max_field=MyMax('field', 'other_field')  # pass

The above will let you pass two source expressions all the way through, but then remove the second just before constructing the sql output. I think that'll do the trick.

@jarshwah thanks! That did the trick. Just updated with a test.

Please also test that the lack of alias fails with a FieldError

@jarshwah the example you mentioned doesn't trigger the missing alias failure. Both source_expressions have the 'name' property

Actually, it seems like neither of the examples are getting past the
if source_expression.contains_aggregate and not summarize line

Updated in https://github.com/django/django/pull/4900.


Add support for Get extended community link bandwidth in snappi

AS per below OTG API reference i see the path is mentioned but get extended community link bandwidth is not supported in snappi
request to add support for getting extended community link bandwidth value.
devices->bgp->ipv_interfaces->peers->v4_routes->extended_communities
in https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/master/artifacts/openapi.yaml&nocors

Feature is now available in https://github.com/open-traffic-generator/ixia-c/releases/tag/v1.4.0-1


Add default_file parameter for cowboy_static

This allows you to specify a default file when using cowboy_static with
dir or priv_dir. Thus the path will be completed with the default file.
Example :
{"/[...]", cowboy_static, {priv_dir, static_world, "",
 [{mimetypes, cow_mimetypes, all}, {default_file, "index.html"}]}}

Thus http://localhost:8080/howdy/ will do the same as http://localhost:8080/howdy/index.html

Out of scope of cowboy_static, sorry. You can easily do the same with a simple middleware between router and handler. If anything gets into Cowboy it would have to be in middleware form.


[bug]: Mocking of DialogService throws error after upgrade to v1.1.0

Describe the bug
I just ugpraded to stacked-services v1.1.0 (together with stacked v3.4.0) and now the build runner fails when I want to generate the mocks for the DialogService with the mockito package.
To reproduce

Install packages (  stacked: ^3.4.0,  stacked_services: ^1.1.0, build_runner: ^2.1.4, mockito: ^5.4.0)
Define the DialogService to have mocks generated: @GenerateNiceMocks( [   MockSpec<DialogService>(),]);
Let build runner run and get error output (and no mock file):
[SEVERE] mockito:mockBuilder on test/setup/test_helpers.dart:
Null check operator used on a null value

Expected behavior
Generate the mocks as usual.
Screenshots
No response
Additional Context
No response

Hi @sebastianbuechler ! I just created a project from scratch and I could not reproduce your issue.
Could you try to change the DialogService like below?
MockSpec<DialogService>(onMissingStub: OnMissingStub.returnDefault),

Also, could you update the following packages?

build_runner: ^2.4.5
mockito: ^5.4.1

Let me know what happened, I will be around.

Hi @sebastianbuechler ! I just created a project from scratch and I could not reproduce your issue.
Could you try to change the DialogService mock spec like below?
MockSpec<DialogService>(onMissingStub: OnMissingStub.returnDefault),

Also, could you update the following packages?

build_runner: ^2.4.5
mockito: ^5.4.1

Let me know what happened, I will be around.

HI @ferrarafer, thanks for the reply.
I tried to update the build_runner to the version you mentioned but I'm still on Dart SDK 2.19.5:
flutter pub get
Running "flutter pub get" in MobileApp...
Resolving dependencies...
The current Dart SDK version is 2.19.5.

Because mobileapp depends on build_runner >=2.4.0 which requires SDK version >=3.0.0-134.0.dev <4.0.0, version solving failed.

Is the upgrade of the Dart SDK needed for this to work?

Update: Managed to upgrade to Dart SDK 3.0.5 and set build_runner to 2.4.5 and mockito 5.4.1. Still the same issue
[INFO] Generating build script completed, took 507ms
[INFO] Reading cached asset graph completed, took 6.5s
[INFO] Checking for updates since last build completed, took 2.0s
[WARNING] No actions completed for 23.6s, waiting on:
  - stacked_generator:stackedRouterGenerator on test/setup/test_helpers.dart

[WARNING] No actions completed for 38.8s, waiting on:

[SEVERE] mockito:mockBuilder on test/setup/test_helpers.dart:

Null check operator used on a null value
[INFO] Running build completed, took 1m 23s
[INFO] Caching finalized dependency graph completed, took 5.0s
[SEVERE] Failed after 1m 28s
make: *** [makefile:12: run-build-runner] Error 1

I'm using the flutter pub run build_runner build --delete-conflicting-outputs command for generating the mocks.

Interesting, I will try to reproduce this on my side.

Unfortunately I can't reproduce this issue. What is the possibility that you upload your project to a repository so I can pull it and test it locally? Obviously, it doesn't have to be the complete project, you can leave only the minimum necessary for the issue to be reproducible on your side.

It's hard to reproduce, as I can't create a new repo that shows the issue.
However, I did some debugging and found the piece that breaks:
Mockito breaks here: https://github.com/dart-lang/mockito/blob/ffbbb4ce8057fc5f793cc3e2fd635f0903fee3a3/lib/src/builder.dart#L289
And I found that it breaks when handling the barrierColor parameter of the showCustomDialog of the dialog service of stacked. It seems that mockito has issues with the dart:ui library import, as the type of this barrierColor gets reported as InvalidType. That's why the line mentioned above probably breaks.
I saw multiple similar behaviors of mockito mentioned in my ticket here: https://github.com/dart-lang/mockito/issues/662
So I don't think it's a stacked issue, but something that mockito does not like about my current project. Interestingly, I tried it on three different machines and all show the same behavior.

This issue was fixed by manually upgrading build_resolvers to the latest version. More details here: https://github.com/dart-lang/mockito/issues/662

@sebastianbuechler great to heard that !!


Proposal: Convert Frontend from Vanilla CSS to Tailwind CSS for Improved Efficiency and Responsiveness

Hey, @maniyaom I noticed the frontend is currently built using React.js and vanilla CSS. I believe it would be beneficial to convert the vanilla CSS to Tailwind CSS, as it aligns better with React.js and will improve efficiency for frontend developers who work on this project in the future. If no one is currently assigned to this task, please consider assigning it to me.
Here’s what I plan to do:

Revamp the entire structure using Tailwind CSS

Fix any existing responsiveness issues

@anuragbansall Please be specific about page name. I have already assigned some pages for conversion from Venila CSS to Tailwind CSS.

@maniyaom I’m planning to revamp all the pages, but since some people are already working on certain ones, could you let me know which pages are available? I’ll focus on revamping one of those.

Can I also work on this issue , its my first time and would love to work on this.

@anuragbansall for now, please convert the Login and Sign Up UI to Tailwind CSS. Ensure that the pages are responsive across all devices.

Hi @maniyaom, can I also work in this issue , I would love to share my inputs in this and it will be a great experience for me also as it is my first time in contributing.

 I’ve raised a PR, please take a look and let me know if you have any suggestions or improvements!
Thanks!


[HIP-Clang] find_package(hip) changes for clang

Adding HIP-Clang options into find_package(hip) functionality for dependent libraries. Enabling HIP_COMPILER and HIP_RUNTIME when using find_package(hip).

This patch has already merged into amd-master-next.

Closing all existing pull requests that do not target the develop branch. In case this pull request is still valid, please rebase your changes against develop branch and resubmit.


Is is possible to style or set handler to InViewMonitor?

Heya,
Thanks for that lib! I'd like to use it but it seems that I can't style it's div and it cause some issues on my current layout, any reason for that?
Many thanks!

Hi,
you can repeat your class in the following two props if you need to:
classNameNotInView='myClass'
classNameInView='myClass'

and then style it that way. Does that help you?

Absolutely! Thanks!


Alignment of the button that takes us to top of page

Details
The button that takes you to the top of the page is not in the correct position. I want to fix the error
Please assign me this issue @Spyware007
Screenshots

Type of Contribution

[ ] Update to an existing Animated Button
[ ] Adding a new Button
[ ] Resolving a bug
[ ] Proposal to the Repository
[ ] Changes related to documentation or README.md
[X] Other Changes

Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue
[X] I am a GSSoC'23 contributor

Please check #1346

Sorry for the inconvinience, but we are closing all the issues! Please open a new issue if you want to contribute anything. Also now you can create a new button from the website itself! You will get points for those too! I will add the instructions on how to create a new button soon and create an empty pr for the same to get points!


Support complete XML mapping for embeddable

<embeddable metadata-complete="true"/> -> @Embeddable and friends

See XmlManagedTypeHelper#makeCompleteEmbeddableMapping


create_fake_backend: tool for creating fake backend files and settings

(moving https://github.com/Qiskit/qiskit/pull/8466 here)
This script creates the file for setting a new fake backend, including inserting the lines around and the release note.
python ./tools/create_fake_backend.py --hub <redacted> oslo ibm_oslo
python ./tools/update_fake_backends.py --hub <redacted> ibm_oslo

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 46.45%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2329

Relevant Lines:
5014

💛  - Coveralls

This PR is 6 months old, is it ok to close for now and reopen if necessary?

Closing, feel free to reopen


select: Cannot read property 'length' of undefined (Angular SSR)

ERROR TypeError: Cannot read property 'length' of undefined
at n.value (D:\Dev\jeet-chaudhari\universal-starter\node_modules@angular-mdc\web\bundles\web-select.umd.js:438:82)
at t._propagateChanges (D:\Dev\jeet-chaudhari\universal-starter\node_modules@angular-mdc\web\bundles\web-select.umd.js:579:190)
at t.setSelectionByValue (D:\Dev\jeet-chaudhari\universal-starter\node_modules@angular-mdc\web\bundles\web-select.umd.js:572:100)
at Timeout. (D:\Dev\jeet-chaudhari\universal-starter\node_modules@angular-mdc\web\bundles\web-select.umd.js:549:76)
at ZoneDelegate.invokeTask (D:\Dev\jeet-chaudhari\universal-starter\node_modules\zone.js\dist\zone-node.js:421:31)
at Object.onInvokeTask (D:\Dev\jeet-chaudhari\universal-starter\node_modules@angular\core\bundles\core.umd.js:3873:37)
at ZoneDelegate.invokeTask (D:\Dev\jeet-chaudhari\universal-starter\node_modules\zone.js\dist\zone-node.js:420:36)
at Zone.runTask (D:\Dev\jeet-chaudhari\universal-starter\node_modules\zone.js\dist\zone-node.js:188:47)
at ZoneTask.invokeTask (D:\Dev\jeet-chaudhari\universal-starter\node_modules\zone.js\dist\zone-node.js:496:34)
at Timeout.ZoneTask.invoke (D:\Dev\jeet-chaudhari\universal-starter\node_modules\zone.js\dist\zone-node.js:485:48)

@trimox I received an email that you could not reproduce this issue however, I can not find that comment here, did you manage to reproduce it?

@trimox Now I can see your comment, weird issue! I will test it again and get back to you also if required I would set up test repo on GitHub for you to look.

@trimox https://github.com/JeetChaudhari/angular-ssr-mdc
I have set up SSR repo, use yarn and add mdc build manually
You have to use yarn build:prerender to test the output.
Note: all occurances of mdc-checkbox are commented due to checkbox issue.

@JeetChaudhari Very nice! Checking it out now

@JeetChaudhari Think we got it!

Before I close out any existing issue for this, do you mind pulling master and giving it a go? I did some quick testing here, and minus checkbox we're looking good.

Merging PRs. I have one more to push for tab scroller.

@trimox Testing changes now. Would post results after done.

@trimox I build the app using prerender but I got this strange error as follows. Not sure if it is because of some checkbox content that I commented or something else.
Error retrieving icon:
undefined
onSelectionChange: undefined undefined
undefined
onSelectionChange: undefined undefined
onSelectionChange: undefined undefined
onSelectionChange: undefined undefined
{ source:
a {
changeDetectorRef:
ViewRef { _view: [Object], _viewContainerRef: null, _appRef: null },
ripple:
b {
_ngZone: [NgZone],
_platform: [d],
_elementRef: [ElementRef],
_destroy: [Subject],
initialized: undefined },
elementRef: ElementRef { nativeElement: [HTMLUnknownElement] },
_uniqueId: 'mdc-switch-2',
id: 'mdc-switch-2',
name: 'demoswitch',
tabIndex: 0,
change:
EventEmitter {
_isScalar: false,
observers: [Array],
closed: false,
isStopped: false,
hasError: false,
thrownError: null,
__isAsync: false },
_onChange: [Function],
_onTouched: [Function],
foundation: b { adapter: [Object] },
inputElement: ElementRef { nativeElement: [HTMLInputElement] },
thumbUnderlay: ElementRef { nativeElement: [HTMLDivElement] },
_checked: false },
checked: false }
{ source:
a {
changeDetectorRef:
ViewRef { _view: [Object], _viewContainerRef: null, _appRef: null },
ripple:
b {
_ngZone: [NgZone],
_platform: [d],
_elementRef: [ElementRef],
_destroy: [Subject],
initialized: undefined },
elementRef: ElementRef { nativeElement: [HTMLUnknownElement] },
_uniqueId: 'mdc-switch-2',
id: 'mdc-switch-2',
name: 'demoswitch',
tabIndex: 0,
change:
EventEmitter {
_isScalar: false,
observers: [Array],
closed: false,
isStopped: false,
hasError: false,
thrownError: null,
__isAsync: false },
_onChange: [Function],
_onTouched: [Function],
foundation: b { adapter: [Object] },
inputElement: ElementRef { nativeElement: [HTMLInputElement] },
thumbUnderlay: ElementRef { nativeElement: [HTMLDivElement] },
_checked: true },
checked: true }
Done in 1032.57s.

@JeetChaudhari No worries on that odd message, it's just a console.log inside switch-demo.ts. I can run yarn serve:prerender and use the demos.

@JeetChaudhari Try using latest pre-release, v0.41.0-pre.1
https://github.com/trimox/angular-mdc-web/releases/tag/v0.41.0-pre.1
Lot's of improvements to mdc-text-field related to SSR.

Hi, I would test it and let you know the results.On 28-Oct-2018 4:41 AM, Dominic Carretto<EMAIL_ADDRESS>wrote:@JeetChaudhari Try using latest pre-release, v0.41.0-pre.1
https://github.com/trimox/angular-mdc-web/releases/tag/v0.41.0-pre.1
Lot's of improvements to mdc-text-field related to SSR.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

No issues, looking good to me.


ResponseCaching returns no headers in 304 NotModified response

Describe the bug
ResponseCaching returns no headers in 304 NotModified response
To Reproduce
Steps to reproduce the behavior:

Setup a server that uses ResponseCaching
Make a request that responds with a Last-Modified and Expires header and see that it gets put into the ResponseCache
The Response will be a 200 with headers including Last-Modified, Expires, Cache-Control
Make the same request again, but add the If-Modified-Since header with a value the same as the previously returned Last-Modified time
The Response will be a 304 but it won't have any headers.

Expected behavior
The 304 response should contain a number of headers as specified in RFC 7232
https://tools.ietf.org/html/rfc7232#section-4.1
   The server generating a 304 response MUST generate any of the
   following header fields that would have been sent in a 200 (OK)
   response to the same request: Cache-Control, Content-Location, Date,
   ETag, Expires, and Vary.

Additional context
You can see this quite clearly in https://github.com/aspnet/AspNetCore/blob/master/src/Middleware/ResponseCaching/src/ResponseCachingMiddleware.cs#L156

cc @JunTaoLuo

I can repro this and it does seem like it's contrary to the spec. @mrjpeterj is there a specific scenario that this affects or is this just about complying with the spec? I agree it is important to do so, but just trying to get an idea of the priority of this, if it's blocking a user scenario then it would be a higher priority.

Well it did crop up in implementing something for my job, but it turned out that for that specific thing I could just turn off server side caching to work around the issue. (setting Cache-Control: private)
The endpoint is using a MemoryCache to return the result anyway so it still performs fine.
If I was desperate for it, then I could implement the fix myself and submit it.

Ok, thanks for the context there! Like I said, I don't disagree it's a thing we should look at, but we likely won't get to it in 3.0 unless you (or someone else) is interested in submitting a PR. We'll review it again after 3.0 is done. Thanks for the report!

I will give it a go

This should have been fixed in #11428

Indeed! Unfortunately "Addresses" doesn't close the issue out when the PR is closed :).


Add port handling to TrustedProxyMiddleware

Currently the TrustedProxyMiddleware determines the forwarded host, IP and scheme (protocol). An additional attribute which might be forwarded is the port ($_SERVER['SERVER_PORT'] / $_SERVER['HTTP_X_FORWARDED_PORT']).
We should add this as some integrations (like SAML) might require host details including the port.

I guess that would be good!


add system test running capabilities

We now have a secure variable GCLOUD_TESTS_CREDENTIALS in AppVeyor. It is not exposed to PR builds.

Coverage remained the same at 100.0% when pulling eea27e37d27fde0a02cf1d05bd27f956f2897d87 on stephenplusplus:spp--appveyor-branch-configurations into e1a932acd94038f0e585445c2b8ff765c4532dd7 on GoogleCloudPlatform:master.


[AIRFLOW-860] [AIRFLOW-935] fixes plugin executor import cycle and executor selection

Please accept this PR that addresses the following issues:

AIRFLOW-860
AIRFLOW-935

ISSUE 1 (AIRFLOW-860):
When a plugin is made with a custom Operator and executor, an import cycle occurs when the executor is chosen in airflow.cfg because the executors/init.py starts loading plugins too early when a non standard executor is chosen.
To reproduce:
Make a plugin with both a custom operator (derived from BaseOperator) and a custom executor. Then use the custom executor in airflow.cfg to trigger the import loop. It will fail to resolve BaseOperator, since the plugin contains "import airflow.models" and models.py will trigger a plugin load again because it imports executors.DEFAULT_EXECUTOR.
executors/init.py loads the plugins when an unknown executor is specified in airflow.cfg.
Spitting the plugin executor and operator into separate modules or even plugins does not resolve the problem
fix:
changed DEFAULT_EXECUTOR use to a function call which returns the default executor. This lazy approach fixes the import cycle.
ISSUE 2 AIRFLOW-935:
revision eb5982d4aac135051666d2977bbf6adfc8b9e2a7 (included in 1.8) breaks plugin executors altogether. It makes a new module for every plugin, so import statements need to be adapted, but the executor selection is left unchanged, so it ends up passing the plugin module as the executor (instead of the actual executor class).
fix:
fixed executor selection to work with the new plugin modules system. in Airflow.cfg a executor can now be specified as {pugin_name}.{executor_name}
Testing Done:
The current tests do not cover these issues at all. Tested with custom plugins in v1-8-stable and master.

@stverhae could you please add a unit test with a (dummy) plugin executor?

This looks pretty good once we have a unit test.

Well its hard to write a unit test for this scenario (would be more of an integration test really ..)
All issues arise by the way the plugin folder is scanned and imported dynamically
the plugin tests right now just do:
        from airflow.executors.test_plugin import PluginExecutor
        assert issubclass(PluginExecutor, BaseExecutor)```
which tests none of the issues.

To make the test I'd need to point the airflow.cfg to a custom plugin folder inside the testing folder and choose a custom executor, or set these value programatically (needs to be very early in the __init__ cycle). I've only worked with airflow for 1 week so don't have enough experience with its codebase to pull that off cleanly.

If you could provide me with an example how to do the custom plugin folder & executer setting for a unit test I could provide the rest of the actual testing code.

I apologize I do not have the time available atm to fully familiarize myself with the testing code.

Would love to see this in a patch or upcoming release since custom executors are broken atm.

@bendoerr indeed, the patch has been working great here for weeks but seems like a unit test is holding this up, seeing as the problem with the original code was in the import mechanics when plugins are loaded a "unit test" for this problem is not really straightforward to write ...
@saguziel @jlowin @bolkedebruin  any update on when/how this could be included?

Codecov Report

Merging #2120 into master will decrease coverage by 0.01%.
The diff coverage is 48.64%.

@@            Coverage Diff             @@
##           master    #2120      +/-   ##
==========================================
- Coverage    67.5%   67.49%   -0.02%
==========================================
  Files         142      142
  Lines       10845    10856      +11
==========================================
+ Hits         7321     7327       +6
- Misses       3524     3529       +5

Impacted Files
Coverage Δ

airflow/jobs.py
72.94% <ø> (ø)
:arrow_up:

airflow/operators/subdag_operator.py
90% <100%> (ø)
:arrow_up:

airflow/models.py
86.94% <100%> (+0.01%)
:arrow_up:

airflow/task_runner/base_task_runner.py
71.42% <100%> (ø)
:arrow_up:

airflow/executors/__init__.py
56.41% <37.03%> (-1.66%)
:arrow_down:

airflow/bin/cli.py
53.18% <50%> (ø)
:arrow_up:

airflow/www/views.py
67.73% <50%> (-0.05%)
:arrow_down:

Continue to review full report at Codecov.

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

+1 to get this PR merged. I'm trying to write a custom executor (AWS Batch) and without this, I'm stuck. Trying to find a workaround / may just clone this PR branch.

@stverhae Are all of the commits here related to this issue?

Not that i know of. The two options I can think of are:

reset your master branch back to the original commit related to this issue and move the other commits to another branch on your fork. Only con I can think of with this option is it'd be modifying history on a now public branch. That's a bad idea in general, but not sure if it applies to forks or not.
close this pull request entirely, and open again from either a cleaned up master or another branch with only that commit. Con with this one is the discussion is moved elsewhere.

Not entirely sure which one is best practice though.
Any thoughts from anyone else?

Just for reference, I pulled in the changes in that first commit and it fixed things for us. Running in DC/OS using the mesos executor.

@stverhae You could rebase the other commits out?

if this is rebased/squashed, a proper commit message is added and tests are added we can target this for 1.8.2.

@bolkedebruin I sorted out the forks master branch, which now only contains the commit which fixes the two issues.
As mentioned before, I would like to add unit tests, but seeing how the issues are tied to physical plugin files and import cycles when loading airflow, I have no idea how to contain this within a unit test. I am on the airflow slack if you wish to discuss adding tests.
To be clear, the current unit tests are sufficient to test the changes when no executor plugins are used and when they are used, the current implementation is confirmed to be broken in a bad way, so even if we don't figure out the unit tests immediately it would still be a big improvement to include this PR in the next release.

@stverhae I understand. However I am not asking for integration tests, but for a unit tests. This could just be against GetDefaultExecutor and to make sure it returns an expected value.
In addition, could you please please follow the guidelines for the commit messages, as they are stipulated in the template for PRs?

@bolkedebruin I fixed the commit title and after taking another look at the unit tests I was able to figure some things out about airflows plugin unit tests. I altered the original patch a bit so it was easier to test and thus was able to add the required unit tests (finally!)

Nice! Much better. Ill have a look

@bolkedebruin Is this still on track for 1.8.2?

@bolkedebruin @perryao  did you ever get a response if this is on track for 1.8.2?

@grantnicholas chasing @mistercrunch for it.


Allowing markdown in the fields

Hi!
It would be great if using markdown in the extra fields would be possible.
Adding a checkbox to allow Markdown would be an option.
Thanks!

Hi,
it took some time but now it's possible to use a textformatter e.g. markdown parser. This is only available in branch develop for PW3.x.
There is a little issue due to focus textareas, I created a PR to solve this.
How to use it: go to field settings, enter some other fields, save. Reopen ImageExtra tab, now you can see a table below in which you can define one textformatter for each extra field. All installed text formatters will be listet in this dropdown.


What happened to OS_CFG_ISR_POST_DEFERRED_EN?

I'm wondering why this macro does not appear anywhere in this repository, despite being a significant feature (direct vs. deferred post) described in the uCOS-III book?
Thanks!

The feature was dropped many years ago. I believe the reason was that the overhead was too large for an ISR, and the code itself added needless complexity.

Thanks for the clarification @forg0ne. So you mean the "deferred" post feature was dropped and all posts are "direct"?

That's correct.


slack-ruby-bot rspec doesn't log no bot response properly. Reports undefined method count for nil:NilClass

There seems to be a bug inslack-ruby-bot-0.12.0/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rbat this line message += @messages.count.zero? ? 'No response messages received' : @messages.inspect
In the example below you can see that the code throws a  undefined method count for nil:NilClass error when there is no message instead of reporting that the No response messages received message to the user.
Failures:

  1) Bot listens for anything to do with VPN and refers user to help channel
     Failure/Error:
       expect(message: 'I am locked out of the vpn', channel: CHANNEL)
         .to respond_with_slack_message our_response

     NoMethodError:
       undefined method `count' for nil:NilClass
     # ./spec/8_bot_spec.rb:14:in `block (3 levels) in <top (required)>'

Finished in 0.53769 seconds (files took 0.93579 seconds to load)
47 examples, 1 failure

Please do fix, PRs welcome!

This has been fixed on master, but there has not been a proper gem release since the fix, so it would be nice to get that before we officially close this issue.
Would prefer to pin to an official release version instead of a branch or specific commit hash.

Which PR fixed this? Let's close it with that. I'll cut a release when I get to it.

@dblock It looks like you fixed it here:
https://github.com/slack-ruby/slack-ruby-bot/commit/e926d310923e58af151377fab9219ef899207697#diff-cfc9d257a3dc24179f3e707fee606d26R31


Aluminium Ore Chucks won't smelt.

All your chunks can be dropped into a smeltery from Tinkers' and they smelt fine.  but the Aluminium doesn't.  The bars smelt fine, but the chunks don't.

If its a custom modpack then use CraftTweaker to add a furnace recipe.

The answer to something in this mod not working correctly shouldn't be "download another mod to fix this one".


Convert 3DGS to Mesh... Error: 'NoneType' object has no attribute 'ray_aabb_intersect'

Hi again my friend, I have been getting stuck on this one node with this particular error. Keep up the great work, you are awesome for the community. Thanks.
Error occurred when executing [Comfy3D] Convert 3DGS to Mesh with NeRF and Marching Cubes:
'NoneType' object has no attribute 'ray_aabb_intersect'
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/custom_nodes/ComfyUI-3D-Pack/nodes.py", line 1459, in convert_gs_ply
converter.fit_nerf()
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/custom_nodes/ComfyUI-3D-Pack/algorithms/nerf_marching_cubes_converter.py", line 175, in fit_nerf
image_pred, alpha_pred = self.render_nerf(pose)
File "/home/ubuntu/fv/inno-comfyui-hosting/ComfyUI/custom_nodes/ComfyUI-3D-Pack/algorithms/nerf_marching_cubes_converter.py", line 124, in render_nerf
ray_indices, t_starts, t_ends = self.estimator.sampling(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/nerfacc/estimators/occ_grid.py", line 164, in sampling
intervals, samples, _ = traverse_grids(
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/nerfacc/grid.py", line 158, in traverse_grids
t_mins, t_maxs, hits = ray_aabb_intersect(rays_o, rays_d, aabbs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.10/site-packages/nerfacc/grid.py", line 43, in ray_aabb_intersect
t_mins, t_maxs, hits = _C.ray_aabb_intersect(
File "/home/ubuntu/.local/lib/python3.10/site-packages/nerfacc/cuda/init.py", line 13, in call_cuda
return getattr(_C, name)(*args, **kwargs)

Thank you very much friend, and sorry for the late reply , was quite busy recently
From your error message, I can't tell what went wrong, I'm guessing some part of input is missing, is this error show in my example workflow? if not, then, can you pls share me your workflow?

Thanks for your reply, yes this is in your examples only where the 3DGS node is concerned, im going to try put my gpu in another computer and try your setup if that works then its probably a driver issue. Will report back. thanks.

Thanks for your reply, yes this is in your examples only where the 3DGS node is concerned, im going to try put my gpu in another computer and try your setup if that works then its probably a driver issue. Will report back. thanks.感谢您的回复，是的，这只是在您的示例中涉及 3DGS 节点的情况，我将尝试将我的 GPU 放入另一台计算机中，然后尝试您的设置，如果有效，则可能是驱动程序问题。会回来报告。谢谢。

hallo,how about now？


Adds Groovyscript support for crafting

📝 Description
This PR Adds Groovyscript support for crafting such as ammo press and workbench.
🎯 Goals

add Groovyscript support for crafting such as ammo press and workbench for easier modpack development.

❌ Non Goals

Completely replacing existing json recipe is not a goal for compatibility's sake

🚦 Testing

use following example script on Postinit Script of Groovyscript (E.G: run/groovy/postinit/main.groovy)
mods.mwc.craftingstation.removeAllinGroup("GUN")
mods.mwc.craftingstation.recipeBuilder().output(item('minecraft:clay')).addEntry(item('minecraft:nether_star')*4).register()
mods.mwc.craftingstation.recipeBuilder().output(item('minecraft:iron_ingot')).addOredict("oreIron", 4, 0.5).addOredict("oreCoal", 4).register()

this script should do 3 things:

clear ALL the recipes in gun tab of workbench
add 2 example script. 1 recipe that turns 4 nether star into 1 clay block with 100% yield, and 1 recipe that turns 4 Iron Ore (50% Yield) and 1 Coal Ore(100% Yield) (both are ore dictionary entry)  into 1 Iron ingot.

Test video to prove that this PR doesn't break anything even if Groovyscript isn't present in runtime:
https://github.com/Cubed-Development/Modern-Warfare-Cubed/assets/49832212/6f451206-dbaa-49a1-9c3b-27fc6729c651
⏮ Backwards Compatibility

Exisiting JSON Recipe system is not replaced. since it should not cause issue with any existing modpack that utilizes the JSON for their costom recipes.
📚 Related Issues & Documents

N/A
🖼 Screenshots/Recordings

📖 Added to documentation?

[ ] 📜 README.md
[ ] 📑 Documentation
[x] 📓 Javadoc
[ ] 🍕 Comments
[ ] 🙅 No documentation needed

😄 [optional] What gif best describes this PR or how it makes you feel?
N/A

@coderabbitai review


Show support jQuery validation for non-English locales that use a comma (",") for a decimal point

https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/validation mentions
You may not be able to enter decimal points or commas in the Price field. To support jQuery validation for non-English locales that use a comma (",") for a decimal point, and non US-English date formats, you must take steps to globalize your app.
Need tutorial that shows how to do this. Until the tutorial is written, follow these instructions:
On Index.cshtml add
@System.Globalization.CultureInfo.CurrentUICulture

Refreshing the page you should see en-US displayed at the very top.
This will help to see if you does have localization enabled on mvc. When localization is working it can be removed.
To enable another locale than default on mvc you need to add localization support (read Globalization and localization in ASP.NET Core)
For this sample, let's just add es-UY locale and set as the default.
on Startup.cs:
app.UseRequestLocalization("en-UY", "fr-FR");

this will add support for locale "es-UY" and also make it the default culture.
refreshing the Index page on your browser should now show es-UY as the current UI locale.
At this point, using decimal points on the client as 19.50 will allow the jQuery validation but on the server it won't be seen as decimals so you will end with 1.950,00 value.
Then you need to use Globalize with jquery-validation-globalize plugin.
See Globalize installation instructions and jquery-validation-globalize installation instructions. Unfortunately those instructions use bower for the installation and the ASP.NET CORE 2.0 and late doesn't use bower.  If you want to use the recommended NPM way, you can still do it. Either way, I highly recommend you check out both projects for documentation and more info. You just need to install Globalize with jquery-validation-globalize plugin - how you do it is secondary.
After you managed to install Globalize and jquery-validation-globalize plugin then you need to use it on your html pages.
on _ValidationScriptsPartial.cshtml add the new required javascript files (after jQuery):
<!-- cldr scripts (needed for globalize) -->
<script src="~/lib/cldrjs/dist/cldr.js"></script>
<script src="~/lib/cldrjs/dist/cldr/event.js"></script>
<script src="~/lib/cldrjs/dist/cldr/supplemental.js"></script>

<!-- globalize scripts -->
<script src="~/lib/globalize/dist/globalize.js"></script>
<script src="~/lib/globalize/dist/globalize/number.js"></script>
<script src="~/lib/globalize/dist/globalize/date.js"></script>

<script src="~/lib/jquery-validation-globalize/jquery.validate.globalize.js"></script>

Refresh your page, it should work with the current culture (in this case, es-UY).
The LibMan tool requires VS 15.8.0 Preview 2.0 or later.
Hope it helps.

@damienbod @bartmax @hishamco would one of you be able to help out with this? (or recommend someone)?

@damienbod @Bartmax @hishamco would one of you be able to help out with this? (or recommend someone)?

@ryanbrandenburg  @danroth27  this is a frequent complaint of customers. Can I get some help on showing how to do this?

@Rick-Anderson
Some notes:

The RegularExpression attribute is used to limit what characters can be input. In the code above, Genre and Rating must use only letters (white space, numbers and special characters are not allowed).

The regular expression is not doing what's described, more notably it requires first letter to be Uppercase.

You may not be able to enter decimal points or commas in the Price field.
This is misleading, you can't use decimal commas but decimal points of course works.
You don't need to add localization to support decimal points as this is the default for english (us) locale.

Now on your request for help on the localization part
On Index.cshtml add
@System.Globalization.CultureInfo.CurrentUICulture

Refreshing the page you should see en-US displayed at the very top.
This will help to see if you does have localization enabled on mvc. When localization is working it can be removed.
To enable another locale than default on mvc you need to add localization support (read somewhere else for details)
For this sample, let's just add es-UY locale and set as the default.
on Startup.cs:
var defaultCulture = new CultureInfo("es-UY");
var localizationOptions = new RequestLocalizationOptions
{
    DefaultRequestCulture = new RequestCulture(defaultCulture),
    SupportedCultures = new List<CultureInfo> { defaultCulture },
    SupportedUICultures = new List<CultureInfo> { defaultCulture }
};
app.UseRequestLocalization(localizationOptions);

this will add support for locale "es-UY" and also make it the default culture.
refreshing the Index page on your browser should now show es-UY as the current UI locale.
At this point, using decimal points on the client as 19.50 will allow the jQuery validation but on the server it won't be seen as decimals so you will end with 1.950,00 value.
Then you need to use the Globalize plugin
IMPORTANT: First update .bowercc to looks like this:
{
  "directory": "wwwroot/lib",
  "scripts": {
    "preinstall": "npm install<EMAIL_ADDRESS>    "postinstall": "node ./node_modules/cldr-data-downloader/bin/download.js -i bower_components/cldr-data/index.json -o bower_components/cldr-data/"
  }
}

Then include jquery-validation-globalize on your bower.json file
{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "bootstrap": "3.3.7",
    "jquery": "2.2.0",
    "jquery-validation": "1.14.0",
    "jquery-validation-unobtrusive": "3.2.6",
    "jquery-validation-globalize" : "1.0.0"
  }
}

on _ValidationScriptsPartial.cshtml add the new required javascript files:
<!-- cldr scripts (needed for globalize) -->
<script src="~/lib/cldrjs/dist/cldr.js"></script>
<script src="~/lib/cldrjs/dist/cldr/event.js"></script>
<script src="~/lib/cldrjs/dist/cldr/supplemental.js"></script>

<!-- globalize scripts -->
<script src="~/lib/globalize/dist/globalize.js"></script>
<script src="~/lib/globalize/dist/globalize/number.js"></script>
<script src="~/lib/globalize/dist/globalize/date.js"></script>

<script src="~/lib/jquery-validation-globalize/jquery.validate.globalize.js"></script>

Refresh your page, it should work with the current culture (in this case, es-UY).
Hope it helps.

and don't think you need it, but just in case I made the sample project available on my github at https://github.com/Bartmax/MvcMovie.LocalizationSample (let me know when I can delete it)

Thanks @Bartmax

@Bartmax I have this error in js, during validation, not you?

jquery.validate.js:666 Uncaught Error: E_DEFAULT_LOCALE_NOT_DEFINED: Default locale has not been defined.
at createError (globalize.js:105)
at validate (globalize.js:182)
at validateDefaultLocale (globalize.js:213)
at Function.Globalize.numberParser.Globalize.numberParser (number.js:1422)
at Function.Globalize.parseNumber.Globalize.parseNumber (number.js:1474)
at $.validator.methods.number (jquery.validate.globalize.js:21)
at $.validator.check (jquery.validate.js:639)
at $.validator.element (jquery.validate.js:437)
at $.validator.onfocusout (jquery.validate.js:266)
at HTMLInputElement.delegate (jquery.validate.js:380)
createError @ globalize.js:105
validate @ globalize.js:182
validateDefaultLocale @ globalize.js:213
Globalize.numberParser.Globalize.numberParser @ number.js:1422
Globalize.parseNumber.Globalize.parseNumber @ number.js:1474
$.validator.methods.number @ jquery.validate.globalize.js:21
check @ jquery.validate.js:639
element @ jquery.validate.js:437
onfocusout @ jquery.validate.js:266
delegate @ jquery.validate.js:380
dispatch @ jquery.js:4732
elemData.handle @ jquery.js:4544
trigger @ jquery.js:7788
simulate @ jquery.js:7859
handler @ jquery.js:7922

I would really like to let both comma and dot to be accepted as a decimal separator. Does anybody really types in number like this: 10.000,00? I get the part about presenting localized vaues on the page, but why localize the input? Plus, here in Russia and i guess in some other places it is ok to use either dot or comma to separate decimal values, but for the thousands people tend to use space, like that: 125 000 000.25

@coykto-repos  is not the case of configure the model with attribute that indicate it is a currency data type? On the other hand, perhaps, you may be using a culture that needs a comma to decimal separator.

@Calkines maybe i'm missing something as i'm not familiar with asp.net core, or .net in general for that matter. I originaly came here because i got really confused by "getting started" tutorial, writen by @Rick-Anderson and others, as neither "." nor "," passed validation for a price field. I have a Django background and i never had problems like that as the framework seems to handled these things well, but here it seems messing with jQuery validation probably would not be enough. As i mentioned, typing in values "1.99" and "1,99" should give me the same result - "$ 1.99" regardless of what culture my browser says it uses, definately not "$ 199". So, this is also server-side (or asp.net-side) problem as far as i understand it, since one of the solutions i found is to write custom IModelBinder (which far from "getting started").

@Calkines maybe i'm missing something as i'm not familiar with asp.net core, or .net in general for that matter. I originaly came here because i got really confused by "getting started" tutorial, writen by @Rick-Anderson and others, as neither "." nor "," passed validation for a price field. I have a Django background and i never had problems like that as the framework seems to handled these things well, but here it seems messing with jQuery validation probably would not be enough. As i mentioned, typing in values "1.99" and "1,99" should give me the same result - "$ 1.99" regardless of what culture my browser says it uses, definately not "$ 199". So, this is also server-side (or asp.net-side) problem as far as i understand it, since one of the solutions i found is to write custom IModelBinder (which is far from "getting started").

https://github.com/aspnet/Docs/pull/4382 adds link to this issue until I have time to add this info to the doc.

This happened after I updated the file .bowercc file:
bower                                            ECMDERR Failed to execute "node ./node_modules/cldr-data-downloader/bin/download.js -i bower_components/cldr-data/index.json -o bower_components/cldr-data/", exit code of #1
Whops ENOENT: no such file or directory, open 'C:\Users\Utilizador\source\repos\MyProject\MyProject\bower_components\cldr-data\index.json'
Additional error details:
Whops ENOENT: no such file or directory, open 'C:\Users\Utilizador\source\repos\MyProject\MyProject\bower_components\cldr-data\index.json'

Hello!
I solved this problem so:

First, you need to modify the file .bowerrc (you can find it under the file bower.json):

{
  "directory": "wwwroot/lib",
  "scripts": {
    "preinstall": "npm install<EMAIL_ADDRESS>    "postinstall": "node ./node_modules/cldr-data-downloader/bin/download.js -i wwwroot/lib/cldr-data/index.json -o wwwroot/lib/cldr-data/"
  }
}

Check dependecies in bower.json:

{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "bootstrap": "3.3.7",
    "jquery": "3.2.1",
    "jquery-validation": "1.17.0",
    "jquery-validation-unobtrusive": "3.2.6",
    "cldr-data": "29.0.0",
    "globalize": "v0.1.1",
    "jquery-validation-globalize": "1.0.0",
    "cldrjs": "0.5.0"
  },
  "resolutions": {
    "globalize": "^1.0.0",
    "jquery": "3.2.1",
    "cldrjs": "0.5.0",
    "jquery-validation": "1.17.0"
  }
}

Modify file _ValidationScriptsPartial.cshtml like so:

<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>

<!-- cldr scripts (needed for globalize) -->
<script src="~/lib/cldrjs/dist/cldr.js"></script>
<script src="~/lib/cldrjs/dist/cldr/event.js"></script>
<script src="~/lib/cldrjs/dist/cldr/supplemental.js"></script>

<!-- globalize scripts -->
<script src="~/lib/globalize/dist/globalize.js"></script>
<script src="~/lib/globalize/dist/globalize/number.js"></script>
<script src="~/lib/globalize/dist/globalize/date.js"></script>

<script src="~/lib/jquery-validation-globalize/jquery.validate.globalize.js"></script>

@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment HostingEnvironment
@{
    string GetDefaultLocale() {
        const string localePattern = "lib\\cldr-data\\main\\{0}";
        var currentCulture = System.Globalization.CultureInfo.CurrentCulture;
        var cultureToUse = "ru-RU"; //Default regionalisation to use

        if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.Name))))
            cultureToUse = currentCulture.Name;
        else if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.TwoLetterISOLanguageName))))
            cultureToUse = currentCulture.TwoLetterISOLanguageName;

        return cultureToUse;
    }
}

<script type="text/javascript">
    var culture = "@GetDefaultLocale()";
    $.when(
        $.get("/lib/cldr-data/supplemental/likelySubtags.json"),
        $.get("/lib/cldr-data/main/" + culture + "/numbers.json"),
        $.get("/lib/cldr-data/supplemental/numberingSystems.json"),
        $.get("/lib/cldr-data/main/" + culture + "/ca-gregorian.json"),
        $.get("/lib/cldr-data/main/" + culture +"/timeZoneNames.json"),
        $.get("/lib/cldr-data/supplemental/timeData.json"),
        $.get("/lib/cldr-data/supplemental/weekData.json")
    ).then(function () {
        // Normalize $.get results, we only need the JSON, not the request statuses.
        return [].slice.apply(arguments, [0]).map(function (result) {
            return result[0];
        });
    }).then(Globalize.load).then(function () {
        Globalize.locale(culture);
    });
</script>

This solution from article by Stefan Vincent Haug.
Why does the official documentation refer to an answer that does not solve the problem?

@Bartmax  I copied your instructions to the top of the issue to resolve some problems people had with the comment we don't use bower. I also fixed a couple problems you mentioned with the tutorial (changes will show up in a couple days) and removed those comments. Can you review my edits? Is there anything we could do to make the instructions easier to follow?

@ryanbrandenburg  can you review the instructions at the top and suggest improvements?

@Rick-Anderson I would suggest modifying the example to include at least two supported cultures, even if you only use one in the example just to emphasis that this works in a multi-culture scenario.
I also suggest doing a scrub of that text for phrasing and syntax if you weren't already planning to. It's a good rough draft but some stuff like "You can find here Globalize installation instructions and jquery-validation-globalize installation instructions." needs re-wording before it goes into docs.
Where in the docs where you planning to put this? This is an important scenario, but it's relatively niche, so I don't really think it belongs in, for example, the loc fundamentals doc, which is already a pretty dense read.

Where in the docs where you planning to put this?
I'll create a  new doc.

Can you post the updated instructions here?  This is our highest support issue.

I leave the language improvements to you, but as far as my first comment it would be enough to replace the Startup.cs code section with:
var defaultCulture = new CultureInfo("es-UY");
var supportedCultures = new List<CultureInfo>{ defaultCulture, new CultureInfo("fr-FR") }
var localizationOptions = new RequestLocalizationOptions
{
    DefaultRequestCulture = new RequestCulture(defaultCulture),
    SupportedCultures = supportedCultures,
    SupportedUICultures = supportedCultures
};
app.UseRequestLocalization(localizationOptions);

maybe we can update the doc to use the Mads client-side library tools that is encouraged to use on the new templates. Let me see if I manage to get some time to do it

@Bartmax  that would be fantastic.

@Rick-Anderson we can simplify the above code snippet with
app.UseRequestLocalization("en-UY", "fr-FR");

using the builder APIs that we provide https://github.com/aspnet/Localization/blob/dev/src/Microsoft.AspNetCore.Localization/ApplicationBuilderExtensions.cs#L95

@hishamco  can you supply the full snippet using builder APIs?

@Rick-Anderson there's a problem in trying to include details with the LibMan tool. It was postponed and it's not on VS 😞 anymore

@Rick-Anderson we can simplify the above code snippet with

great advise @hishamco  !!

@hishamco can you supply the full snippet using builder APIs?

replace:
var defaultCulture = new CultureInfo("es-UY");
var localizationOptions = new RequestLocalizationOptions
{
    DefaultRequestCulture = new RequestCulture(defaultCulture),
    SupportedCultures = new List<CultureInfo> { defaultCulture },
    SupportedUICultures = new List<CultureInfo> { defaultCulture }
};
app.UseRequestLocalization(localizationOptions);

with this:
app.UseRequestLocalization("en-UY", "fr-FR");

I'm not sure in which version this extension was added and/or if it does matters.

@Bartmax  how about
The LibMan tool requires VS 15.8.0 Preview 2.0 or later.

@Rick-Anderson as @Bartmax said before the line that I provided is the replacement, FYI I added extra Builder APIs in 2.1 preview 2

Is there any update on this topic ? I'm facing the same issue for sk-sk locales with the double model validators and I'm not willing to write a custom modelbinder or use overcomplicated solutions like applying another 3 layers of js libraries for the simple thing like this. I see that there are bunch of localization methods already in the jquery validation library. https://github.com/jquery-validation/jquery-validation/blob/master/src/localization/methods_pt.js Why they did not write more of them I don't know.

@Bartmax

On Index.cshtml add

@System.Globalization.CultureInfo.CurrentUICulture

This solution is only applicable on server side. If the user's browser is using different UI culture, then the problem will still occur, and it can break existing client-side script such as Javascript.
This is why @XelaNimed comments is also reproducible and valid.
For me, it is more preferable to honor the UI culture of the user agent (i.e. web browser) used by looking at the request headers, although this can be one or more cultures.
There's one good sample from Stackoverflow: https://stackoverflow.com/questions/9414123/get-cultureinfo-from-current-visitor-and-setting-resources-based-on-that
This is the code that honors the user agent's culture: (I have modified to correctly map string to StringWithQualityHeaderValue)
public IEnumerable<CultureInfo> GetUserPreferredCultures()
{
  var requestedLanguages = Request.Headers["Accept-Language"];
  if (StringValues.IsNullOrEmpty(requestedLanguages) || requestedLanguages.Count == 0)
  {
    return null;
  }

  var preferredCultures = requestedLanguages.ToString().Split(',')
      .Select(s => StringWithQualityHeaderValue.Parse(s))
      .Where(sv => sv.Value != AnyLanguageIdentifier)
      // Remove duplicates with a lower value
      .GroupBy(sv => sv.Value).Select(svg => svg.OrderByDescending(sv => sv.Quality.GetValueOrDefault(1)).First())
      .OrderByDescending(sv => sv.Quality.GetValueOrDefault(1))
      .Select(sv => new CultureInfo(sv.Value.ToString()));

  return preferredCultures;
}

I have tried it, and it works well on ASP.NET Core runtime 2.0.1 and 2.0.2. I haven't tried on ASP.NET Core 2.1.0 yet.
@Rick-Anderson
Could I propose to create a new article to document how to handle server side and client side culture on ASP.NET Core 2,1?

@eriawan

Could I propose to create a new article to document how to handle server side and client side culture on ASP.NET Core 2,1?

That would be great. Can you create a new issue to track that work?
cc @hishamco

@eriawan how's the sample differ from built-in AcceptLanguageHeaderRequestCultureProvider?

@Rick-Anderson
Thanks! I have created a WIP issue #8585 to track this. Feel free to give suggestions and feedback.

hi @hishamco
Thanks for the info! The sample code was taken from the code from StackOverflow.
I will use the AcceptLanguageHeaderRequestCultureProvider too in the written doc page,

I have tried to implement the cldr solution but with no success
https://stackoverflow.com/questions/54926621/globalize-validation-problem-with-datetime-input-control
Any help would be appreciated.

en Startup.cs

anybody have jquery-validation-globalize in libman?

Why Microsoft will not repair this issue? It exists from years!

Perhaps the easiest way to to expose a view model with a string property, then handle the format recognition on the server side when receiving a post or ajax query?

Perhaps the easiest way to to expose a view model with a string property, then handle the format recognition on the server side when receiving a post or ajax query?

you have every done that? the issue is the Client side Validation

Perhaps the easiest way to to expose a view model with a string property, then handle the format recognition on the server side when receiving a post or ajax query?
you have every done that? the issue is the Client side Validation

Duh! I'm not thinking this morning. I retract my comment.

anybody have jquery-validation-globalize in libman?

Yes. At least I've got this working in VS 2019. Just use jsdelivr or unpkg as defaultProvider. Add/Client side library.../Choose one of these providers.

What happened to this number/date format problem with different languages/locales? I can't find any info about that problem except this issue, which is somewhat old. Are there any new solutions available?

Unfortunately this issue was closed, without a proper solution.. A beginner following the ASP.NET MVC Core tutorial will arrive here, but the steps are not clear at all.

Just an update on the nice solution provided by @XelaNimed as the newly versions of Visual Studio do not use Bower anymore and cldr-data changed to cldr-json.
Notice the paths for the json changed as well as the path in localePattern variable:
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment
@{
    string GetDefaultLocale()
    {
        const string localePattern = "lib\\cldr-json\\cldr-numbers-modern\\main\\{0}";
        var currentCulture = System.Globalization.CultureInfo.CurrentCulture;
        var cultureToUse = "en-US"; //Default regionalisation to use

        if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.Name))))
            cultureToUse = currentCulture.Name;
        else if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.TwoLetterISOLanguageName))))
            cultureToUse = currentCulture.TwoLetterISOLanguageName;

        return cultureToUse;
    }
}
<script type="text/javascript">
    var culture = "@GetDefaultLocale()";
    $.when(
        $.get("/lib/cldr-json/cldr-core/supplemental/likelySubtags.json"),
        $.get("/lib/cldr-json/cldr-numbers-modern/main/" + culture + "/numbers.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/numberingSystems.json"),
        $.get("/lib/cldr-json/cldr-dates-modern/main/" + culture + "/ca-gregorian.json"),
        $.get("/lib/cldr-json/cldr-dates-modern/main/" + culture +"/timeZoneNames.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/timeData.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/weekData.json")
    ).then(function () {
        // Normalize $.get results, we only need the JSON, not the request statuses.
        return [].slice.apply(arguments, [0]).map(function (result) {
            return result[0];
        });
    }).then(Globalize.load).then(function () {
        Globalize.locale(culture);
    });
</script>

Just an update on the nice solution provided by @XelaNimed as the newly versions of Visual Studio do not use Bower anymore and cldr-data changed to cldr-json.
Notice the paths for the json changed as well as the path in localePattern variable:
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment
@{
    string GetDefaultLocale()
    {
        const string localePattern = "lib\\cldr-json\\cldr-numbers-modern\\main\\{0}";
        var currentCulture = System.Globalization.CultureInfo.CurrentCulture;
        var cultureToUse = "en-US"; //Default regionalisation to use

        if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.Name))))
            cultureToUse = currentCulture.Name;
        else if (System.IO.Directory.Exists(System.IO.Path.Combine(HostingEnvironment.WebRootPath, string.Format(localePattern, currentCulture.TwoLetterISOLanguageName))))
            cultureToUse = currentCulture.TwoLetterISOLanguageName;

        return cultureToUse;
    }
}
<script type="text/javascript">
    var culture = "@GetDefaultLocale()";
    $.when(
        $.get("/lib/cldr-json/cldr-core/supplemental/likelySubtags.json"),
        $.get("/lib/cldr-json/cldr-numbers-modern/main/" + culture + "/numbers.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/numberingSystems.json"),
        $.get("/lib/cldr-json/cldr-dates-modern/main/" + culture + "/ca-gregorian.json"),
        $.get("/lib/cldr-json/cldr-dates-modern/main/" + culture +"/timeZoneNames.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/timeData.json"),
        $.get("/lib/cldr-json/cldr-core/supplemental/weekData.json")
    ).then(function () {
        // Normalize $.get results, we only need the JSON, not the request statuses.
        return [].slice.apply(arguments, [0]).map(function (result) {
            return result[0];
        });
    }).then(Globalize.load).then(function () {
        Globalize.locale(culture);
    });
</script>

This must be a tutorial for beginners, but steps that are written here are more than complicated. I have not a single idea what you need to do.
It was clear until author starts to throw all kind of other links at and saying that you need to do this and that click here and there and bla bla bla. Really this isnt much of a help.

The steps to get globalization to work as suggested here, does not seem to work in Visual Studio 2022.

Hey guys, how are you all?
If you're getting hard time to solve this globalize install problem, there is how I've solved it to follow properly Razor Pages tutorial.

You need to learn how to use libman, it will help you a lot. Use LibMan with ASP.NET Core in Visual Studio

At solution explorer, add Client-Side Library and install those libraries:

From CDNJS provider:

globalize

put it inside wwwroot/lib/globalize/

cldrjs

put it inside wwwroot/lib/cldrjs/

From JSDELIVR:

jquery-validation-globalize

put it inside wwwroot/lib/jquery-validation-globalize/

With those libs properly installed, you need to add this lines of code at bottom of /Pages/Shared/__ValidationScriptsPartial.cshtml

<!-- cldr script (needed for globalize) -->
<script src="~/lib/cldrjs/cldr.js"></script>
<!-- globalize script -->
<script src="~/lib/globalize/globalize.js"></script>
<!-- jquery validation script with globalize -->
<script src="~/lib/jquery-validation-globalize/jquery.validate.globalize.js"></script>

If you're following the razor pages tutorial all along, you should put this line of code inside Program.cs. Remember to put it before app.Run();

app.UseRequestLocalization("YOUR_LOCALIZATION");

Change YOUR_LOCALIZATION to your real localization, like taught by @Rick-Anderson  at first answer. :point_right: First answer
Btw, thank you Rick-Anderson! Much appreciated your help at this matter, it was driving me crazy.

Hi,
I am coming from the ASP.NET Razor Pages tutorial as well, te be more precies:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/validation?view=aspnetcore-6.0&tabs=visual-studio
Even as an experience developer in many technologies (but not so much modern ASP.NET Core yet), I experience some issues.
First we have the point that the docs are really a bit messy (for example: things of general relevance only being visible under the "Visual Studio Code" tab) and also really a bit outdated (for example: Part 2 talks about many problems and warnings with null check errors which are all solved issues in the current version).
But let's talk about the specific issue with Globalization/Localization here, because I am trying to get things working as well.
I notice issues on multiple aspects:

The first thing someone sees when navigating with the links to this page is someone talking about "Startup.cs". This is part of the default template in .NET 6, but refers to older ASP.NET Core projects. This confuses new people.
A bit of trying with available methods in VS Code reveals to me multiple ways of configuring Localization:

builder.Services.AddLocalization()
builder.Services.AddRequestLocalization(options => { /* Certain configuration here. */ })
app.UseRequestLocalization(), which also has a parameterless version (can we use that and wat does it do?)
etc.
I miss clarity here. Nobody else seems to talk about the first two from the IServiceCollection that I mentioned here.

z

Hey guys, how are you all?
If you're getting hard time to solve this globalize install problem, there is how I've solved it to follow properly Razor Pages tutorial.

You need to learn how to use libman, it will help you a lot. Use LibMan with ASP.NET Core in Visual Studio

At solution explorer, add Client-Side Library and install those libraries:

From CDNJS provider:

globalize

put it inside wwwroot/lib/globalize/

cldrjs

put it inside wwwroot/lib/cldrjs/

From JSDELIVR:

jquery-validation-globalize

put it inside wwwroot/lib/jquery-validation-globalize/

With those libs properly installed, you need to add this lines of code at bottom of /Pages/Shared/__ValidationScriptsPartial.cshtml

<!-- cldr script (needed for globalize) -->
<script src="~/lib/cldrjs/cldr.js"></script>
<!-- globalize script -->
<script src="~/lib/globalize/globalize.js"></script>
<!-- jquery validation script with globalize -->
<script src="~/lib/jquery-validation-globalize/jquery.validate.globalize.js"></script>

If you're following the razor pages tutorial all along, you should put this line of code inside Program.cs. Remember to put it before app.Run();

app.UseRequestLocalization("YOUR_LOCALIZATION");

Change YOUR_LOCALIZATION to your real localization, like taught by @Rick-Anderson at first answer. point_right First answer
Btw, thank you Rick-Anderson! Much appreciated your help at this matter, it was driving me crazy.

my VS Code About page:
Versión: 1.72.0
Commit: 64bbfbf67ada9953918d72e1df2f4d8e537d340e
Fecha: 2022-10-04T23:20:47.539Z
Electrón: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 5.19.14-xanmod1
En espacio aislado: No
I can confirm this solution works just fine, es-VE
dotnet tool install -g Microsoft.Web.LibraryManager.Cli libman init libman install globalize libman install cldrjs libman install jquery-validation-globalize --provider jsdelivr
then following the rest as described by @rafaelrpd  at Here

@Rick-Anderson does it make sense to write the instructions provided here by @rafaelrpd in the body of the https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/validation page?

@damienbod @Bartmax @hishamco would one of you be able to review he instructions provided https://github.com/dotnet/AspNetCore.Docs/issues/4076#issuecomment-1153254062 by @rafaelrpd

@mkArtakMSFT can you have someone  review the instructions provided here by @rafaelrpd

@rafaelrpd @Rick-Anderson could you please let me know what this script is doing? This is the first time I see it
BTW this is one of the oldest issues in localizations, it mainly related to jQuery if I'm not wrong

LGTM maybe an integrity check is needed if including the js file from a CDN

I remember the instructions provided by @rafaelrpd for using globalize.js is quite similar to the instructions in the old Getting Started with ASP.NET MVC 4/5 pages at here and here from 2013/2014. The globalize.js GitHub project's page is https://github.com/globalizejs/globalize and it’s also available from npm and bower. It’s a very popular project on GitHub btw.

Looks like it’s also possible to adapt and update the text and instructions provided in the old "Getting Started with ASP.NET MVC 4/5" tutorials from here and here to the current .NET version, with no major changes.

We need to check ..

Franlky I didn't try before, also never heard about it :)
@Rick-Anderson again I see the issue related to jQuery, the question is what's the issue from localization APIs?

The solution from @rafaelrpd works fine, but the problem is, it only works for server-side validations, the client-side stopped working.
Is there any solution to this?

The solution from @rafaelrpd works fine, but the problem is, it only works for server-side validations, the client-side stopped working.
Is there any solution to this?

@garbiru Did you find a solution?

I may have read over it. But what's the solution now?
And where i can find better tutorials for asp.net than on learn.microsoft?
I mean i see you try to solve this and have propably put much work into it, but this isn't the first Tutorial form learn.microsoft that feels like loss-of-time, due to inconsequent documentation.

Folowing code worked in VS 2017 ASP.NET application Framework 4.5
using Microsoft.AspNet.Localization;
using System.Web.Mvc;
public partial class Startup
{
    public class LanguageActionFilter : ActionFilterAttribute
    {
        private readonly ILogger _logger;

        public LanguageActionFilter(ILoggerFactory loggerFactory)
        {
            _logger = loggerFactory.CreateLogger("LanguageActionFilter");
        }

        public override void OnActionExecuting(ActionExecutingContext context)
        {
            string culture = context.RouteData.Values["culture"].ToString();
            _logger.LogInformation($"Setting the culture from the URL: {culture}");

#if NET451
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
#elif NET46
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
#else
//    CultureInfo.CurrentCulture = new CultureInfo(culture);
//    CultureInfo.CurrentUICulture = new CultureInfo(culture);
#endif
base.OnActionExecuting(context);
}
}
public void ConfigureServices(IServiceCollection services)
{
services.AddLocalization(options => options.ResourcesPath = "Resources");
        services.AddScoped<LanguageActionFilter>();

        services.Configure<RequestLocalizationOptions>(
            options =>
            {
                var supportedCultures = new List<CultureInfo>
                    {
                        new CultureInfo("en-US"),
                        new CultureInfo("de-CH"),
                        new CultureInfo("fr-CH"),
                        new CultureInfo("it-CH"),
                        new CultureInfo("nl"),
                        new CultureInfo("en-AU"),
                        new CultureInfo("en-GB"),
                        new CultureInfo("en"),
                        new CultureInfo("es-ES"),
                        new CultureInfo("es-MX"),
                        new CultureInfo("es"),
                        new CultureInfo("fr-FR"),
                        new CultureInfo("fr-BE")
                                    };

                options.SupportedCultures = supportedCultures;
                options.SupportedUICultures = supportedCultures;
            });
    }

How to make this work in ASP.NET core 7.0 in VS 2022?
The docs and implementations I found so far are not working or incomplete.
After 40 years of programming, there is still no easy way to implement a decimal comma instead of a point?  I must be missing something.

TUVE EL MISMO PROBLEMA Y LO SOLUCIONE EN 2 PASOS! Gracias a ChatGPT

Solo agregas en wwroot/js/validation.js                (este archivo y dentro escribes)
$.validator.methods.number = function (value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:.\d{3})+)(?:,\d+)?$/.test(value);
};

Cargas este archivo en Pages/Shared/_ValidationScriptsPartial.cshtml

Y listo funcionando! al 100% pones volver a cargar el proyecto f5 y puedes poner decimales ejemplo: 5,60

Thanks. Got it.
Cheers,
Eddy
Van: christian0712 @.>
Verzonden: maandag 31 juli 2023 19:38
Aan: dotnet/AspNetCore.Docs @.>
CC: onetoucheddy @.>; Comment @.>
Onderwerp: Re: [dotnet/AspNetCore.Docs] Show support jQuery validation for non-English locales that use a comma (",") for a decimal point (#4076)
TUVE EL MISMO PROBLEMA Y LO SOLUCIONE EN 2 PASOS! Gracias a ChatGPT

Solo agregas en wwroot/js/validation.js (este archivo y dentro escribes)
$.validator.methods.number = function (value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:.\d{3})+)(?:,\d+)?$/.test(value);
};
Cargas este archivo en Pages/Shared/_ValidationScriptsPartial.cshtml

Y listo funcionando! al 100% pones volver a cargar el proyecto f5 y puedes poner decimales ejemplo: 5,60
—
Reply to this email directly, view it on GitHub https://github.com/dotnet/AspNetCore.Docs/issues/4076#issuecomment-1658856461 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ47GVMNAEGVG5D53MCML6LXS7UPXANCNFSM4DYAI62A .
You are receiving this because you commented.Message ID: @.***>

Now you can add jQuery.Validation.Globalize package directly from NuGet package manager form Visual Studio 2022 IDE.
Just goto Tools -> NuGet PackageManager -> Manage NuGetPackages for solution
There after click! 'Browse'
Search for Globalize currency.
You'll find Globalize Currency (Latest stable 1.1.0).
Click! Install....
After that check the uncheck box of your ASP.NET core project, click! apply.

I've tried everything suggested here and it's still not possible to enter 8,99 as a price with fr-FR locale


eks.amazonaws.com/sts-regional-endpoints has no effect

What happened:
eks.amazonaws.com/sts-regional-endpoints: "true" annotation is not injecting AWS_STS_REGIONAL_ENDPOINTS=regional to the Pods.
What you expected to happen:
AWS_STS_REGIONAL_ENDPOINTS=regional is injected in to the Pods.
How to reproduce it (as minimally and precisely as possible):

Create a serviceaccount as mentioned in the README with annotation eks.amazonaws.com/sts-regional-endpoints: "true"
Create a Pod, using that serviceaccount

Anything else we need to know?:
I noticed that in the README there are two versions of the annotation:

eks.amazonaws.com/sts-regional-endpoints: "true" - https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/README.md#eks-walkthrough
eks.amazonaws.com/sts-regional-endpoint: "true" - https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/README.md#aws_sts_regional_endpoints-injection

Which one is correct?
Environment:

AWS Region: ap-south-1
EKS Platform version (if using EKS, run aws eks describe-cluster --name <name> --query cluster.platformVersion): eks.1
Kubernetes version (if using EKS, run aws eks describe-cluster --name <name> --query cluster.version): 1.19
Webhook Version: Am using AWS EKS, so not sure how to find the version

any ETA for the resolution of this?

I think I've found where the issue in line 202 here with the if statement evaluating to false.
m.RegionalSTSEndpoint is set in main.go as a flag and unless you set this to true on the webhook it won't add the regional endpoint ENV var - this conflicts with the README.md doc which states that:
You can also enable this per-service account with the annotation eks.amazonaws.com/sts-regional-endpoint set to "true".

https://github.com/aws/amazon-eks-pod-identity-webhook/pull/117


[WIP] try to fix custom.js

Should fix #246 (partially) but work in progress.
It is a due to a complex interaction between codemirror 4, that is now asynchronous, the kernelspecs of IPython master and a few other things. @dbartow might want to try that.
Notebook will work but you won't have highliting though.
https://github.com/ipython/ipython/pull/6850 should fix that.

Closing as IPython as evolved too much. and fix is simpler.

Okay, see #276.


Fix element.insertBefore(node, refNode) to accept falsy second parmeter

Likely other methods are affected by not tested (e.g: element.insertAfter(node, refNode))
https://github.com/c-smile/sciter-js-sdk/blob/main/status.md
I managed to run a build generated by a svelte project after applying some fixes:
Svelte Project

npx degit sveltejs/template my-svelte-project
cd my-svelte-project

Open rollup.config.js and uncomment terser plugin (this should help tracking some errors from terminal)
// production && terser(),

Build the project and execute sciter. you also need to fix paths (styles, scripts, etc..) in index.html by removing the leading forward slash

npm run build
scapp ./public/index.html

Reported Error:

error:script: TypeError: Node was deleted

After some checks, I discovered that sciter is claiming about invoking the second parameter (reNode) with a 'null' value.
element.insertBefore(node, null) // Accepted by chrome but not sciter
element.insertBefore(node)       // Accepted by sciter but not chrome

I tried to fix Node.prototype.insertBefore but the moment I write Node.prototype, I get this error:
console.log(Node.prototype)

Reported Error:

terminate called after throwing an instance of 'qjs::exception'
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR<EMAIL_ADDRESS>sciter: scapp ./public/index.html
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>sciter script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

But I managed to apply a temporary fix either by using @rollup/plugin-replace or by invoking some code before executing the script
Method 1 (@rollup/plugin-replace):
// rollup.config.js
replace({
    include: ['node_modules/svelte/internal/**'],
    delimiters: ['', ''],
    'target.insertBefore(node, anchor || null);': 'let sciter_detected = false; try { navigator } catch { sciter_detected = true } ; (!anchor && sciter_detected) ? target.insertBefore(node) : target.insertBefore(node, anchor || null);',
}),

Method 2 (replacing insertBefore for document.body and any other element created at runtime):
// at the top of src/main.js, add these lines
let sciter_detected = false; try { navigator; } catch { sciter_detected = true; }
if (sciter_detected) {
	document.body.__insertBefore = document.body.insertBefore
	document.body.insertBefore = function (node, anchor) {
		const params = [node, ...(anchor ? [anchor] : [])]
		document.body.__insertBefore(...params)
	}

	document.__createElement = document.createElement
	document.createElement = function (...rest) {
		const element = document.__createElement(...rest)
		element.__insertBefore = element.insertBefore
		element.insertBefore = function (node, anchor) {
			const params = [node, ...(anchor ? [anchor] : [])]
			element.__insertBefore(...params)
		}
		return element
	}
}

Sorry for the long text, I only tried to prove to others the possibility to benefit from some wide spread reactive frameworks

Try v.<IP_ADDRESS> - I just uploaded it.
These:
element.insertBefore(node, null);
console.log(Node.prototype);

should work.

Already confirmed that the issues mentioned above got fixed under Windows but not Linux.
I can also confirm about some other issues affecting both Windows and Linux:

document.body.style.setProperty is reported as "string" instead of "function"
document.getElementsByTagName isn't available at all

// test code
const el = document.createElement('div')
el.appendChild(document.createTextNode('text...'))

document.body.insertBefore(el, null) // linux -> error:script: TypeError: Node was deleted

console.log(Node.prototype) // linux -> error: terminate called after throwing an instance of 'qjs::exception'

console.log(typeof document.body.style.setProperty) // linux|windows -> reported as "string" instead of "object"
document.body.style.setProperty('background-color', 'red') // linux|windows -> error:script: TypeError: not a function

console.log(document.getElementsByClassName) // linux|windows -> undefined
console.log(document.getElementsByTagName('head')) // linux|windows -> error:script: TypeError: not a function

As of getElementsByClassName and other methods ...
Idea of Sciter.JS is to keep implementation as compact as possible.
Not all browser's DOM methods will be available but it will always be other means to add them when needed.
For example, this will add getElementsByTagName:

        <title>Test</title>

Veni

Vidi

Vici

and getElementsByClassName is an exercise for the reader.
As of styles, this works:
document.body.style['background-color'] = 'red';

The problem is that existing libraries are free to use any valid syntax and you can't do anything about this. But not a big problem in this case as the programmer can polyfill them with ease.
But leaving element.style.setProperty as a "string" property instead of "function" or undefined is an issue, unless if you're planning to support it.

you can't do anything about this

I understand that. Polyfill will be needed for features that are not in Sciter.
For example window.location makes almost no sense in Sciter.JS context. The only thing that is used in popular SPA libraries is hashchange event (for routing). And so this needs to be emulated somehow. Yet there are other features similar to this - API in browsers is huge and it is not realistic for such small engine to support all that. And 80% of those APIs are outdated, not used anyway.
Browser must be a universal platform - to run all possible sites. Sciter case is different in this respect - it runs particular application that uses particular features. Yet Sciter internally is modular - if you don't need std module for example you can exclude it from your binary completely.
Some [modular] compatibility JS layer should be designed so applications may include only features they need.
There is a mechanism in place in Sciter and Sciter.JS that allows to bind JS code using CSS declarations:
html {
   prototype: BrowserCompatibility url(scripts/std-compatibility.js);
}
... other stylistic compatibility declarations ...

And that std-compatibility.js may include declarations like Element.prototype.getElementsByTagName above.
In order to hookup all this we will need to include just CSS:
@import url(std-compatibility.css);

Or for a frame
<frame src="std-content.html" content-style="std-compatibility.css" />

Also I've added element.style.setProperty() and element.style.getPropertyValue(), see
https://github.com/c-smile/sciter-js-sdk/wiki/DOM.Element.Style

window.location isn't only used by SPA libraries for routing. Even rollup is using window.location.href to construct the uri for Websocket. Likely in the near future, I'll try to add minimal code or use some rollup transformations to support auto reload during development.
What kept me away from Sciter in the previous years was the use of tiscript which prevented me from using reactive frameworks like vue.js and svelte. But Sciter.js is changing this and it doesn't has to support every browser's feature, as many javascript developers are using bundlers for code transformation and for supporting older browsers, and according to their experience, they should adapt with Sciter.js
Sciter.js is getting interesting and I started to think about the possibility to support Leaflet after some fixes including fixing styles. Likely, I'll try this in the near future.
Note: I'll check your last message about element.style.setProperty immediately.

I can confirm that:

This issue got fixed under Linux
element.style.setProperty is working

Feel free to close this issue anytime and thank you for informing me about the wiki. I need to spend more time exploring this wiki and code samples.

Some form of location will be there but in Sciter variant as url method:
const thisUrl = document.url("relpath");
cosnt relativeUrl = document.url("frames/relpath.htm");

Each framework has its own notion of routing.


Cannot import

I have tried importing the package but I get an error...
>>> import ezaggrid
1ms, finished 15:18:44 2018-07-03
  File ".../packages/ezaggrid/util.py", line 282
    print('In dataframe column names "." are replaced by "_".', end=' ')
                                                                   ^
SyntaxError: invalid syntax

ezaggrid does not support Python 2.7, and will not.
Python 2.7 is on the way out, and I would recommend to upgrade - if possible.
Let me rewrite the notification email I received as the post above seems truncated (!)
The Python version shows in the path.
>>> import ezaggrid
1ms, finished 15:18:44 2018-07-03
  File "/mnt/md0/ADA/natty/tickets/DA-1043/pixel_dashboard/local/lib/python2.7/site-packages/ezaggrid/util.py", line 282
    print('In dataframe column names "." are replaced by "_".', end=' ')
                                                                   ^
SyntaxError: invalid syntax


Dont work at all for me

GTX 1080 Ti 12Gb VRam
Windows 11 CMD:
`S:\AI-Tools\Aitrepreneur>cd OmniGen
S:\AI-Tools\Aitrepreneur\OmniGen>LAUNCHER.bat
S:\AI-Tools\Aitrepreneur\OmniGen\app.py:229: SyntaxWarning: invalid escape sequence '/'
"<|image_1|></img> What item can be used to see the current time? Please highlight it in blue.",
S:\AI-Tools\Aitrepreneur\OmniGen\app.py:271: SyntaxWarning: invalid escape sequence '<'
description = """
Fetching 10 files: 100%|███████████████████████████████████████████████████████████████████████| 10/10 [00:00<?, ?it/s]
Loading safetensors
(env) S:\AI-Tools\Aitrepreneur\OmniGen>`
Please help me :C

I used this script:
OMNIGEN_AUTO_INSTALL.bat.txt
And tried it manually

See if this works
https://youtu.be/9ZXmXA2AJZ4?si=M2kESfsCh-LO-5Ky

Thank you very much! The fork from the video at least starts, but when I start the generation it stops:
(omnigen) S:\AI-Tools\omnigen>python app.py
INFORMATION: Es konnten keine Dateien mit dem angegebenen
Muster gefunden werden.

Running on local URL:  http://<IP_ADDRESS>:7860

To create a public link, set share=True in launch().
Fetching 10 files: 100%|███████████████████████████████████████████████████████████████████████| 10/10 [00:00<?, ?it/s]
Loading safetensors
(omnigen) S:\AI-Tools\omnigen>

Hi, @Archer7x , is there any error messages? It's difficult to identify the issue with the current information.

Hi @staoxiao,
I know its difficult but this is all i have:
it says "Loading safetensors" and then quits to cmd input. I guess it didnt download the model yet. Because I can not find it anywhere. Where should the file model.safetensors be located in the folderstruckture?

Same result. I also tried using ComfyUi, but same result. No error, just quit. And I cant find any .safetensors file. Neither in the OmniGen folder nor in the conda omnigen env.
ComfyUI Node

having the same issue, no error message just kills the process and goes back to the cmd line.

Same Issue as above, however also got "Python has stopped working" message.
Further research and debugging led me to the following:
Unhandled exception at 0x00007FFB326D3ECB (torch_cpu.dll) in python.exe: 0xC0000005: Access violation reading location 0x0000000000005D68.
Reinstalled/updated torch to version 2.1.3 in system using
C:\ pip install torch==2.3.1+cu118 torchvision --extra-index-url https://download.pytorch.org/whl/cu118
(note that 'cu118' is the version for my machine, yours may vary so research which one that you need for yours)
deleted and reinstalled the venv using Aitrepreneur's 1-click installer
reboot system
Issue fixed!!
Machine info:
Windows 11
32GB System Ram
12GB VRam
Nvidia 3070 TI


Copy facility for a logical model element with all its child elements and existing mappings, etc.

in development.