Skip to content

Instantly share code, notes, and snippets.

View dimka11's full-sized avatar

Dmitry Sokolov dimka11

  • Russia, Omsk
  • 19:39 (UTC -12:00)
View GitHub Profile
@dimka11
dimka11 / array.cpp
Created October 6, 2017 15:25
Статический массив
#include <iostream>
int main()
{
int mas [3] = { 1,2,3 };
int b = 10;
mas [4] = b;
mas[5] = mas[2] + mas[4]; // 3 + 10
std::cout << mas[0] + mas[1] + mas[2] << std::endl; // 6
@dimka11
dimka11 / testmodf.cpp
Created October 4, 2017 19:34
test modf
#include "stdafx.h"
#include "CppUnitTest.h"
#include <iostream>                   // для оператора cout
#include <cmath>                      // для функции modf
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace modfUnit
{
TEST_CLASS(UnitTest1)
@dimka11
dimka11 / Source.cpp
Created September 9, 2017 16:56
TestGistFromVS
int main()
{
return 0;
Calc(1, 1);
}
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@dimka11
dimka11 / heapClass.py
Created December 29, 2016 09:13 — forked from RadhikaG/heapClass.py
A class to demonstrate the different operations on heaps.
def parent(i):
return i/2
def left(i):
return 2*i
def right(i):
return (2*i + 1)
class Heap:
@dimka11
dimka11 / delete.pas
Last active December 16, 2016 17:39
Удаление строки из таблицы
procedure TForm1.BitBtn3Click(Sender: TObject);
var
id: Integer;
sqlTextStore: string;
begin
if Application.MessageBox('Удалить?','',MB_YESNO)=IDYES then
begin
case PageControl1.ActivePageIndex of
0: ADOQuery1.Delete;
1: ADOQuery2.Delete;