Skip to content

Instantly share code, notes, and snippets.

@shmutalov
shmutalov / Migrator.cs
Created September 9, 2021 06:09
Increment Upgrade Example
using System;
using System.Threading.Tasks;
using Dapper;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using MySqlConnector;
using Crawler.Service.Enums;
using Crawler.Service.Models;
public class Migrator
Console.OutputEncoding = Encoding.UTF8;
var data = File.ReadAllText("raw.txt");
data = data.Substring(1, data.Length - 3);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(data);
//replace escaped Unicode characters, see \u0026 => &
data = Regex.Replace(data, @"\\u([0-9A-F]{4})", match => ((char)int.Parse(match.Groups[1].Value, NumberStyles.HexNumber)).ToString(), RegexOptions.IgnoreCase);
using System;
using System.Threading.Tasks;
namespace KekPuk.Extensions
{
/// <summary>
/// Task extension methods
/// </summary>
public static class TaskExt
{
https://t.me/proxy?server=catalog.proxy.pp.ru&port=443&secret=ee4fa2f00b585e2528db4ce33feaabb1c0676f6f676c652e636f6d
Running `target\release\rusty-shooter.exe`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InternalError("NoAvailablePixelFormat")', src\libcore\result.rs:1165:5
stack backtrace:
0: backtrace::backtrace::dbghelp::trace
at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.40\src\backtrace/dbghelp.rs:88
1: backtrace::backtrace::trace_unsynchronized
at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.40\src\backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src\libstd\sys_common/backtrace.rs:77
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
12:18:37.099 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':compileKotlin'.
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Internal compiler error. See log for more details
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
12:18:37.100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --scan to get full insights.
@shmutalov
shmutalov / sulis-build.log
Created October 27, 2019 11:49
Sulis build log
Sherzod Mutalov@DESKTOP-N8S8K9E MINGW64 /f/Projects/other/sulis
$ cargo b --release
Compiling cfg-if v0.1.9
Compiling autocfg v0.1.6
Compiling lazy_static v1.3.0
Compiling winapi-x86_64-pc-windows-gnu v0.4.0
Compiling winapi v0.3.7
Compiling semver-parser v0.7.0
Compiling libc v0.2.62
Compiling log v0.4.8
error: proc-macro derive panicked
--> C:\Users\shmut\.cargo\registry\src\github.com-1ecc6299db9ec823\specs-0.15.1\src\world\lazy.rs:83:10
|
83 | #[derive(Derivative)]
| ^^^^^^^^^^
|
= help: message: failed to parse macro input: "/// Lazy updates can be used for world updates\n/// that need to borrow a lot of resources\n/// and as such should better be done at the end.\n/// They work lazily in the sense that they are\n/// dispatched when ca calling `world.maintain()`.\n///\n/// Lazy updates are dispatched in the order that they\n/// are requested. Multiple updates sent from one system\n/// may be overridden by updates sent from other systems.\n///\n/// Please note that the provided methods take `lf`&self`\n/// so there\'s no need to get `LazyUpdate` mutably.\n/// This resource is added to the world by default.\n#[derivative(Default)]\npub struct LazyUpdate {\n #[derivative(Default (value = \"Some(Default::default())\"))]\n queue: Option<Queue<Box<dyUpdn LazyUpdateInternal>>>,\n}"
while(1)
{
char token[100];
int index = 0;
bool flag;
if(Worker2())
break;
-- Таблица №1:
CREATE TABLE [dbo].[tbl1](
[id] [int] NULL,
[_int] [int] NULL,
[_str] [varchar](1) NULL
)
-- Таблица №2:
CREATE TABLE [dbo].[tbl2](
[id] [int] NULL,