Skip to content

Instantly share code, notes, and snippets.

View tnayanam's full-sized avatar

Tanuj Nayanam tnayanam

  • Syracuse, NY
View GitHub Profile
// DONE
resource "aws_lambda_function" "lambda_tf" {
function_name = "FunctionHandler"
role = "${aws_iam_role.iam_for_lambda.arn}"
handler = "Terra5::Terra5.Function::FunctionHandler"
runtime = "dotnetcore3.1"
# The filebase64sha256() function is available in Terraform 0.11.12 and later
# For Terraform 0.11.11 and earlier, use the base64sha256() function and the file() function:
using System;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.DynamoDBEvents;
using Amazon.DynamoDBv2.Model;
using Microsoft.Azure.ServiceBus;
using System;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using Amazon.Lambda.Core;
using Amazon.Lambda.DynamoDBEvents;
using Amazon.DynamoDBv2.Model;
using Microsoft.Azure.ServiceBus;
using SM.BrokerDomain.DTO.Configuration;
using SM.Common.BLL.AppServices.Statistics;
using SM.Common.BLL.Helpers;
using SM.Common.DTO.Configuration;
using SM.Common.DTO.Exceptions;
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using SM.BrokerDomain.DTO.Configuration;
using SM.BrokerDomain.DTO.Federation;
using SM.BrokerDomain.DTO.System;
using SM.BrokerDomain.Repo.SystemModels;
namespace SM.BrokerDomain.BLL
{
/// <summary>
/// Performs bulk-writes of logs to the database.
/// Do not use this class directly for logging. Instead, use the FederationLogger singleton for logging.
/// </summary>
public class BulkLogWriter
{
public class BulkLogWriterResult
{
namespace SM.BrokerDomain.BLL
{
/// <summary>
/// Performs bulk-writes of logs to the database.
/// Do not use this class directly for logging. Instead, use the FederationLogger singleton for logging.
/// </summary>
public class BulkLogWriter
{
using Amazon;
using Amazon.CloudWatchLogs;
using Newtonsoft.Json;
using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Threading;
namespace ConsoleApp16
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<script runat="server">
protected void btnSave_Click(object sender, EventArgs e)
{
//Include three second delay for example only.
System.Threading.Thread.Sleep(3000);
Label1.Text = "Button Clicked";
}
// Suppose we want to update something based on Ajax Call
UI: HTML Dropdown
Step 1: // ***here we have the change event of dropdown which will call ajax
<select id="idselect" name="classselect" onchange="makeajaxcall()">
<option value="2">Two</option>
<option value="3">Three</option>
</select>
Step 2: Make the actual ajax call on change of dropdown
<script>
function makeajaxcall()