Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
creating new things

Viacheslav Avsenev snmslavk

🤖
creating new things
View GitHub Profile
@snmslavk
snmslavk / cleanup_gwt.bat
Last active Jan 28, 2020
The script that cleans unused #gwt temp files
View cleanup_gwt.bat
@ECHO OFF
ECHO Cleaning ImageResourceGenerator files ...
IF EXIST "%TEMP%\ImageResourceGenerator*" DEL "%TEMP%\ImageResourceGenerator*" /F /Q
ECHO Cleaning uiBinder files ...
IF EXIST "%TEMP%\uiBinder*" DEL "%TEMP%\uiBinder*" /F /Q
ECHO Cleaning gwt files ...
IF EXIST "%TEMP%\gwt*" DEL "%TEMP%\gwt*" /F /Q
@snmslavk
snmslavk / testgist
Created Jan 28, 2020
test description
View increment-downloads-nuget.ps1
1..100 | % {
Write-Host "LOOP $_"
Write-Host "CLEAR CHACHE"
Remove-Item c:\Users\v.avsenev\.nuget\packages\kafka-net-core\ -Force -Recurse
dotnet nuget locals http-cache --clear
Write-Host "GENERATE NAME"
$AppName = "console-" + -join ((65..90) + (97..122) | Get-Random -Count 5 | % {[char]$_})
Write-Host $AppName
Write-Host "create app"
View 832
class Solution {
public int[][] flipAndInvertImage(int[][] A) {
// reverse
for( int i = 0; i < A.length; i++)
{
for( int j = 0; i < A[i].length / 2; i++)
{
int len = A[i].length;
int tmp = A[i][j];
A[i][j] = A[i][len - j - 1];
View HttpClientOperationsFactory.cs
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
View controller.cs
public ChartObject ReturnTestData()
{
return new ChartObject
{
data = new Data
{
content = new List<Content> {new Content {segment = "ea", key = "1", visits = 192}},
localization = new Localization
{
fields = new List<Field>
View Localization.cs
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Localization
{
public List<Field> fields { get; set; }
}
}
View Field.cs
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Field
{
public string field { get; set; }
public Dictionary<string,string> translations { get; set; }
}
}
View Data.cs
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Data
{
public Localization localization { get; set; }
public List<Content> content { get; set; }
}
}
View Content.cs
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Content
{
public string segment { get; set; }
public string dateLabel { get; set; }
public object date { get; set; }
public string key { get; set; }
public int visits { get; set; }
public int value { get; set; }