Skip to main content

Posts

Showing posts from 2019

All about Microservices and Containers and Monolithic Architecure

Brief Containers, by contrast, are much smaller — perhaps one tenth or one hundredth the size of a virtual machine. And, because they do not require the operating system spin-up time associated with a virtual machine, containers are more efficient at initialization. Overall, containers start in seconds, or even milliseconds in some cases. That's much faster than VMs. That's why, from a performance perspective, containers are a much better execution foundation for microservices architectures. Their quick instantiation maps much better to the erratic workload characteristics associated with microservices.  Monolithic vs Microservices Architecture Monolithic applications are more of a single complete package, having all the related needed components and services encapsulated in one package. Fig: Monolithic Architecture A microservice is an approach to create small services, each running in their own space that can communicate via messaging. These are inde

How to install Precision Touchpad Drivers on Windows 10

Brief Even if you don’t have it preinstalled with the laptop that you bought you can still install the drivers and use the advantages of Microsoft’s Precision Touchpad. This trick is effective if your touchpad is Elan or Synaptics. So, before you proceed any further you must check this. Download Link:  click here Checking touchpad drivers 1. Right click on the start icon 2. Click on “Device Manager” 3. Expand “Mice and other pointing devices” and see if it says Elan or Synaptics Installing Precision Touchpad Since Precision Touchpad is developed to work with Windows 10 it means that you should have a better experience. Users are reporting better movement and sensitivity after installing the precision touchpad drivers. Before you begin, make sure to have a mouse at hand in case the installation kills the touchpad and you need to do a restart. Let’s begin. 1. Download the required driver. If you have a Synaptics touchpad download this   driver  and if you ha

(JavaScript/jQuery): Create dynamically anchor tag and simulate click on that anchor tag automatically.

================================= var link = document.createElement('a');           link.href = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' + response.data;           link.download = "report" + GetCurrentDate() + ".xlsx";           //Firefox requires the link to be in the body           document.body.appendChild(link);           //simulate click           link.click();           //remove the link when done           document.body.removeChild(link); ================================= var GetCurrentDate = function () {       var today = new Date();       var dd = today.getDate();       var mm = today.getMonth() + 1; //January is 0!       var yyyy = today.getFullYear();       today = yyyy + '-' + mm + '-' + dd;       return today;     }; ======================================= //quarter = 2018.4, output = FY18 Q4 var GetFormattedQuarter = function (quarter) {       if (quarter) {        

Add Swagger To Asp.Net Core Rest API

Brief Add SwaggerGen to the services collection in the Configure method, and in the ConfigureServices method, enable the middleware for serving generated JSON document and the SwaggerUI. public void ConfigureServices ( IServiceCollection services ) { // Add framework services. services . AddMvc (); services . AddLogging (); // Add our repository type services . AddSingleton < ITodoRepository , TodoRepository >(); // Inject an implementation of ISwaggerProvider with defaulted settings applied services . AddSwaggerGen (); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure ( IApplicationBuilder app , IHostingEnvironment env , ILoggerFactory loggerFactory ) { app . UseMvcWithDefaultRoute (); // Enable middleware to serve generated Swagger as a JSON endpoint app . UseSwagger (); // Enable middlewar

Copy and Replace the .dll and .pdb file to the specified folder

Brief Solution copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)HP.EMEA.Web\App_Data\Dependencies\$(ProjectName).dll" copy /Y "$(TargetDir)$(ProjectName).pdb" "$(SolutionDir)HP.EMEA.Web\App_Data\Dependencies\$(ProjectName).pdb" copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)HP.EMEA.Web\bin\$(ProjectName).dll" copy /Y "$(TargetDir)$(ProjectName).pdb" "$(SolutionDir)HP.EMEA.Web\bin\$(ProjectName).pdb"

npm install on windows 7 python2 not found error and node-sass@3.13.1 error #317

Before I write all, I'd like to say that before the update everything worked well; while updating node from version 7.2.1 to version 9.4.0 and npm from version 5.5.1 to version 5.6.0 in Windows 7 (64-bit) using the installer (https://nodejs.org/en/download/) and installing globally gulp-cli version 2.0.0, as far as npm install starts from the JointsWP folder I get the following error: $ npm install npm WARN deprecated babel-preset-es2015@6.24.1: รฐ  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue > uws@0.14.5 install C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\uws > node-gyp rebuild > build_log.txt 2>&

Highlight Menu On Scrolling (if reach div)

Brief Use   $(this).offset().top   instead of   $(this).position().top Fiddle As   .position()   get the current coordinates of the first element in the set of matched elements, relative to the offset parent whereas   .offset()   get the current coordinates of the first element in the set of matched elements, relative to the document. In your website all the DIV with class inside   .target   are inside therefore all the element of class   .target   are returning the value   .position().top   equal to 0. Decrease the offset value so that the   class   change when element reach the menu by making the   if   condition like this: if ( $ ( window ). scrollTop () >= $ ( this ). offset (). top - $ ( "#cssmenu" ). height ()) HTML <section id="main">     <div class="target" id="1">TARGET 1</div>     <div class="target" id="2">TARGET 2</div>     <div class="target" id="

OpenCV installation and not working in PyCharm fixes.

Brief pip install opencv - python pip3 install cv2 pip install opencv - python pip3 install cv2   Go to File->Settings->Project Interpreter and then add buy '+' button 'opencv-python' module on this repository. It downloaded without an error for my PyCharm and also downloaded the dependencies as well. Link StackvOverflow

Steps using Github with Git Bash and Git Tortoise

Brief We will learn below things: Download tortoise git from the URL ( https://tortoisegit.org/ ) Download git from the URL ( https://git-scm.com/downloads ) Integrate local git with the remote GitHub . Initialize git in the local folder using git tortoise . Push and Pull the code from the master branch. Create different branches and check out between those branches from the local. Setup After downloading the git and git tortoise, install those files and you will be shown the below window when you right click inside any Folder in the windows. Initialize Git from the Git Tortoise Click on the "Git Create Repository Here" as shown in the first context menu and Press "Ok". You will see '.git' folder added as below. Right click inside the project Folder and hover on "TortoiseGit". The snapshot will be shown. Setting Up the Remote Repository into the local Click on the "Settings" as shown in the

Top 10 in the world (Job Sites, Skills in demand, Free Education, etc) Sites,

Top 10 Sites for your career:* 1. Linkedin 2. Indeed 3. Naukri 4. Careerealism 5. Job-Hunt 6. JobBait 7. Careercloud 8. GM4JH 9. Personalbrandingblog 10. Jibberjobber  *Top 10 Tech Skills in demand in 2019:* 1. Machine Learning 2. Mobile Development 3. SEO/SEM Marketing 4. Data Visualization 5. Data Engineeringj 6. UI/UX Design 7. Cyber-security 8. Cloud Computing/AWS 9. Blockchain 10. IOT  *Top 10 Sites for Free Online Education:* 1. Coursera 2. edX 3. Khan Academy 4. Udemy 5. iTunesU Free Courses 6. MIT OpenCourseWare 7. Stanford Online 8. Codecademy 9. Open Culture Online Courses  *Top 10 Sites to learn Excel for free:* 1. Microsoft Excel Help Center 2. Excel Exposure 3. Chandoo 4. Excel Central 5. Contextures 6. Excel Hero 7. Mr. Excel 8. Improve Your Excel 9. Excel Easy 10. Excel Jet  *Top 10 Sites to review your resume for free:* 1. Zety Resume Builder 2. Resumonk 3. Resume dot com 4. VisualCV 5. Cvmaker 6. ResumUP 7. Re

Dependency Injection (DI) or Inversion of Control (IoC)

Brief The DI should be done using IoC but not through direct dependency injection. Please refer below image for clear picture. Links Conforming Container Dependency injection in ASP.NET Core IoC

Make .Net Web API queue requests operate 'single threaded'

Brief When working with a multithreading application it is very important for developers to handle multiple threads for a critical section of code. Monitor and lock is the way to provide thread safety in a multithreaded application in C#. Both provide a mechanism to ensure that only one thread is executing code at the same time to avoid any functional breaking of code. Example  Lock for only one request to be processed at a time. private static object s_SyncRoot = new object (); ... new Task (() => { lock ( s_SyncRoot ) { // process payment - single thread } }). Start (); return "ok" ; Links StackOverflow Monitor And Lock In C#