TypeScript protocol for a JSON response object (from node.js backend for example):
interface Circle {
type: "circle";
radius: number;
}
interface Square {
type: "square";
size: number;
using System; | |
using System.Text.Json; | |
var inProgress = StatusFactory.InProgress(); | |
var complete = StatusFactory.Complete("Expected data"); | |
var failure = StatusFactory.Failure(404); | |
var options = new JsonSerializerOptions | |
{ | |
PropertyNamingPolicy = JsonNamingPolicy.CamelCase |
using System; | |
using System.Buffers; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
using Hexarc.Annotations; | |
namespace Hexarc.Union |
const table = { | |
"а": "a", "А": "A", | |
"б": "b", "Б": "B", | |
"в": "v", "В": "V", | |
"г": "g", "Г": "G", | |
"д": "d", "Д": "D", | |
"е": "e", "Е": "E", | |
"ё": "e", "Ё": "Е", | |
"ж": "zh", "Ж": "Zh", | |
"з": "z", "З": "Z", |
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
TypeScript protocol for a JSON response object (from node.js backend for example):
interface Circle {
type: "circle";
radius: number;
}
interface Square {
type: "square";
size: number;
function splitString (value: string, chunkSize: number) { | |
let re = new RegExp('.{1,' + chunkSize + '}', 'g'); | |
return value.match(re); | |
} |
type Primitive = string | number | boolean; | |
module Iters { | |
export function* where<T>( | |
generator: () => IterableIterator<T>, | |
predicate: (value: T, index: number) => boolean | |
) { | |
let index = 0; | |
for (let item of generator()) { | |
if (predicate(item, index)) { |
com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure during read query at consistency LOCAL_ONE (1 responses were required but only 0 replica responded, 2 failed) | |
at com.datastax.driver.core.exceptions.ReadFailureException.copy(ReadFailureException.java:95) | |
at com.datastax.driver.core.Responses$Error.asException(Responses.java:128) | |
at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:179) | |
at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:184) | |
at com.datastax.driver.core.RequestHandler.access$2500(RequestHandler.java:43) | |
at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:798) | |
at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:617) | |
at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1005) | |
at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:928) |
use TestDB | |
if object_id('tempdb..#ProductEmployee') is not null drop table #ProductEmployee | |
if object_id('tempdb..#Employee') is not null drop table #Employee | |
if object_id('tempdb..#Product') is not null drop table #Product | |
-- No PK/FK definitions for brevity | |
create table #Employee | |
( | |
ID int, |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Globalization; | |
using System.Collections.Generic; | |
namespace Shadeglare.Utils | |
{ |