Posts

Showing posts with the label Javascript

Angular: building basic calculator

Image
Introduction In this tutorial, we will walk through the steps to create a simple calculator application using Angular. This exercise is designed to help you practice your Angular skills and understand the basics of building a user interface and handling events. Prerequisites Before you begin, ensure you have the following: Basic understanding of Angular Angular CLI installed Node.js and npm installed Step 1: Setting Up the Project First, let's create a new Angular project. Open your terminal and run: ng new BasicCalculator  cd BasicCalculator  ng serve This will set up a new Angular project and start the development server. You can view the default application by navigating to http://localhost:4200 in your browser. Step 2: Designing the Calculator UI In app.component.html, design the UI of the calculator. Here's a simple structure to get you started: <div class="container"> <div class="calculator"> <div><input class=...

Asymmetric cryptography using Angular 9 and Asp.net Web Api

Image
Introduction Nothing better than to learn something new during our free time. A new programming language, why not. Thus to make my mind busy as a geek i tried to learn Angular 9 and create a small application nothing fancy at all and called it Asymmetric cryptography. In simple words using Angular 9 to create the client side application and hooked it up with an ASP.NET web api. To conclude i deployed the application on Microsoft azure. How it works Key generation Asymmetric cryptography uses 2 key pairs to encryption  and decryption data. The 2 keys consist of a private key and a public key. To produce a cipher text (encryption), the public key alongside with the plain text will be used. In the same way, in order to produce a plain text (decryption) the cipher text will be used with the private key. The images below illustrate how asymmetric cryptography works: To use the application first select the key length namely: 512 bit 1024 bit 2048 bit 4096 bit...

Face recognition using EmguCV 3.0 and typing pattern recognition

Image
Introduction An MSc project with the title Student Examination System, where the objective is to put the students in an examination condition but instead of having an invigilator in an examination center, the system will cater for the proper ongoing of the exam. the system can be used as an online examination system The system is able to: Recognizing the face shape of a particular student Detect if there is more than one person in the examination room  Analyze the typing pattern of a student and detect if any one person is taking part in the exam voice recognition for the student and detect if there is more than one person speaking in the examination room Setup Download Emgu CV from  http://www.emgu.com/wiki/index.php/Main_Page Download Haarcascade from  https://github.com/opencv/opencv/tree/master/data/haarcascades Create an account at  https://www.keytrac.net/ Face recognition The snippet below illustrates how the Emgu CV is loaded whe...

Google reCAPTCHA implementation - ASP.NET C#, ASP.NET Web API, Android

Image
Google reCAPTCHA implementation ASP.NET C# Steps to implement Google reCAPTCHA in your website using technologies such as ASP.NET C#, ASP.NET web API, HTML and javascript. First you need to use your google account to login to Google reCAPTCHA  to register a new site. Add a label of your choice in the label section and for web implementation select the reCAPTCHA V2 radio button. Next in the domain section you can add several domains, for testing purposes you can add localhost also followed by another domain in the next line. Accept the terms and conditions and click on the button register. After you click register, google will generate a site key and a secret key and  instructions how to integrate it on both client and server side. Create ASP.NET Web API Next step is to open Microsoft Visual Studio and create a new project by selecting File > New from the menu bar and then select Project.  Select ASP.NET Web Application(.NET Framework) in the p...

Student Information System - AngularJS , ASP.NET API, C#

Image
Web based application the student information system is a small application that allows user to register and login to view information about a particular student and can perform several actions like Login and register to the application View students  Add new student Delete a particular student Update user information Screen Shot Project architecture routing.js, config.js and app.js allow the application to route from one partial view to another and config.js is used to save all the endpoint needed to access the API.   For separation of concerns, in the solution panel separate partial views, controller and services in different directories and reference it in index.html to enable angular to load all the files required Login process login.html LoginController.js Using $resource from AngularJS to make an API call and response  with a user details model UserViewModel and UserDetailsViewModel Using Unity fo...