Python – Check TensorFlow Using GPU

To check weather Tensorflow using GPU follow these steps:   from tensorflow.python.client import device_lib print(device_lib.list_local_devices()) If GPU support is not enabled you will see the output as follows If you have GPU support enabled then you will see the output as follows.   Run Below code to assign specific GPU to your code if you… Read More »

Easy Password validator for MVC C#

If you are developing an application in MVC C# use this code in your password model to make easy validation [Required] [DataType(DataType.Password)] [StringLength(100, ErrorMessage = “The {0} must be at least {2} characters long.”, MinimumLength = 8)] [Display(Name = “Password”)] [RegularExpression(“^((?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])|(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[^a-zA-Z0-9])|(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[^a-zA-Z0-9])|(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^a-zA-Z0-9])).{8,}$”, ErrorMessage = “Passwords must be at least 8 characters and contain at 3 of… Read More »

Regx for Validating UAE Telephone Numbers

This is the regx which can be used to validate UAE contact numbers in your developments. In C# Use as below in your models [RegularExpression(“^(?:\\+971|00971|0)?(?:50|51|52|54|55|56|58|2|3|4|6|7|9)\\d{7}$”, ErrorMessage = “Enter Valid UAE Numbers”)] public string Mobile { get; set; } Verify and test this regx online : In other designs you can use this  ^(?:\+971|00971|0)?(?:50|51|52|54|55|56|58|2|3|4|6|7|9)\d{7}$    … Read More »

SB Admin 2 Bootstrap Theme – Visual Studio 2017

I have updated the SB Admin 2 theme to match with Visual Studio 2017 . I have also updated all the nuget packages related. Features SB Admin 2 Bootstrap admin theme, dashboard template, or webapp UI starter. The theme features a variety of custom jQuery plugins to add extended functionality past the built in Bootstrap… Read More »

Configuring Email in SQL Server Express

Its a known issue that SQL Server express edition wont support Email . TO overcome this we can use CLR based email stored procedure.   Step 1 : Compile the VB code and convert as a dll. Code : Imports System.Net.Mail Public Class StoredProcedure <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub spSendMail(ByVal recipients As String, ByVal subject… Read More »

Integrating Google Recaptcha to Webid – Auction Script

Webid do not have built in support for new google Recaptcha . If use enable Recaptcha of webid your registration form may not work. To resolve this follow below steps.   Step 1 : Register for google Recaptcha Enter google username and Password   Once you register google will provide a site key , please… Read More »

SignalR – Real-time web communication between Client and Server Easy c# [Part 1 of 2]

What is SignalR ? ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers.… Read More »

SignalR & Oracle DB Change Notification [Part 2 of 2]

What is Oracle change Notification ? The Oracle Data Provider for .NET provides a notification framework that supports Database Change Notification in the database server. Database Change Notification enables applications to receive notifications from a registered callback routine when there is a change in a query result set, schema objects, or the state of the… Read More »