ESP-12E Based Weather Station – NodeMCU 12-E, BME280 and Yaler

Preface : Develop a Weather Station which can be accessed through the internet Advantage : Extremely low budget Easily available hardware Easy to configure Hardware Components Required : NodeMCU – ESP 8266-12E BME280 I2C or SPI Temperature Humidity Pressure Sensor Breadboard Internet Subscription Required : Yaler.net   Hardware Details ESP8266 – NodeMCU 12E     BME/BMP 280 Sensor Bread Board               Jumper cables                           Pin Configuration Pin Number D3 ESP — > SDA Pin BMP/BME 280 Pin Number D4 ESP — > SDB Pin BMP/BME 280 Pin Number 3V3 ESP — > VIN Pin BMP/BME 280 Pin Number GND ESP — > GND Pin BMP/BME 280 Online Subscription for Domain Send an email to get an account by paying their fee. Once you get the user account note down your Relay-Host and Relay-Domain   Install Arduino (if you dont have) from https://www.arduino.cc/en/Main/Software   After installation Open the Arduino software. Tools –> Boards –> Board Manager       You can also download the Yaler library files from https://bitbucket.org/yaler/yalercontrib/downloads/YalerESP8266WiFiServer.zip   Once download copy to Arduino Library folder make sure your folder looks like […]

» Read more

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 have multiple GPU   import tensorflow as tf with tf.device(‘/gpu:0′): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name=’a’) b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name=’b’) c = tf.matmul(a, b) with tf.Session() as sess: print (sess.run(c))

» Read more

Secure your WhatsApp with 2 Step Verification today!

Hereis the tips to secure your whatsapp with 2 step verification. Why I need to secure? If you lose your mobile number for any reason like failed ID card registration or finishing the contract with service providers all your messages will not be available for the next subscriber of the same number. If the new subscriber cannot enter the pass code your number will be automatically removed from any previous subscribed groups. Usually if there is no 2 step pass code all your contents including pictures will be available to the next subscriber of your number without your consent. What 2 step will do? Once you enable 2 step authentication, WhatsApp will frequently make sure you are the real owner of the WhatsApp account. Also in case you change mobile device it will copy the previous content only after you enter valid passcode. How to Enable 2 Step Verification in WhatsApp ? Its very simple procedure and hardly takes 2 minutes to harness your whatsapp account privacy. Procedure for Android Users : Open Whatsapp –> Settings –> Account –> 2 Step Verification –> Enable Please keep note of the 6 digit passcode you have entered. In case you forgot the […]

» 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 4 of the following: upper case (A-Z), lower case (a-z), number (0-9) and special character (e.g. !@#$%^&*)”)] public string Password { get; set; } This will impose following password policy Passwords must be at least 8 characters And Satisfy any of  3 from 4 of the following: upper case (A-Z), lower case (a-z), number (0-9) special character (e.g. !@#$%^&*)

» 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 : https://regexr.com/47qlv 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 UI features. Live Preview : https://blackrockdigital.github.io/startbootstrap-sb-admin-2/pages/index.html Mode Details : https://startbootstrap.com/template-overviews/sb-admin-2/ Download From GitHub: https://github.com/haneefputtur/HaneefSBAdmin2  

» 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 As String, ByVal from As String, ByVal body As String) Dim mySmtpClient As SmtpClient Using myMessage As New MailMessage(from, recipients) myMessage.Subject = subject myMessage.Body = body myMessage.IsBodyHtml = True mySmtpClient = New SmtpClient(“smtp.zxvzxvxzvx.com”) mySmtpClient.Credentials = New System.Net.NetworkCredential(“haneef@xcxzvcxzvz.com”, “vzxvxzvxzvz”) mySmtpClient.Send(myMessage) End Using End Sub End Class Step 2: Replace these 2 lines with your smtp username , password amd smtp server adress mySmtpClient = New SmtpClient(“smtpxxxxxxxx.com”) mySmtpClient.Credentials = New System.Net.NetworkCredential(“haneef@xxxxxxxx.com”, “Password”) Save the above file in d:\sendmail.vb Step 3: Complie the code using below command.   C:\Windows\system32>C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc /target:li brary D:\sendmail.vb The above will comile and create a file sendmail.dll in the same location. Step 4: Run this command in SQL management studio ALTER DATABASE msdb SET trustworthy ON Step 5: Create the assembly in SQL management studio   USE msdb GO CREATE ASSEMBLY SendEmail FROM ‘C:\SendEmail.dll’ WITH PERMISSION_SET = UNSAFE GO Step 6: Enable CLR sp_configure […]

» Read more

Install 2 Whatsapp in One Android Phone – Parallel Space

We always carry two mobile phones just for sake of 2 different accounts. Sometime we face this challenge if we have dual sim mobile still we carry the second mobile for purpose of whatsapp. Hereis the solution which will help you to clone any app and run as a second user. Search For Parallel Space in Android Playstore Android Application : https://play.google.com/store/apps/details?id=com.lbe.parallel.intl&hl=en     Features : Clone and run multiple accounts of the same app simultaneously, and use themes to style your unique space. As one of the top-ranked tools on Android, Parallel Space helps more than 90 million users log on multiple accounts at the same time on one device and highlight their own style. It also protects user privacy by making apps invisible on device with the Incognito Installation feature. Moreover, users are able to customize themes of their cloned apps and the themes of Parallel Space to style their own space. Parallel Space supports 24 languages, and be compatible with most Android apps. Get Parallel Space immediately to manage multiple accounts, protect privacy, and customize your own space. ★Log in to multiple accounts of social networking apps or game apps at the same time on one device • […]

» 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 https://www.google.com/recaptcha/admin Enter google username and Password   Once you register google will provide a site key , please make a note of it. Step 2 : Open the file themes/modern/global_header.tpl     .. If you are using different theme use concerned folder. Add This line exactly before the >/head> tag <script src=’https://www.google.com/recaptcha/api.js’></script> Step 3 : Open themes/modern/register.tpl   and replace below code   Replace below code block after replacing the site key <div class=”form-group col-lg-12″> <div class=”capchabox”>{CAPCHA}</div> </div> <!– CAPCHA CODE –> <div class=”form-group col-lg-12″> <div class=”g-recaptcha” data-sitekey=”SITE KEY HERE”></div> </div>     Now login to webid panel and disable captcha setting to now as below.   Now you open the home page in webid admin panel and click on clear cache as below Now open the registration page you will see the new Google recapcha version 2 as follows    

» 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. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization. Features of this exercise after you complete: # Send real time message to client without client refreshing the page # Receive real time communication or message from client without refreshing the page. #Send message to all connected clients. # Send message to specific client. # Send message to all client except one who sent it… # This is a proof of concept …. you can extend it to the way you want…   How to Install SignalR to MVC C# ? Steps : Open Visual Studio 2015 Create New MVC Project Install SignalR from Nuget Package  – Install-Package Microsoft.AspNet.SignalR -Version 2.2.2 Create SignalR Hub Create Owin Startup File Create A view and include SignalR library reference Test the Application Extend the functionality to the ActionMethod       Testing the […]

» Read more
1 2 3 44