Skip to content

Instantly share code, notes, and snippets.

import {Page, HTTPResponse} from 'puppeteer'
import log from "../services/log";
/**
* This class contains the logic to solve protections provided by CloudFlare
**/
const BAN_SELECTORS: string[] = [];
const CHALLENGE_SELECTORS: string[] = [
[ContentProperty(nameof(MenuContent))]
public class HamburgerMenuItem : Freezable
{
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
nameof(Title),
typeof(string),
typeof(HamburgerMenuItem),
new FrameworkPropertyMetadata(null));
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
@ivanjx
ivanjx / control.cs
Created July 22, 2022 10:35
my own flyout
namespace x.Main.Settings
{
/// <summary>
/// Interaction logic for SettingsFlyout.xaml
/// </summary>
public partial class SettingsFlyout : UserControl
{
ISettingsService m_settingsService;
public SettingsFlyout()
using System.Threading;
int[] m_forks = new[]
{
1,
1,
1,
};
void TakeFork(int fid, int fid2)
using System.Threading;
int[] m_forks = new[]
{
1,
1,
1,
};
void TakeFork(int fid)
@ivanjx
ivanjx / 1.cs
Last active May 14, 2021 16:18
using System.Threading;
Random rand = new Random();
const int BUFFER_SIZE = 5;
int[] m_buffer = new int[BUFFER_SIZE];
int m_count = 0;
Semaphore m_full = new Semaphore(0, BUFFER_SIZE);
Semaphore m_empty = new Semaphore(BUFFER_SIZE, BUFFER_SIZE);
@ivanjx
ivanjx / 1.cs
Last active May 14, 2021 16:17
using System.Threading;
Random rand = new Random();
const int BUFFER_SIZE = 5;
int[] m_buffer = new int[BUFFER_SIZE];
int m_count = 0;
void Produce()
@ivanjx
ivanjx / 1.cs
Last active May 14, 2021 16:17
using System.Threading;
Random rand = new Random();
const int BUFFER_SIZE = 5;
int[] m_buffer = new int[BUFFER_SIZE];
int m_count = 0;
void Produce()
<Window x:Class="wpf_test.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:local="clr-namespace:wpf_test"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<StackPanel>
<UniformGrid Columns="3">
<Window x:Class="wpf_test.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:local="clr-namespace:wpf_test"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<WrapPanel>
<Grid