By admin , 18 March, 2022

Symfony

Symfony is an open-source MVC based PHP framework for both web and console projects.

M:  All the Database operation takes place in the Model.

V:  All the User Interface  takes place in the View.

C:  All the business logic takes place in the Controller.

Symfony is sponsored by SensioLabs. It was developed by Fabien Potencier in 2005

Symfony is majorly a set of reusable PHP components and bundles. Their independent component is not strict with Symfony framework  and  can be used in any PHP project.

Installing Symfony Framework

Symfony can be install in two ways.

  1. Using Composer
  2. Using Symfony CLI

Using Composer

Composer is used for download/Install Symfony Components.

Step1: composer create-project symfony/skeleton my-project
Step2: cd my-project/
Step3: composer require webapp
Step4: php -S 127.0.0.1:8000 -t public
Step5: Open your browser and navigate to https://127.0.0.1:8000 or http://localhost:8000/. If everything is working, you'll see a welcome page.

Using Symfony CLI

Symfony CLI is a developer tool to help you build, run, and manage only your Symfony applications directly from your terminal.

install using Symfony CLI is recommended . Symfony CLI creates a binary called symfony that provides all the tools you need to develop and run your Symfony application locally.

cd my-project/
symfony server:start

Symfony_traditional

Run Your Symfony Applications

Open your console terminal, move into your new project directory and start the local web server as follows:

run_symfony

Open your browser and navigate to https://127.0.0.1:8000 or http://localhost:8000/. If everything is working, you'll see a welcome page

we

You can run Symfony applications with any web server (Apache, nginx, the internal PHP web server, etc.). However, Symfony provides its own web server to make you more productive while developing your applications.

Lets Understand term components and bundles

Components are collection of classes providing a single core functionality. For example, Cache component provides cache functionality, which can be added to any application.

Symfony components are being used by a lot of open source projects that include Composer, Drupal, and phpBB.

Kernel component is the heart of the system. Kernel is basically the ‘main class’ that manages the environment and has the responsibility of handling a http request.

HttpKernel is the core component of the Symfony web framework.

A Symfony bundle is a collection of files and folders organized in a specific structure. The bundles are modeled in such a way that it can be reused in multiple applications. The main application itself is packaged as a bundle and it is generally called AppBundle

 Bundles In Symfony versions prior to 4.0, it was recommended to organize your own application code using bundles. This is no longer recommended and bundles should only be used to share code and features between multiple applications.

Path where Bundles must be enabled    [Root directory]/config/bundles.php file:

 

Feature

  • The core features of Symfony framework are implemented with bundles (FrameworkBundle, SecurityBundle, DebugBundle, etc.) They are also used to add new features in your application via third-party bundles.

Start Coding!

By admin , 16 March, 2022

OOPs is a programming technique used to combine data and the functions that interact with it into a single entity so that no other parts of the code may touch it.

benefits of object-oriented programming?

  • Used to creation of reusable code.
  • It is used to resolving an issue by generating objects.

Difference between C and C++

C C++
C has not built-in support for OOP concepts but in C we can make program in OOPS style without built-in OOP support. C++ has built-in support for OOP concepts.
   

 

Four fundamental OOP concepts(also called pillar of object oriented programming)

1 . ABSTRACTION

2. ENCAPSULATION

3. INHERITANCE

4. POLYMORPHISM

 

By admin , 16 March, 2022

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Python 2 Vs. Python 3

The two versions of Python- Python 2  and Python 3 are the most widely used Python versions and there are many differences between these versions which are as follows:

Python 1 Python 2 Python 3
Python 1 The release year of Python 2 is 2000 The release year of Python 3 is 2008
Python 1 The syntax is more complex in this version than in Python 3 The syntax is easy and simple
Python 1 By default, strings are saved in ASCII format in version 2 of Python By default, strings are saved in UNICODE format in this version.
Python 1 In Python 2, Print is a statement. So, the syntax is print “hello” In Python 3, Print is a function. So, the syntax is print (“hello”).
Python 1 Exceptions should be enclosed in notations in Python 2. Exceptions should be enclosed in parentheses in Python 3.
Python 1 In python 2, while using variables inside a for-loop, their values do change. In Python 3, the value of variables stays constant.
Python 1 Python 2 is not that popular after 2020 compared to Python 3 Python 3 is a more popular version of Python and is being used for many purposes
Python 1 To perform iterations in Python 2, xrange() is used To perform iterations in Python 3, Range() is used
By admin , 16 March, 2022

To undertand the  HttpKernel first we need to understand how the web page works over the server.

Every HTTP web interaction begins with a request and ends with a response. 

for this we require  server and browser.

Generally developer make a request (create PHP code)(e.g. the URL)  in a browser;

The browser sends a request to the server;

The server sends back the 

to the browser;

The browser displays the resource to the user.

Generally developer make a request (create PHP code)(e.g. the URL)  and returns a response (e.g. an HTML page or JSON string). 

By admin , 9 March, 2022

In Statistics we play with data. data is in organized form rather than raw data.

Grouped vs. Ungrouped Data


Grouped data : Organized data is presented in a tabular form

Ungrouped Data: Unorganized data presented as raw data.

interval:

Next interval must be start where previous left. if that is not a case during problem solving we have to make new interval.

Lets understand the concept 

1. Mean for Grouped Data: 

By admin , 9 March, 2022

Arithmetic covers listed topic below.

Statistics

By admin , 8 March, 2022

Variables are containers used for storing information.

Creating Variables

Remember that PHP variable names are case-sensitive!.

Rules for creating PHP variables:

  • A variable starts with the $ sign, followed by the name of the variable
  • A variable name must start with a letter or the underscore character
  • A variable name cannot start with a number
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  • Variable names are case-sensitive ($age and $AGE are two different variables)

 

 

Note: Unlike other programming languages, PHP do not need to be declared with any particular type, and can even change type after they have been set. Creating and Declaring are done at a same time.

By admin , 8 March, 2022

Data Structure  = Data + Structure

Data:  Raw facts in the figure.

Structure:  Organization of data inside computer memory.

A data structure is a particular way of organizing data(store, retrieve ,update) in a computer memory so that it can be used effectively.

 

 

By admin , 6 March, 2022

Step1: Ready your setup by Installing the Python and Anaconda Distributions

Step1.2:When installation is finished, from the Start menu, open the Anaconda Prompt and Test your installation installed , by typing:

C:\Users\manoj>conda -V
conda 4.2.9
C:\Users\manoj>conda list

# packages in environment at C:\Users\manoj\anaconda3:

#

# Name                                     Version                   Build                        Channel

scipy                                         1.7.1                       py39hbe87c03_2

numpy                                      1.20.3                      py39ha4e8547_0

matplotlib                                  3.4.3                       py39haa95532_0

pandas                                     1.3.4                        py39h6214cd6_0

Step1.3: in the  command(conda list) By default Anaconda should automatically available below libraries check and confirm once if yes, then all set.

  • scipy
  • numpy
  • matplotlib
  • pandas
C:\Users\manoj>python
Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

Step2:Loading the dataset.

...
...
By admin , 6 March, 2022

https://gist.github.com/apphp-snippets/2759502

Search engine algorithm

Encryption algorithm

Greedy algorithm

Recursive algorithm

Backtracking algorithm

Divide-and-conquer algorithm

Dynamic programming algorithm

Brute-force algorithm

Sorting algorithm

Hashing algorithm

Randomized algorithm