Skip to content

Instantly share code, notes, and snippets.

View SnowyPainter's full-sized avatar
🎯
Focusing

Minwoo Yu SnowyPainter

🎯
Focusing
View GitHub Profile
#include <iostream>
using namespace std;
//알고리즘 문제해결전략
//록 페스티벌
//풀이 핵심
// 1. 기능을 따로 보라
// 2. 필요에 의해 하라
from matplotlib import pyplot as plt
import numpy as np
points = np.random.randint(-10, size=100 ,high=10)
disp = np.var(points)
print("분산 : {}".format(disp))
print("표준편차 : {}".format(np.sqrt(disp)))
@SnowyPainter
SnowyPainter / bingo_game_winner.py
Created May 4, 2021 16:51
빙고게임 채점 알고리즘
def all_same(arr):
temp = arr[0]
for v in arr[1:]:
if temp == v:
temp = v
else:
return False
return True
def the_highest_value_key(dictionary):
public class TitleBarViewModel:ViewBase
{
private RelayCommand<Window> titleBar_MouseDown, minimizeButton_Click, closeButton_Click;
public string Title { get; set; }
public ICommand TitleBar_MouseDown
{
get
{
return titleBar_MouseDown ?? (titleBar_MouseDown = new RelayCommand<Window>(w => DragMove(w)));
}
Command="{Binding DataContext.property, Source={x:Reference Name=name}}"
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void NotifyPropertyChanged(string property)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
}
@SnowyPainter
SnowyPainter / relayCommand.cs
Last active February 23, 2021 03:34
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
namespace a
{
public class RelayCommand<T> : ICommand
{
#region Fields
<Application x:Class="Epe.xaml.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Epe.xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<SolidColorBrush x:Key="Dark" Color="#2E3D59"/>
<SolidColorBrush x:Key="LightDark" Color="#4A608C"/>
<SolidColorBrush x:Key="Green" Color="#71734C"/>
<SolidColorBrush x:Key="LightGreen" Color="#8A8C51"/>
<Window x:Class="Epe.xaml.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:Epe.xaml"
mc:Ignorable="d"
WindowStyle="None" MinHeight="400" MinWidth="850" Height="600" Width="1200" Icon="/Images/ICON.ico">
<Grid>
<Grid.RowDefinitions>
using System;
using System.Reflection;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace HeVibrates
{
[ContentProperty (nameof(Source))]
class ImageResourceExtension:IMarkupExtension
{