How to find that cookie set in browsers or not?

When you code with javascript and set cookies using the javascript code, now when you test it then you did not get the result, all code are correct but still you do not get the result. if you want to debug this issue then you need to check that cookie is actual created or not, now the question is how to see the cookies are created or not. below is the steps to see the cookies are created or not.

1) Go to main menu and click on tools.
2) Select Options from the menu.
3) One pop-up will opne, now in this pop-up see at the top icons and select Privacy icon.
4) in the History fieldset you will see the drop-down with remember history.
5) Select use custom settings for history.
6) now click on the show cookies button.
7) again new pop-up will open and its give folder tree structure, in that structure find the domain name for which you search cookies.
8) all cookies are store in that, so you can check that cookie is set or not.

how many storage engine in mysql

How Many Storage Engine in MySQL?

MySQL provide 8 type of storage engine which is as below:

1) MEMORY: Hash based, stored in memory, useful for temporary tables.
2) FEDERATED: Federated MySQL storage engine.
3) MyISAM: Default engine as of MySQL 3.23 with great performance.
4) BLACKHOLE: /dev/null storage engine (anything you write to it disappears).
5) MRG_MYISAM: Collection of identical MyISAM tables.
6) CSV: CSV storage engine.
7) ARCHIVE: Archive storage engine.
8) InnoDB:  Supports transactions, row-level locking, and foreign keys.

MySQL use MyISAM as a default storage engine if you do not select any storage engine.

differences between MyISAM and InnoDB Storage Engines in MySQL

What is Differences between MyISAM and InnoDB Storage Engines in MySQL?

MyISAM: Default engine as of MySQL 3.23 with great performance.
InnoDB : Supports transactions, row-level locking, and foreign keys.

When you are using mysql there is myisam and innodb storage engine, most of the developer do not know the difference between this 2 engine. below is the explanation for both storage engine, once you read this you get idea about the storage engine difference.

1) InnoDB supports transaction and its also supports transactions, commits, rollbacks, foreign keys and row-level locking. this is one of the most important feature and because of that this storage engine give high performance then the MyISAM.
2) MYISAM does not support the foreign key constraint and transaction and because of that its give lower performance then InnoDB.
3) MYISAM is faster then the InnoDB because its not support transactions, foreign keys but in case of performing the count operation it takes more time then the InnoDB.
4) InnoDB storage engine occupy more memory space then MyISAM.

I hope now you are clear on the difference between Myisam and InnoDB storage engine.

character sets in html document

When we create any html page first we need to set the character set because browser need to know which character set used for the page to display the html page correctly.

world wide character set is ASCII character set, because its use alphabet in uppercase and lowercase, numeric numbers 0-9 and some special character. Now a day almost all new browser use ISO-8859-1 character set. If you want to change the character set then you need to define it in the <meta> tag.

Below is the list of the character set which is generally use in html page, you can use any character set as per your requirement.

Character set Description Covers
ISO-8859-1 Latin alphabet part 1 North America, Western Europe, Latin America, the Caribbean, Canada,
ISO-8859-2 Latin alphabet part 2 Eastern Europe
ISO-8859-3 Latin alphabet part 3 SE Europe, Esperanto, miscellaneous others
ISO-8859-4 Latin alphabet part 4 Scandinavia/Baltics (and others not in ISO-8859-1)
ISO-8859-5 Latin/Cyrillic part 5 The languages that are using a Cyrillic alphabet such as Bulgarian,
Belarusian, Russian and Macedonian
ISO-8859-6 Latin/Arabic part 6 The languages that are using the Arabic alphabet
ISO-8859-7 Latin/Greek part 7 The modern Greek language as well as mathematical symbols derived from
the Greek
ISO-8859-8 Latin/Hebrew part 8 The languages that are using the Hebrew alphabet
ISO-8859-9 Latin 5 part 9 The Turkish language. Same as ISO-8859-1 except Turkish characters
replace Icelandic ones
ISO-8859-10 Latin 6 Lappish, Nordic, Eskimo The Nordic languages
ISO-8859-15 Latin 9 (aka Latin 0) Similar to ISO 8859-1 but replaces some less common symbols with the
euro sign and some other missing characters
ISO-2022-JP Latin/Japanese part 1 The Japanese language
ISO-2022-JP-2 Latin/Japanese part 2 The Japanese language
ISO-2022-KR Latin/Korean part 1 The Korean language

There is one more character set named UTF-8 which is more useful, if you are using multiple language in your site then you should use UTF-8 character set.

UTF-8 : UTF8 character set is 4 bytes long. UTF-8 character set  can represent any language character in the unicode standard.

What is Tracebility Matrix?

A method used to validate the compliance of a process or product with therequirements for that process or product.  The requirements are each listed in a row of the matrix and the columns of the matrix are used to identify how and where each requirement has been addressed.

In a software development process, a traceability matrix is a table that correlates any two baselined documents that require a many to many relationship to determine the completeness of the relationship. It is often used with high-level requirements (sometimes known as marketing requirements) and detailed requirements of the software product to the matching parts of high-level design, detailed design, test plan, and test cases.

Common usage is to take the identifier for each of the items of one document and place them in the left column. The identifiers for the other document are placed across the top row. When an item in the left column is related to an item across the top, a mark is placed in the intersecting cell. The number of relationships are added up for each row and each column. This value indicates the mapping of the two items. Zero values indicate that no relationship exists. It must be determined if one must be made. Large values imply that the item is too complex and should be simplified.

To ease with the creation of traceability matrices, it is advisable to add the relationships to the source documents for both backward traceability and forwardtraceability. In other words, when an item is changed in one baselined document, it’s easy to see what needs to be changed in the other.

Traceability ensures completeness, that all lower level requirements come from higher level requirements, and that all higher level requirements are allocated to lower level requirements. Traceability is also used to manage change and provides the basis for test planning.



Explain Regression Testing:

Regression testing is any type of software testing which seeks to uncover regression bugs. Regression bugs occur whenever software functionality that previously worked as desired, stops working or no longer works in the same way that was previously planned. Typically regression bugs occur as an unintended consequence of program changes.

Common methods of regression testing include re-running previously run tests andchecking whether previously fixed faults have re-emerged.

Explain Functional Testing:

In this type of testing, the software is tested for the functional requirements. The tests are written in order to check if the application behaves as expected. Although functional testing is often done toward the end of the development cycle, it can—and should, —be started much earlier. Individual components and processes can be tested early on, even before it’s possible to do functional testing on the entire system.

Functional testing covers how well the system executes the functions it is supposed to execute—including user commands, data manipulation, searches and business processes, user screens, and integrations. Functional testing covers the obvious surface type of functions, as well as the back-end operations.

set cross-subdomain cookie with javascript

How to set cross-subdomain cookie with javascript?

As we mention that using php we can set the cookie for cross-subdomain, we can also set the cookie in javascript as well. when we are working on the sub-domain and we need cross-subdomain cookie in php then we also need cross-subdomain cookie in javascript.

First i explain how to set cookie in the javascript because people are not aware that we how to set cookie in javascript. using JavaScript, you can create cookie and retrieve value from that cookie.

document.cookie = ‘cookiename=’ + cookievalue+ ‘,expires=’ + expirydate.toGMTString();

Here cookiename is the name of cookie and the cookievalue is the value which you need to store in the cookie, expires is the expiry data of the cookie.

Now, if you need to set cross-subdomain cookie then use the below code

document.cookie = name+”=”+value+”expires=”+date.toGMTString()+”; path=/;”;

Here i mention 2 more things which is not available in the first one, this is path and domain. path is the folder path where you need to store the cookie and the domain is the domain name for which you need to set the cookie, please look carefully that i set value in the domain, here first dot(.) is required if you want to set it for cross- subdomain, if you do not set it then it will not work for cross-subdomain.

What is unit testing?

The developer carries out unit testing in order to check if the particular module or unit of code is working fine. The Unit Testing comes at the very basic level as it is carried out as and when the unit of the code is developed or a particular functionality is built.

Unit testing deals with testing a unit as a whole. This would test the interaction of many functions but confine the test within one unit. The exact scope of a unit is left to interpretation. Supporting test code, sometimes called scaffolding, may be necessary to support an individual test. This type of testing is driven by the architecture and implementation teams. This focus is also called black-box testing because only the details of the interface are visible to the test.

Limits that are global to a unit are tested here. In the construction industry, scaffolding is a temporary, easy to assemble and disassemble, frame placed around a building to facilitate the construction of the building. The construction workers first build the scaffolding and then the building. Later the scaffolding is removed, exposing the completed building.

Similarly, in software testing, one particular test may need some supporting software. This software establishes an environment around the test. Only when this environment is established can a correct evaluation of the test take place. The scaffolding software may establish state and values for data structures as well as providing dummy external functions for the test. Different scaffolding software may be needed from one test to another test. Scaffolding software rarely is considered part of the system. Sometimes the scaffolding software becomes larger than the system software being tested. Usually the scaffolding software is not of the same quality as the system software and frequently is quite fragile.

A small change in the test may lead to much larger changes in the scaffolding. Internal and unit testing can be automated with the help of coverage tools. A coverage tool analyzes the source code and generates a test that will execute every alternative thread of execution. It is still up to the programmer to combine this test into meaningful cases to validate the result of each thread of execution. Typically, the coverage tool is used in a slightly different way. First the coverage tool is used to augment the source by placing informational prints after each line of code. Then the testing suite is executed generating an audit trail. This audit trail is analyzed and reports the percent of the total system code executed during the test suite. If the coverage is high and the untested source lines are of low impact to the system’s overall quality, then no more additional tests are required.

difference between margin and padding in html

What is the difference between padding and margins?

When new designer or programmer use the html and need to set margin and padding then its confuse. the reason behind that is they both like the same thing its apply white space around an image or object.

Well, i aware that padding leave the space inside the border, if you use image then its between the border and the actual image, if you use table then its incide the border and cell contents.  padding is apply completely around the contents or images, when you use padding, there is padding on the top, bottom, right and left sides.

While margins leave the space outside the border, if you use image then its apply outside the image border, its apply between the border and the other elements next to this object. as like the padding, the margin is apply completely around the contents or images, when you use margin, there are margins on the top, bottom, right, and left sides.

Example of Padding:


Example of Margin:


In the Above both example i use 10px for padding and margin, you can see the difference and easily understand it.