Prayag Sagar

1

votes
1

answer
954

views

What is the difference between uid and sAMAccountName

What is the difference between uid and sAMAccountName attributes of a Microsoft Active Directory. Edit : I am aware of the fact that sAMAccountName is a mandatory field and uid is not. Can someone explain how they differ from each other in terms of usage
Prayag Sagar
3

votes
1

answer
2k

views

Read a SNS message at AWS Lambda Function written in C#

I have a lambda function at AWS written in c#. This lambda function would read an incoming SNS message. Below is my lambda code. public void FunctionHandler(Amazon.Lambda.SNSEvents.SNSEvent.SNSMessage message, ILambdaContext context) { if (message.Message == null) { Console.WriteLi...
Prayag Sagar
5

votes
4

answer
1.7k

views

Regex in javascript to allow only numbers, commas, and a single decimal point

Currently i am using this regex to match for positive numbers with a single decimal point /^\d+(\.\d+)?$/ But this doesn't allow commas. How can i modify this to allow zero or more commas before the decimal point? Example : 11,111.00 (should be allowed) I am okay with numbers having any number of...
Prayag Sagar
4

votes
1

answer
438

views

What is the difference between DropDownList.ClearSelection() and DropDownList.SelectedIndex=-1

What is the difference between DropDownList.ClearSelection(); and DropDownList.SelectedIndex = -1; while working with a dropdownlist? Edit : I am aware of the definitions for these available at MSDN. Can someone provide differences in implementation/practical use.
Prayag Sagar
1

votes
5

answer
138

views

Replace only a part of the string in SQL

I have a table with a nvarchar column having DateTime data in YYYY:MM:DD HH:MM:SS format. I want to convert and update this data into YYYY-MM-DD HH:MM:SS format. The problem i am facing is, If i use REPLACE, all : gets replaced by -, something like YYYY-MM-DD HH-MM-SS format. How can i achieve this?...
Prayag Sagar