Skip to content

Instantly share code, notes, and snippets.

View guntidheerajkumar's full-sized avatar
💭
Happy

Dheeraj Kumar Gunti guntidheerajkumar

💭
Happy
View GitHub Profile
view.Layer.MaskedCorners = (CoreAnimation.CACornerMask)3;
view.Layer.CornerRadius = 15f;
0: no rounded corners
1: top left
2: top right
3: top left & right (both top corners)
4: bottom left
5: top & bottom left (both left corners)
6: top right & bottom left
public class EncryptDecrypt
{
public (string Key, string IVBase64) InitSymmetricEncryptionKeyIV()
{
var key = GetEncodedRandomString(32); // 256
Aes cipher = CreateCipher(key);
var IVBase64 = Convert.ToBase64String(cipher.IV);
return (key, IVBase64);
}
using System;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.AppCenter.Analytics;
namespace DotnetMobileCommands
{
public class MobileCommand<T> : ICommand
{
private Action _action;
namespace Mobile.Commands
{
public class CustomCommand<T> : ICommand
{
private Action _action;
private Action<object> _newAction;
private string _activityName;
private bool _canExecute;
private readonly Func<T, Task> _executeTask;
setInterval(function updateClock() {
var currentTime = new Date();
var currentHours = currentTime.getHours();
var currentMinutes = currentTime.getMinutes();
var currentSeconds = currentTime.getSeconds();
// Pad the minutes and seconds with leading zeros, if required
currentMinutes = (currentMinutes < 10 ? "0" : "") + currentMinutes;
currentSeconds = (currentSeconds < 10 ? "0" : "") + currentSeconds;
// Choose either "AM" or "PM" as appropriate
public enum PasswordScore
{
Blank = 0,
VeryWeak = 1,
Weak = 2,
Medium = 3,
Strong = 4,
VeryStrong = 5
}
public class Employee
{
public Employee()
{
}
///Primary Key
public int EmpId
{
get;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Export.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
HtmlForm frm = new HtmlForm();
GrdView.Parent.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(GrdView);
frm.RenderControl(hw);
[assembly: Xamarin.Forms.Dependency(typeof(LoadingService))]
namespace YourNameSpace
{
public class LoadingService : ILoadingService
{
public LoadingService()
{
}
#region ILoadingService implementation
public interface ILoadingService
{
void Show (string message = "Loading");
void Hide ();
}