`
gstarwd
  • 浏览: 1569003 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

新开发的silverlight视频播放器,

阅读更多

http://www.chenjiliang.com/Article/View.aspx?ArticleID=13574&TypeID=99

再看设计2008-11-22修改为最新版本


 

 

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
             xmlns:d="http://schemas.microsoft.com/expression/blend/2006" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             mc:Ignorable="d"      
             x:Class="Kkun.KkunMovie"     
             Width="600" Height="400" 
             x:Name="GlobeFrame" Foreground="#FF1D1D1D" Background="#FF1D1D1D">
    <UserControl.Resources>
        <Style x:Name="VolumeSliderStyle" TargetType="Rectangle">
            <Setter Property="Fill" Value="#FF414141"></Setter>
            <Setter Property="Stroke" Value="#002A2A29"></Setter>
            <Setter Property="StrokeThickness" Value="0"></Setter>
            <Setter Property="RadiusX" Value="0"></Setter>
            <Setter Property="RadiusY" Value="0"></Setter>
            <Setter Property="HorizontalAlignment" Value="Right"></Setter>
            <Setter Property="VerticalAlignment" Value="Top"></Setter>
            <Setter Property="Height" Value="20"></Setter>
            <Setter Property="Cursor" Value="Hand"></Setter>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="Frame" Width="Auto" Height="Auto">
        <!--FrameIframe-->
        <Rectangle Fill="#FF1D1D1D" Stroke="#FF2A2A29" RadiusX="10" RadiusY="10" Margin="0,0,0,0" x:Name="FrameIframe" d:IsLocked="True" />
        <!--播放区框架-->
        <Grid Margin="10,30,10,11" x:Name="播放区框架">
            <MediaElement x:Name="TstringMovieObject" Margin="2,2,2,31" Source="111.WMV" Canvas.ZIndex="10"/>
            <!--PlayScreen-->
            <Rectangle Stroke="#FF2A2A29" StrokeThickness="1" RadiusX="0" RadiusY="0" Margin="0,0,0,30" x:Name="PlayScreen" Fill="#FF000000" />
            <!--播放状态切换-->
            <TextBlock x:Name="ControlPlay" Cursor="Hand" HorizontalAlignment="Left" Margin="0,0,0,2" VerticalAlignment="Bottom" Width="Auto" Height="Auto" FontSize="16" Foreground="#FFFFFFFF" Text="播放" TextWrapping="Wrap"/>
            <!--音量控制-->
            <Grid HorizontalAlignment="Right" Margin="0,10,10,50" x:Name="VolumeSlider" VerticalAlignment="Center" Width="Auto" Height="Auto" Canvas.ZIndex="100" Background="#00000000">
                <Rectangle x:Name="_1" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Top" Width="30" Height="21"/>
                <Rectangle x:Name="_2" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,20,0,0" VerticalAlignment="Top" Width="30" Height="21"/>
                <Rectangle x:Name="_3" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,40,0,0" VerticalAlignment="Top" Width="29" Height="21"/>
                <Rectangle x:Name="_4" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,60,0,0" VerticalAlignment="Top" Width="28" Height="21"/>
                <Rectangle x:Name="_5" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,80,0,0" VerticalAlignment="Top" Width="27" Height="21"/>
                <Rectangle x:Name="_6" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,100,0,0" VerticalAlignment="Top" Width="26" Height="21"/>
                <Rectangle x:Name="_7" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,120,0,0" VerticalAlignment="Top" Width="25" Height="21"/>
                <Rectangle x:Name="_8" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,140,0,0" VerticalAlignment="Top" Width="24" Height="21"/>
                <Rectangle x:Name="_9" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,160,0,0" VerticalAlignment="Top" Width="23" Height="21"/>
                <Rectangle x:Name="_10" Fill="#FF414141" Stroke="#002A2A29" StrokeThickness="0" RadiusX="0" RadiusY="0" HorizontalAlignment="Right" Margin="0,180,0,0" VerticalAlignment="Top" Width="22" Height="21"/>
            </Grid>
            <Grid Margin="40,0,0,2" x:Name="SliderProcessBar" VerticalAlignment="Bottom" Height="20" HorizontalAlignment="Stretch" Canvas.ZIndex="9">
                <!--加载进度-->
                <Grid x:Name="DownloadedPercent" Canvas.ZIndex="11" HorizontalAlignment="Left" Width="Auto">
                    <Rectangle x:Name="TstringSliderLoaded" Cursor="Hand" Fill="#FF4F4F4F" Stroke="#00A5A5A5"  StrokeThickness="0" RadiusX="5" RadiusY="5" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" Margin="0,0,0,0" >
                        <Rectangle.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                <SkewTransform AngleX="0" AngleY="0"/>
                                <RotateTransform Angle="0"/>
                                <TranslateTransform X="0" Y="0"/>
                            </TransformGroup>
                        </Rectangle.RenderTransform>
                    </Rectangle>
                    <TextBlock x:Name="TstringSliderLoadedPercentText" HorizontalAlignment="Right" Margin="0,0,10,0" Width="Auto" FontFamily="Verdana" FontSize="10" FontWeight="Normal" Foreground="#FF9D9D9D" Text="56%" TextWrapping="Wrap" VerticalAlignment="Center" />
                </Grid>
                <!--播放进度-->
                <Rectangle x:Name="TstringPlayState" Cursor="Hand" Canvas.ZIndex="12" Stroke="#00A5A5A5" StrokeThickness="2" RadiusX="5" RadiusY="5" Width="1" HorizontalAlignment="Left">
                    <Rectangle.Resources>
                        <SolidColorBrush x:Key="BrushVistaStyle" Color="#FF3D3838"/>
                    </Rectangle.Resources>
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0.524,0.498" StartPoint="0.524,0.502">
                            <GradientStop Color="#FF313131" Offset="0.0"/>
                            <GradientStop Color="#FF414141" Offset="1"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <!--播放进度背景-->
                <Rectangle x:Name="TstringSliderBg" Cursor="Hand" Canvas.ZIndex="10" Fill="#FF767676" Stroke="#FF1A1A1A" StrokeThickness="0" RadiusX="5" RadiusY="5" OpacityMask="#FF313131" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" Margin="0,0,0,0">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>
            </Grid>
        </Grid>
        <!--右上角装饰方框-->
        <Grid Margin="0,8,20,0" x:Name="右上角装饰方框" VerticalAlignment="Top" Height="15" HorizontalAlignment="Right" Width="Auto" d:IsLocked="True">
            <!--影片合适大小-->
            <Rectangle x:Name="tPlayButton" ToolTipService.ToolTip="播放" Cursor="Hand" Fill="#FF5A5A5A" Stroke="#FF2A2A29" StrokeThickness="0" RadiusX="2" RadiusY="2" Width="15" HorizontalAlignment="Left" Margin="0,0,0,0"/>
            <!--影片合适大小-->
            <Rectangle x:Name="tFullScreenButton" ToolTipService.ToolTip="全屏" Cursor="Hand" Fill="#FF5A5A5A" Stroke="#FF2A2A29" StrokeThickness="0" RadiusX="2" RadiusY="2" Margin="17,0,0,0" HorizontalAlignment="Left" Width="15"/>
            <!--静音-->
            <Rectangle x:Name="tMutedButton" ToolTipService.ToolTip="静音" Cursor="Hand" Fill="#FF5A5A5A" Stroke="#FF2A2A29" StrokeThickness="0" RadiusX="2" RadiusY="2" Width="15" HorizontalAlignment="Left" Margin="34,0,0,0"/>
            <!--循环播放-->
            <Rectangle x:Name="tLoop" ToolTipService.ToolTip="循环" Cursor="Hand" Fill="#FF5A5A5A" Stroke="#FF2A2A29" StrokeThickness="0" RadiusX="2" RadiusY="2" Width="15" HorizontalAlignment="Left" Margin="51,0,0,0"/>
        </Grid>
        <!--网址-->
        <TextBlock Cursor="Hand" HorizontalAlignment="Left" Margin="10,10,0,0" x:Name="网址" VerticalAlignment="Top" Width="Auto" Height="Auto" Foreground="#FFAAAAAA" Text="tstring.com.cn" TextWrapping="Wrap" d:IsLocked="True"/>
        <!--提示信息-->
        <TextBlock HorizontalAlignment="Center" Margin="0,0,0,0" x:Name="tbInfo" VerticalAlignment="Center" FontSize="20" FontWeight="Bold" Text="缓冲" TextWrapping="Wrap"/>
    </Grid>
</UserControl>

 

 

最后源码2008-11-22修改为最新版本

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Kkun
{
    public partial class KkunMovie : UserControl
    {
        public bool IsLeftButtonPressed = false;
        public bool IsLoop = false;

        public KkunMovie()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(TstringMovieControl_Loaded);
        }
        void TstringMovieControl_Loaded(object sender, RoutedEventArgs e)
        {
            InitializeEvent();
        }

        private void InitializeEvent()
        {
            tbInfo.Text = string.Empty;
            VolumeSlider.Opacity = 0;
            VolumeSlider.MouseEnter += new MouseEventHandler(VolumeSlider_MouseEnter);
            VolumeSlider.MouseLeave += new MouseEventHandler(VolumeSlider_MouseLeave);

            TstringMovieObject.MediaOpened += new RoutedEventHandler(TstringMovieObject_MediaOpened);
            TstringMovieObject.DownloadProgressChanged += new RoutedEventHandler(TstringMovieObject_DownloadProgressChanged);
            TstringMovieObject.MarkerReached += new TimelineMarkerRoutedEventHandler(TstringMovieObject_MarkerReached);
            TstringMovieObject.MediaEnded += new RoutedEventHandler(TstringMovieObject_MediaEnded);
            TstringMovieObject.CurrentStateChanged += new RoutedEventHandler(TstringMovieObject_CurrentStateChanged);


            ControlPlay.MouseLeftButtonDown += new MouseButtonEventHandler(ControlPlay_MouseLeftButtonDown);
            tMutedButton.MouseLeftButtonDown += new MouseButtonEventHandler(tMutedButton_MouseLeftButtonDown);
            tPlayButton.MouseLeftButtonDown += new MouseButtonEventHandler(ControlPlay_MouseLeftButtonDown);
            tFullScreenButton.MouseLeftButtonDown += new MouseButtonEventHandler(tFullScreenButton_MouseLeftButtonDown);
            tLoop.MouseLeftButtonDown += new MouseButtonEventHandler(tLoop_MouseLeftButtonDown);

            TstringPlayState.MouseLeftButtonDown += new MouseButtonEventHandler(TstringPlayState_MouseLeftButtonDown);
            TstringPlayState.MouseMove += new MouseEventHandler(TstringPlayState_MouseMove);
            TstringPlayState.MouseLeftButtonUp += new MouseButtonEventHandler(TstringPlayState_MouseLeftButtonUp);

            DownloadedPercent.MouseLeftButtonDown += new MouseButtonEventHandler(TstringPlayState_MouseLeftButtonDown);
            DownloadedPercent.MouseMove += new MouseEventHandler(TstringPlayState_MouseMove);
            DownloadedPercent.MouseLeftButtonUp += new MouseButtonEventHandler(TstringPlayState_MouseLeftButtonUp);

            #region

            Application.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);

            for (int i = 1; i <= 20; i++)
            {
                Rectangle VolumeItem = (Rectangle) this.FindName(string.Format("_{0}", i));
                if (VolumeItem != null)
                {
                    VolumeItem.MouseEnter += new MouseEventHandler(VolumeItem_MouseEnter);
                    VolumeItem.MouseLeave += new MouseEventHandler(VolumeItem_MouseEnter);
                }
            }
            #endregion

        }

        void TstringMovieObject_CurrentStateChanged(object sender, RoutedEventArgs e)
        {
            switch (this.TstringMovieObject.CurrentState)
            {
            case MediaElementState.Buffering:
            this.Info("Buffering");
            break;
            case MediaElementState.Closed:
            this.Info("Closed");
            break;
            case MediaElementState.Opening:
            this.Info("Opening");
            break;
            case MediaElementState.Paused:
            this.Info("Paused");
            break;
            case MediaElementState.Playing:
            this.Info(null);
            break;
            case MediaElementState.Stopped:
            this.Info("Stopped");
            break;
            default:
            this.Info(null);
            break;
            }
        }

        void tLoop_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            IsLoop = !IsLoop;
            tLoop.Opacity = IsLoop ? 0.5 : 1;
        }

        void TstringMovieObject_MediaEnded(object sender, RoutedEventArgs e)
        {
            if (IsLoop)
            {
                ControlPlay_MouseLeftButtonDown(sender, null);
            }
            tPlayButton.Opacity = 1;
            ControlPlay.Text = "重播";
            TstringPlayState.Width = 0;
            DownloadedPercent.Width = OffsetLoadedProcessBarLeng();
            TstringMovieObject.Position = new TimeSpan(0, 0, 0);
            TstringSliderLoadedPercentText.Text = string.Empty;
        }

        void TstringMovieObject_DownloadProgressChanged(object sender, RoutedEventArgs e)
        {
            DownloadedPercent.Width = TstringMovieObject.DownloadProgress * OffsetLoadedProcessBarLeng();
            TstringSliderLoadedPercentText.Text = string.Format("{0}%", (int) (TstringMovieObject.DownloadProgress * 100));
        }

        void TstringSliderBg_MouseLeave(object sender, MouseEventArgs e)
        {
            IsLeftButtonPressed = false;
        }

        void TstringPlayState_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            IsLeftButtonPressed = false;
        }

        void TstringPlayState_MouseMove(object sender, MouseEventArgs e)
        {
            if (IsLeftButtonPressed)
            {
                double seconds = this.TstringMovieObject.NaturalDuration.TimeSpan.TotalSeconds;

                TstringPlayState.Width = e.GetPosition((UIElement) sender).X;
                TstringMovieObject.Position = new TimeSpan(0, 0, (int) (seconds / OffsetLeng() * TstringPlayState.Width));
            }
        }

        void TstringPlayState_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!IsLeftButtonPressed)
            {
                IsLeftButtonPressed = true;
                double seconds = this.TstringMovieObject.NaturalDuration.TimeSpan.TotalSeconds;

                TstringPlayState.Width = e.GetPosition((UIElement) sender).X;
                TstringMovieObject.Position = new TimeSpan(0, 0, (int) (seconds / OffsetLeng() * TstringPlayState.Width));
            }
        }

        void tFullScreenButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
            FrameIframe.Visibility = Application.Current.Host.Content.IsFullScreen ? Visibility.Collapsed : Visibility.Visible;
            tFullScreenButton.Opacity = Application.Current.Host.Content.IsFullScreen ? 0.5 : 1;
        }

        void tMutedButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            TstringMovieObject.IsMuted = !TstringMovieObject.IsMuted;
            tMutedButton.Opacity = TstringMovieObject.IsMuted ? 0.5 : 1;
        }

        void VolumeSlider_MouseLeave(object sender, MouseEventArgs e)
        {
            VolumeSlider.Opacity = 0;
        }

        void VolumeSlider_MouseEnter(object sender, MouseEventArgs e)
        {
            VolumeSlider.Opacity = 1;
        }

        void Content_FullScreenChanged(object sender, EventArgs e)
        {

            if (Application.Current.Host.Content.IsFullScreen)
            {
                GlobeFrame.Width = Application.Current.Host.Content.ActualWidth;
                GlobeFrame.Height = Application.Current.Host.Content.ActualHeight;
            }
            else
            {
                GlobeFrame.Width = 600;
                GlobeFrame.Height = 400;
            }
            DownloadedPercent.Width = this.Width - 60;
        }

        void VolumeItem_MouseEnter(object sender, MouseEventArgs e)
        {
            Rectangle VolumeItem = e.OriginalSource as Rectangle;
            if (VolumeItem != null)
            {
                double _CurrentIndex = double.Parse(VolumeItem.Name.Replace("_", ""));
                for (int i = 1; i <= 20; i++)
                {
                    Rectangle _TempRectangle = (Rectangle) this.FindName("_" + i);
                    if (_TempRectangle != null)
                    {
                        if (i >= _CurrentIndex)
                        {
                            _TempRectangle.Opacity = 1;
                        }
                        else
                        {
                            _TempRectangle.Opacity = 0.2;
                        }
                    }
                }

                this.TstringMovieObject.Volume = 1 - _CurrentIndex / 10;
            }
        }

        void TstringMovieObject_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e)
        {
            if (this.TstringMovieObject.NaturalDuration.TimeSpan.TotalSeconds > 0)
            {
                TstringPlayState.Width = e.Marker.Time.TotalSeconds * OffsetLeng() / this.TstringMovieObject.NaturalDuration.TimeSpan.TotalSeconds;
            }
        }

        void TstringMovieObject_MediaOpened(object sender, RoutedEventArgs e)
        {
            double seconds = this.TstringMovieObject.NaturalDuration.TimeSpan.TotalSeconds;
            for (int i = 1; i < OffsetLeng(); i++)
            {
                TimelineMarker marker = new TimelineMarker();
                double time = seconds / OffsetLeng() * i;
                marker.Time = new TimeSpan(0, 0, (int) time);
                marker.Text = time.ToString();
                marker.Type = "Slider";
                this.TstringMovieObject.Markers.Add(marker);
            }
        }

        void ControlPlay_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            switch (this.TstringMovieObject.CurrentState)
            {
            case MediaElementState.Paused:
            this.TstringMovieObject.Play();
            tPlayButton.Opacity = 1;
            ControlPlay.Text = "播放";
            this.Info(string.Empty);
            break;
            case MediaElementState.Playing:
            this.TstringMovieObject.Pause();
            tPlayButton.Opacity = 0.5;
            ControlPlay.Text = "暂停";
            this.Info("暂停");
            break;
            case MediaElementState.Stopped:
            this.TstringMovieObject.Pause();
            tPlayButton.Opacity = 1;
            ControlPlay.Text = "播放";
            break;
            default:
            break;
            }
        }

        #region Method

        private double OffsetLoadedProcessBarLeng()
        {
            return this.Width - 60;
        }

        private double OffsetLeng()
        {
            return this.Width - 140;
        }

        private void Info(string Information)
        {
            if (string.IsNullOrEmpty(Information))
            {
                tbInfo.Text = string.Empty;
            }
            else
            {
                tbInfo.Text = Information;
            }
        }

        #endregion

    }
}
 


说明

下载:http://files.cnblogs.com/kkun/KkunMovie.rar
开发工具:Microsoft Expression Blend 2,Microsoft Visual Studio 2008,c# 

布局基本上都是相对位置,设置总长宽则所有控件均按比例绽放
下载完成后唯一要做的就是在TestPage页面目录下添加一个111.wmv格式的视频文件,这个属性在xaml的26行

如何卸载旧的SL客户端,TOOLS,SDK?请跟我来
http://forums.microsoft.com/china/ShowPost.aspx?PostID=4120391&SiteID=15

 

  • 大小: 34.9 KB
分享到:
评论

相关推荐

    常用1.SchLib

    常用1.SchLib

    tokenizers-0.26.0.jar中文文档.zip

    # 【tokenizers-***.jar***文档.zip】 中包含: ***文档:【tokenizers-***-javadoc-API文档-中文(简体)版.zip】 jar包下载地址:【tokenizers-***.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【tokenizers-***.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【tokenizers-***.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【tokenizers-***-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: tokenizers-***.jar***文档.zip,java,tokenizers-***.jar,ai.djl.huggingface,tokenizers,***,ai.djl.engine.rust,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,djl,huggingface,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【tokenizers-***.jar***文档.zip】,再解压其中的 【tokenizers-***-javadoc-API文档-中文(简体)版.zip】,双击 【index.html】 文件,即可用浏览器打开、进行查看。 # 特殊说明: ·本文档为人性化翻译,精心制作,请放心使用。 ·只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; ·不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 # 温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件; # Maven依赖: ``` <dependency> <groupId>ai.djl.huggingface</groupId> <artifactId>tokenizers</artifactId> <version>***</version> </dependency> ``` # Gradle依赖: ``` Gradle: implementation group: 'ai.djl.huggingface', name: 'tokenizers', version: '***' Gradle (Short): implementation 'ai.djl.huggingface:tokenizers:***' Gradle (Kotlin): implementation("ai.djl.huggingface:tokenizers:***") ``` # 含有的 Java package(包): ``` ai.djl.engine.rust ai.djl.engine.rust.zoo ai.djl.huggingface.tokenizers ai.djl.huggingface.tokenizers.jni ai.djl.huggingface.translator ai.djl.huggingface.zoo ``` # 含有的 Java class(类): ``` ai.djl.engine.rust.RsEngine ai.djl.engine.rust.RsEngineProvider ai.djl.engine.rust.RsModel ai.djl.engine.rust.RsNDArray ai.djl.engine.rust.RsNDArrayEx ai.djl.engine.rust.RsNDArrayIndexer ai.djl.engine.rust.RsNDManager ai.djl.engine.rust.RsSymbolBlock ai.djl.engine.rust.RustLibrary ai.djl.engine.rust.zoo.RsModelZoo ai.djl.engine.rust.zoo.RsZooProvider ai.djl.huggingface.tokenizers.Encoding ai.djl.huggingface.tokenizers.HuggingFaceTokenizer ai.djl.huggingface.tokenizers.HuggingFaceTokenizer.Builder ai.djl.hu

    电力系统PMU优化配置研究——基于MATLAB的多种算法实现与性能比较

    内容概要:本文详细探讨了电力系统中PMU(相量测量单元)的优化配置问题,旨在确保系统完全可观测的同时尽量减少PMU的数量。作者介绍了六种不同的算法,包括模拟退火、图论方法、递归安全N算法等,并通过MATLAB实现了这些算法。通过对IEEE标准测试系统的实验,展示了各种算法在不同规模系统中的表现。文中不仅提供了具体的MATLAB代码实现,还分享了许多实用的经验技巧,如邻域解生成、退火速率设置、拓扑排序等。 适合人群:从事电力系统研究的技术人员、研究生以及对组合优化感兴趣的科研工作者。 使用场景及目标:适用于电力系统状态估计、故障诊断等领域,帮助研究人员和工程师找到最优的PMU配置方案,提高系统的可靠性和经济性。 其他说明:文章强调了在实际应用中需要注意的问题,如变压器支路的影响、节点编号不连续等问题,并推荐了几篇相关领域的经典文献供进一步学习。此外,还提到了一些有趣的发现,如某些中间节点装PMU反而能减少总数。

    spring-ai-mistral-ai-1.0.0-M5.jar中文文档.zip

    # 压缩文件中包含: 中文文档 jar包下载地址 Maven依赖 Gradle依赖 源代码下载地址 # 本文件关键字: jar中文文档.zip,java,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压最外层zip,再解压其中的zip包,双击 【index.html】 文件,即可用浏览器打开、进行查看。 # 特殊说明: ·本文档为人性化翻译,精心制作,请放心使用。 ·只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; ·不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 # 温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件;

    三菱FX1s与台达MS300变频器基于Modbus RTU通讯的实战指南

    内容概要:本文详细介绍了三菱FX1s PLC与台达MS300变频器通过Modbus RTU协议实现通讯的方法。首先,文中列举了所需的硬件设备及其连接方法,确保PLC与变频器能够正常通信。接下来,针对频率设定、频率读取及正反转启停控制三大主要功能进行了详细的编程讲解,提供了具体的梯形图代码示例并解释了每一步的作用。此外,还涉及到了触摸屏(MCGS和威纶通)的配置步骤,使用户可以通过触摸屏方便地操作变频器的各项功能。最后,作者分享了一些实用的小技巧和常见错误避免方法,帮助使用者快速解决问题,提高工作效率。 适合人群:从事自动化控制系统集成的技术人员,尤其是那些需要将三菱PLC与台达变频器进行互联的工程师。 使用场景及目标:适用于工业自动化领域的项目实施过程中,旨在帮助技术人员掌握三菱FX1s与台达MS300变频器之间的高效通信技术,从而更好地完成系统集成任务。 其他说明:文中不仅包含了详细的理论知识和技术要点,还有丰富的实践经验分享,有助于读者全面理解和应用相关技术。同时,提供的完整工程文件可以直接应用于实际项目中,极大地节省了开发时间和成本。

    winrar免费版压缩工具

    winrar免费版压缩工具

    基于CEC21测试函数的灰狼、鲸鱼、人工蜂群优化算法性能对比及Matlab实现

    内容概要:本文详细介绍了灰狼算法(GWO)、鲸鱼算法(WOA)和人工蜂群算法(ABC)在CEC21标准测试函数集上的性能对比。通过设定相同的实验条件(种群数量50,迭代次数500次,30维问题空间),分别探讨了各算法的关键参数调整及其对不同类型函数(单峰、多峰、复合)的影响。文中提供了每个算法的核心代码片段,并针对具体函数给出了优化建议。最终结果显示,GWO在单峰函数上有优势,WOA擅长处理旋转和平移问题,而ABC在高维复杂环境中表现出色。 适合人群:从事优化算法研究的科研人员、研究生以及对智能优化算法感兴趣的开发者。 使用场景及目标:适用于需要评估和比较不同优化算法性能的研究项目,特别是那些涉及高维、多峰、旋转平移等问题的实际应用场景。目标是帮助研究人员选择最适合特定任务的优化算法,并提供参数调优的经验。 其他说明:文章不仅提供了理论分析,还分享了许多实践经验,如参数调整技巧、初始化方法等。此外,所有实验均基于Matlab平台完成,附带完整的代码实现,方便读者复现实验结果。

    电控开关.SchLib

    电控开关.SchLib

    spring-ai-autoconfigure-model-openai-1.0.0-M7.jar中文-英文对照文档.zip

    # 【spring-ai-autoconfigure-model-openai-1.0.0-M7.jar中文-英文对照文档.zip】 中包含: 中文-英文对照文档:【spring-ai-autoconfigure-model-openai-1.0.0-M7-javadoc-API文档-中文(简体)-英语-对照版.zip】 jar包下载地址:【spring-ai-autoconfigure-model-openai-1.0.0-M7.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【spring-ai-autoconfigure-model-openai-1.0.0-M7.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【spring-ai-autoconfigure-model-openai-1.0.0-M7.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【spring-ai-autoconfigure-model-openai-1.0.0-M7-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: spring-ai-autoconfigure-model-openai-1.0.0-M7.jar中文-英文对照文档.zip,java,spring-ai-autoconfigure-model-openai-1.0.0-M7.jar,org.springframework.ai,spring-ai-autoconfigure-model-openai,1.0.0-M7,org.springframework.ai.model.openai.autoconfigure,jar包,Maven,第三方jar包,组件,开源组件,第三方

    c++复习题.doc

    c++复习题.doc

    附件3:本科毕业设计(论文)中期检查报告(3)(1)(1).docx

    本科毕业设计(论文)中期检查报告

    【信号调制】使用不同的分类器(逻辑回归分类器、决策树、随机森林、全连接密集层和CNN)来训练模型,以预测不同信噪比值下信号的调制类型附Python代码.rar

    1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。

    weixin248食堂订餐小程序ssm(文档+源码)_kaic

    weixin248食堂订餐小程序ssm(文档+源码)_kaic

    基于粒子群优化算法的微型燃气轮机冷热电联供系统优化调度附Matlab代码.rar

    1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。

    e1e90185ca2f1eda312e7f604d38195c_b4125f83523abcb38acd9dc0deebd500.png

    e1e90185ca2f1eda312e7f604d38195c_b4125f83523abcb38acd9dc0deebd500

    spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar中文-英文对照文档.zip

    # 【spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar中文-英文对照文档.zip】 中包含: 中文-英文对照文档:【spring-ai-autoconfigure-mcp-client-1.0.0-M7-javadoc-API文档-中文(简体)-英语-对照版.zip】 jar包下载地址:【spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【spring-ai-autoconfigure-mcp-client-1.0.0-M7-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar中文-英文对照文档.zip,java,spring-ai-autoconfigure-mcp-client-1.0.0-M7.jar,org.springframework.ai,spring-ai-autoconfigure-mcp-client,1.0.0-M7,org.springframework.ai.mcp.client.autoconfigure,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,springfram

    基于 OpenCV 的图像颜色与形状识别项目(含完整 Python 源码)

    该项目使用 OpenCV 实现图像中红色目标的识别与轮廓框选,适用于图像处理、颜色追踪与形状检测等场景。项目无需深度学习框架,适合图像识别技术入门学习。附带测试图像与运行说明,支持一键运行。

    爱威6-8电脑调音软件是专为音响爱好者和专业人士设计的一款强大工具,喜欢的话,直接下载吧

    爱威6-8电脑调音软件是专为音响爱好者和专业人士设计的一款强大工具,喜欢的话,直接下载吧

    spring-ai-vertex-ai-0.8.0.jar中文-英文对照文档.zip

    # 【spring-ai-vertex-ai-0.8.0.jar中文-英文对照文档.zip】 中包含: 中文-英文对照文档:【spring-ai-vertex-ai-0.8.0-javadoc-API文档-中文(简体)-英语-对照版.zip】 jar包下载地址:【spring-ai-vertex-ai-0.8.0.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【spring-ai-vertex-ai-0.8.0.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【spring-ai-vertex-ai-0.8.0.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【spring-ai-vertex-ai-0.8.0-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: spring-ai-vertex-ai-0.8.0.jar中文-英文对照文档.zip,java,spring-ai-vertex-ai-0.8.0.jar,org.springframework.ai,spring-ai-vertex-ai,0.8.0,org.springframework.ai.vertex,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,springframework,spring,ai,vertex,中文-英文对照API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【spring-ai-vertex-ai-0.8.0.jar中文-英文对照文档.zip】,再解压其中的 【spring-ai-vertex-ai-0.8.0-javadoc-API文档-中文(简体)-英语-对照版.zip】,双

    电源.SCHLIB

    电源.SCHLIB

Global site tag (gtag.js) - Google Analytics