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
CREATE OR REPLACE FUNCTION fullCheckData(uuid) RETURNS varchar AS $$ | |
DECLARE | |
_rec RECORD; | |
_key text; | |
_value text; | |
_jsonView json; | |
_result text := ''; | |
_nullColumns TEXT ARRAY DEFAULT ARRAY['Имя', 'Фамилия', 'Отчество', 'Пол', 'Дата рождения', 'Место рождения', | |
'Серия паспорта', 'Номер паспорта', 'Кем выдан паспорт', 'Дата выдачи паспорта', | |
'Код подразделения', 'Адрес регистрации', 'Адрес проживания', 'Мобильный телефон', 'Социальный статус']; |
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
CREATE OR REPLACE FUNCTION minCheckData(uuid) RETURNS varchar AS $$ | |
DECLARE | |
_rec RECORD; | |
_key text; | |
_value text; | |
_jsonView json; | |
_result text := ''; | |
_nullColumns TEXT ARRAY DEFAULT ARRAY['Имя', 'Фамилия', 'Отчество', 'Пол', 'Дата рождения', 'Место рождения', | |
'Серия паспорта', 'Номер паспорта', 'Кем выдан паспорт', 'Дата выдачи паспорта', | |
'Код подразделения', 'Адрес регистрации', 'Адрес проживания']; |
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
psql.exe --host localhost --port 5432 --username=postgres --dbname=template1 –c "CREATE DATABASE UAT_RNB WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1" | |
pg_restore --host localhost --port 5432 --username=postgres --dbname=UAT_RNB --no-owner --no-privileges --verbose D:\work\backups\uat_20220208.sql |
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
Set WshShell = CreateObject("WScript.Shell") | |
Set Objects = ThisApplication.Root.Objects(0) | |
Set xdoc = CreateObject("MSXML2.DOMDocument") | |
set rows = xdoc.appendChild(xdoc.CreateElement("rows")) | |
'creating columns | |
set row = rows.appendChild(xdoc.CreateElement("row")) | |
set cell = row.appendChild(xdoc.createElement("cell")) | |
cell.SetAttribute "value", "" |
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
string town = new Regex(@"<h1>(?<town>.*)</h1>").Match(data).Groups["town"].Value; | |
string temp = new Regex(@"<div class=""temperature"">([^<]+)<span class=""value "">(?<temp>[^<]+)</span>").Match(data).Groups["temp"].Value.Replace("°", "\xB0"); | |
answer += "Казань" + "\nТемпература воздуха: " + temp + "\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
Uri uri = new Uri("pack://application:,,,/WpfQuiz;component/resources/sounds/main_theme.wav", UriKind.RelativeOrAbsolute); | |
StreamResourceInfo str = Application.GetResourceStream(uri); | |
_player = new SoundPlayer(str.Stream); | |
_player.Play(); |
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
//Файл содержит в себе 3 класса | |
// 1. UsbListener | |
// 2. DeviceChangedEventArgs | |
// 3. EventType | |
//EventType - набор типов событий. | |
//DeviceChangedEventArgs - класс, содержащий данные события. Наследуется от EventArgs и | |
// содержит в себе информацию класса EventArrivedEventArgs в более удобном виде. |
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
//Опсиание класса UsbListener | |
//https://gist.github.com/SpacePurr/c35aa79e8d702b5d639cef05f05f188c | |
//Основной принцип работы: | |
// 1. Создание объекта класса UsbListener | |
// 2. Подписка на эвенты событий подключения/отключения Usb устройств | |
// 3. Запуск слушателя с помощью метода Start | |
// 4. Остановка слушателя с помощью метода Stop | |
//Нюансы: |
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
<TabControl Grid.Row="0" ItemsSource="{Binding Models}" SelectedItem="{Binding CurrentTab, Mode=TwoWay}" Loaded="FrameworkElement_OnLoaded" > | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="SelectionChanged"> | |
<ei:CallMethodAction MethodName="Selector_OnSelectionChanged" TargetObject="{Binding}"/> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> | |
<TabControl.ItemTemplate> | |
<DataTemplate> |
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 int TimeSlider { get; set; } | |
//public int TimeSliderCurrent { get; set; } | |
//public List<ModelVisual3D> History { get; set; } | |
//private void TestExecute(object obj) | |
//{ | |
// TimeSliderCurrent = 0; | |
// History = new List<ModelVisual3D>(); | |
// var modelVisual = _styler.CommonShapes.Children.FirstOrDefault() as ModelVisual3D; |
NewerOlder