How to apply specific Sortingvector<int> salary = {100, 34, 90, 1, 14, 65, 22, 21, 90}; Q: Sort this array in NON-decreasing order.A: using the in-built sort function we can write // we need to include bits/stdc++ library sort(v.begin(), v.end()); // {1, 14, 21, 22, 34, 65, 90,...Jan 29, 2024·2 min read
#Day3 of LaravelQ. What is "::" Operator ?A. Its static method access operator. To access static methods we use "::" operator before the class name. Example Route::get() Q. Why do we use static members and methods ?A. So that we don't have to instantiate an object o...Oct 6, 2023·2 min read
#Day 2 of Laravel1. In Laravel you create applications based upon MVC Architecture. Read my blog on MVC architecture here: https://mayank1728.hashnode.dev/eli5-mvc-pattern. 2. How to user Services like authentication and routing? Using the bind method or serviceprovi...Oct 5, 2023·2 min read
#Day 1 of LaravelBird's eye view of each folder 1. App: Contains Main App Logic for our server. We will spend most of our time writing code here. 2. Bootstrap: Here Laravel setups/creates our app. 3. Config: Contains default setting for your app. Ex Which is the defa...Oct 4, 2023·1 min read
Why const, final, late, var, and dynamic ?Const Const variables are completely immutable. Once constructed can never be changed and values are determined at *compile time. Reassignment is NOT allowed. The address(reference) inside the variable CANNOT be changed NO modification is allowed. ...Sep 1, 2023·4 min read
ELI5: MVC PatternThings can become messy really fast depending upon the application you are building. That's why we have a way of building and organizing things called the MVC pattern. Here we divide the application into 3 parts: Model, View and Controllers. In one w...Aug 30, 2023·2 min read
15 Things I learned about NetworkingA computer can act as a Client and as a Server. A computer is the Client when it requests data from the Server. Ex: When you enter "https: //www. youtube.com/" in the browser, the browser sends the request to Youtube servers. Here your computer ACTs...Aug 19, 2023·2 min read