Skip to content

Instantly share code, notes, and snippets.

View habibg1232191's full-sized avatar
💻
Work on AniJin

Luen habibg1232191

💻
Work on AniJin
View GitHub Profile
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Switch_Wallparer.Views.Controls">
<Design.PreviewWith>
<controls:MList />
</Design.PreviewWith>
<Style Selector="controls|MList">
<!-- Set Defaults -->
<Setter Property="Template">
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Switch_Wallparer.Views.Controls">
<Design.PreviewWith>
<controls:MList />
</Design.PreviewWith>
<Style Selector="controls|MList">
<!-- Set Defaults -->
<Setter Property="Template">
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
namespace Switch_Wallparer.Views.Controls
{
public class MList : ListBox
{
Unhandled exception. System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Avalonia.Controls.Presenters.ItemContainerSync.AddContainers(ItemsPresenterBase owner, Int32 index, IEnumerable items) in /_/src/Avalonia.Controls/Present
ers/ItemContainerSync.cs:line 89
at Avalonia.Controls.Presenters.ItemContainerSync.ItemsChanged(ItemsPresenterBase owner, IEnumerable items, NotifyCollectionChangedEventArgs e) in /_/src/Ava
lonia.Controls/Presenters/ItemContainerSync.cs:line 73
at Avalonia.Controls.Presenters.ItemVirtualizerNone.ItemsChanged(IEnumerable items, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Presenter
s/ItemVirtualizerNone.cs:line 59
at Avalonia.Controls.Presenters.ItemsPresenterBase.set_Items(IEnumerable value) in /_/src/Avalonia.Controls/Presenters/ItemsPresenterBase.cs:line 72
at Avalonia.Controls.ItemsControl.ItemsChanged(AvaloniaPropertyChangedEventArgs
HttpWebRequest checkedRequest = (HttpWebRequest) WebRequest.Create(remoteFilename);
HttpWebResponse checkedResponse = (HttpWebResponse) checkedRequest.GetResponse();
FileStream fs = new FileStream(localFilename, FileMode.OpenOrCreate);
request = (HttpWebRequest)WebRequest.Create(remoteFilename);
if (fs.Length < checkedResponse.ContentLength && fs.Length != 0)
{
request.Headers.Add("range", $"bytes={fs.Length}-");
}
#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <string>
#include <iostream>
#include <filesystem>
std::wstring ExePath() {
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.beryx.runtime") version "1.12.5"
kotlin("jvm") version "1.5.31"
kotlin("plugin.serialization") version "1.5.31"
application
}
group = "me.habib"
import androidx.compose.animation.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.window.Popup
@Composable
fun AniJinPopup(
expanded: Boolean,
import androidx.compose.foundation.Image
import androidx.compose.runtime.*
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.toComposeImageBitmap
import kotlinx.coroutines.delay
import org.bytedeco.ffmpeg.avcodec.AVCodecParameters
import org.bytedeco.ffmpeg.avutil.AVFrame
import org.bytedeco.ffmpeg.global.*
import org.bytedeco.ffmpeg.global.avformat.avformat_find_stream_info
import org.bytedeco.ffmpeg.global.avformat.avformat_open_input
import androidx.compose.animation.*
import androidx.compose.animation.core.*
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.window.*