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
public void Push(string N, string BD, double Avg) | |
{ | |
Item temp = head; | |
Item temp1 = new Item(); // Это "каркас" для ячейки списка, куда положим элемент, который будем добавлять. | |
temp1.value = new Student(); // Теперь создадим "каркас" для самого объекта-студента, куда запишем его данные. | |
Console.WriteLine("\nВведите имя студента: "); | |
temp1.value.Name = Convert.ToString(Console.ReadLine()); // Convert.ToString() лучше убрать. | |
Console.WriteLine("\nВведите сред. ариф. студента: "); |
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
/* | |
* A stupid solution for task from https://habr.com/ru/post/328864/ | |
* Write a program that prints into console the numbers from 1 to 100. But for multiples of three print "Miss" instead of the number and for the multiples of five print "Kiss". For numbers which are multiples of both three and five print "MissKiss". Each print must be asynchronous call console.log function with a 50ms delay. | |
* Environment: Node.js | |
*/ | |
let print1 = (m, isActive = true, isRecursion = false) => { | |
if (!isActive) | |
return | |
else if (!isRecursion) | |
setTimeout(() => { console.log(m); isActive = false }, 1000) |
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
/// <summary> | |
/// Represents object instance properties as a string | |
/// </summary> | |
/// <param name="o">Any object to represent its properties</param> | |
/// <returns>String { prop1: value1 prop2: value2 ... }</returns> | |
private static string InstancePropertiesToString(object o) | |
{ | |
var stringBuilder = new StringBuilder("{ "); | |
foreach (var property in o.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) | |
{ |