Skip to content

Instantly share code, notes, and snippets.

View snmslavk's full-sized avatar
💬

Slava snmslavk

💬
  • Prague, Czech Republic
  • 23:35 (UTC +02:00)
View GitHub Profile
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; }
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Data
{
public Localization localization { get; set; }
public List<Content> content { get; set; }
}
}
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Field
{
public string field { get; set; }
public Dictionary<string,string> translations { get; set; }
}
}
using System.Collections.Generic;
namespace DigitalFuture.Intranet.Models.Analytics
{
public class Localization
{
public List<Field> fields { get; set; }
}
}
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>
// ----------------------------------------------------------------------------------
//
// 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.
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];
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"
@snmslavk
snmslavk / testgist
Created January 28, 2020 11:07
test description
testgist
@snmslavk
snmslavk / cleanup_gwt.bat
Last active January 28, 2020 11:08
The script that cleans unused #gwt temp files
@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