Customize the appearance style of Menu

<Style TargetType=”{x:Type Menu}”> <Setter Property=”Background” Value=”{DynamicResource LineBrush}” /> <Setter Property=”Foreground” Value=”{DynamicResource WhiteBrush}” /> <Setter Property=”BorderBrush” Value=”{DynamicResource NormalBorderBrush}” /> <Setter Property=”SnapsToDevicePixels” Value=”True” /> <Setter Property=”Template”> <Setter.Value> <ControlTemplate TargetType=”{x:Type Menu}”> <Grid> <Border Margin=”1″ x:Name=”Border” BorderBrush=”{TemplateBinding BorderBrush}” BorderThickness=”{TemplateBinding BorderThickness}” /> <StackPanel Background=”{TemplateBinding Background}” IsItemsHost=”True” ClipToBounds=”True” Orientation=”Horizontal” /> </Grid> <ControlTemplate.Triggers> <Trigger Property=”IsEnabled” Value=”False”> <Setter Property=”Background” Value=”{DynamicResource DisabledBackgroundBrush}” TargetName=”Border” /> […]

2023 Xiangshan Cup reappears

It is better to have a local one and a cloud one. The questions this time are relatively simple, but there will still be some minor problems here and there. Senior W said: There are many changes in Android questions. Find functions in so or find functions in resource files (some main functions are loaded […]

VSYNC-app/VSYNC-appSf/VSYNC-sf analysis appears on Android 13/14 high version SurfaceFlinger

Problem background: Students who know vsync about surfaceflinger may know that vsync is a metronome, which is mainly used to control rhythmic rendering to prevent screen tearing and other phenomena. Generally vsync has two parts: The vsync part of the app controls the rhythmic frame loading of each app. The surfaceflinger part vsync controls the […]

WebLogic deserialization vulnerability (CVE-2019-2890) reappears

1. Vulnerability introduction On October 15, 2019, Oracle officially released the October 2019 security update announcement, which contains a high-risk vulnerability that can cause RCE remote arbitrary code execution. The vulnerability number is CVE-2019-2890. When Weblogic uses the T3 protocol to make remote resource loading calls, it will perform blacklist filtering by default to ensure […]

Edabit Algorithm Bacon Encryption: Hidden under the AppearanceHidden in Plain Sight

Hidden in Plain Sight cryptography simulation Instructions This challenge makes use of a modified Baconian (Francis Bacon) cipher. The following is an example of a (modified) Baconian ciphertext: ciphertext = “KNowlEDgE ITsElf Is power.” The peculiar capitalization might, at first glance, suggest that either the lowercase or uppercase letters contain, or code for, the hidden […]

[Solved] MySQL: Wrong data appears when executing sql query (caused by MySQL hidden mechanism-type conversion)

Table of Contents Problem symptoms: problem analysis: in conclusion: Solution: expand: Problem phenomenon: A very strange bug was discovered during project development today: As shown in the figure, I executed a sql query in the database with “dept_id = 1712651046956421123” as the condition, but the query result showed: dept_id is 1712651046956421122. At that time, I […]

Customize the appearance style of ContextMenu

<!–Customize the appearance style of ContextMenu–> <Style x:Key=”ContextMenyStyle” TargetType=”{x:Type ContextMenu}”> <Setter Property=”SnapsToDevicePixels” Value=”true”/> <Setter Property=”OverridesDefaultStyle” Value=”true”/> <Setter Property=”Grid.IsSharedSizeScope” Value=”true”/> <Setter Property=”Focusable” Value=”false” /> <Setter Property=”HasDropShadow” Value=”true”/> <Setter Property=”BorderThickness” Value=”{TemplateBinding BorderThickness}” /> <Setter Property=”Template”> <Setter.Value> <ControlTemplate TargetType=”{x:Type ContextMenu}”> <Border Name=”Border” Background=”{DynamicResource BorderBrush}” BorderBrush=”{DynamicResource NormalBorderBrush}” BorderThickness=”1″ > <StackPanel IsItemsHost=”true” KeyboardNavigation.DirectionalNavigation=”Cycle” /> </Border> <ControlTemplate.Triggers> <Trigger Property=”HasDropShadow” Value=”true”> <Setter […]

Resolve WARNING: You do not appear to have an NVIDIA GPU supported by the 430.34 NVIDIA Linux graph

Table of Contents Resolve WARNING: You do not appear to have an NVIDIA GPU supported by the 430.34 NVIDIA Linux graph Check graphics card model Find supported driver versions Install appropriate drivers Verify driver installation in conclusion Sample code NVIDIA graphics card model PyCUDA Resolve WARNING: You do not appear to have an NVIDIA GPU […]