问:
Why isn't my JQuery working in Ruby on Rails Application?
I have just started a new project and struggling to get my JQuery working. I created a new file: app/javascript/menu.js after reading that I shouldn't be including JS in /javascript/application.js

And filled it with some basic JQuery to test:

```<code>$(".star").on('click', function () {
    $(".star").hide();
});
</code>```

My application.js contains this after also reading a lot about having to include these files:

```<code>import "@hotwired/turbo-rails"
import "controllers"

//= require jquery
//= require menu.js
//= require jquery3
//= require jquery_ujs
//= require_tree .
</code>```

My app/views/home/index.html.erb contains this:

```<code><h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
<div class="star" style="color:yellow">star</div>
</code>```

Based on other solutions I have tried putting:

```<code><%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</code>```

in the head of my layout/application.html.erb file

And also have the JQuery Gem included in my Gemfile and ran bundle install:

```<code>gem 'jquery-rails'
</code>```

A few JS related errors in console being shown (not sure which are relevant):

A preload for 'http://localhost:3000/assets/application-c6cfeddf2cc82767c591b13a28614b8f0f939b097ea8471155ef803809350558.js' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Uncaught SyntaxError: Cannot use import statement outside a module

The resource http://localhost:3000/assets/es-module-shims.min-d89e73202ec09dede55fb74115af9c5f9f2bb965433de1c2446e1faa6dac2470.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

DevTools failed to load source map: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/browser-polyfill.js.map: Fetch through target failed: Frame not found; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

Body:
I have just started a new project and struggling to get my JQuery working. I created a new file: app/javascript/menu.js after reading that I shouldn't be including JS in /javascript/application.js

And filled it with some basic JQuery to test:

$(".star").on('click', function () {
    $(".star").hide();
});

My application.js contains this after also reading a lot about having to include these files:

import "@hotwired/turbo-rails"
import "controllers"

//= require jquery
//= require menu.js
//= require jquery3
//= require jquery_ujs
//= require_tree .

My app/views/home/index.html.erb contains this:

Home#index

Find me in app/views/home/index.html.erb

star

Based on other solutions I have tried putting:

<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

in the head of my layout/application.html.erb file

And also have the JQuery Gem included in my Gemfile and ran bundle install:

gem 'jquery-rails'

A few JS related errors in console being shown (not sure which are relevant):

A preload for 'http://localhost:3000/assets/application-c6cfeddf2cc82767c591b13a28614b8f0f939b097ea8471155ef803809350558.js' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Uncaught SyntaxError: Cannot use import statement outside a module

The resource http://localhost:3000/assets/es-module-shims.min-d89e73202ec09dede55fb74115af9c5f9f2bb965433de1c2446e1faa6dac2470.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

DevTools failed to load source map: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/browser-polyfill.js.map: Fetch through target failed: Frame not found; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME


来源: stackexchange

问:
CoverFlow Recycler View
I'm trying to implement a cover flow horizontal recycler view - Android,

I used this library:
https://github.com/ChenLittlePing/RecyclerCoverFlow

And everything works fine, but the problem is in RTL, when the app in RTL mode, the scroll direction is from left to right, it should be form right to left.

ContentLicense: CC BY-SA 4.0

Title: CoverFlow Recycler View


问:
BottomNavigationView nested navigation
I have 3 fragments. I use Navigation component. The first fragment refers to the second fragment, the second to the third fragment. The BottomNavigationView element is associated with the first fragment. How to return to the first fragment from the third fragment by clicking on the menu item?

chart

Title: BottomNavigationView nested navigation


问:
PrensetationFramework calling WpfWebRequestHelper incomprehensibly
I got a very strange problem and I don't know how to analyze it. It occurs only on the system of our client and not on my machine. It occurs everytime the client restarts the software and opens a specific dialog for the first time...

The when the dialog is created, the software freezes for 100 seconds. I managed to get the callstack by attaching to the software and hitting break when the dialog is beeing created. It looks like wpf is doing a webrequest with a timeout of 100 seconds, but I dont understand why. We dont do any WebRequests in our code, PresentationFramework somehow decides it has to do a WebRequest.

Did Someone experience a similar problem or can imagine why this call happens every time this dialog is opened for the first time? Any hint could be helpfull...

The Callstack:

```<code>file:///C:/Windows/system32/spool/drivers/color/sRGB%20Color%20Space%20Profile.icm

TimeOut 100000

    ntdll.dll!00007fffc8f246d4()    Unknown
    KernelBase.dll!00007fffc653f310()   Unknown
    WindowsBase.ni.dll!00007fff7073069e()   Unknown
    [Managed to Native Transition]
    WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)  Unknown
    [Native to Managed Transition]
    [Managed to Native Transition]
    mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)  Unknown
    mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext) Unknown
    System.dll!System.Net.FileWebRequest.GetResponse()  Unknown
>   PresentationCore.dll!MS.Internal.WpfWebRequestHelper.GetResponse(System.Net.WebRequest request) Unknown
    PresentationCore.dll!System.Windows.Media.ColorContext.Initialize(System.Uri profileUri, bool isStandardProfileUriNotFromUser)  Unknown
    PresentationCore.dll!System.Windows.Media.ColorContext.ColorContext(System.Windows.Media.PixelFormat pixelFormat)   Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(System.Windows.Media.Imaging.BitmapFrame frame, System.Windows.Media.Imaging.BitmapSourceSafeMILHandle wicSource, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption, System.Windows.Media.Imaging.BitmapPalette palette) Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()  Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(System.Windows.Media.Imaging.BitmapDecoder decoder, System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame> frames) Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapDecoder.Frames.get()    Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(System.Uri baseUri, System.Uri uri, System.IO.Stream stream, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption, System.Net.Cache.RequestCachePolicy uriCachePolicy)    Unknown
    PresentationCore.dll!System.Windows.Media.ImageSourceConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)    Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.TrySharingValue(System.Windows.DependencyProperty property, object value, string parentName, System.Xaml.XamlReader xamlReader, bool allowRecursive, out System.Windows.PropertyValue? sharedValue)    Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.TrySharingProperty(System.Xaml.XamlReader xamlReader, System.Xaml.XamlType parentType, string parentName, MS.Utility.FrugalObjectList<System.Xaml.NamespaceDeclaration> previousNamespaces, out System.Windows.PropertyValue? sharedValue) Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseNode(System.Xaml.XamlReader xamlReader, System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber, out object newValue)  Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseNodes(System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber) Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseTree(System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber)  Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseXaml()    Unknown
    PresentationFramework.dll!System.Windows.FrameworkTemplate.Template.set(System.Windows.TemplateContent value)   Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(object inst, System.Xaml.XamlMember property, object value)  Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx, System.Xaml.XamlMember prop, object value, bool onParent)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.CreateObject(System.Windows.Baml2006.KeyRecord key) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValue(object key, ref object value, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValuePrivate(object key, ref object value, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.DeferredResourceReference.GetValue(System.Windows.BaseValueSourceInternal valueSource) Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.TryProvideValueImpl(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)    Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.ProvideValueInternal(System.IServiceProvider serviceProvider, bool allowDeferredReference) Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension me, System.IServiceProvider serviceProvider)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ProvideValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)    Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.CreateObject(System.Windows.Baml2006.KeyRecord key) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValue(object key, ref object value, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValuePrivate(object key, ref object value, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.Lookup(object key, bool allowDeferredResourceReference, bool mustReturnDeferredResourceReference, bool canCacheAsThemeResource) Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.FindResourceInEnviroment(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)   Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.TryProvideValueImpl(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)    Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.ProvideValueInternal(System.IServiceProvider serviceProvider, bool allowDeferredReference) Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension me, System.IServiceProvider serviceProvider)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ProvideValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)    Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader xamlReader, bool skipJournaledProperties, object rootObject, System.Xaml.Permissions.XamlAccessLevel accessLevel, System.Uri baseUri) Unknown
    PresentationFramework.dll!System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream stream, System.Windows.Markup.ParserContext parserContext, object parent, bool closeStream)    Unknown
</code>```

EDIT:

I'm using a DataTemplate in this View:

```<code><DataTemplate DataType="{x:Type shared:PreviewPageViewModel}">
<Grid Background="White">
  <Grid.RowDefinitions>
    <RowDefinition Height="*" />
  </Grid.RowDefinitions>
  <Image Source="{Binding PreviewPicturePath, Converter={StaticResource StringToImageSourceConverter}}"
                 Stretch="Uniform"
                 StretchDirection="Both"
                 Grid.Row="0"
                 Visibility="{Binding PicturePathValid, Converter={StaticResource BooleanToVisibilityConverter}}" />
  <ContentControl Grid.Row="0"
                          BorderBrush="DarkGray"
                          BorderThickness="10"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Content="{Binding Path=FunctionViewAdapter}"
                          ContentTemplateSelector="{StaticResource HintTemplateSelector}"
                          Visibility="{Binding ShowFallbackPreview, Converter={StaticResource BooleanToVisibilityConverter}}"
                          Opacity="0.85">
  </ContentControl>
</Grid>
</code>```

The Bound Property is just a string:

```<code>  string directory = Path.GetDirectoryName(panelPath);
  string panelPicturePath = Path.Combine(directory, "PreviewPicture.png");

  if (File.Exists(panelPicturePath))
  {
    PreviewPicturePath = panelPicturePath;
  }

     public class StringToImageSourceConverter : IValueConverter
  {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
  if (!(value is string valueString))
  {
    return null;
  }
  try
  {
    ImageSource image = BitmapFrame.Create(new Uri(valueString), BitmapCreateOptions.IgnoreImageCache, BitmapCacheOption.OnLoad);
    return image;
  }
  catch { return null; }
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
  throw new NotImplementedException();
}
</code>```

}

Body:
I got a very strange problem and I don't know how to analyze it. It occurs only on the system of our client and not on my machine. It occurs everytime the client restarts the software and opens a specific dialog for the first time...

The when the dialog is created, the software freezes for 100 seconds. I managed to get the callstack by attaching to the software and hitting break when the dialog is beeing created. It looks like wpf is doing a webrequest with a timeout of 100 seconds, but I dont understand why. We dont do any WebRequests in our code, PresentationFramework somehow decides it has to do a WebRequest.

Did Someone experience a similar problem or can imagine why this call happens every time this dialog is opened for the first time? Any hint could be helpfull...

The Callstack:

file:///C:/Windows/system32/spool/drivers/color/sRGB%20Color%20Space%20Profile.icm

TimeOut 100000

    ntdll.dll!00007fffc8f246d4()    Unknown
    KernelBase.dll!00007fffc653f310()   Unknown
    WindowsBase.ni.dll!00007fff7073069e()   Unknown
    [Managed to Native Transition]
    WindowsBase.dll!System.Windows.Threading.DispatcherSynchronizationContext.Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)  Unknown
    [Native to Managed Transition]
    [Managed to Native Transition]
    mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)  Unknown
    mscorlib.dll!System.Threading.WaitHandle.WaitOne(int millisecondsTimeout, bool exitContext) Unknown
    System.dll!System.Net.FileWebRequest.GetResponse()  Unknown
>   PresentationCore.dll!MS.Internal.WpfWebRequestHelper.GetResponse(System.Net.WebRequest request) Unknown
    PresentationCore.dll!System.Windows.Media.ColorContext.Initialize(System.Uri profileUri, bool isStandardProfileUriNotFromUser)  Unknown
    PresentationCore.dll!System.Windows.Media.ColorContext.ColorContext(System.Windows.Media.PixelFormat pixelFormat)   Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapSource.CreateCachedBitmap(System.Windows.Media.Imaging.BitmapFrame frame, System.Windows.Media.Imaging.BitmapSourceSafeMILHandle wicSource, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption, System.Windows.Media.Imaging.BitmapPalette palette) Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()  Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(System.Windows.Media.Imaging.BitmapDecoder decoder, System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame> frames) Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapDecoder.Frames.get()    Unknown
    PresentationCore.dll!System.Windows.Media.Imaging.BitmapFrame.CreateFromUriOrStream(System.Uri baseUri, System.Uri uri, System.IO.Stream stream, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption, System.Net.Cache.RequestCachePolicy uriCachePolicy)    Unknown
    PresentationCore.dll!System.Windows.Media.ImageSourceConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)    Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.TrySharingValue(System.Windows.DependencyProperty property, object value, string parentName, System.Xaml.XamlReader xamlReader, bool allowRecursive, out System.Windows.PropertyValue? sharedValue)    Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.TrySharingProperty(System.Xaml.XamlReader xamlReader, System.Xaml.XamlType parentType, string parentName, MS.Utility.FrugalObjectList<System.Xaml.NamespaceDeclaration> previousNamespaces, out System.Windows.PropertyValue? sharedValue) Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseNode(System.Xaml.XamlReader xamlReader, System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber, out object newValue)  Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseNodes(System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber) Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseTree(System.Windows.TemplateContent.StackOfFrames stack, System.Collections.Generic.List<System.Windows.PropertyValue> sharedProperties, ref int nameNumber)  Unknown
    PresentationFramework.dll!System.Windows.TemplateContent.ParseXaml()    Unknown
    PresentationFramework.dll!System.Windows.FrameworkTemplate.Template.set(System.Windows.TemplateContent value)   Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(object inst, System.Xaml.XamlMember property, object value)  Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx, System.Xaml.XamlMember prop, object value, bool onParent)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.CreateObject(System.Windows.Baml2006.KeyRecord key) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValue(object key, ref object value, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValuePrivate(object key, ref object value, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.DeferredResourceReference.GetValue(System.Windows.BaseValueSourceInternal valueSource) Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.TryProvideValueImpl(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)    Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.ProvideValueInternal(System.IServiceProvider serviceProvider, bool allowDeferredReference) Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension me, System.IServiceProvider serviceProvider)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ProvideValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)    Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.CreateObject(System.Windows.Baml2006.KeyRecord key) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValue(object key, ref object value, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.OnGettingValuePrivate(object key, ref object value, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValueWithoutLock(object key, out bool canCache)  Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.GetValue(object key, out bool canCache) Unknown
    PresentationFramework.dll!System.Windows.ResourceDictionary.Lookup(object key, bool allowDeferredResourceReference, bool mustReturnDeferredResourceReference, bool canCacheAsThemeResource) Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.FindResourceInEnviroment(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)   Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.TryProvideValueImpl(System.IServiceProvider serviceProvider, bool allowDeferredReference, bool mustReturnDeferredResourceReference)    Unknown
    PresentationFramework.dll!System.Windows.StaticResourceExtension.ProvideValueInternal(System.IServiceProvider serviceProvider, bool allowDeferredReference) Unknown
    System.Xaml.dll!MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension me, System.IServiceProvider serviceProvider)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_ProvideValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)   Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(MS.Internal.Xaml.Context.ObjectWriterContext ctx)    Unknown
    System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndMember()   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader xamlReader, System.Xaml.XamlObjectWriter xamlWriter, bool onlyLoadOneNode, bool skipJournaledProperties, bool shouldPassLineNumberInfo, System.Xaml.IXamlLineInfo xamlLineInfo, System.Xaml.IXamlLineInfoConsumer xamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack<System.Windows.Markup.WpfXamlFrame> stack, System.Windows.Markup.IStyleConnector styleConnector)  Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader xamlReader, System.Xaml.IXamlObjectWriterFactory writerFactory, bool skipJournaledProperties, object rootObject, System.Xaml.XamlObjectWriterSettings settings, System.Uri baseUri)   Unknown
    PresentationFramework.dll!System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader xamlReader, bool skipJournaledProperties, object rootObject, System.Xaml.Permissions.XamlAccessLevel accessLevel, System.Uri baseUri) Unknown
    PresentationFramework.dll!System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream stream, System.Windows.Markup.ParserContext parserContext, object parent, bool closeStream)    Unknown

EDIT:

I'm using a DataTemplate in this View:

<DataTemplate DataType="{x:Type shared:PreviewPageViewModel}">
<Grid Background="White">
  <Grid.RowDefinitions>
    <RowDefinition Height="*" />
  </Grid.RowDefinitions>
  <Image Source="{Binding PreviewPicturePath, Converter={StaticResource StringToImageSourceConverter}}"
                 Stretch="Uniform"
                 StretchDirection="Both"
                 Grid.Row="0"
                 Visibility="{Binding PicturePathValid, Converter={StaticResource BooleanToVisibilityConverter}}" />
  <ContentControl Grid.Row="0"
                          BorderBrush="DarkGray"
                          BorderThickness="10"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Content="{Binding Path=FunctionViewAdapter}"
                          ContentTemplateSelector="{StaticResource HintTemplateSelector}"
                          Visibility="{Binding ShowFallbackPreview, Converter={StaticResource BooleanToVisibilityConverter}}"
                          Opacity="0.85">
  </ContentControl>
</Grid>

The Bound Property is just a string:

  string directory = Path.GetDirectoryName(panelPath);
  string panelPicturePath = Path.Combine(directory, "PreviewPicture.png");

  if (File.Exists(panelPicturePath))
  {
    PreviewPicturePath = panelPicturePath;
  }

     public class StringToImageSourceConverter : IValueConverter
  {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
  if (!(value is string valueString))
  {
    return null;
  }
  try
  {
    ImageSource image = BitmapFrame.Create(new Uri(valueString), BitmapCreateOptions.IgnoreImageCache, BitmapCacheOption.OnLoad);
    return image;
  }
  catch { return null; }
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
  throw new NotImplementedException();
}

}


问:
How to add values into hubspot form
I am trying to add value into my firstname field and webform hubspot form.

Below is my function which I have defined in my helpers:

```<code>export function hubspotContactFormFields(formRender) {

    if (typeof window !== "undefined") {

    document.getElementById("firstname-3478d953-3c8d-4bea-8501-af6ab93cac87").value = "abc"
    }

return (
      <HubspotForm
        onReady={hubspotContactFormFields(formRender)}
      />
  );
}
</code>```

but value is not populating into firstname field and I have also tried to did console.log but I did not see anything in console.

Title: How to add values into hubspot form

Body:
I am trying to add value into my firstname field and webform hubspot form.

Below is my function which I have defined in my helpers:

export function hubspotContactFormFields(formRender) {

    if (typeof window !== "undefined") {

    document.getElementById("firstname-3478d953-3c8d-4bea-8501-af6ab93cac87").value = "abc"
    }

return (
      <HubspotForm
        onReady={hubspotContactFormFields(formRender)}
      />
  );
}

but value is not populating into firstname field and I have also tried to did console.log but I did not see anything in console.


问:
Can we use Delta Live Tables with open source delta lake like with minIO Object Storage
Can we use Delta Live Tables with open source delta lake. Like currently we are using minIO Object Storage. I would like to know whether DLT be used for transformation in such cases.

I am working on my RnD for my project's Data Architecture


问:
How does one make jQuery Mobile load pages into the DOM when going through a JSP servlet?
jQuery Mobile will background-load additional 'pages' into the DOM, then transition to them.  This works well sometimes, but in the example where one uses a JSP servlet, it seems to break.  I wondered what the best way to do this would be.

For instance, say we have on our first page this:

```<code><div data-role="page" id="home">
  <div data-role="content">
    <a href="jqmServlet?value=1.1">1.1</a>
  </div>
</div>
</code>```

Where the 1.1 is something that can be different, and so cause the servlet to do something different.

Now the servlet returns a page containing this:

```<code><div data-role="page" id=${pageThing}>
  <div data-role="content">
   <a href="#OTHER_1">other 1</a></li>
  </div>
</div>

<div data-role="page" id="OTHER_1">
  <div data-role="content">
<p>Other 1 Content</p>
  </div>
</div>
</code>```

Starting the first page, I click "1.1", it goes to the servlet, and I see the "other 1" link.  So that is all expected.  But when I click "other 1", it fails because the underlying link looks like jqmServlet?value=1.1#OTHER_1, which is clearly not what I intended.  What I intended was the "Other 1 Content" be displayed just using the content already in the DOM.

I started playing with the "data-url" parameter, but haven't figured out the secret handshake yet.

What's the right way to do this?

EDIT: It seems to me this would be a standard thing that would need to get done.  I tried dozens of variations of the data-url, but I could not get it working properly; there was always some problem with the URL or if I got the URL looking pretty good, it still didn't show the 'OTHER_1' page (it just acted as if that page in the DOM didn't exist).  I was going to replace the link with a call to JavaScript, but that sort of negates the value of this tool.  Anyone have any ideas at all?

ContentLicense: CC BY-SA 3.0

Body:
jQuery Mobile will background-load additional 'pages' into the DOM, then transition to them.  This works well sometimes, but in the example where one uses a JSP servlet, it seems to break.  I wondered what the best way to do this would be.

For instance, say we have on our first page this:

    1.1

Where the 1.1 is something that can be different, and so cause the servlet to do something different.

Now the servlet returns a page containing this:

   other 1

Other 1 Content

Starting the first page, I click "1.1", it goes to the servlet, and I see the "other 1" link.  So that is all expected.  But when I click "other 1", it fails because the underlying link looks like jqmServlet?value=1.1#OTHER_1, which is clearly not what I intended.  What I intended was the "Other 1 Content" be displayed just using the content already in the DOM.

I started playing with the "data-url" parameter, but haven't figured out the secret handshake yet.

What's the right way to do this?

EDIT: It seems to me this would be a standard thing that would need to get done.  I tried dozens of variations of the data-url, but I could not get it working properly; there was always some problem with the URL or if I got the URL looking pretty good, it still didn't show the 'OTHER_1' page (it just acted as if that page in the DOM didn't exist).  I was going to replace the link with a call to JavaScript, but that sort of negates the value of this tool.  Anyone have any ideas at all?


问:
openpyxl: Is it possible to load a workbook (with data_only=False), work on it, save it and re open the saved vile with (data_only= True)?
Basically the title. The thing is that I got an Excel file already (with a lot of formulas) and I have to use it as a template, but I have to copy certain column and paste it in another column.

Since I have to make some graphs in between I need the numeric data of the excel file so my plan is the following:

1.- load the file with data_only = False.

2.- Make the for loops needed to copy and paste info from one worksheet to another.

3.- Save the copied data as another Excel file.

4.- Open the new Excel created file, this time with data_only = True, so I can work with the numeric values.

The problem is that after doing this, it's like after putting data_only on the new created file it doesn't work, because when I made a list that filters NoneType values and strings in a column that have actual numerical values it gives me an empty list.

```<code>#I made the following
wb = load_workbook('file_name.xlsx', data_only = True)

S1 = wb['Sheet 1']
S2 = wb['Sheet 2']

#Determination of min and max cols and rows
col_min = S1.min_column
col_max = S1.max_column
row_min = S1.min_row
row_max = S1.max_row

for i in range(row_min + 2, row_max + 1):
    for j in range(col_min + Value, Value + 2):
        S2.cell(row = i+6, column = j+10-Value).value = S1.cell(row = i, column = j).value

Transition_file = wb.save('transition.xlsx')
wb1 = load_workbook('transition.xlsx', data_only = True) #To obtain only numerical values
S2 = wb1['Sheet 2'] #Re define my Sheet 2 values
</code>```

Body:
Basically the title. The thing is that I got an Excel file already (with a lot of formulas) and I have to use it as a template, but I have to copy certain column and paste it in another column.

Since I have to make some graphs in between I need the numeric data of the excel file so my plan is the following:

1.- load the file with data_only = False.

2.- Make the for loops needed to copy and paste info from one worksheet to another.

3.- Save the copied data as another Excel file.

4.- Open the new Excel created file, this time with data_only = True, so I can work with the numeric values.

The problem is that after doing this, it's like after putting data_only on the new created file it doesn't work, because when I made a list that filters NoneType values and strings in a column that have actual numerical values it gives me an empty list.

#I made the following
wb = load_workbook('file_name.xlsx', data_only = True)

S1 = wb['Sheet 1']
S2 = wb['Sheet 2']

#Determination of min and max cols and rows
col_min = S1.min_column
col_max = S1.max_column
row_min = S1.min_row
row_max = S1.max_row

for i in range(row_min + 2, row_max + 1):
    for j in range(col_min + Value, Value + 2):
        S2.cell(row = i+6, column = j+10-Value).value = S1.cell(row = i, column = j).value

Transition_file = wb.save('transition.xlsx')
wb1 = load_workbook('transition.xlsx', data_only = True) #To obtain only numerical values
S2 = wb1['Sheet 2'] #Re define my Sheet 2 values


问:
Ignore ANSI escape codes in regexp
I have a Spring Boot App and I need to parse its log with regexp.
Log record example:

```<code>2023-01-10 12:05:41,922 [39mDEBUG[0;39m [[34mhttp-nio-5287-exec-8[0;39m] [33mdrivers.redu.server.clients.ReduGroup[0;39m request: ReduMsg.ReduRequest(clientInfo=ReduMsg.ClientInfo(groupId=redu-TEST_7, clientId=29, weight=1), lastChangeTs=1672130668563)
</code>```

I've made a regexp:

```<code>^(?<time>\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}.\d{3})\s+(?<level>[^\s]+)\s\[(?<message>.*)
</code>```

It matches all groups I need, but there are ANSI escape codes in the log and it does not look fine after parsing. How can I ignore these escape codes with regexp?
https://regex101.com/r/bQtBCQ/1

Title: Ignore ANSI escape codes in regexp

Body:
I have a Spring Boot App and I need to parse its log with regexp.
Log record example:

2023-01-10 12:05:41,922 [39mDEBUG[0;39m [[34mhttp-nio-5287-exec-8[0;39m] [33mdrivers.redu.server.clients.ReduGroup[0;39m request: ReduMsg.ReduRequest(clientInfo=ReduMsg.ClientInfo(groupId=redu-TEST_7, clientId=29, weight=1), lastChangeTs=1672130668563)

I've made a regexp:

^(?<time>\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}.\d{3})\s+(?<level>[^\s]+)\s\[(?<message>.*)

It matches all groups I need, but there are ANSI escape codes in the log and it does not look fine after parsing. How can I ignore these escape codes with regexp?
https://regex101.com/r/bQtBCQ/1


问:
Implementing SecretKey for JwtEncoder for Apple Sign-In
I'm trying to implement Apple signIn logic. From documentation I need create JWT with key file I downloaded from apple site.

A lot tutorials starts like this with using org.bouncycastle library:

```<code>private String generateJWT() {
    String path = new ClassPathResource("apple/AuthKey.p8").getFile().getAbsolutePath();
    final PEMParser pemParser = new PEMParser(new FileReader(path));
    final JcaPEMKeyConverter converter = new JcaPEMKeyConverter();
    final PrivateKeyInfo object = (PrivateKeyInfo) pemParser.readObject();
    PrivateKey privateKey = converter.getPrivateKey(object);

    return Jwts.builder()
            .setHeaderParam(JwsHeader.KEY_ID, KEY_ID)
            .setIssuer(TEAM_ID)
            .setAudience("https://appleid.apple.com")
            .setSubject(CLIENT_ID)
            .setExpiration(new Date(System.currentTimeMillis() + (1000 * 60 * 5)))
            .setIssuedAt(new Date(System.currentTimeMillis()))
            .signWith(privateKey, SignatureAlgorithm.ES256)
            .compact();
}
</code>```

But I don't want to use io.jsonwebtoken library, so I need to use spring's JwtEncoder.

Previously I make it only with SecretKey by string value like this:

```<code>@Bean
public JwtEncoder jwtEncoder() {
    byte[] decodedKey = Base64.getDecoder().decode(secret);
    SecretKey secretKey = new SecretKeySpec(decodedKey, "HmacSHA256");
    JWKSource<SecurityContext> immutableSecret = new ImmutableSecret<>(secretKey);
    return new NimbusJwtEncoder(immutableSecret);
}
</code>```

But JWKSource hasn't ability to use PrivateKey, only SecretKey. How I can use JwtEncoder for this case?

Body:
I'm trying to implement Apple signIn logic. From documentation I need create JWT with key file I downloaded from apple site.

A lot tutorials starts like this with using org.bouncycastle library:

private String generateJWT() {
    String path = new ClassPathResource("apple/AuthKey.p8").getFile().getAbsolutePath();
    final PEMParser pemParser = new PEMParser(new FileReader(path));
    final JcaPEMKeyConverter converter = new JcaPEMKeyConverter();
    final PrivateKeyInfo object = (PrivateKeyInfo) pemParser.readObject();
    PrivateKey privateKey = converter.getPrivateKey(object);

    return Jwts.builder()
            .setHeaderParam(JwsHeader.KEY_ID, KEY_ID)
            .setIssuer(TEAM_ID)
            .setAudience("https://appleid.apple.com")
            .setSubject(CLIENT_ID)
            .setExpiration(new Date(System.currentTimeMillis() + (1000 * 60 * 5)))
            .setIssuedAt(new Date(System.currentTimeMillis()))
            .signWith(privateKey, SignatureAlgorithm.ES256)
            .compact();
}

But I don't want to use io.jsonwebtoken library, so I need to use spring's JwtEncoder.

Previously I make it only with SecretKey by string value like this:

@Bean
public JwtEncoder jwtEncoder() {
    byte[] decodedKey = Base64.getDecoder().decode(secret);
    SecretKey secretKey = new SecretKeySpec(decodedKey, "HmacSHA256");
    JWKSource<SecurityContext> immutableSecret = new ImmutableSecret<>(secretKey);
    return new NimbusJwtEncoder(immutableSecret);
}

But JWKSource hasn't ability to use PrivateKey, only SecretKey. How I can use JwtEncoder for this case?


问:
How do I exclude a file from an Angular deployment
I am loading some data from a JSON file in my Angular (19.1) app using HTTP GET.

```<code>  urlDataFile = './assets/data.json';
  data: any = null;

  constructor(
    private _http: HttpClient
  ) {
    this.loadData().subscribe((res) => {
        this.data = res;
    });
  }

  private loadData() {
    return this._http.get(this.urlDataFile);
  }
</code>```

The data file that I develop with, and is held in source control, is a dummy/test file.

Once the application is built for distribution and deployed, the data file will be replaced with an actual data file.

Normally (using as basic default configuration as possible), the file from ./src/assets/data.json gets copied to ./dist/assets/data.json when I do ng build.

How can I exclude just this one file ./src/assets/data.json from being included in my distribution?

Body:
I am loading some data from a JSON file in my Angular (19.1) app using HTTP GET.

  urlDataFile = './assets/data.json';
  data: any = null;

  constructor(
    private _http: HttpClient
  ) {
    this.loadData().subscribe((res) => {
        this.data = res;
    });
  }

  private loadData() {
    return this._http.get(this.urlDataFile);
  }

The data file that I develop with, and is held in source control, is a dummy/test file.

Once the application is built for distribution and deployed, the data file will be replaced with an actual data file.

Normally (using as basic default configuration as possible), the file from ./src/assets/data.json gets copied to ./dist/assets/data.json when I do ng build.

How can I exclude just this one file ./src/assets/data.json from being included in my distribution?


问:
Leaflet on-click circle doesn't work in Python folium
I would like to make the Leaflet circle an on-click feature in my Python folium map.

Unfortunately, the code returns nothing despite no information from the console.

```<code>class Circle(MacroElement):
"""
    https://leafletjs.com/reference.html#circle
"""

_template = Template(
"""
{% macro script(this, kwargs) %}
  function newCircle(e){
   var circle_job = L.Circle().setLatLng(e.latlng).addTo({{this._parent.get_name()}});
   }
         {% endmacro %}
 """
)
</code>```

job_range = Circle()

map.add_child(job_range)

What have I done wrong here?

Body:
I would like to make the Leaflet circle an on-click feature in my Python folium map.

Unfortunately, the code returns nothing despite no information from the console.

class Circle(MacroElement):
"""
    https://leafletjs.com/reference.html#circle
"""

_template = Template(
"""
{% macro script(this, kwargs) %}
  function newCircle(e){
   var circle_job = L.Circle().setLatLng(e.latlng).addTo({{this._parent.get_name()}});
   }
         {% endmacro %}
 """
)

job_range = Circle()

map.add_child(job_range)

What have I done wrong here?


问:
Impossible to use azure automl to forecast time series with context that intercepts training dataset?
I have a very simple question but I cannot seem to find a reasonable solution.

I am using Azure automl to predict time series. So far so good.

As you can see in the image below, I would like to train a model and then later on run it by giving it more recent context. In other words, I would like to train a model from January 2022 to December 2022 and then use it to predict February 2023.

My issue is, I would like to give it context information that is also present in training data. I think this makes perfect sense, so, for example, if I want to predict February 2023 I would like to give it context from January 2023 December 2022, November 2022 etc.

This seems to be impossible. Any overlap between training and context data will give this error:

```<code>"Input prediction data X_pred or input forecast_destination contains dates prior to the latest date in the training data. Please remove prediction rows with datetimes in the training date range or adjust the forecast_destination date".
</code>```

Isn't this a big limitation? What am I missing?

Body:
I have a very simple question but I cannot seem to find a reasonable solution.

I am using Azure automl to predict time series. So far so good.

As you can see in the image below, I would like to train a model and then later on run it by giving it more recent context. In other words, I would like to train a model from January 2022 to December 2022 and then use it to predict February 2023.

My issue is, I would like to give it context information that is also present in training data. I think this makes perfect sense, so, for example, if I want to predict February 2023 I would like to give it context from January 2023 December 2022, November 2022 etc.

This seems to be impossible. Any overlap between training and context data will give this error:

"Input prediction data X_pred or input forecast_destination contains dates prior to the latest date in the training data. Please remove prediction rows with datetimes in the training date range or adjust the forecast_destination date".

Isn't this a big limitation? What am I missing?


问:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3: invalid start byte in pyodbc module
I want to run a sql statement using python module pyodbc in teradata.

I have teradata installed already then I installed pyodbc module using pip.

While executing pyodbc connect I am facing below issue
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3: invalid start byte

Code:

```<code>import pyodbc

pyodbc.pooling=False

conn=r'DRIVER={DRIVER NAME};DBCNAME=DBC_NAME;AUTHENTICATION=KBR5;'

conx=pyodbc.connect(conn)
</code>```
```<code>Traceback (most recent call last):
File "load.py", line 7, in
conx=pyodbc.connect(conn)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3: invalid start byte
</code>```

Body:
I want to run a sql statement using python module pyodbc in teradata.

I have teradata installed already then I installed pyodbc module using pip.

While executing pyodbc connect I am facing below issue
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3: invalid start byte

Code:

import pyodbc

pyodbc.pooling=False

conn=r'DRIVER={DRIVER NAME};DBCNAME=DBC_NAME;AUTHENTICATION=KBR5;'

conx=pyodbc.connect(conn)

Traceback (most recent call last):
File "load.py", line 7, in
conx=pyodbc.connect(conn)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3: invalid start byte


问:
How do I create a pop up that lets the user select which cookies they want to enable or disable?
I'm not looking for the usual, "By using this site...."
Instead I want to code a pop up that'll allow the user to accept all or go through and disable/enable each specific cookie option we use, e.g. Functional, Performance, Marketing, etc.

Currently I've only been able to find WordPress options which is no good as I need to add this to my existing React site.

Something like this:


问:
How can I put my NavBar at the Top of my Calendar in Vue Pwa?
Hi guys I got the following code:

App.vue:

```<code><template>
  <div id="app">
    <NavBar></NavBar>
    <Agenda />
  </div>
</template>

<script>
import Agenda from './components/Agenda'
import NavBar from './components/NavBar.vue'
export default {
  name: 'app',
  components: {
    Agenda,
    NavBar
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

</style>
</code>```

and Navbar.vue:

```<code><template>
  <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
    <header class="mdl-layout__header">
      <div class="mdl-layout__header-row">
        <span class="mdl-layout-title">CropChat</span>
      </div>
    </header>
    <div class="mdl-layout__drawer">
      <span class="mdl-layout-title">CropChat</span>
      <nav class="mdl-navigation">
        <router-link class="mdl-navigation__link" to="/" @click.native="hideMenu">Home</router-link>
        <router-link class="mdl-navigation__link" to="/post" @click.native="hideMenu">Post a picture</router-link>
      </nav>
    </div>
    <main class="mdl-layout__content">
      <div class="page-content">
        <router-view></router-view>
      </div>
    </main>
  </div>
</template>
</code>```

I got the following Issue that my Navbar doesnt respond no idea why :

it just centers all of my components of my Navbar instead of making a normal Navbar at the top of my Calendar. Anyone got any idea what is the problem? Im trying to build a PWA using vue2

Body:
Hi guys I got the following code:

App.vue:

<template>

    <NavBar></NavBar>
    <Agenda />

</template>

and Navbar.vue:

<template>

        CropChat

      CropChat

        <router-link class="mdl-navigation__link" to="/" @click.native="hideMenu">Home</router-link>
        <router-link class="mdl-navigation__link" to="/post" @click.native="hideMenu">Post a picture</router-link>

        <router-view></router-view>

</template>

I got the following Issue that my Navbar doesnt respond no idea why :

it just centers all of my components of my Navbar instead of making a normal Navbar at the top of my Calendar. Anyone got any idea what is the problem? Im trying to build a PWA using vue2


问:
I'm trying to integrate owl-carousel in my Angular project
I created an owl-carousel by following all the steps required. It works fine but I'm not getting exactly what I want. I want to show just 4 items when the screen is 740px upwards, but no matter what I try all the items keeps showing.
This is a link to the Live Share session to the angular project:

I tried using overflow: auto and still nothing happened.
I also tried changing the number of items that showed on that screen size, still nothing.
I need help please. Thanks in advance.


问:
Django static files load combined with css function url() generates weird & string in paths
I have deployed a django website to digital ocean, and storing static files into AWS buckets. So far so good, 'some' of my static files are loading correctly.

For example, files like:

```<code><link rel="icon" href="{% static 'images/logo.svg' %}">
<script src="{% static 'js/jquery-3.3.1.slim.min.js' %}"></script>
</code>```

are loaded totally fine. The generated url when inspecting chrome's dev tools for, say the above logo is:

```<code>https://<REGION>.digitaloceanspaces.com/<BUCKET NAME>/static/images/logo.svg?AWSAccessKeyId=<ACCESS KEY ID>&Signature=<AWS SECRET>
</code>```

which is correct, and the logo shows indeed on my webpage.

Now, the weird thing is that I have some inline
```
<p>which is rendered as (again looking at chrome's dev tool):</p>
```<style>
    header#background-image {
        background-image: url("https://<REGION>.digitaloceanspaces.com/<BUCKET NAME>/static/images/header-background.svg?AWSAccessKeyId=<ACCESS KEY ID>&Signature=<AWS SECRET>&Expires=1673362355");
    }
</style>
```

The reason I mentioned this is 'nearly' ok is because I noticed the & pieces of string in the generated url. If I correct those changing them to simple & and go to the modified link I indeed see my background image...

This is so weird and drives me crazy, anybody got an idea of what is happening?

Body:
I have deployed a django website to digital ocean, and storing static files into AWS buckets. So far so good, 'some' of my static files are loading correctly.

For example, files like:

<link rel="icon" href="{% static 'images/logo.svg' %}">

are loaded totally fine. The generated url when inspecting chrome's dev tools for, say the above logo is:

https://<REGION>.digitaloceanspaces.com/<BUCKET NAME>/static/images/logo.svg?AWSAccessKeyId=<ACCESS KEY ID>&Signature=<AWS SECRET>

which is correct, and the logo shows indeed on my webpage.

Now, the weird thing is that I have some inline

which is rendered as (again looking at chrome's dev tool):

The reason I mentioned this is 'nearly' ok is because I noticed the & pieces of string in the generated url. If I correct those changing them to simple & and go to the modified link I indeed see my background image...

This is so weird and drives me crazy, anybody got an idea of what is happening?


问:
INFORMATION_SCHEMA.SESSIONS_BY_USER returns 0 rows
I am running this

select session_id, user_email, project_id, creation_time FROM region-us.INFORMATION_SCHEMA.SESSIONS_BY_PROJECT WHERE is_active = true AND  creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY);

The query returns 0 rows which I was not expecting. The documentation says the view holds session information for the last 180 days.

Is there a configuration change I need to make in the project to query this view?

thanks in advance.


问:
incrementing the index values based on the previous index

index
A

24
10

48
20

61
30

77
40

78
50

```<code># Define the fixed values in a list
fixed_values = [10, 20, 30, 40, 50]

# Create a DataFrame with the fixed values and fixed indices
df = pd.DataFrame({'A': fixed_values}, index=[24, 48, 61, 77, 88])

def increment_list(lst):
    result = []
    for i in range(len(lst)-1):
        start = float(lst[i])
        end = float(lst[i+1])
        num = np.arange(start, end, 1)
        result.extend(num)
    return result

my_list = df['A'].to_list()
incremented_list = increment_list(my_list)

def round_list(lst):
    return [round(val,3) for val in lst]
rounded_list = round_list(incremented_list)
</code>```

I have defined the above dataframe and read the values of column A to my_list and incremented the values with a step size of 1 such that the resulting list is:

```<code>rounded_list =[10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0]
</code>```

Now I want to add the incremented values to column A in a manner 10,11,12,....20, 21, 22...30,31,32....40,41,42,.....50 such that the indices should also increase based on its previous values available

it should look like this.

index
A

24
10

25
11

26.......
12....

33
19

48
20

49
21

50.....
22.....

57
29

61
30

62....
31......

70
39

77
40

78....
41....

Body:
index
A

24
10

48
20

61
30

77
40

78
50

# Define the fixed values in a list
fixed_values = [10, 20, 30, 40, 50]

# Create a DataFrame with the fixed values and fixed indices
df = pd.DataFrame({'A': fixed_values}, index=[24, 48, 61, 77, 88])

def increment_list(lst):
    result = []
    for i in range(len(lst)-1):
        start = float(lst[i])
        end = float(lst[i+1])
        num = np.arange(start, end, 1)
        result.extend(num)
    return result

my_list = df['A'].to_list()
incremented_list = increment_list(my_list)

def round_list(lst):
    return [round(val,3) for val in lst]
rounded_list = round_list(incremented_list)

I have defined the above dataframe and read the values of column A to my_list and incremented the values with a step size of 1 such that the resulting list is:

rounded_list =[10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0]

Now I want to add the incremented values to column A in a manner 10,11,12,....20, 21, 22...30,31,32....40,41,42,.....50 such that the indices should also increase based on its previous values available

it should look like this.

index
A

24
10

25
11

26.......
12....

33
19

48
20

49
21

50.....
22.....

57
29

61
30

62....
31......

70
39

77
40

78....
41....


问:
Problem with running stable diffusion and getting torch to recognize my Graphics card for the CUDA test
so I've been trying to install Stable diffusion on my computer for the past three days. My computer has a gtx 980, and I have an i7 4790K cpu. I installed my Windows 10 OS on a smaller SSD that I have, while I install almost all games and programs on my other 2TB harddisk. So I think I might have installed Python 3.10.6 on my Harddisk drive (D:), while my scripts are located in appdata on my OS drive (C:).

When I run the webui-user.bat, I get this:

File "D:\SDlocal\launch.py", line 64, in un raise
RuntimeError(message) RuntimeError: Error running command. Command:
"D:\SDlocal\venv\Scripts\python.exe" -c "import torch; assert
torch.cuda.is_available(), 'Torch is not able to use GPU; add
--skip-torch-cuda-test to COMMANDLINE_ARGS variaable to disable this check'"

I Tried following the advice, and added the skip CUDA test to the commandline args in webui-user, but the next error that showed up was:

Installing requirements for Web UI
Traceback (most recent call last):
File "D:\SDlocal\launch.py", line 306, in
prepare_environment()
File "D:\SDlocal\launch.py", line 258, in prepare_environment
run_pip(f"install -r {requirements_file}", "requirements for WebUI")
File "D:\SDlocal\launch.py", line 93, in run_pip
return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
File "D:\SDlocal\launch.py", line 64, in run
raise RuntimeError(message)
RuntimeError: Couldn't install requirements for Web UI.
Command: "D:\SDlocal\venv\Scripts\python.exe" -m pip install -r requirements_versions.txt --prefer-binary
Error code: 1
stdout:

I looked into the launch.py and managed to find that it tries to build an environment and install a specific CUDA and torch version, but I'm not knowledgeable enough to start tinkering with the launch.py file, so I'd like to set up a proper environment to launch python files from my D: drive first, and make sure that it's not my weird setup that's the problem.

As a sidenote, I've looked up the compatible CUDA version, but it failed to run the torch.cuda.is_available(), but I found another thread that helped me look up the proper compatibility between CUDA, my graphics driver as well as the Torch version, and when I installed CUDA 11.6 and the 527,37 graphics driver for my card, I was able to get torch.cuda.is_available() to return true, but whenever I try to launch the webui-user.bat file, It still returns the error that it can't get past the CUDA test.

Thanks for any help regarding this matter, I'm starting to lose the will to continue looking into this matter, but I'm willing to provide any other information you'd need to help me further through this process.

Oh wait, I didn't realize there were 2 parts to the question itself. I've already described the situation, so I'll just write some filler here.


问:
AmCharts-Sankey Chart Sum of node values
How can we get the sum of the nodes in AmChart-Sankey.I am using as like below to get sum of nodes but muddle node values getting double.

```<code>series.nodes.labels.template.setAll({
text: "[bold]{name}[/] (₹{sum})"
-     });
</code>```

If i am using {sumOutgoing} Last node values in sankey are zero.

Body:
How can we get the sum of the nodes in AmChart-Sankey.I am using as like below to get sum of nodes but muddle node values getting double.

series.nodes.labels.template.setAll({
text: "[bold]{name}[/] (₹{sum})"
-     });

If i am using {sumOutgoing} Last node values in sankey are zero.


问:
Greedy subrules and LL(1) grammar in ANTLR4
Suppose I have a grammar like this, and it's LL(1):
(Lexical rules ignored)

```<code>grammar parser_dfa;

drc_parser_start:layer_def derived_layer_def drc_rules;

layer_def: LAYER VAR_NAME NUM;

derived_layer_def:VAR_NAME ASSIGNMENT derived_op_statement;

derived_op_statement: r_and | r_or | r_not ;

r_and: AND op_layer op_layer;

r_or: OR op_layer op_layer;

r_not: NOT op_layer op_layer;

op_layer: LEFT_PAR derived_op_statement RIGHT_PAR | VAR_NAME ;

drc_rules: VAR_NAME_TWO LEFT_BRACKET derived_layer_def check_statement RIGHT_BRACKET;

check_statement: r_and | r_or | r_not ;
</code>```

If I change rule drc_parser_start and drc_rules into this way:

```<code>drc_parser_start:layer_def* derived_layer_def* drc_rules*;
drc_rules: VAR_NAME_TWO LEFT_BRACKET (derived_layer_def | check_statement)* RIGHT_BRACKET;
</code>```

is the whole grammar still in LL(1) style?

If so, how can I write the parsing table of this grammar?

Thank you.

================================================================
Edited:
@kaby76
I put full grammar on:

```<code>grammar parser_dfa;

drc_parser_start:layer_def* derived_layer_def* drc_rules*;

layer_def: LAYER VAR_NAME NUM;

derived_layer_def:VAR_NAME ASSIGNMENT derived_op_statement;

derived_op_statement: r_and | r_or | r_not ;

r_and: AND op_layer op_layer;

r_or: OR op_layer op_layer;

r_not: NOT op_layer op_layer;

op_layer: LEFT_PAR derived_op_statement RIGHT_PAR | VAR_NAME ;

drc_rules: VAR_NAME_TWO LEFT_BRACKET (derived_layer_def | check_statement)* RIGHT_BRACKET;

check_statement: r_and | r_or | r_not ;

LAYER:'LAYER';

NUM:  [1-9][0-9]* | '0' ;

AND: 'AND';

OR: 'OR' ;

NOT: 'NOT' ;

LEFT_PAR:'(' ;

RIGHT_PAR: ')' ;

LEFT_BRACKET:'{';

RIGHT_BRACKET:'}';

VAR_NAME: [A-Za-z_]+ ;

ASSIGNMENT: '=' ;

WS: [ \t\r\n]+ -> channel(HIDDEN) ;

VAR_NAME_TWO:PART_ONE DOT PART_TWO DOT PART_THREE ;
fragment PART_ONE:[A-Za-z_]+ ;
fragment PART_TWO:[A-Za-z_]+ ;
fragment PART_THREE:[0-9]+ ;
fragment DOT: '.' ;
</code>```

I'm just curious whether it's LL(1) or not in both situations(meaning that ANTLR4 subrule greedy symbol * in drc_parser_start and drc_rules enabled or not).If it's LL(1) with symbol * on, I wonder how to write the parsing table.

Body:
Suppose I have a grammar like this, and it's LL(1):
(Lexical rules ignored)

grammar parser_dfa;

drc_parser_start:layer_def derived_layer_def drc_rules;

layer_def: LAYER VAR_NAME NUM;

derived_layer_def:VAR_NAME ASSIGNMENT derived_op_statement;

derived_op_statement: r_and | r_or | r_not ;

r_and: AND op_layer op_layer;

r_or: OR op_layer op_layer;

r_not: NOT op_layer op_layer;

op_layer: LEFT_PAR derived_op_statement RIGHT_PAR | VAR_NAME ;

drc_rules: VAR_NAME_TWO LEFT_BRACKET derived_layer_def check_statement RIGHT_BRACKET;

check_statement: r_and | r_or | r_not ;

If I change rule drc_parser_start and drc_rules into this way:

drc_parser_start:layer_def* derived_layer_def* drc_rules*;
drc_rules: VAR_NAME_TWO LEFT_BRACKET (derived_layer_def | check_statement)* RIGHT_BRACKET;

is the whole grammar still in LL(1) style?

If so, how can I write the parsing table of this grammar?

Thank you.

================================================================
Edited:
@kaby76
I put full grammar on:

grammar parser_dfa;

drc_parser_start:layer_def* derived_layer_def* drc_rules*;

layer_def: LAYER VAR_NAME NUM;

derived_layer_def:VAR_NAME ASSIGNMENT derived_op_statement;

derived_op_statement: r_and | r_or | r_not ;

r_and: AND op_layer op_layer;

r_or: OR op_layer op_layer;

r_not: NOT op_layer op_layer;

op_layer: LEFT_PAR derived_op_statement RIGHT_PAR | VAR_NAME ;

drc_rules: VAR_NAME_TWO LEFT_BRACKET (derived_layer_def | check_statement)* RIGHT_BRACKET;

check_statement: r_and | r_or | r_not ;

LAYER:'LAYER';

NUM:  [1-9][0-9]* | '0' ;

AND: 'AND';

OR: 'OR' ;

NOT: 'NOT' ;

LEFT_PAR:'(' ;

RIGHT_PAR: ')' ;

LEFT_BRACKET:'{';

RIGHT_BRACKET:'}';

VAR_NAME: [A-Za-z_]+ ;

ASSIGNMENT: '=' ;

WS: [ \t\r\n]+ -> channel(HIDDEN) ;

VAR_NAME_TWO:PART_ONE DOT PART_TWO DOT PART_THREE ;
fragment PART_ONE:[A-Za-z_]+ ;
fragment PART_TWO:[A-Za-z_]+ ;
fragment PART_THREE:[0-9]+ ;
fragment DOT: '.' ;

I'm just curious whether it's LL(1) or not in both situations(meaning that ANTLR4 subrule greedy symbol * in drc_parser_start and drc_rules enabled or not).If it's LL(1) with symbol * on, I wonder how to write the parsing table.


问:
How to overlay two video files including audio of each video using ffmpeg"
i would like to merge some music (video file) and singing (video file) into one video file.

i've tried with this:

```<code>ffmpeg -i music.mp4 -itsoffset 2 -i sing01.mp4 -filter_complex  overlay=635:300 test.mp4
</code>```

and everything is fine, except that i cannot hear the singing. what i should add to this command to do the job correctly?

thanks

Body:
i would like to merge some music (video file) and singing (video file) into one video file.

i've tried with this:

ffmpeg -i music.mp4 -itsoffset 2 -i sing01.mp4 -filter_complex  overlay=635:300 test.mp4

and everything is fine, except that i cannot hear the singing. what i should add to this command to do the job correctly?

thanks


问:
Do I have to create a router for every page (component) I create?
I create a router into my proyect

app-routing.module.ts

```<code>import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [
  { path: 'Documentacion', loadChildren: () => import('./pages/documentacion/documentacion.module').then(m => m.DocumentacionModule) },
  { path: 'Main', loadChildren: () => import('./pages/main/main.module').then(m => m.MainModule) },
  { path: '**', redirectTo:'Main' }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
</code>```

but it doesn't work, even if I try creating anchors with router-link or typing the url, the site redirects me to home, or in case the url is ok then the page doesn't load

I tried then creating a router for every page I created and then puf, it worked.

is it mandatory for angular to create a router module for every page (component) I create?

thanks you all

I followed Angular documentation page that talks about router (https://angular.io/guide/router), but it doesn't seems the need to create a router for every page, but the project I created before this one I saw that I was doing so to make it work

UPDATE 1
Hi there, I update with the code in

documentacio-routing.module.ts

```<code>import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DocumentacionComponent } from './documentacion.component';

const routes: Routes = [{ path: '', component: DocumentacionComponent }];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DocumentacionRoutingModule { }
</code>```

what I've figure out is that on the app-routing I wrote forRoot, but in the page I wrote forChild, is it ok to be that way so?

Body:
I create a router into my proyect

app-routing.module.ts

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

const routes: Routes = [
  { path: 'Documentacion', loadChildren: () => import('./pages/documentacion/documentacion.module').then(m => m.DocumentacionModule) },
  { path: 'Main', loadChildren: () => import('./pages/main/main.module').then(m => m.MainModule) },
  { path: '**', redirectTo:'Main' }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

but it doesn't work, even if I try creating anchors with router-link or typing the url, the site redirects me to home, or in case the url is ok then the page doesn't load

I tried then creating a router for every page I created and then puf, it worked.

is it mandatory for angular to create a router module for every page (component) I create?

thanks you all

I followed Angular documentation page that talks about router (https://angular.io/guide/router), but it doesn't seems the need to create a router for every page, but the project I created before this one I saw that I was doing so to make it work

UPDATE 1
Hi there, I update with the code in

documentacio-routing.module.ts

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DocumentacionComponent } from './documentacion.component';

const routes: Routes = [{ path: '', component: DocumentacionComponent }];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class DocumentacionRoutingModule { }

what I've figure out is that on the app-routing I wrote forRoot, but in the page I wrote forChild, is it ok to be that way so?


问:
Nodejs process consumes more memory than actual memory dump size
I've just noticed that pm2 process consumes a ton of memory, but when I tried to take a heap snapshot to figure it out the heap snapshot was 20x more times less.

This is what was inspected:

Then I read some articles covering how to debug heap snaphots and all of them were in vitro experiments. I doubt anyone code like this. All of the heap snaphots I did were healthy, just like any other process with low memory consumption. Does nodejs produce something like runtime cache or functions' calculations results in a form of weak map which is detached from heap snapshot?
Is there any way to restrict nodejs memory usage?


问:
Best Redis Data Type For Distributed Computation
I have an application that needs to use Redis with the following requirements:

A producer storing tens of millions of string records up to 128 bytes each

Indexing the records as each worker needs to access records from its own determined range X to Y in order for multiple workers to be able to process in parallel

Deleting the processed records and storing the results back in redis under a different index

Which redis data type is optimal for this?

I am considering ordered sets, where I would write original strings in one set and results in another, though I have read somewhere that they come with a 64 byte overhead and I'd like to save on memory as much as possible as that allows me to process more records. Another alternative is a simple SET key value where I would index let's say 0-100,000,000 as records to be processed and 100,000,000-200,000,000 as the corresponding result records.

Does anyone know how much memory overhead exists for each solution or can even propose a better one?


问:
Overwriting array in C
Why it is a problem to overwrite value in character array in C.

```<code>#include <stdio.h>
#include<string.h>
int main()
{
char str[]="hello";
printf("%s\n",str);
str="girl";
printf("%s",str);
return 0;
}
</code>```

This throws error. What is the issue in doing this. Can anybody explain.

The value 'girl' is not printing and shows error.

Title: Overwriting array in C

Body:
Why it is a problem to overwrite value in character array in C.

#include <stdio.h>
#include<string.h>
int main()
{
char str[]="hello";
printf("%s\n",str);
str="girl";
printf("%s",str);
return 0;
}

This throws error. What is the issue in doing this. Can anybody explain.

The value 'girl' is not printing and shows error.


问:
Pass CTRL+C to Cmake custom command under VSCode
I have a Cmake custom target that runs a command-line tool which has to be stopped using CTRL+C. If I run the tool from the terminal, it stops on CTRL+C just fine, but if I build my custom Cmake target, it's impossible to terminate it. I tried to add the USES_TERMINAL option to the Cmake target, but that doesn't change anything. Is there a Cmake or VSCode option that I have missed which would allow me to send SIGINT to a Cmake command?

Here's a small project to reproduce the situation:

CMakeLists.txt:

cmake_minimum_required(VERSION 3.2.0)
project(test_prj LANGUAGES CXX C)
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON")
add_executable(test_prj main.c)
add_custom_target(test_run COMMAND test_prj USES_TERMINAL)
```
<p>main.c:</p>
<pre class="lang-c prettyprint-override"><code>#include <signal.h>
#include <stdio.h>

char flag = 1;
void sig_handler(int signum) {
    flag = 0;
}

int main(void) {
    signal(SIGINT, sig_handler);
    while(flag);
    printf("success\n");
    return 0;
}
</code>```

Once test_prj is compiled, running it in the terminal

```<code>PS C:\22_Test\build> ./test_prj.exe
<I hit CTRL-C here>
success
</code>```

However, building test_run results in the following output:

```<code>[main] Building folder: 22_Test test_run
[build] Starting build
[proc] Executing command: C:\tools\cmake\3.20.2\bin\cmake.EXE --build c:/22_Test/build --config Debug --target test_run --
[build] [1/3  33% :: 0.108] Building C object CMakeFiles/test_prj.dir/main.c.obj
[build] [2/3  66% :: 0.345] Linking C executable test_prj.exe
[build] [3/3  66% :: 0.345] cmd.exe /C "cd /D C:\22_Test\build && C:\22_Test\build\test_prj.exe"
<I hit CTRL-C here, nothing happens>
</code>```

Body:
I have a Cmake custom target that runs a command-line tool which has to be stopped using CTRL+C. If I run the tool from the terminal, it stops on CTRL+C just fine, but if I build my custom Cmake target, it's impossible to terminate it. I tried to add the USES_TERMINAL option to the Cmake target, but that doesn't change anything. Is there a Cmake or VSCode option that I have missed which would allow me to send SIGINT to a Cmake command?

Here's a small project to reproduce the situation:

CMakeLists.txt:

cmake_minimum_required(VERSION 3.2.0)
project(test_prj LANGUAGES CXX C)
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON")
add_executable(test_prj main.c)
add_custom_target(test_run COMMAND test_prj USES_TERMINAL)

main.c:

#include <signal.h>
#include <stdio.h>

char flag = 1;
void sig_handler(int signum) {
    flag = 0;
}

int main(void) {
    signal(SIGINT, sig_handler);
    while(flag);
    printf("success\n");
    return 0;
}

Once test_prj is compiled, running it in the terminal

PS C:\22_Test\build> ./test_prj.exe

success

However, building test_run results in the following output:

[main] Building folder: 22_Test test_run
[build] Starting build
[proc] Executing command: C:\tools\cmake\3.20.2\bin\cmake.EXE --build c:/22_Test/build --config Debug --target test_run --
[build] [1/3  33% :: 0.108] Building C object CMakeFiles/test_prj.dir/main.c.obj
[build] [2/3  66% :: 0.345] Linking C executable test_prj.exe
[build] [3/3  66% :: 0.345] cmd.exe /C "cd /D C:\22_Test\build && C:\22_Test\build\test_prj.exe"


问:
Powershell ignore errors, when zipping files
I'm trying to zip specific files however on some files powershell breaks due to the charachter limit of 256, I know I can can alter this y changing registry keys. But I kind of want to ignore this error and write it to a file and zip this error file into the created archive.

However it seems whenever I run this code and an errors appears it does not continue with the code but rather breaks it midway.

If anyone could help it would be much appriciated.
Here is the code:

```<code>try { Add-Type -assembly "system.io.compression.filesystem";
                [io.compression.zipfile]::CreateFromDirectory('C:\Windows\Temp\XYZ\directoryToZip',
                'C:\zippedXYZ.zip')}
catch { Write-Output $_ | Out-File -Append -FilePath C:\Windows\Temp\XYZ\Error.txt;
                Compress-Archive -Update C:\Windows\Temp\XYZ\Error.txt C:\zippedXYZ.zip}
</code>```

Body:
I'm trying to zip specific files however on some files powershell breaks due to the charachter limit of 256, I know I can can alter this y changing registry keys. But I kind of want to ignore this error and write it to a file and zip this error file into the created archive.

However it seems whenever I run this code and an errors appears it does not continue with the code but rather breaks it midway.

If anyone could help it would be much appriciated.
Here is the code:

try { Add-Type -assembly "system.io.compression.filesystem";
                [io.compression.zipfile]::CreateFromDirectory('C:\Windows\Temp\XYZ\directoryToZip',
                'C:\zippedXYZ.zip')}
catch { Write-Output $_ | Out-File -Append -FilePath C:\Windows\Temp\XYZ\Error.txt;
                Compress-Archive -Update C:\Windows\Temp\XYZ\Error.txt C:\zippedXYZ.zip}


问:
How to plot the noise points brighter/smaller?
I just started to work with sklearn and DBScan to cluster my Dataframe. Everything works, I just want to plot the noise points brighter and smaller than the other clusters
how can I do that in python?

This is my code

```<code>dbscan = DBSCAN(eps=0.03, min_samples=35).fit(df_1z) # fitting the model
labels = dbscan.labels\_  # getting the labels
df_1z\['cluster'\]= dbscan.labels\_
df_1mean = df_1z.groupby('cluster').mean()

fig,ax1 = plt.subplots()
ax1.scatter(df_1z\['WMZ RÃ¼cklauftemperatur \[Â°C\]\_x'\],df_1z\['WMZ Leistung \[kW\]\_x'\], c=labels,  cmap= "plasma", s=10) # plotting the clusters
x2=ax1.twinx()
x2.scatter(df_1mean\['WMZ RÃ¼cklauftemperatur \[Â°C\]\_x'\], df_1mean\['WMZ Leistung \[kW\]\_x'\], s=30)
ax1.set_ylim(0,250)
x2.set_ylim(0,250)
ax1.set_xlabel("Rücklauftemperatur in °C") # X-axis label
ax1.set_ylabel("Leistung in kW") # Y-axis label
plt.title('Datafram1 / 160007024')
plt.show() # showing the plot
</code>```

Body:
I just started to work with sklearn and DBScan to cluster my Dataframe. Everything works, I just want to plot the noise points brighter and smaller than the other clusters
how can I do that in python?

This is my code

dbscan = DBSCAN(eps=0.03, min_samples=35).fit(df_1z) # fitting the model
labels = dbscan.labels\_  # getting the labels
df_1z\['cluster'\]= dbscan.labels\_
df_1mean = df_1z.groupby('cluster').mean()

fig,ax1 = plt.subplots()
ax1.scatter(df_1z\['WMZ RÃ¼cklauftemperatur \[Â°C\]\_x'\],df_1z\['WMZ Leistung \[kW\]\_x'\], c=labels,  cmap= "plasma", s=10) # plotting the clusters
x2=ax1.twinx()
x2.scatter(df_1mean\['WMZ RÃ¼cklauftemperatur \[Â°C\]\_x'\], df_1mean\['WMZ Leistung \[kW\]\_x'\], s=30)
ax1.set_ylim(0,250)
x2.set_ylim(0,250)
ax1.set_xlabel("Rücklauftemperatur in °C") # X-axis label
ax1.set_ylabel("Leistung in kW") # Y-axis label
plt.title('Datafram1 / 160007024')
plt.show() # showing the plot


问:
docker run - Client.Timeout exceeded while awaiting headers
I downloaded docker desktop on my Windows 10. When I try to:

```<code>docker run -d -p 80:80 docker/getting-started
</code>```

it gives response

```<code>unable to find image ... localy
</code>```

OK, there is no problem but next it should start to download that image but I am getting:

```<code>docker: Error response from daemon: Get https://registry-docker-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
</code>```

I am using vpn to network connection

Body:
I downloaded docker desktop on my Windows 10. When I try to:

docker run -d -p 80:80 docker/getting-started

it gives response

unable to find image ... localy

OK, there is no problem but next it should start to download that image but I am getting:

docker: Error response from daemon: Get https://registry-docker-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).

I am using vpn to network connection


问:
Mount propagation of virtual kernel filesystems and read-only option
I'm trying to mount /sys and /sys/kernel/security as read-only on custom location with slave mount propagation. With kernel below 4.15 read-only option propagates to the original mount /sys/kernel/security. With newer kernel version it doesn't propagate, so it looks like there was a bug in kernel fixed, but it doesn't propagate even if the custom mountpoint (here /mnt/root/sys) is shared. How to explain this?

Steps to reproduce:

```<code># mkdir -p /mnt/host_root/sys
# mount -o ro -t sysfs sys /mnt/host_root/sys
# mount --make-rslave /mnt/host_root/sys
# mount -o ro -t securityfs securityfs /mnt/host_root/sys/kernel/security
</code>```

Result on CentOS 7 (kernel 3.10) or Ubuntu 18.04 LTS (kernel 4.15):

```<code>$ findmnt -o TARGET,PROPAGATION,OPTIONS
TARGET                                PROPAGATION OPTIONS
/                                     shared      rw,relatime,errors=remount-ro,data=ordered
├─/sys                                shared      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security              shared      ro,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                    shared      ro,nosuid,nodev,noexec,mode=755
│ │ ├─/sys/fs/cgroup/unified          shared      rw,nosuid,nodev,noexec,relatime,nsdelegate
│ │ ├─/sys/fs/cgroup/systemd          shared      rw,nosuid,nodev,noexec,relatime,xattr,name=systemd
│ │ ├─/sys/fs/cgroup/devices          shared      rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/memory           shared      rw,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/rdma             shared      rw,nosuid,nodev,noexec,relatime,rdma
│ │ ├─/sys/fs/cgroup/net_cls,net_prio shared      rw,nosuid,nodev,noexec,relatime,net_cls,net_prio
│ │ ├─/sys/fs/cgroup/hugetlb          shared      rw,nosuid,nodev,noexec,relatime,hugetlb
│ │ ├─/sys/fs/cgroup/cpu,cpuacct      shared      rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
│ │ ├─/sys/fs/cgroup/blkio            shared      rw,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/freezer          shared      rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/cpuset           shared      rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/perf_event       shared      rw,nosuid,nodev,noexec,relatime,perf_event
│ │ └─/sys/fs/cgroup/pids             shared      rw,nosuid,nodev,noexec,relatime,pids
│ ├─/sys/fs/pstore                    shared      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/debug                 shared      rw,relatime
│ ├─/sys/fs/fuse/connections          shared      rw,relatime
│ └─/sys/kernel/config                shared      rw,relatime
├─/proc                               shared      rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc          shared      rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12645
├─/dev                                shared      rw,nosuid,relatime,size=1996564k,nr_inodes=499141,mode=755
│ ├─/dev/pts                          shared      rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/shm                          shared      rw,nosuid,nodev
│ ├─/dev/hugepages                    shared      rw,relatime,pagesize=2M
│ └─/dev/mqueue                       shared      rw,relatime
├─/run                                shared      rw,nosuid,noexec,relatime,size=403944k,mode=755
│ ├─/run/lock                         shared      rw,nosuid,nodev,noexec,relatime,size=5120k
│ ├─/run/user/1000                    shared      rw,nosuid,nodev,relatime,size=403940k,mode=700,uid=1000,gid=1000
│ └─/run/docker/netns/default         shared      rw
├─/boot                               shared      rw,relatime,block_validity,barrier,user_xattr,acl
├─/tmp                                shared      rw,relatime,size=1048576k
└─/mnt/root/sys                       private     ro,relatime
  └─/mnt/root/sys/kernel/security     private     ro,relatime
</code>```

Result on Ubuntu 22.04 LTS (kernel 5.15), mount --make-rslave /mnt/host_root/sys is skipped

```<code>$ findmnt -o TARGET,PROPAGATION,OPTIONS
TARGET                                        PROPAGATION   OPTIONS
/                                             shared        rw,relatime
├─/sys                                        shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security                      shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                            shared        rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
│ ├─/sys/fs/pstore                            shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf                               shared        rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug                         shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/tracing                       shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections                  shared        rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config                        shared        rw,nosuid,nodev,noexec,relatime
├─/proc                                       shared        rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc                  shared        rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=24581
│   └─/proc/sys/fs/binfmt_misc                shared        rw,nosuid,nodev,noexec,relatime
├─/dev                                        shared        rw,nosuid,relatime,size=1951612k,nr_inodes=487903,mode=755,inode64
│ ├─/dev/pts                                  shared        rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/shm                                  shared        rw,nosuid,nodev,inode64
│ ├─/dev/hugepages                            shared        rw,relatime,pagesize=2M
│ └─/dev/mqueue                               shared        rw,nosuid,nodev,noexec,relatime
├─/run                                        shared        rw,nosuid,nodev,noexec,relatime,size=401680k,mode=755,inode64
│ ├─/run/lock                                 shared        rw,nosuid,nodev,noexec,relatime,size=5120k,inode64
│ ├─/run/user/1000                            shared        rw,nosuid,nodev,relatime,size=401676k,nr_inodes=100419,mode=700,uid=1000,gid=1000,inode64
│ ├─/run/credentials/systemd-sysusers.service shared        ro,nosuid,nodev,noexec,relatime,mode=700
│ └─/run/docker/netns/default                 shared        rw
├─/boot                                       shared        rw,relatime
└─/mnt/root/sys                               shared        ro,relatime
  └─/mnt/root/sys/kernel/security             shared        ro,relatime
</code>```

Body:
I'm trying to mount /sys and /sys/kernel/security as read-only on custom location with slave mount propagation. With kernel below 4.15 read-only option propagates to the original mount /sys/kernel/security. With newer kernel version it doesn't propagate, so it looks like there was a bug in kernel fixed, but it doesn't propagate even if the custom mountpoint (here /mnt/root/sys) is shared. How to explain this?

Steps to reproduce:

# mkdir -p /mnt/host_root/sys
# mount -o ro -t sysfs sys /mnt/host_root/sys
# mount --make-rslave /mnt/host_root/sys
# mount -o ro -t securityfs securityfs /mnt/host_root/sys/kernel/security

Result on CentOS 7 (kernel 3.10) or Ubuntu 18.04 LTS (kernel 4.15):

$ findmnt -o TARGET,PROPAGATION,OPTIONS
TARGET                                PROPAGATION OPTIONS
/                                     shared      rw,relatime,errors=remount-ro,data=ordered
├─/sys                                shared      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security              shared      ro,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                    shared      ro,nosuid,nodev,noexec,mode=755
│ │ ├─/sys/fs/cgroup/unified          shared      rw,nosuid,nodev,noexec,relatime,nsdelegate
│ │ ├─/sys/fs/cgroup/systemd          shared      rw,nosuid,nodev,noexec,relatime,xattr,name=systemd
│ │ ├─/sys/fs/cgroup/devices          shared      rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/memory           shared      rw,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/rdma             shared      rw,nosuid,nodev,noexec,relatime,rdma
│ │ ├─/sys/fs/cgroup/net_cls,net_prio shared      rw,nosuid,nodev,noexec,relatime,net_cls,net_prio
│ │ ├─/sys/fs/cgroup/hugetlb          shared      rw,nosuid,nodev,noexec,relatime,hugetlb
│ │ ├─/sys/fs/cgroup/cpu,cpuacct      shared      rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
│ │ ├─/sys/fs/cgroup/blkio            shared      rw,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/freezer          shared      rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/cpuset           shared      rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/perf_event       shared      rw,nosuid,nodev,noexec,relatime,perf_event
│ │ └─/sys/fs/cgroup/pids             shared      rw,nosuid,nodev,noexec,relatime,pids
│ ├─/sys/fs/pstore                    shared      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/debug                 shared      rw,relatime
│ ├─/sys/fs/fuse/connections          shared      rw,relatime
│ └─/sys/kernel/config                shared      rw,relatime
├─/proc                               shared      rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc          shared      rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12645
├─/dev                                shared      rw,nosuid,relatime,size=1996564k,nr_inodes=499141,mode=755
│ ├─/dev/pts                          shared      rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/shm                          shared      rw,nosuid,nodev
│ ├─/dev/hugepages                    shared      rw,relatime,pagesize=2M
│ └─/dev/mqueue                       shared      rw,relatime
├─/run                                shared      rw,nosuid,noexec,relatime,size=403944k,mode=755
│ ├─/run/lock                         shared      rw,nosuid,nodev,noexec,relatime,size=5120k
│ ├─/run/user/1000                    shared      rw,nosuid,nodev,relatime,size=403940k,mode=700,uid=1000,gid=1000
│ └─/run/docker/netns/default         shared      rw
├─/boot                               shared      rw,relatime,block_validity,barrier,user_xattr,acl
├─/tmp                                shared      rw,relatime,size=1048576k
└─/mnt/root/sys                       private     ro,relatime
  └─/mnt/root/sys/kernel/security     private     ro,relatime

Result on Ubuntu 22.04 LTS (kernel 5.15), mount --make-rslave /mnt/host_root/sys is skipped

$ findmnt -o TARGET,PROPAGATION,OPTIONS
TARGET                                        PROPAGATION   OPTIONS
/                                             shared        rw,relatime
├─/sys                                        shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security                      shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                            shared        rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
│ ├─/sys/fs/pstore                            shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf                               shared        rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug                         shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/tracing                       shared        rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections                  shared        rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config                        shared        rw,nosuid,nodev,noexec,relatime
├─/proc                                       shared        rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc                  shared        rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=24581
│   └─/proc/sys/fs/binfmt_misc                shared        rw,nosuid,nodev,noexec,relatime
├─/dev                                        shared        rw,nosuid,relatime,size=1951612k,nr_inodes=487903,mode=755,inode64
│ ├─/dev/pts                                  shared        rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/shm                                  shared        rw,nosuid,nodev,inode64
│ ├─/dev/hugepages                            shared        rw,relatime,pagesize=2M
│ └─/dev/mqueue                               shared        rw,nosuid,nodev,noexec,relatime
├─/run                                        shared        rw,nosuid,nodev,noexec,relatime,size=401680k,mode=755,inode64
│ ├─/run/lock                                 shared        rw,nosuid,nodev,noexec,relatime,size=5120k,inode64
│ ├─/run/user/1000                            shared        rw,nosuid,nodev,relatime,size=401676k,nr_inodes=100419,mode=700,uid=1000,gid=1000,inode64
│ ├─/run/credentials/systemd-sysusers.service shared        ro,nosuid,nodev,noexec,relatime,mode=700
│ └─/run/docker/netns/default                 shared        rw
├─/boot                                       shared        rw,relatime
└─/mnt/root/sys                               shared        ro,relatime
  └─/mnt/root/sys/kernel/security             shared        ro,relatime