This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CompositeFilterMapper<T> | |
{ | |
private readonly CompositeFilterDescriptor _compositeFilterDescriptor;= | |
public CompositeFilterMapper(CompositeFilterDescriptor compositeFilterDescriptor) | |
{ | |
_compositeFilterDescriptor = compositeFilterDescriptor; | |
} | |
public QueryContainer GetQueryContainer(QueryContainerDescriptor<ElasticDataUpload<T>> query) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.EntityFrameworkCore; | |
using Nest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { process, State } from '@progress/kendo-data-query'; | |
import { sampleProducts } from './products'; | |
import { | |
GridComponent, | |
GridDataResult, | |
DataStateChangeEvent | |
} from '@progress/kendo-angular-grid'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CompositeFilterDescriptor | |
{ | |
[JsonProperty("logic")] | |
public string Logic { get; set; } | |
[JsonProperty("filters")] | |
public ICollection<CompositeFilterDescriptor> Filters { get; set; } | |
[JsonProperty("field")] | |
public string Field { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <opencv2/opencv.hpp> | |
int main( int argc, char** argv ) | |
{ | |
VideoCapture cap; | |
if(!cap.open(0)) | |
return 0; | |
Mat frame; | |
cap >> frame; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Redirect old-domain to new-domain" stopProcessing="true"> | |
<match url=".*" /> | |
<action type="Redirect" url="http://<<appdomain>>/{R:0}" redirectType="Permanent" /> | |
</rule> | |
</rules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with tf.name_scope("ImageInputLayer"): | |
image_input = tf.placeholder(tf.float32, shape=[None, 307, 441, 3]) | |
x_image = tf.summary.image('input_cards', image_input, 5) | |
y_ = tf.placeholder(tf.int32, [None, len(features.InternalId)]) | |
with tf.device(get_available_gpus()[0]): | |
with tf.name_scope("ConvolutionLayer1"): | |
with tf.name_scope("Weights"): | |
W_conv1 = weight_variable([5, 5, 3, 32]) | |
variable_summaries(W_conv1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName("StreamOutputToElastic")] | |
public static async Task<HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req, TraceWriter log) | |
{ | |
var node = new Uri("http://{username}:{password}@{ipaddress}:9200"); | |
var settings = new ConnectionSettings(node); | |
settings.DefaultIndex("my-index"); | |
var elasticClient = new ElasticClient(settings); | |
var records = await req.Content.ReadAsAsync<T>(); | |
await elasticClient.IndexManyAsync(timeStampedEvents, "my-index-name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async void ReceiveC2dAsync() | |
{ | |
Console.WriteLine("\nReceiving cloud to device messages from service"); | |
while (true) | |
{ | |
Message receivedMessage = await deviceClient.ReceiveAsync(); | |
if (receivedMessage == null) continue; | |
Console.ForegroundColor = ConsoleColor.Yellow; | |
Console.WriteLine("Received message: {0}", Encoding.ASCII.GetString(receivedMessage.GetBytes())); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Run(Stream myBlob, TraceWriter log) | |
{ | |
log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes"); | |
} |