Posts

Showing posts from December, 2020

How To Secure Apache with Let's Encrypt on Ubuntu (Digital Ocean)

Image
  Introduction This tutorial will show you how to set up a TLS/SSL certificate from Let’s Encrypt on an Ubuntu 16.04 server running Apache as a web server. SSL certificates are used within web servers to encrypt the traffic between the server and client, providing extra security for users accessing your application. Let’s Encrypt provides an easy way to obtain and install trusted certificates for free. Prerequisites In order to complete this guide, you will need: An Ubuntu 16.04 server with a non-root sudo-enabled user, which you can set up by following our Initial Server Setup guide The Apache web server installed with one or more domain names properly configured through Virtual Hosts that specify ServerName . When you are ready to move on, log into your server using your sudo-enabled account. Step 1 — Install the Let’s Encrypt Client Let’s Encrypt certificates are fetched via client software running on your server. The official client is called Certbot, and i...

Frequently asked: Vue.JS Interview Questions and Answers

Image
  Q1. What is Vue.js? What are the advantages of it? Vue is a progressive framework used to building user interfaces.The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. Following are the advantages of using Vue.js. Small in size — The size of this framework is 18 to 21KB and it takes no time for the user to download and use it. Easy to Understand — One of the reasons for the popularity of this framework is that it is quite easy to understand. The user can easily add Vue.js to his web project because of its simple structure. Simple Integration — Vue.js can be integrated with the existing applications easily. Flexibility — This flexibility also makes it easy to understand for the developers of React.js, Angular.js, and any other new JavaScript framework. Virtual DOM — It uses virtual DOM similar to other existing frameworks such as ReactJS, Ember etc. Virtual DOM is a light-weight in-memory tre...

The difference between COMPUTED and METHODS in Vue.js

Image
  They are very similar and could be used to do same things many times but at the same time they are very different and need to be used in different ways. Methods They are static functions usually used to react to events which happen in the DOM and they accept arguments . They are incredibly useful for connecting functionality to events, or even just creating small parts of logic to be reused. You can call a method inside another method, they are very versatile! They are often used to run a functionality from the DOM. i.e. You want to show an output when a user click a button. Computed properties They don’t accept arguments and they are very handy for composing new data from existing sources, they get dynamic values based on other properties. They are often used to do calculation and at the end to return a value. i.e. You are rendering a list of items ordered by date. Here a simple example that makes the idea: var vm = new Vue({ el: '#vue-app', data: { firstname...

Three Types Page Redirect using HTML,Javascript,PHP

Image
  Today we are going to learn how to redirect a page 1)Using HTML <!DOCTYPE html> <html> <head>     <title>Redirect</title>     <meta http-equiv = "refresh" content = "5; url = https://mwtc.in" /> </head> <body>         <h2>Welcome Redirect</h2> </body> </html> 2)Using Javascript <!DOCTYPE html> <html> <head>     <title>Redirect</title> </head> <body>         <h2>Welcome Redirect Javascript</h2> <script type="text/javascript">     window.location.href="http://facebook.com"; </script> </body> </html>   3)Using PHP  <?php header("Location: https://yahoo.com"); ?> <!DOCTYPE html> <html> <head>     <title>Redirect</title> </head> <body>   ...

Laravel could not open input file artisan

Image
    How we fix it : - This is a very common error message that a Laravel user gets. Now let’s see why does this error appears. 1. Wrong console location This error mainly occurs when a user tries to open a Laravel project outside the project folder. Laravel can only execute the project if we open it inside the project folder. That is what the error says ‘ could not open input file ‘. So whenever customers approach us with this error, we ask the customer to re-check the location where they execute the command. 2. Improper permissions of artisan Sometimes the artisan may not be executable. If the user tries to execute the command, it cannot access it. And the user receives this error. So to make artisan executable, we use the command chmod +x artisan Later try to use the command, and it will work.       

PHP Barcode Generator

Image
  Step 1 :- First we have to create a form named index.php and paste below code : - <!DOCTYPE html> <html> <head>     <title></title>     <link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> </head> <body>     <div class="container">             <div class="row">                 <div class="col-md-4">                             <form method="post">                                     <div class="row">           ...

How to reverse string in vue js

Image
  HTML part : - < div id = "example" > < p > Original message: "{{ message }}" </ p > < p > Computed reversed message: "{{ reversedMessage }}" </ p > </ div >   JS Part : -   var vm = new Vue({ el : '#example' , data : { message : 'Hello' }, computed : { // a computed getter reversedMessage : function ( ) { // `this` points to the vm instance return this .message.split( '' ).reverse().join( '' ) } } })

Indian Mobile No. Validation using Javascript and Jquery

Image
  Type 1 Validation using Javascript : - <!DOCTYPE html> <html> <head>     <title>Indian Mobile No. Validation</title> </head> <body> <h1 style="text-align:center">Indian Mobile No. Validation</h1> <form>     <table align="center" border="30">              <tr>             <td>Mobile No.</td>             <td><input type="text" id="mobile" maxlength="10"  placeholder="Enter Your Mobile No."  /></td>         </tr>                  <tr>             <td colspan="2">                 <input type="button"...