WPF 滑動條樣式

效果圖:

淺色:

深色:

滑動條部分代碼:

 <Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}"><Setter Property="OverridesDefaultStyle" Value="true"/><Setter Property="Background" Value="Transparent"/><Setter Property="Focusable" Value="false"/><Setter Property="IsTabStop" Value="false"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type RepeatButton}"><Rectangle RadiusX="5" RadiusY="5" Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/></ControlTemplate></Setter.Value></Setter></Style><SolidColorBrush x:Key="SliderThumb.Static.Background" Color="#FFF0F0F0"/><SolidColorBrush x:Key="SliderThumb.Static.Border" Color="#FFACACAC"/><SolidColorBrush x:Key="SliderThumb.Static.Foreground" Color="#FFE5E5E5"/><SolidColorBrush x:Key="SliderThumb.MouseOver.Background" Color="#FFDCECFC"/><SolidColorBrush x:Key="SliderThumb.MouseOver.Border" Color="#FF7Eb4EA"/><SolidColorBrush x:Key="SliderThumb.Pressed.Background" Color="#FFDAECFC"/><SolidColorBrush x:Key="SliderThumb.Pressed.Border" Color="#FF569DE5"/><SolidColorBrush x:Key="SliderThumb.Disabled.Background" Color="#FFF0F0F0"/><SolidColorBrush x:Key="SliderThumb.Disabled.Border" Color="#FFD9D9D9"/><SolidColorBrush x:Key="SliderThumb.Track.Background" Color="#FFE7EAEA"/><SolidColorBrush x:Key="SliderThumb.Track.Border" Color="#FFD6D6D6"/><ControlTemplate x:Key="SliderThumbHorizontalDefault" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Width="40" Height="40" Margin="-2,-2,-2,-2" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="#ED9805" SnapsToDevicePixels="True" Stretch="Fill" StrokeThickness="3" UseLayoutRounding="True" VerticalAlignment="Center"><Path.Data><EllipseGeometry Center="30,30" RadiusX="30" RadiusY="30"></EllipseGeometry></Path.Data></Path></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderThumbHorizontalTop" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Data="M 0,6 C0,6 5.5,0 5.5,0 5.5,0 11,6 11,6 11,6 11,18 11,18 11,18 0,18 0,18 0,18 0,6 0,6 z" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="{StaticResource SliderThumb.Static.Border}" SnapsToDevicePixels="True" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="True" VerticalAlignment="Center"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderThumbHorizontalBottom" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Data="M 0,12 C0,12 5.5,18 5.5,18 5.5,18 11,12 11,12 11,12 11,0 11,0 11,0 0,0 0,0 0,0 0,12 0,12 z" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="{StaticResource SliderThumb.Static.Border}" SnapsToDevicePixels="True" Stretch="Fill" StrokeThickness="1" UseLayoutRounding="True" VerticalAlignment="Center"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderHorizontal" TargetType="{x:Type Slider}"><Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True"><Grid><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/><RowDefinition Height="Auto"/></Grid.RowDefinitions><TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,0,0,2" Placement="Top" Grid.Row="0" Visibility="Collapsed"/><TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,2,0,0" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/><Border x:Name="TrackBackground" Background="Transparent"  BorderBrush="Transparent" BorderThickness="1" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center"><Canvas Margin="-6,-1"><Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Height="4.0" Visibility="Hidden"/></Canvas></Border><Track x:Name="PART_Track" Grid.Row="1"><Track.DecreaseRepeatButton><RepeatButton Height="18" Margin="0,0,-5,0" Background="#ED9805" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/></Track.DecreaseRepeatButton><Track.IncreaseRepeatButton><RepeatButton Height="18" Margin="-5,0,0,0" Background="#99999999" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/></Track.IncreaseRepeatButton><Track.Thumb><Thumb x:Name="Thumb" Focusable="False"  OverridesDefaultStyle="True" Template="{StaticResource SliderThumbHorizontalDefault}" VerticalAlignment="Center" /></Track.Thumb></Track></Grid></Border><ControlTemplate.Triggers><Trigger Property="TickPlacement" Value="TopLeft"><Setter Property="Visibility" TargetName="TopTick" Value="Visible"/><Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalTop}"/><Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/></Trigger><Trigger Property="TickPlacement" Value="BottomRight"><Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/><Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalBottom}"/><Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/></Trigger><Trigger Property="TickPlacement" Value="Both"><Setter Property="Visibility" TargetName="TopTick" Value="Visible"/><Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/></Trigger><Trigger Property="IsSelectionRangeEnabled" Value="true"><Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/></Trigger><Trigger Property="IsKeyboardFocused" Value="true"><Setter Property="Foreground" TargetName="Thumb" Value="Blue"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderThumbVerticalDefault" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Data="M0.5,0.5 L18.5,0.5 18.5,11.5 0.5,11.5z" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="{StaticResource SliderThumb.Static.Border}" Stretch="Fill"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderThumbVerticalLeft" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Data="M 6,11 C6,11 0,5.5 0,5.5 0,5.5 6,0 6,0 6,0 18,0 18,0 18,0 18,11 18,11 18,11 6,11 6,11 z" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="{StaticResource SliderThumb.Static.Border}" Stretch="Fill"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderThumbVerticalRight" TargetType="{x:Type Thumb}"><Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"><Path x:Name="grip" Data="M 12,11 C12,11 18,5.5 18,5.5 18,5.5 12,0 12,0 12,0 0,0 0,0 0,0 0,11 0,11 0,11 12,11 12,11 z" Fill="{StaticResource SliderThumb.Static.Background}" Stroke="{StaticResource SliderThumb.Static.Border}" Stretch="Fill"/></Grid><ControlTemplate.Triggers><Trigger Property="IsMouseOver" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/></Trigger><Trigger Property="IsDragging" Value="true"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/></Trigger><Trigger Property="IsEnabled" Value="false"><Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/><Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="SliderVertical" TargetType="{x:Type Slider}"><Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions><TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Margin="0,0,2,0" Placement="Left" Visibility="Collapsed" Width="4"/><TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Margin="2,0,0,0" Placement="Right" Visibility="Collapsed" Width="4"/><Border x:Name="TrackBackground" Background="{StaticResource SliderThumb.Track.Background}" BorderBrush="{StaticResource SliderThumb.Track.Border}" BorderThickness="1" Grid.Column="1" HorizontalAlignment="center" Margin="0,5" Width="4.0"><Canvas Margin="-1,-6"><Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Visibility="Hidden" Width="4.0"/></Canvas></Border><Track x:Name="PART_Track" Grid.Column="1"><Track.DecreaseRepeatButton><RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/></Track.DecreaseRepeatButton><Track.IncreaseRepeatButton><RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/></Track.IncreaseRepeatButton><Track.Thumb><Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource SliderThumbVerticalDefault}" VerticalAlignment="Top"/></Track.Thumb></Track></Grid></Border><ControlTemplate.Triggers><Trigger Property="TickPlacement" Value="TopLeft"><Setter Property="Visibility" TargetName="TopTick" Value="Visible"/><Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbVerticalLeft}"/><Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/></Trigger><Trigger Property="TickPlacement" Value="BottomRight"><Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/><Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbVerticalRight}"/><Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/></Trigger><Trigger Property="TickPlacement" Value="Both"><Setter Property="Visibility" TargetName="TopTick" Value="Visible"/><Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/></Trigger><Trigger Property="IsSelectionRangeEnabled" Value="true"><Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/></Trigger><Trigger Property="IsKeyboardFocused" Value="true"><Setter Property="Foreground" TargetName="Thumb" Value="Blue"/></Trigger></ControlTemplate.Triggers></ControlTemplate><Style x:Key="SliderStyle1" TargetType="{x:Type Slider}"><Setter Property="Width" Value="300"/><Setter Property="Height" Value="40"/><Setter Property="Maximum" Value="100"/><Setter Property="IsMoveToPointEnabled" Value="True"/><Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/><Setter Property="Background" Value="Transparent"/><Setter Property="BorderBrush" Value="Transparent"/><Setter Property="Foreground" Value="{StaticResource SliderThumb.Static.Foreground}"/><Setter Property="Template" Value="{StaticResource SliderHorizontal}"/><Style.Triggers><Trigger Property="Orientation" Value="Vertical"><Setter Property="Template" Value="{StaticResource SliderVertical}"/></Trigger></Style.Triggers></Style>

如果要改滑塊顏色,可以查找SliderThumbHorizontalDefault,修改其中的Stroke屬性

如果要更改滑動條顏色,可以查找SliderHorizontal,修改其中的RepeatButton的Background

將上面代碼放入資源文件中,使用時:

 <Slider  Style="{StaticResource SliderStyle1}" />

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/712511.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/712511.shtml
英文地址,請注明出處:http://en.pswp.cn/news/712511.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【Oracle】Oracle清理日志空間

&#xff08;一&#xff09;通過adrci清理日志空間 1.通過find命令查詢大數據文件 find / -type f -size 100M 2.登錄oracle數據庫服務器用戶 su - oracle 3.執行故障診斷命令 adrci 4.查詢ADR目錄 show home 5.切換到對應目錄 set homepath diag/rdbms/orcl 6.執行日志清理命令…

枚舉類、泛型、API

枚舉類 枚舉類可以實現單例設計模式。 枚舉的常見應用場景&#xff1a;用來表示一組信息&#xff0c;然后作為參數進行傳輸。 泛型 API

Qt 中Qwidget相關屬性

文章目錄 1. QWidget 核心屬性1.1 enabled1.2 geometry1.2.1 window frame 的影響 1.3 windowTitle1.4 windowIcon1.4.1 qrc的使用 1.5 windowOpacity1.6 cursor1.7 focusPolicy1.8 styleSheet 1. QWidget 核心屬性 在 Qt 中, 使? QWidget 類表? “控件”. 像按鈕, 視圖, 輸…

今年Android面試必問的這些技術面,2024Android常見面試題

都說程序員是在吃青春飯&#xff0c;這一點的確有一點對的成分&#xff0c;以前我不這么認為&#xff0c;但隨著年齡的增長&#xff0c;事實告訴我的確是這樣的&#xff0c;過了30以后&#xff0c;就會發現身體各方面指標下降&#xff0c;體力和身心上都多少有點跟不上了&#…

Node.js中的緩存策略和緩存技巧

在Node.js中&#xff0c;緩存策略和緩存技巧是提升應用性能和用戶體驗的關鍵因素。通過有效地利用緩存&#xff0c;我們可以顯著減少系統資源的消耗&#xff0c;加快數據訪問速度&#xff0c;從而提升整體的網站性能。本文將針對Node.js中的緩存策略和緩存技巧展開深入探討&…

Newtonsoft.Json

目錄 引言 1、簡單使用 1.1、官方案例 1.2、JsonConvert 2、特性 2.1、默認模式[JsonObject(MemberSerialization.OptIn/OptOut)] 2.2、序列化為集合JsonArrayAttribute/JsonDictionaryAttribute 2.3、序列化該元素JsonProperty 2.4、忽略元素JsonIgnoreAttribute 2.5、…

iOS CVPixelBufferCreate 創建 CVPixelBufferRef 時屏幕拉伸或像素偏移(花屏)

先說結論&#xff1a; CVPixelBufferCreate 創建的 CVPixelBufferRef 可能由以下的原因導致的&#xff1a; 1.pixelFormatType 格式錯誤&#xff0c;換一下格式嘗試 2.width和height 非 32 的整數倍 3.視頻幀的寬高比非標準比例&#xff08;4:3,16:9,1:1&#xff09; 另外說明&…

今天面試招了個18K的人,從騰訊出來的果然都有兩把刷子···

公司前段時間缺人&#xff0c;也面了不少測試&#xff0c;前面一開始瞄準的就是中級的水準&#xff0c;也沒指望來大牛&#xff0c;提供的薪資在15-20k&#xff0c;面試的人很多&#xff0c;但平均水平很讓人失望。看簡歷很多都是4年工作經驗&#xff0c;但面試中&#xff0c;不…

docker save 命令 docker load 命令 快速復制容器

docker save 命令 docker load 命令 1、docker save 命令2、docker load 命令 1、docker save 命令 docker save 命令用于在系統上把正在使用的某個容器鏡像 導出成容器鏡像文件保存下載&#xff0c;以便在其他系統上導入這個容器鏡像文件 以便快速在其他服務器上啟動相同的容…

讀書筆記:《思考 . 快與慢》- 1 系統1 系統2

《思考 . 快與慢》 [美] 丹尼爾 . 卡尼曼 著 胡曉姣 李愛民 何夢瑩 譯 這本書會改變你的思考方式 利用閑談發現和分析別人犯的錯誤比分析自己的錯誤更容易&#xff0c;也更有意思 在人生最輝煌的時候&#xff0c;我們很難對自己的信念和需求產生懷疑&#xff0c;越是在最…

【Web】Java反序列化之CC2——commons-collections4的新鏈之一

目錄 關于commons-collections4 一個重要的思維模型 觸發Transform的關鍵類&#xff1a;TransformingComparator 反序列化的入口&#xff1a;PriorityQueue Exp 關于commons-collections4 commons-collections4 是 Apache Commons 組件庫中的一個項目&#xff0c;它是對舊…

在Linux上定時執行腳本

在Linux上定時執行腳本通常可以使用 ?cron?任務來實現。?cron?是一個系統服務&#xff0c;用于在預定時間自動執行命令或腳本。下面是如何在Linux上設置定時執行腳本的步驟&#xff1a; 編寫腳本&#xff1a;首先&#xff0c;你需要編寫需要定時執行的腳本文件&#xff0c;…

找不到msvcp140.dll無法運行程序如何處理?分享5種解決方法

在計算機系統運行過程中&#xff0c;如果無法找到必要的動態鏈接庫文件msvcp140.dll&#xff0c;可能會引發一系列的問題與故障。這個特定的dll文件是Microsoft Visual C Redistributable Package的一部分&#xff0c;對于許多基于此編譯環境開發的應用程序至關重要。缺失msvcp…

C++的常用排序(未完待續)

注&#xff1a;本文以升序為例 一、冒泡排序 1.1 操作方法 步驟1比較相鄰元素&#xff0c;如果前者比后者大&#xff0c;則交換它們。步驟2對頭到尾&#xff0c;對所有元素按序執行一輪這樣的操作(這樣可以找到第一最大值)步驟3再從第一個元素開始&#xff0c;重復上述比較操…

jax可微分編程的筆記(8)

jax可微分編程的筆記(8) 第八章 循環神經網絡 神經網絡是可微分編程中最為重要的模型構造形式&#xff0c;也是當代 深度學習的基本組成部分&#xff0c;深度學習中的“深度”一詞&#xff0c;便是對 神經網絡的層數的形容。 8.1 神經網絡的生物學基礎 通過層層近似&#x…

智能駕駛規劃控制理論學習02-基于搜索的路徑規劃方法

目錄 一、路徑搜索問題 二、圖論基礎 三、圖搜索方法 1、廣度優先搜索&#xff08;BFS&#xff09; bfs與dfs的區別 bfs的搜索過程 bfs的算法實現 2、迪杰斯特拉算法&#xff08;Dijkstra&#xff09; 核心思想 優先級隊列 Dijkstra搜索過程 Dijkstra優缺點…

【.NET Core】深入理解IO - FileSteam流

【.NET Core】深入理解IO - FileSteam流 文章目錄 【.NET Core】深入理解IO - FileSteam流一、IO流概述二、文件流FileStream2.1 FileStream概述2.2 FileStream檢測流位置更改2.3 FileStream構造函數2.4 FileStream常用屬性2.5 FileStream.Read方法2.6 FileStream.Write方法2.7…

插混、油混、增程式、輕混、強混,啥區別

這里寫自定義目錄標題 隨著我國新能源汽車的大力推進&#xff0c;電車可以說是世界未來的主流&#xff0c;只不過現在是處在一個過渡時代 這是個好時代&#xff0c;因為我們見證并體驗著歷史過渡的細節 這是個不好的時代&#xff0c;因為我們可能只是未來新新人類的試驗品 幫他…

MyBatis 學習(三)之 MyBatis 全局配置文件

目錄 1 MyBatis 全局配置文件 2 properties 元素 3 setting 設置 4 typeAlianses 別名處理器 5 typeHandler 類型處理器 6 objectFacotry 對象工廠&#xff08;了解&#xff09; 7 plugins 插件&#xff08;了解&#xff09; 8 environments 運行環境 9 databaseIdPro…

今日arXiv最熱大模型論文:點擊即可播放!港中文發布大模型寫歌神器!

一首歌&#xff0c;包含作詞作曲兩個部分。擅長作詞or作曲就已經很牛了。比如方文山是周杰倫的御用作詞人&#xff0c;而周杰倫寫過很多耳熟能詳的曲子。而兼具作詞作曲才華的全能創作人卻是難得一見。 最近港中文發布了一款歌曲創作大模型SongComposer&#xff0c;作詞作曲都…