Secret mind

hi Friends, I am Aman gupta and a web developer. I learned many languages such as java, javaScript, python, clang, php, jquery, mysql database, Html and css and many more just to make a perfect and wonderfully website. Here i will upload related post of PHP, Secret of world, computer science, Feelings, GK, And Question paper.

Trending video

Responsive Ads Here

الخميس، 3 مارس 2022

AEG RELATION SD YADAV MATH BOOK

AGE RELATION SD YADAV BOOK

Age Relation || आयु सम्बन्धी || Full Solution || From Q 1 to Q 50 || SD Yadav Book Solution || 2019 Edition || HIndi || Maths || Yadav Academy || Amit Yadav || यादव एकेडमी

AGE RELATION


join my telegram chenel:- https://t.me/Amaneducationpoint Age Relation Chapter Details :- 1.Age Relation Part 1
5.Age Relation Part 5 6.Age Relation part 6 7. Age Relation part 7 8. Age Relation part 8 9.Age Relation part 9 10 Age Relation Part 10 11 Age Relation Part 11 For Prepration:- DEO, Income tax Inspactor, PO and clerk in RBI, SBI, UBI & NABARD etc. Railways, Police requirment, CPO, IAS, IPS, CBI, CISF, IB, CAT, MAT, CPO, SI, Constable , NDA, CDS, TC, TT, SSC. specially SSC SD Yadav SD Yadav Maths Book SD Yadav Maths Book Solution SD Yadav Maths Book Solution hindi S D Yadav aayu sambandhi #sdyadav #maths #solution https://yadavacademy108.blogspot.com/ sd यादव मैथ्स SHARDA ANKGANIT BOOK SHARDA ANKGANIT BOOK SOLUTION sd यादव अंकगणित SHARDA MATHS SHARDA ANKGANIT MATHS SHARDA PUBLICATION MATHS SHARDA BOOK FULL SOLUTION IN HINDI sd yadav math Age Relation Age Relation sd yadav sd yadav Age Relation sd yadav maths sd yadav sd yadav maths book sd yadav maths book in hindi Age Relation shortcut and tricks Age Relation tricks and shortcut Age Relation tricks Age Relation tricks in hindi Age Relation shortcut Age Relation problems tricks and shortcut  

tag:- sd yadav percentage solution,sd yadav math,sd,sd yadav number system,sd yadav age relation,sd yadaav age,sd yadav book solve,sd yadav full,sd yadav math short trick,sd yadav profit and loss,sd yadav profit and loss solve,dr sd yadav maths book in hindi,sd yadav ratio and proportion,sd yadav age full solve,Aman educatgion point,educaiton point,Education adda,wifi study classes,wifistudy,perfection academy,mp police reasoning,perfection academy reasoning 

الأربعاء، 5 يناير 2022

The Comprehensive Mobile Ethical Hacking Course

 The Comprehensive  Mobile Ethical Hacking Course

Secret Mind


About us:-  

Mobile devices introduce new threats to organizations through untrusted applications. Therefore, it has become a mandate to evaluate and identify flaws regularly and conduct penetration tests to avoid any mishaps and losses. This course provides hands-on practical experience on ethical hacking for mobile applications & mobile devices.

Course link:- Click me


The Complete Mobile Ethical Hacking Course

Watch, Learn and Implement. Create your Hacking Lab. The Comprehensive Mobile Ethical Hacking Course provides the capabilities to protect against attacks and verify compliance with corporate risk and privacy policies. The course content focuses on mobile application security solution combined with the remediation capabilities that enable you to secure the mobile applications and device along with the server-side infrastructure with which the communication is done for iOS and Android devices.

Course Link:- Click me


It will explain the process of jailbreaking, rooting and reverse engineering in mobile phones. This course includes intensive learning about how to deploy a step-by-step mobile device penetration test. It will help you to leverage your knowledge about cloud security. By the end of this course you will be able to identify the risks and implement mobile security in enterprise workspace.


Thanks for watching

الاثنين، 3 يناير 2022

Whai is SQL Injection ?



 How to hack any website







Whai is SQL Injection ?

SQl injection is a web security vulnerability  that allows  an attacker  to interfere with the queries that an application makes to its database. It generally allows an attacker to view data that are not normally able to retrieve. This might include data belonging to other users, or any other data that the application itself is able to access. In many cases, an attacker can modify or delete this data, causing persistent changes to the application's content or behaviour.In some situations, an attacker can escalate an SQL injection attack to compromise the underlying server or other back-end infrastructure, or perform a denial-of-service attack







Thanks for watching

الأربعاء، 15 ديسمبر 2021

Learn Wi-Fi Password Penetration Testing (WEP/WPA/WPA2)

 Learn Wi-Fi Password Penetration Testing (WEP/WPA/WPA2) 


Secret mind
Wifi  Hacking course


What You will learn:-

  • Learn the main weaknesses of WEP encryption and how it can be cracked
  • Gain access to WPA2 Enterprise networks
  • Use the GPU for faster cracking
  • Understand how devices communicate with each other in a netowrk
  • Discover wireless networks within range
  • Discover connected devices to each wifi network within range 
  • Launch interactive packet reply attack to crack WEP encryption
  • Learn WPA/WPA2 weakness and the theory behind cracking it
  • Capture handshake and launch word list attack
  • Launch a wordlist attack using the GPU
  • How to protect wireless networks from cracking attacks
  • Configure wireless networks to protect against the discussed attacks
  • Understand a number of techniques to crack WEP,WPA & WPA2
  • Hack captive portals (eg: hotel and airport networks).
  • Have a good understanding of how networks operate
  • Launch chopchop reply attack to crack WEP encryption
  • Gather information about wifi networks
  • Disconnect any device from any network within range
  • Launch fragmentation attack to crack WEP encryption
  • Exploit WPS feature to crack WPA/WPA2 without a wordlist and without the need to any connected clients
  • Create your own wordlist
  • Launch a word list attack using a rainbow table
  • Spot weaknesses in wireless networks in order to protect your network


This Course I Will Provide You Totally free of cost  



Download link free :- Click me



Thanks for watching

الثلاثاء، 14 ديسمبر 2021

Best hacking book free and paid

 

Best hacking book free and paid 

Hacking book


Hacking book provide by Secret mind

1. Bypass Android Pattern Lock from ADB Tool [Free] -Click me
2. The_Hacker's_Underground_Handbook [free] - Click me
3. Batch File Programming - Ankit Fadia [free] - Click me
4. Facebook Hacking [Paid price only 50 rupy] - contact 8700263572 
5. Hacking_gmail [Paid price only 35 rupy]- Contact 8700263572
6. Dangerous Google - Searching For Secrets [Free] - Click me
7. McGraw.Hill.Gray.Hat.Hacking.2nd.EdSpunkins [Free] - Click me
8. High School Hacking [Free] - Click me
9. Learn Python And Ethical Hacking Full course [Paid price 150 Only ] - Contact 8700263572
10. Termux Full Course [free] - Click me
11. Adobe photoshop CC Crash Course Learn [Free]- Click me
12. CSS - Basics To Advanced for front end development (2021) [Free]-Click me
13. C++ Programing laguage course [free] - Click me 
14. HTML5 Ultimate Course [Free] - Click me
15 C++ book [free] - click me
16 black book of compuer viruses [free] - click me 
17.  501 Website Secrets [free]- click me
18.  7 Reasons a Credit Card is blocked [free] - Click me
19.   Bypass Gmail Mobile Verification [free]- Click me
20.Instagram hacked, like followers with video [free] - Click me 
21.

السبت، 4 أبريل 2020

DBMS Important Questions for exam 2021

DBMS Important Questions for exam


DBMS Important Questions for exam 2020
DBMS Important Questions for exam 2020

Q: 1 What is a DBMS (Database Management System)?

Answer: Database Management System (DBMS) is a collection of computer programs that control the creation, maintenance, and use of databases. This enables organizations to place database development control in the hands of database administrators (DBAs) and other specialists. A DBMS is a system software package that helps you use a collection of data records and files known as databases. This allows various user application programs to easily access the same database. DBMS can use one of various database models, such as network models or relational models. In large systems, DBMS allows users and other software to store and retrieve data in a structured manner. Instead of having to write a computer program to extract information, users can ask simple questions in the request language. As such, many DBMS packages provide a fourth generation programming language (4GL) and other application development features. This helps to determine the logical organization for the database and access and use information in the database. It provides facilities to control data access, enforce data integrity, manage concurrency, and restore databases from backup. The DBMS also provides the ability to present database information logically to users.

Q: 2 Define the Database.
Answer: A database is a collection of information that is organized so that it can be easily accessed, managed and updated. In one view, databases can be classified according to content types: bibliography, full text, numbers, and images.

In computing, databases are sometimes classified according to their organizational approach. The most common approach is a relational database, a tabular database where data is defined so that it can be reorganized and accessed in a number of different ways. Distributed databases are databases that can be distributed or replicated between different points in a network. Object-oriented programming databases are congruent with data defined in object classes and subclasses.

A computer database usually contains a collection of data records or files,

such as sales transactions, product catalogs and inventory, and customer profiles. Typically, database managers give users the ability to control read / write access, determine report generation, and analyze usage.



Q: 3 What is Data?

Answer: Data is the plural form of datum, which is originally a Latin noun meaning "something given." Today, data is used in English both as a plural noun meaning "facts or pieces of information" and as a single mass noun meaning "information".

In computing, data is information that has been translated into a form that is more convenient to move or process. Relative to computers and transmission media today, data is information that is converted into binary digital forms.


Q.4 Why is it recommended to use a DBMS? Explain by listing some of its main advantages.

Answer: Some of the main advantages of DBMS are as follows:

Controlled Redundancy: The DBMS supports a mechanism to control data redundancy in the database by integrating all data into one database and because data is stored in only one place, data duplication does not occur.
Data Sharing: Sharing data among many users simultaneously can also be done in a DBMS because the same database will be shared among all users and by various application programs.
Backup and Recovery Facility: The DBMS minimizes the pain of backing up data over and over again by providing a 'backup and recovery' feature that automatically backs up data and restores data whenever needed.
Enforcement of Integrity Constraints: Integrity Constraints are very important to be enforced on the data so that the enhanced data after putting some constraints are stored in the database and this is followed by the DBMS.
Data Independence: This means you can change the data structure without affecting the structure of any application program.


Q.5 What types of languages ​​are available in the DBMS?
Answer: Basically, there are 3 types of languages ​​in the DBMS as mentioned below:

  1. DDL: DDL is a Data Definition Language used to define databases and schema structures by using several sets of SQL Questions such as CREATE, ALTER, TRUNCATE, DROP and RENAME.
  2. DCL: DCL is a Data Control Language that is used to control user access in a database by using several sets of SQL Questions such as GRANT and REVOKE.
  3. DML: DML is a Data Manipulation Language that is used to do some manipulations in a database such as Insertion, Deletion, etc. By using several sets of SQL Questions such as SELECT, INSERT, DELETE and UPDATE.


Q: 6 What is SQL (Structured Query Language)?
Ans. Structured Query Language, is a database computer language designed to manage data in a relational database management system (RDBMS), and was originally based on algebra and relational calculus. Its scope includes data insertion, requests, updates and deletions, creation and modification of schemes, and data access control. SQL is one of the first commercial languages ​​for the Edgar F. Codd relational model.


SQL is DSL (Data Sub Language), which is a combination of two languages. These are Data Definition Languages ​​(DDL) and Data Manipulation Languages ​​(DML). Schema changes are part of DDL, while data changes are part of DML.





Q. 7 Explain the key concepts of Primary and Foreign Key.

Answer: A Primary Key is used to uniquely identify records in a database table while a Foreign Key is mainly used to link two or more tables together because this is a particular field in one database table that is the primary key of several other tables.

Example: There are 2 tables - Employees and Departments and both have one field / column which is the same as 'ID' where ID is the primary key of the Employee table while this is a foreign key for the Department table.

Q. 8 What is the use of DROP commands and what are the differences between DROP, TRUNCATE and DELETE commands?

Answer: The DROP command is a DDL command that is used to drop / delete existing tables, databases, indexes or views from a database.

The main differences between DROP, TRUNCATE and DELETE commands are:

DROP and TRUNCATE commands are DDL commands that are used to delete tables from a database and once a table is deleted, all privileges and indexes associated with the table can also be deleted. 2 This operation cannot be canceled and hence must be used with extreme caution.

DELETE Command, on the other hand, is a DML Command which is also used to delete rows from a table and this can be canceled.


Q. 9 Explain the concept of ACID properties in a DBMS?

Answer: The ACID property is a combination of Atomicity, Consistency, Isolation, and Durability. This property is very helpful in enabling a safe and secure way of sharing data among many users.


  1. Atomicity: This is based on the concept of "all or nothing" which basically means that if there is an update that occurs in the database then the update must be available to everyone other than users and application programs or it should not be available to anyone outside the user program and application.
  2. Consistency: This ensures that consistency is maintained in the database before or after any transactions that occur in the database.
  3. Isolation: As the name implies, this property states that each transaction that occurs separately from others, ie transactions that have started but have not yet been completed must be separated from the others so that other transactions are not affected by this transaction. .
  4. Durability: This property states that data must always be in a durable state ie any data that is committed must be available in the same state even if a failure or restart occurs in the system.




Q 10. What is the Difference Between Files and Databases? Can files qualify as a database?

Answer: The main difference between a simple file and a database is that a database has an independent way (SQL) to access information while a simple file does not fulfill the storage, management, and retrieval part of the database but is not an independent way to access the data. Many experienced programmers think that the main difference is that files cannot provide the multi-user capabilities provided by DBMS. But if we look at some old COBOL and C programs where files are the only way to store data, we can see functions such as locking, multi-user etc. provided very efficiently. So it's a matter of debate if some interviewers consider this to be the main difference between the file and the database receiving it ... getting into the debate might lose work.



Q 11. What is Data Independence?

Answer: Data independence determines that the application does not depend on the storage structure and data access strategy. This means that the ability to change the definition of a scheme at one level must not affect the definition of a scheme at the next higher level.
There are two types of data independence:


  1. Independence of physical data
  2. Logical data independence



Q 12. What is the Difference Between Dbms and Rdbms?

Answer: DBMS provides a systematic and organized way to store, manage and retrieve logically related information from gathering. RDBMS also provides what the DBMS provides but on top of that it provides the integrity of the relationship. So in short we can say

RDBMS = DBMS + INTEGRITY OF REFERENCES

This relationship is defined using "Foreign Key" in RDBMS. Many DBMS companies claim DBMS products are RDBMS compliant, but according to industry rules and regulations if the DBMS meets twelve CODD rules, this is really RDBMS. Almost all DBMS (SQL SERVER, ORACLE etc.) meet all twelve CODD rules and are considered as truly RDBMS.

Q 13. What is Functional Dependency?

Answer: Functional dependency is the starting point for normalization. It exists when the relationship between two attributes allows you to uniquely determine the value of the corresponding attribute.

Q 14. Can You Explain Insert, Update and Delete Questions in DBMS?

Answer: Insert statement is used to insert a new row into the table. Update to update the data in the table. Delete statement to delete records from the table. The code snippet below for Insert, Update and Delete: -

Enter into wbEmployee SET name = 'maxwell', age = '22 ';
UPDATE wbEmployee SET age = '22 'where name =' maxwell ';
REMOVE FROM wbEmployee WHERE name = 'david';

Q 15. What are Entity Sets?

Answer: This is a collection of all entities of a certain entity type in the database.

Q 16. What is the E-R Model?

Answer: The E-R model is a short name for the Entity Relationship model. This model is based on the real world. It contains basic objects (known as entities) and relationships between these objects

Q 17. What Do You Understand With Relationships in the Relational Database Model?

Answer: Relationships in the relational database model are defined as sets of tuples that have the same attributes. Tuples represent an object and also the information that contains the object. Objects are basically instances of classes and are used to hold larger images. Relationships are explained as tables and arranged in rows and columns. Data referenced by relations come in the same domain and has the same constraints. Relationships in the relational database model can be modified using commands such as insert, delete etc.

Q 18. What are the Two Principles of the Relational Database Model? What's the Difference Between Them?

Answer: The two main rules for the relational model are as follows:

Entity integrity: This is used to maintain integrity at the entity level
Referential integrity: used to maintain integrity on all values ​​that have been referred.
The differences between them are as follows:

Entity integrity says that in a database every entity must have a unique key; on the other hand referential integrity tells us that in the database every table of values ​​for all foreign keys will remain valid.
Referential integrity is based on entity integrity but not vice versa.
For example: if a table is present and there is a set of columns in which one column has a set of parent keys then to ensure that the table does not contain duplicate values, a unique index is defined in the column containing the parent key.

Q 19. What Do You Understand With Database Normalization?

Answer: Normalization is a very important part of the relational model. It consists of a set of procedures that eliminate non-atomic domains and data redundancy which prevents data manipulation and loss of data integrity. Normal form is a common form of normalization. This helps in reducing redundancy to improve overall information. This has some disadvantages because it increases complexity and has some processing overhead.

Q 20. What Do You Understand Data Independence?

Answer: Data independence tells about the independence of data in the application. Usually it relates to the storage structure and represents the ability to modify the schema definition. That does not affect the definition of the schema that is being written at a higher level. There are two types of data independence:

Independence of physical data: allows modifications to be made at the physical level and does not affect the logical level.
Logical data independence: allows modifications to be made at the logical level and affects the display level.


NOTE: Logic Data Independence is more difficult to achieve.


Q 21. Determine the B-tree.

Ans:- Data structures in the form of trees that store sorted data and search, insertion, sequential access, and deletion are permitted in logarithmic time.

Q 22. What is functional dependency? And explain all types of functional dependencies.
Answer: - Functional dependency is when one attribute determines another attribute in the DBMS system. Functional Dependency plays an important role in finding differences between good and bad database designs.



NOTES: - The functional dependency in is denoted by x-y between to set the f x & y attribute.


Functional dependency type: -


1. Multivalued dependency:-Multivalued dependencies occur in situations where there are several independent multivalued attributes in one table. Multivalued dependency is a complete constraint between two sets of attributes in a relation. This requires certain tuples to be present in a relationship.

2. Trial functional dependency:
Trivial dependence is a set of attributes called trivial if the attribute set is included in that attribute.

3. Non-trivial functional dependencies in the DBMS
Functional dependency which is also known as non-trivial dependence occurs when A-> B applies where B is not part of A. In a relationship, if attribute B is not a subset of attribute A, then it is considered as non-trivial dependency.

4. Transitive dependence:
Transitive is a type of functional dependency that occurs when t is indirectly formed by two functional dependencies.


Q 23. What are the key types in the DBMS?

Answer: - DBMS has seven types of keys, each of which has a different function:

1. Super keys: - Super keys are a group of single or multiple keys that identify rows in a table. Super keys may have additional attributes that are not needed for unique identification.

2.Candidate key: - A candidate key is a column of attributes or a set of attributes in a relation / table that qualifies for the unique of each tuple (row) of a relation can have one or more than one candidate key. The candidate key is also not the key to dinner.

3. Primary key: -A column or group of columns in a table that helps us uniquely identify each row in that table called the primary key. This DBMS cannot be duplicated. The same value cannot appear more than once in a table.

4. Alternative key: - All keys that are not primary keys are called alternative keys. This is a candidate key that is not currently the primary key. However, tables may have a single or multiple choices for primary keys.

5. Foreign key: - Foreign key is a column that is added to make a relationship with another table. Foreign keys help us maintain data integrity and also allow navigation between two instances of different entities. Every relationship in the model needs to be supported by a foreign key.

6. Compound key: Compound key has many fields that allow you to uniquely recognize certain records. It is possible that each column may not be unique by itself in the database. However, when combined with other columns or composite key combination columns it becomes unique.



7. Composite key: - A key that has many attributes to identify rows in a table is uniquely called a composite key. The difference between a compound and a composite key is that each part of the combined key can be a foreign key, but the composite key may or may not be part of a foreign key.

Q 24. Explain three architectural schemes.
Answer: - This architecture has three levels:

1. External level or user display
2. Conceptual or logical level
3. Internal or physical level



1. External level
This is also called display level. The reason this level is called "display" is because some users can see the desired data from this level that is taken internally from the database with the help of conceptual and internal level mapping.

Users do not need to know the details of the database schema such as data structures, table definitions, etc. users only pay attention to data that is returned to the display level after being retrieved from the database (at the internal level).

The external level is the "top level" of the Three Level DBMS Architecture.

2. Conceptual level
This is also called the logical level. All database designs such as data relationships, data schemes, etc. Described in this level.

Database constraints and security are also applied at this level of architecture. This level is managed by DBA (database administrator).

3. Internal level
This level is also known as the physical level. This level explains how data is actually stored in a storage device. This level is also responsible for allocating space to data. This is the lowest level of architecture.



Q 25. What is Data Independence? And everything illustrates.

Answer: - The database sees that the extraction of any three levels of change at any level can affect other level schemes (Database structure)

this should not lead to a redesign, re-implementation of a database called independence data.

NOTES: - The ability to modify the schema definition at one level without affecting the definition at a higher level is called data independence.

Type of Data Independence

In DBMS there are two types of data independence


  • Independence of physical data
  • Logical data independence.
  • Independence of Physical Data

Physical data independence helps you separate the conceptual level from the internal / physical level. This allows you to provide a logical description of the database without the need to specify a physical structure. Compared to Logical Independence, it's easy to achieve physical data independence.

With Physical Independence, you can easily change the structure or physical storage device with effects on conceptual schemes. Any changes made will be absorbed by the mapping between conceptual and internal levels. Physical data independence is achieved by the internal database level and then the transformation from the conceptual database level to the internal level.

Logical Data Independence
Logical data independence refers to the ability to modify the conceptual / schema level without changes in the schema followed at the level of logical data independence display ensuring that the application program. a conceptual modification is a logical structure of the database.

Q 26. What are the mapping and types?
Ans:-

Mapping:-

Mapping is the process of changing one level to another. In this process, data at one level is related to data at another level.

There are two types of mapping:


  • Conceptual / Internal Mapping
  • External / Conceptual Mapping

1. Conceptual / Internal Mapping:

Conceptual / internal mapping defines correspondence between conceptual display and store database.
This determines how conceptual notes and fields are represented at the internal level.
It connects conceptual schemes with internal schemes.
If the store database structure is changed.
If changes are made to the definition of a storage structure-then the conceptual / internal mapping must be changed accordingly, so that the conceptual scheme can remain invariant.
There might be a mapping between conceptual and internal levels.

2. External / Conceptual Mapping:

External / conceptual mapping defines correspondence between certain external views and conceptual views.
It connects every external scheme with a conceptual scheme.
The difference that can exist between these two levels is analogous to the difference that exists between the conceptual display and the stored database.
Example: fields can have different data types; fields and record names can be changed; several conceptual fields can be combined into one single external field.
A number of external displays can exist at the same time; a number of users can share given external displays: various external displays can overlap.
There may be some mapping between the external and conceptual levels


Thanks for watching any quarry please comment thankyou,

الأحد، 12 يناير 2020

Web technology ultra important question for exam

Web technology ultra important question for exam


Secret mind
Question and answer


Q1. Write a program  in which you used alert, prompt, and confirm box. 
Ans: JavaScript alert - Dialog box
An alert box is mostly used to give a warning to the user.alert() is a simple function to display a message to a dialog box (also called alert box). There is only one button which is an OK alert. Here is a simple example to display a text in the alert box.

HTML Code

<!DOCTYPE html>
<head>
<title>Javascript alert box example-1</title>
</head>
<body>
<h1 style="color: red">JavaScript alert() box example</h1>
<hr />
<script type="text/javascript">
alert("This is a alert box");
</script>
</body>
</html>

JavaScript prompt - Dialog box
The alert() method can not interact with the visitor. To interact with the user we use prompt(), which asks the visitor to input some information and stores the information in a variable. It is very useful when you want to popup a text box to get user input.

See the following example.

HTML Code

<!DOCTYPE html>
<head>
<title>JavaScript prompt() example-2</title>
</head>
<body>
<script type="text/javascript">
visiter_name = prompt("Input your name : ")
if(visiter_name != null && visiter_name != "")
alert("Your Name is : "+visiter_name);
else
alert("Blank name ...!")
</script>
</body>
</html>

JavaScript confirm - Dialog box
Confirm() displays a dialog box with two buttons, OK and Cancel and a text as a parameter. If the user clicks on OK button, confirm() returns true and on clicking Cancel button, confirm() returns false.

See the following web document.

HTML Code

<!DOCTYPE html>
<head>

<title>JavaScript confirm box example </title>
</head>
<body>
<h1 style="color: red">JavaScript confirm() box example</h1>
<hr />
<script type="text/javascript">
mess1='Press Ok to Continue.';
x = confirm(mess1);
if (x == true)
{
alert("You have clicked on Ok Button.");
}
else
{
alert("You have clicked on Cancel Button."); }
</script>
</body>
</html>



Q2. What is a chaning method ? explain with the proper example.
Ans: jQuery Method Chaining
The jQuery provides another robust feature called method chaining that allows us to perform multiple action on the same set of elements, all within a single line of code.

This is possible because most of the jQuery methods return a jQuery object that can be further used to call another method. Here's an example.

Example »

<!DOCTYPE html>
<head>
<title>Example of jQuery Method Chaining</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<style>
/* Some custom styles to beautify this example */
p {
    width: 200px;
padding: 40px 0;
font: bold 24px sans-serif;
text-align: center;
    background: #aaccaa;
    border: 1px solid #63a063;
    box-sizing: border-box;
}
</style>
<script>
$(document).ready(function(){
    $(".start").click(function(){
        $("p").animate({width: "100%"}).animate({fontSize: "46px"}).animate({borderWidth: 30});
    });
    $(".reset").click(function(){
        $("p").removeAttr("style");
    });
});
</script>
</head>
<body>
    <p>Hello World!</p>
    <button type="button" class="start">Start Chaining</button>
    <button type="button" class="reset">Reset</button>
</body>
</html>                         
The above example demonstrate the chaining of three animate() method. When a user click the trigger button, it expands the <p> to 100% width. Once the width change is complete the font-size is start animating and after its completion, the border animation will begin.

Q3.what is CDN server? And what is the Advantages of CDN server?
Ans:
CDN - Content Delivery Network:

CDN is short for content delivery network. A content delivery network (CDN) is a system of distributed servers (network) that deliver pages and other web content to a user, based on the geographic locations of the user, the origin of the webpage and the content delivery server.

This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user. CDNs also provide protection from large surges in traffic.

Advantages Of CDN
Companies that witness a huge traffic on their website on daily basis can use CDN to their advantage. When a large number of users simultaneously access a web page on some specific content such as a video, a CDN enables that content to be sent to each of them without delay. Here are few of the benefits of using a CDN for your website:

1. Your Server Load Will Decrease:
As a result of, strategically placed servers which form the backbone of the network the companies can have an increase in capacity and number of concurrent users that they can handle. Essentially, the content is spread out across several servers, as opposed to offloading them onto one large server.

2. Content Delivery Will Become Faster:
Due to higher reliability, operators can deliver high-quality content with a high level of service, low network server loads, and thus, lower costs. Moreover, jQuery is ubiquitous on the web. There’s a high probability that someone visiting a particular page has already done that in the past using the Google CDN. Therefore, the file has already been cached by the browser and the user won’t need to download again.

3. Segmenting Your Audience Becomes Easy:
CDNs can deliver different content to different users depending on the kind of device requesting the content. They are capable of detecting the type of mobile devices and can deliver a device-specific version of the content.

4. Lower Network Latency And Packet Loss:
End users experience less jitter and improved stream quality. CDN users can, therefore, deliver high definition content with high Quality of Service, low costs, and low network load.

5. Higher Availability And Better Usage Analytics:
CDNs dynamically distribute assets to the strategically placed core, fallback, and edge servers. CDNs can give more control of asset delivery and network load. They can optimize capacity per customer, provide views of real-time load and statistics, reveal which assets are popular, show active regions and report exact viewing details to customers. CDNs can thus offer 100% availability, even with large power, network or hardware outages.

6. Storage And Security:
CDNs offer secure storage capacity for content such as videos for enterprises that need it, as well as archiving and enhanced data backup services. CDNs can secure content through Digital Rights Management and limit access through user authentication.

Q4.state all the get elements method.
The HTML DOM Document Object
The document object represents your web page.

If you want to access any element in an HTML page, you always start with accessing the document object.

Below are some examples of how you can use the document object to access and manipulate HTML.

Finding HTML Elements
Often, with JavaScript, you want to manipulate HTML elements.

To do so, you have to find the elements first. There are several ways to do this:

  • Finding HTML elements by id
  • Finding HTML elements by tag name
  • Finding HTML elements by class name
  • Finding HTML elements by CSS selectors
  • Finding HTML elements by HTML object collections


Finding HTML Element by Id

The easiest way to find an HTML element in the DOM, is by using the element id.
This example finds the element with id="intro":
<!DOCTYPE html>
<html>
<body>

<h2>Finding HTML Elements by Id</h2>

<p id="intro">Hello World!</p>
<p>This example demonstrates the <b>getElementsById</b> method.</p>

<p id="demo"></p>

<script>
var myElement = document.getElementById("intro");
document.getElementById("demo").innerHTML = 
"The text from the intro paragraph is " + myElement.innerHTML;
</script>

</body>
</html>

Finding HTML Elements by Tag Name

This example finds all <p> elements:
<!DOCTYPE html>
<html>
<body>

<h2>Finding HTML Elements by Tag Name</h2>

<p>Hello World!</p>
<p>This example demonstrates the <b>getElementsByTagName</b> method.</p>

<p id="demo"></p>

<script>
var x = document.getElementsByTagName("p");
document.getElementById("demo").innerHTML = 
'The text in first paragraph (index 0) is: ' + x[0].innerHTML;
</script>

</body>
</html>



Finding HTML Elements by Class Name

If you want to find all HTML elements with the same class name, use getElementsByClassName().
This example returns a list of all elements with class="intro".

<!DOCTYPE html>
<html>
<body>

<h2>Finding HTML Elements by Class Name</h2>

<p>Hello World!</p>

<p class="intro">The DOM is very useful.</p>
<p class="intro">This example demonstrates the <b>getElementsByClassName</b> method.</p>

<p id="demo"></p>

<script>
var x = document.getElementsByClassName("intro");
document.getElementById("demo").innerHTML = 
'The first paragraph (index 0) with class="intro": ' + x[0].innerHTML;
</script>

</body>
</html>

Finding HTML Elements by CSS Selectors

If you want to find all HTML elements that match a specified CSS selector (id, class names, types, attributes, values of attributes, etc), use the querySelectorAll() method.
This example returns a list of all <p> elements with class="intro".
<!DOCTYPE html>
<html>
<body>

<h2>Finding HTML Elements by Query Selector</h2>

<p>Hello World!</p>

<p class="intro">The DOM is very useful.</p>
<p class="intro">This example demonstrates the <b>querySelectorAll</b> method.</p>

<p id="demo"></p>

<script>
var x = document.querySelectorAll("p.intro");
document.getElementById("demo").innerHTML = 
'The first paragraph (index 0) with class="intro": ' + x[0].innerHTML;
</script>

</body>
</html>

الثلاثاء، 7 يناير 2020

PHP ultra important questions || secret mind

PHP ultra important questions 


Aman gupta


Q1 write a program to create a table and insert multipul records in the table.

Ans:

Create table:  

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "demo";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// sql to create table
$sql = "CREATE TABLE aman (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)";

if ($conn->query($sql) === TRUE) {
    echo "Table aman created successfully";
} else {
    echo "Error creating table: " . $conn->error;
}
$conn->close();
?>

Insert multipul records in the table: 

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "demo";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO aman (firstname, lastname, email)
VALUES ('varun', 'meena', 'varun@example.com');";
$sql .= "INSERT INTO aman (firstname, lastname, email)
VALUES ('vandita', 'rajput', 'vandita@example.com');";
$sql .= "INSERT INTO aman (firstname, lastname, email)
VALUES ('shubham', 'podder', 'shubham@example.com')";
if ($conn->multi_query($sql) === TRUE) {
    echo "New records created successfully";
} else {
    echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>


Q2. write a program to update a record in the table.

Ans:

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "dbname";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "UPDATE tablename SET lastname='Doe' WHERE id=2";

if ($conn->query($sql) === TRUE) {
    echo "Record updated successfully";
} else {
    echo "Error updating record: " . $conn->error;
}

$conn->close();
?>


Q3. write a programe to delete a record in the table.
Ans:
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// sql to delete a record
$sql = "DELETE FROM tablename WHERE id=3";

if ($conn->query($sql) === TRUE) {
    echo "Record deleted successfully";
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();
?>

Q4. Write a program to create a database.
Ans:
<?php
$servername = "localhost";
$username = "root";
$password = "";


// Create connection
$conn = new mysqli($servername,$username,$password);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "Create DATABASE demo";

if ($conn->query($sql) === TRUE) {
    echo "database has been cerated";
} else {
  echo "database has been not craeted".$conn->connect_error;
}

$conn->close();

?>

Q5.what is cookie? write a program to create a cookie and delete a cookie?
Ans:
clike me and see 7 question

Q6.What is session? How you can create session variable and print the value of session variable also write a program to delete or destroy a session.
Ans:  When you work with an application, you open it, do some changes, and then you close it. This is much like a Session. The computer knows who you are. It knows when you start the application and when you end. But on the internet there is one problem: the web server does not know who you are or what you do, because the HTTP address doesn't maintain state.

Session variables solve this problem by storing user information to be used across multiple pages (e.g. username, favorite color, etc). By default, session variables last until the user closes the browser.

So; Session variables hold information about one single user, and are available to all pages in one application.


Start a PHP Session:
A session is started with the session_start() function.

Session variables are set with the PHP global variable: $_SESSION.

Now, let's create a new page called "demo_session1.php". In this page, we start a new PHP session and set some session variables:

Example
<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
// Set session variables
$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.";
?>

</body>
</html>

Destroy a PHP Session:
To remove all global session variables and destroy the session, use session_unset() and session_destroy():

Example
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>

<?php
// remove all session variables
session_unset();

// destroy the session
session_destroy();
?>

</body>
</html>


Q7. Write a program to create and read a file.

Ans: PHP Create File - fopen(): 

The fopen() function is also used to create a file. Maybe a little confusing, but in PHP, a file is created using the same function used to open files.

If you use fopen() on a file that does not exist, it will create it, given that the file is opened for writing (w) or appending (a).

The example below creates a new file called "testfile.txt". The file will be created in the same directory where the PHP code resides:

Example
$myfile = fopen("testfile.txt", "w")


PHP Write to File - fwrite():

The fwrite() function is used to write to a file.

The first parameter of fwrite() contains the name of the file to write to and the second parameter is the string to be written.

The example below writes a couple of names into a new file called "newfile.txt":

Example
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "John Doe\n";
fwrite($myfile, $txt);
$txt = "Jane Doe\n";
fwrite($myfile, $txt);
fclose($myfile);
?>

Notice that we wrote to the file "newfile.txt" twice. Each time we wrote to the file we sent the string $txt that first contained "John Doe" and second contained "Jane Doe". After we finished writing, we closed the file using the fclose() function.

Q8. Explain the difference between the following 
  1. GET and POST method
  2. print and echo
  3. include and require statement 
Ans: 
  1.  --> clike me and see question number 2 <--
  2. *Clicke me and see question number 1*
  3. *clicke me and see question number 11*
Q9. what is function? explain all the types of functtion with example.

Ans:PHP | Functions:

A function is a block of code written in a program to perform some specific task. We can relate functions in programs to employees in a office in real life for a better understanding of how functions work. Suppose the boss wants his employee to calculate the annual budget. So how will this process complete? The employee will take information about the statics from the boss, performs calculations and calculate the budget and shows the result to his boss. Functions works in a similar manner. They take informations as parameter, executes a block of statements or perform operations on this parameters and returns the result.
PHP provides us with two major types of functions:

  • Built-in functions : PHP provides us with huge collection of built-in library functions. These functions are already coded and stored in form of functions. To use those we just need to call them as per our requirement like, var_dump, fopen(), print_r(), gettype() and so on.
  • User Defined Functions : Apart from the built-in functions, PHP allows us to create our own customised functions called the user-defined functions.Using this we can create our own packages of code and use it wherever necessary by simply calling it.
 read more

Q10. What is array? Explain all the types of array with example.

Ans: An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length.

There are three different kind of arrays and each array value is accessed using an ID c which is called array index.

  • Numeric array − An array with a numeric index. Values are stored and accessed in linear fashion.
  • Associative array − An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.
  • Multidimensional array − An array containing one or more arrays and values are accessed using multiple indices

Numeric Array:

These arrays can store numbers, strings and any object but their index will be represented by numbers. By default array index starts from zero.

Example
Following is the example showing how to create and access numeric arrays.

Here we have used array() function to create array. This function is explained in function reference.
<html>
   <body>
   
      <?php
         /* First method to create array. */
         $numbers = array( 1, 2, 3, 4, 5);
         
         foreach( $numbers as $value ) {
            echo "Value is $value <br />";
         }
         
         /* Second method to create array. */
         $numbers[0] = "one";
         $numbers[1] = "two";
         $numbers[2] = "three";
         $numbers[3] = "four";
         $numbers[4] = "five";
         
         foreach( $numbers as $value ) {
            echo "Value is $value <br />";
         }
      ?>
      
   </body>
</html>

Associative Arrays:

The associative arrays are very similar to numeric arrays in term of functionality but they are different in terms of their index. Associative array will have their index as string so that you can establish a strong association between key and values.

To store the salaries of employees in an array, a numerically indexed array would not be the best choice. Instead, we could use the employees names as the keys in our associative array, and the value would be their respective salary.

NOTE − Don't keep associative array inside double quote while printing otherwise it would not return any value.

Example:
<html>
   <body>
      
      <?php
         /* First method to associate create array. */
         $salaries = array("mohammad" => 2000, "qadir" => 1000, "zara" => 500);
         
         echo "Salary of mohammad is ". $salaries['mohammad'] . "<br />";
         echo "Salary of qadir is ".  $salaries['qadir']. "<br />";
         echo "Salary of zara is ".  $salaries['zara']. "<br />";
         
         /* Second method to create array. */
         $salaries['mohammad'] = "high";
         $salaries['qadir'] = "medium";
         $salaries['zara'] = "low";
         
         echo "Salary of mohammad is ". $salaries['mohammad'] . "<br />";
         echo "Salary of qadir is ".  $salaries['qadir']. "<br />";
         echo "Salary of zara is ".  $salaries['zara']. "<br />";
      ?>
   
   </body>
</html>

Multidimensional Arrays:

A multi-dimensional array each element in the main array can also be an array. And each element in the sub-array can be an array, and so on. Values in the multi-dimensional array are accessed using multiple index.

Example
In this example we create a two dimensional array to store marks of three students in three subjects −

This example is an associative array, you can create numeric array in the same fashion.
<html>
   <body>
      
      <?php
         $marks = array( 
            "mohammad" => array (
               "physics" => 35,
               "maths" => 30,
               "chemistry" => 39
            ),
            
            "qadir" => array (
               "physics" => 30,
               "maths" => 32,
               "chemistry" => 29
            ),
            
            "zara" => array (
               "physics" => 31,
               "maths" => 22,
               "chemistry" => 39
            )
         );
         
         /* Accessing multi-dimensional array values */
         echo "Marks for mohammad in physics : " ;
         echo $marks['mohammad']['physics'] . "<br />"; 
         
         echo "Marks for qadir in maths : ";
         echo $marks['qadir']['maths'] . "<br />"; 
         
         echo "Marks for zara in chemistry : " ;
         echo $marks['zara']['chemistry'] . "<br />"; 
      ?>
   
   </body>
</html>

Q11 Write all the shorting method of the array with example and defination.
Ans: What is sorting?
Sorting refers to ordering data in an alphabetical, numerical order and increasing or decreasing fashion according to some linear relationship among the data items.Sorting greatly improves the efficiency of searching.

Sorting Functions For Arrays In PHP

  • sort() – sorts arrays in ascending order
  • rsort() – sorts arrays in descending order
  • asort() – sorts associative arrays in ascending order, according to the value
  • ksort() – sorts associative arrays in ascending order, according to the key
  • arsort() – sorts associative arrays in descending order, according to the value
  • krsort() – sorts associative arrays in descending order, according to the key
(i).Sort Array in Ascending Order – sort():
The following function sorts the elements of a numerical array in ascending numerical order:
<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$numbers = array(40, 61, 2, 22, 13); 
sort($numbers); 
  
$arrlength = count($numbers); 
for($x = 0; $x < $arrlength; $x++) { 
    echo $numbers[$x]; 
    echo "<br>"; 
?> 
  
</body> 
</html> 
(ii). Sort Array in Descending Order – rsort()
The following function sorts the elements of a numerical array in descending numerical order:

<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$numbers = array(40, 61, 2, 22, 13); 
rsort($numbers); 
  
$arrlength = count($numbers); 
for($x = 0; $x < $arrlength; $x++) { 
    echo $numbers[$x]; 
    echo "<br>"; 
?> 
  
</body> 
</html> 

(iii). Sort Array in Ascending Order,According to Value – asort()
The following function sorts an associative array in ascending order, according to the value:

<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$age = array("ayush"=>"23", "shankar"=>"47", "kailash"=>"41"); 
asort($age); 
  
foreach($age as $x => $x_value) { 
    echo "Key=" . $x . ", Value=" . $x_value; 
    echo "<br>"; 
?> 
  
</body> 
</html> 

(iv). Sort Array in Ascending Order, According to Key – ksort()
The following function sorts an associative array in ascending order, according to the key:

<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$age = array("ayush"=>"23", "shankar"=>"47", "kailash"=>"41"); 
ksort($age); 
  
foreach($age as $x => $x_value) { 
    echo "Key=" . $x . ", Value=" . $x_value; 
    echo "<br>"; 
?> 
  
</body> 
</html> 

(v). Sort Array in Descending Order, According to Value – arsort()
The following function sorts an associative array in descending order, according to the value.

<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$age = array("ayush"=>"23", "shankar"=>"47", "kailash"=>"41"); 
arsort($age); 
  
foreach($age as $x => $x_value) { 
    echo "Key=" . $x . ", Value=" . $x_value; 
    echo "<br>"; 
?> 
  
</body> 
</html>

(vi). Sort Array in Descending Order, According to Key – krsort()
The following function sorts an associative array in descending order, according to the key.
<!DOCTYPE html> 
<html> 
<body> 
  
<?php 
$age = array("ayush"=>"23", "shankar"=>"47", "kailash"=>"41"); 
krsort($age); 
  
foreach($age as $x => $x_value) { 
    echo "Key=" . $x . ", Value=" . $x_value; 
    echo "<br>"; 
?> 
  
</body> 
</html> 

Q12. What is operator? explain all the types of operator.

Q13. What is string? explain any three string function with example.
Ans: PHP | Strings

Strings can be seen as a stream of characters. For example, ‘S’ is a character and ‘secretmind’ is a string. We have learned about basics of string data type in PHP. In this article we will discuss about strings in details. Every thing inside quotes , single (‘ ‘) and double (” “) in PHP is treated as a string.

1.strtoupper() function in PHP:
This function takes a string as argument and returns the string with all characters in Upper Case.
Syntax:

strtoupper($string)

Program to illustrate the use of strtoupper() function:

<?php 
# PHP code to convert to Upper Case 
function toUpper($string){ 
    return(strtoupper($string)); 
  
// Driver Code 
$string="GeeksforGeeks";   
echo (toUpper($string)); 
?>   

2.strtolower() function in PHP:

This function takes a string as argument ans returns the string with all of the characters in Lower Case.

Syntax:

strtolower($string)

example: 
<?php 
# PHP code to convert to Lower Case 
function toLower($string){ 
    return(strtolower($string)); 
  
// Driver Code 
$string="GeeksforGeeks";   
echo (toLower($string)); 
?>

3.ucfirst() function in PHP

This function takes a string as argument and returns the string with the first character in Upper Case and all other cases of the characters remains unchanged.
Syntax:

ucfirst($string)

Example:

<?php 
# PHP code to convert the first letter to Upper Case 
function firstUpper($string){ 
    return(ucfirst($string)); 
  
// Driver Code 
$string="welcome to GeeksforGeeks";   
echo (firstUpper($string)); 
?> 

Q14. What is data type in php ? explain all the data type.

Ans: Data Types in PHP:

The values assigned to a PHP variable may be of different data types including simple string and numeric types to more complex data types like arrays and objects.

PHP supports total eight primitive data types: Integer, Floating point number or Float, String, Booleans, Array, Object, resource and NULL. These data types are used to construct variables. Now let's discuss each one of them in detail.

1.PHP Integers
Integers are whole numbers, without a decimal point (..., -2, -1, 0, 1, 2, ...). Integers can be specified in decimal (base 10), hexadecimal (base 16 - prefixed with 0x) or octal (base 8 - prefixed with 0) notation, optionally preceded by a sign (- or +).

2.PHP Strings
Strings are sequences of characters, where every character is the same as a byte.

A string can hold letters, numbers, and special characters and it can be as large as up to 2GB (2147483647 bytes maximum). The simplest way to specify a string is to enclose it in single quotes (e.g. 'Hello world!'), however you can also use double quotes ("Hello world!").

3.PHP Floating Point Numbers or Doubles
Floating point numbers (also known as "floats", "doubles", or "real numbers") are decimal or fractional numbers, like demonstrated in the example below.
<?php
$a = 1.234;
var_dump($a);
echo "<br>";
$b = 10.2e3;
var_dump($b);
echo "<br>";
$c = 4E-10;
var_dump($c);
?>

4. PHP Booleans
Booleans are like a switch it has only two possible values either 1 (true) or 0 (false).

5.PHP Objects
An object is a data type that not only allows storing data but also information on, how to process that data. An object is a specific instance of a class which serve as templates for objects. Objects are created based on this template via the new keyword.

Every object has properties and methods corresponding to those of its parent class. Every object instance is completely independent, with its own properties and methods, and can thus be manipulated independently of other objects of the same class.

6.PHP NULL
The special NULL value is used to represent empty variables in PHP. A variable of type NULL is a variable without any data. NULL is the only possible value of type null.

7.PHP Resources
A resource is a special variable, holding a reference to an external resource.

Resource variables typically hold special handlers to opened files and database connections.

8. PHP Arrays
An array is a variable that can hold more than one value at a time. It is useful to aggregate a series of related items together, for example a set of country or city names.

An array is formally defined as an indexed collection of data values. Each index (also known as the key) of an array is unique and references a corresponding value.

Q15. What do you mean by global and local scope of a variable.