Monday, May 31, 2021

Difference Between Relative and Absolute Position

What Is Relative Positioning? When you set the position relative to an element, without adding any other positioning attributes (top, bottom, right, left) nothing will happen. When you add an additional position, such as left: 20px the element will move 20px to the right from its normal position. In this example, you will see how the relatively positioned element moves when its attributes are changed. The first element moves to the left and top from its normal position, while the second element stays in the same place because none of the additional positioning attributes were changed. HTML
First element
Second element
CSS #first_element { position: relative; left: 30px; top: 70px; width: 500px; background-color: #fafafa; border: solid 3px #ff7347; font-size: 24px; text-align: center; } ​ #second_element { position: relative; width: 500px; background-color: #fafafa; border: solid 3px #ff7347; font-size: 24px; text-align: center; }
What Is Absolute Positioning? This type of positioning allows you to place your element precisely where you want it. The positioning is done relative to the first relatively (or absolutely) positioned parent element. In the case when there is no positioned parent element, it will be positioned related directly to the HTML element (the page itself). An important thing to keep in mind while using absolute positioning is to make sure it is not overused, otherwise, it can lead to a maintenance nightmare. In the example, the parent element has the position set to relative. Now, when you set the position of the child element to absolute, any additional positioning will be done relative to the parent element. The child element moves relative to the top of the parent element by 100px and right of the parent element by 40px. HTML
CSS #parent { position: relative; width: 500px; height: 400px; background-color: #fafafa; border: solid 3px #9e70ba; font-size: 24px; text-align: center; } ​ #child { position: absolute; right: 40px; top: 100px; width: 200px; height: 200px; background-color: #fafafa; border: solid 3px #78e382; font-size: 24px; text-align: center; }

Saturday, May 29, 2021

Request Libraries

We have different request libraries available for use in Node.js. Request Unirest Native Axios Request

Thursday, May 27, 2021

Clean Code

https://www.freecodecamp.org/news/clean-coding-for-beginners/

Procedure Optimization Technique

1. The simplest guidance is do not create the stored procedure with prefix "sp_". I prefer to create the procedures with a convention like <projectabbreviation_spProcedureName>.
2. Include the SET NOCOUNT ON statement as the first statement of the procedure.
3. Do not write "Select count(*) from Table" statement to get the count of the records. Alternatively, use "Select count (PrimaryKeyColumn) from Table".
4. Try to avoid dynamic SQL queries as much as possible.
5. Prefer to have the table variables instead of temp tables. Keep minimal use of temp tables.
6. Avoid the use of the cursors to loop through the records. Instead keep the records in the table variable or temp tables.
Use schema name with an object name.
7. Prefer table joins over the use of subqueries in the where conditions.
8 Transfer the relevant records from the primary tables to the table variable and do further processing with the table variable, thereby disconnecting the primary tables reference.
9. Try to avoid using NOT LIKE operator.
10.Create Non-clustered indexes, wherever it is necessary
11. Use the sp_executesql stored procedure instead of the EXECUTE statement.
12. Create views for repeatedly used select queries.
13. Keep only the required columns as part of the final SELECT query instead of saying "SELECT * FROM..".
14 Instead of keeping a very large stored procedure, try to break it into smaller sub-procedures, wherever possible.
15 When you fetch the records from the stored procedure and display in the grid format on the front-end, prefer to have custom paging logic when the underlying results set contains many records.

Rohde and Schwarz

1. What is SOLID principle? 
2. What is git flow? 
3. What is cherry pick in git? 
4. What is strategy pattern? 
5. If you three mobile format x,y,z and all of them contains Message(name,data,direction) than write the dll to decode the message. 
7. Drawback of TDD

Followers

Link