This file contains hidden or 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 System; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
namespace HttpClientSample | |
{ | |
public class Product | |
{ |
This file contains hidden or 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
var stringDate = "20190130"; | |
var startDate = new DateTime(2019, 01, 30); | |
var endDate = new DateTime(2019, 02, 20); | |
var testDate = new DateTime(2019, 02, 01); | |
var result1 = DateTime.Compare(testDate, startDate); | |
var result2 = DateTime.Compare(testDate, endDate); | |
This file contains hidden or 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 System; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
PrintNTimes(5); | |
} |
This file contains hidden or 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
SELECT salesDate | |
, customerName | |
, productName | |
, salesQty | |
, salesQty * productPrice as 'Total' | |
FROM testDB.dbo.salesDaily | |
INNER JOIN testDB.dbo.customers ON testDB.dbo.customers.custId = customerId AND customerName = 'Customer2' | |
INNER JOIN testDB.dbo.products ON testDB.dbo.products.prodId = productId | |
WHERE salesDate >= DATEADD(WK, DATEDIFF(WK, 0, GETDATE()) - 1, 0) | |
AND salesDate < DATEADD(WK, DATEDIFF(WK, 0, GETDATE()), 0) |
This file contains hidden or 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 System.Collections.Generic; | |
using Domain; | |
using System; | |
using System.Data.SqlClient; | |
namespace Persistence | |
{ | |
public class SqlBusinessTree: IRepository | |
{ | |
SqlConnection conn; |
This file contains hidden or 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 System; | |
namespace Test_2018_05_30 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Напишите функцию fib(n), которая виводить 100 парних чисел Фибоначчи. |
This file contains hidden or 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
module Palindrome where | |
{- Напишите программу, которая возвращает наибольшее число палиндром, | |
которое является произведением двух простых пятизначных чисел, а также возвращает сами сомножители. | |
Простое число - это натуральное число, которое делится нацело только на 1 и на себя само (2, 3, 5, 7, 11, …) | |
Палиндром – строка, которая читается одинаково в обоих направлениях (например ABBA) -} | |
main = maximum [(x*y, x, y) | x <- prime5digitNumbers, y <- prime5digitNumbers, isPalindrome (x * y)] | |
where | |
prime5digitNumbers = [p5dn | p5dn <- [last5digtNumber, (last5digtNumber - 1)..first5digtNumber], isPrime p5dn] |
This file contains hidden or 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 Dict { | |
public static void myFunc(int[] inArray) { | |
HashMap<Integer, Integer> dict = new HashMap<Integer, Integer>(); | |
for (int i = 0; i < inArray.length; i++) { | |
if (dict.get(inArray[i]) != null) { | |
dict.put(inArray[i], (dict.get(inArray[i]) + 1) ); |
This file contains hidden or 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 System; | |
using System.IO; | |
using System.Collections.Generic; | |
namespace lexical_analyzer_Csharp | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains hidden or 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
// lab_3 | |
// | |
// Created by Sergiy on 24.01.18. | |
#include <GLUT/GLUT.h> | |
#include <stdio.h> | |
#include <iostream> | |
#include <math.h> |
NewerOlder