Skip to content

Instantly share code, notes, and snippets.

View Musin-Mihail's full-sized avatar

Мусин Михаил Musin-Mihail

View GitHub Profile
@Musin-Mihail
Musin-Mihail / parse.cs
Created January 20, 2023 13:13
parse youtube
string data = File.ReadAllText("html.txt");
string start = "i.ytimg.com/vi/";
bool endSearch = false;
int count = 0;
string videoId = "";
string allIDstring = File.ReadAllText("allid.txt");
List<string> allID = allIDstring.Split(';').ToList();
List<string> newLink = new List<string>();
for (int i = 0; i < data.Length; i++)
@Musin-Mihail
Musin-Mihail / Testing
Last active July 18, 2022 17:45
Тестирование кодакода
using Course;
namespace TestProject
{
[TestClass]
public class UnitTest1
{
Words wordsGame = new Words();
List<string> usedWords = new List<string>();
List<string> dictionary = new List<string>();
Char endCurrentchar = 'О';
@Musin-Mihail
Musin-Mihail / Words.cs
Last active July 14, 2022 12:51
Игра слова
string[] array = File.ReadAllLines("dict.txt");
List<string> listWordsString = array.ToList();
List<string> usedWords = new List<string>();
bool startGame = false;
bool stopGame = false;
int errorCount = 3;
string CurrentWord = "";
Char endCurrentchar = ' ';
FirstMove();
@Musin-Mihail
Musin-Mihail / Popotno.cs
Created June 29, 2022 12:56
Полотно кода
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
@Musin-Mihail
Musin-Mihail / example.cs
Created May 22, 2022 11:54
Пример работы с файлами и списками
// В файле строки типа "п;0"
string Data = File.ReadAllText("TEXT.txt"); // считываем файл в string
List<string> listString = new List<string>(Data.Split('\n')); //Сохраняем каждую строчку в список.
List<char> listChar = new List<char>(); // Список с сипволами
List<int> listInt = new List<int>(); // Список с числами
foreach (var line in listString)
{
List<string> listString2 = new List<string>(line.Split(';'));// Разделяем на символ и число
char symbol = listString2[0][0]; //Вытаскиваем символ
int number = int.Parse(listString2[1]); // Вытаскиваем число
@Musin-Mihail
Musin-Mihail / DumbbellExercises.cs
Created May 19, 2022 08:54
Сортировка упражнений с гантелями.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace DumbbellExercises
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Threading;
@Musin-Mihail
Musin-Mihail / MoveCamera.cs
Last active June 21, 2021 19:53
Input anyKey GetKey KeyCode GetAxis Quaternion Euler rotation Mathf Repeat Clamp
using UnityEngine;
public class MoveCamera : MonoBehaviour
{
float _speed = 0.02f;
float _rotationSpeed = 10;
private Vector2 _rotation;
int _maxYAngle = 80;
void Update()
{
@Musin-Mihail
Musin-Mihail / Cube.cs
Last active June 15, 2021 18:35
Cube
using System.Collections;
using UnityEngine;
public class Cube : MonoBehaviour
{
public int _check;
Vector3 NewVector3;
public IEnumerator MoveUp()
{
_check = 1;
@Musin-Mihail
Musin-Mihail / Move.cs
Last active June 15, 2021 18:35
Move Physics.Raycast Ray
using UnityEngine;
public class Move : MonoBehaviour
{
static public float _targetUp = 1.5f;
static public float _targetDown = 0.0f;
GameObject _gameObject;
void Update()
{
if (Input.GetMouseButtonDown(0))