Skip to content

Instantly share code, notes, and snippets.

//Работает со сколько угодным вложенным массивом
func flattenArray<T>(_ arr: Array<Any?>) -> [T] {
var result = [T]()
for item in arr {
if item is [Any?] {
result += flattenArray(item as! [Any?])
} else if item != nil {
result.append(item as! T)
}
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
@MikeWar1ock
MikeWar1ock / SOAPtest.cs
Created April 29, 2020 23:55
CBR request example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Net;
using System.IO;
using System.Data;
using System.Xml.Linq;
namespace Terrasoft.Configuration
{
using Core.Entities;
using System;
using System.Collections.Generic;
using Terrasoft.Core;
public class CalendarHelper
{
private readonly UserConnection _userConnection;
@MikeWar1ock
MikeWar1ock / FindGuidInString.cs
Created January 15, 2019 14:36
Example how to find all of Guid's in some string value.
using System;
using System.Text.RegularExpressions;
namespace myApp
{
class Program
{
static void Main(string[] args)
{
string str = "7c347b7b-cdd1-4889-83d6-b0f54c460835 SocialMessage f45696fb-7399-4b7e-90fc-5509e5970d4a";
diff: /**SCHEMA_DIFF*/[
{
"operation": "insert",
"name": "Tab6ccaa1feTabLabel",
"values": {
"caption": "Хранилище",
"items": []
},
"parentName": "Tabs",
"propertyName": "tabs",
//fpc 3.0.0
program Palindrom;
var b,c,bMod:int64;
var a,cStr:string;
begin
a:= '044';
var path = require('path')
var webpack = require('webpack')
module.exports = {
mode: 'development',
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'babel-polyfill',
'./src/index'
namespace Terrasoft.Configuration
{
using System;
using Core;
using Messaging.Common;
using global::Common.Logging;
public static class KmMsgChannelUtilities
{
define("CardModuleResponseInterceptor", ["terrasoft", "ext-base", "sandbox", "BaseModule"],
function(Terrasoft, Ext, sandbox) {
Ext.define("Terrasoft.configuration.CardModuleResponseInterceptor", {
alternateClassName: "Terrasoft.CardModuleResponseInterceptor",
extend: "Terrasoft.BaseModule",
Ext: null,
sandbox: null,
Terrasoft: null,
viewModel: null,
view: null,