This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region GUI | |
var ffmpeg = new FFmpeg(); | |
ffmpeg.UI.Dump(); | |
#endregion | |
class FFmpeg | |
{ | |
TimeSpan duration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import numpy as np | |
from pathlib import Path | |
from rich.progress import track | |
from scipy.spatial import KDTree | |
folder = Path('avatar') | |
def calc_all_colors(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Xaml.Behaviors; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
namespace WpfTutorials.RadioButtonBindings.Behaviors; | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window ...> | |
<Window.Resources> | |
<local:BrightnessToBoolConverter x:Key="conv" /> | |
<Style TargetType="Button"> | |
<Setter Property="FontSize" Value="16" /> | |
<Setter Property="Foreground" Value="Black" /> | |
<Setter Property="FocusVisualStyle" Value="{x:Null}" /> | |
<EventSetter Event="Click" Handler="OnButtonClicked" /> | |
<Style.Triggers> | |
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Background, Converter={StaticResource conv}}" Value="False"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Globalization; | |
using System.Windows.Data; | |
class ElementIndexConverter : IMultiValueConverter | |
{ | |
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if (values.Length == 2 && values[0] is not null && values[1] is IList items) | |
return (items.IndexOf(values[0]) + 1).ToString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
from itertools import permutations | |
from matplotlib import pyplot as plt | |
COLS = 5 | |
ROWS = 6 | |
x1 = 10 | |
x2 = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="WpfTutorials.NuGetValueConverters.Views.MainWindow" | |
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/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:conv="clr-namespace:ValueConverters;assembly=ValueConverters" | |
Title="登录" | |
Width="800" | |
Height="600" | |
WindowStartupLocation="CenterScreen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Controls.Primitives; | |
namespace DataGridView | |
{ | |
public class MultiSelectorHelper | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var demo = new Demo(); | |
demo.FieldValue = 10; | |
demo.PropValue = 10; | |
// 修改字段的值 | |
ModifyFieldValue(ref demo.FieldValue, 42); | |
demo.FieldValue.Dump("Field Value"); | |
// 修改属性的值 | |
// ModifyFieldValue(ref demo.PropValue, 42); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.md-alert-text { | |
font-size: 1rem; | |
font-weight: 600; | |
} | |
.md-alert-text-container::after { | |
text-transform: uppercase; | |
position: relative; | |
bottom: 1px; | |
} |
OlderNewer