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 ShowCards (Opponent WhosePack) | |
{ | |
if (WhosePack == Opponent.Player) { | |
Console.WriteLine ("\nВаши карты:"); | |
for (int i = 0; i < PlayerPack.Count; i++) { | |
if (36 < i && i <= 40) { | |
Console.Write ("\tJ"); | |
} | |
else if (40 < i && i <= 44) { | |
Console.Write ("\tQ"); |
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
#include <iostream> | |
#include <vector> | |
#include <stdio.h> | |
using namespace std; | |
static int PlayerBalance = 1000; | |
static int ComputerBalance = 1000; | |
class Game |
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
void BetToBank () | |
{ | |
for (;;) { | |
cout << "Введите вашу ставку цифрами до $100.\nМоя ставка: "; | |
try { | |
cin >> Bet; | |
} catch { | |
Bet = 0; | |
cout << "Не корректный ввод. Попробуйте еще раз."; |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <iomanip> | |
double number(); | |
double factor(); | |
double expr(); | |
double brackets(); | |
int main() |
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 class Calc | |
{ | |
// Универсальная операция | |
abstract class Operation | |
{ | |
public abstract float Eval (); | |
} | |
// Просто число | |
class Number : Operation |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
using System.IO; | |
public class TextureCreator : Editor { | |
[MenuItem("TEXTURE/Create Texture")] | |
static void CreateTexture(){ | |
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
char mostFrequentCharacter(char* string, int size) | |
{ | |
int threadsCount = 2; | |
BOOL *threadComplete = calloc(threadsCount, sizeof(BOOL)); | |
BOOL *freqCountInThread = calloc(threadsCount, sizeof(int)); | |
BOOL *mostFrequentCharInThread = calloc(threadsCount, sizeof(char)); | |
int sizeForProcessing = size/threadsCount; | |
dispatch_queue_t queue = dispatch_queue_create("com.evsenev.mylovechar", DISPATCH_QUEUE_CONCURRENT); |