The refresh rate of a display is the number of times per second that the image refreshes on the screen. For example, a 60Hz display will update the screen 60 times per second.
To find the constraints in a table
ALL_CONSTRAINTS
: Provides information about all constraints accessible to the user, across all tables in the database. It includes constraint types, status, and more, but doesn’t show column-specific details.
SELECT * FROM ALL_CONSTRAINTS
WHERE TABLE_NAME='YOUR_TABLE_NAME'
AND OWNER = 'OWNER_NAME';
To find the constarints referring to a table.
SELECT * FROM ALL_CONSTRAINTS
WHERE R_CONSTRAINT_NAME IN (
SELECT CONSTRAINT_NAME FROM ALL_CONSTRAINTS
WHERE TABLE_NAME='YOUR_TABLE_NAME'
)
AND OWNER = 'OWNER_NAME';
USER_CONS_COLUMNS
: Shows details about columns associated with constraints for tables owned by the current user. It’s useful for checking specific columns involved in constraints like primary keys, foreign keys, or unique constraints.
SELECT CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, POSITION
FROM USER_CONS_COLUMNS
WHERE TABLE_NAME = 'YOUR_TABLE_NAME';
<link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'">
In the link’s media attribute is set to print
. Print is a media type which will apply to the print based media or when user tries to print the page. By applyinhg this the CSS will load Asynchronosuly. But we need to apply the style to the page also, for that we can use the onload
attribute to set the link’s media to all when it finishes loading.
References
The RETURNING INTO
clause allows us to return column values for rows affected by DML statements. The returned data could be a single column, multiple columns or expressions.
INSERT INTO t1 VALUES (t1_seq.nextval, 'FOUR')
RETURNING id INTO l_id;
References
In windows, deleting node modules takes so much time and sometimes it makes my screen unresponsive. I googled for some soultion and found the below:
Install a npm package called npkill
with the command npm i -g npkill
.
After installing from the terminal go to the directory from which we want to delete the node modules and type npkill
.
The command prompt will list all the node modules and we can select the required folder.
After the secltion, you can press the Space key which will erase the directory in which the cursor is located.
To exit, q
, or Ctrl + c
.
References
This view describes all directories accessible to the user.
SELECT * FROM ALL_DIRECTORIES;
This view describes all directories specified for the entire database.
SELECT * FROM DBA_DIRECTORIES;
References
In CSS modules, CSS class names and animation names are scoped locally by default. In React you can use the file naming conversion as [file name].module.css
. This let the React and Webpack know that you are using CSS Modules.
Importing the CSS in the file.
import nameyoulike from './name.modules.css';
Calling the style in the file.
<button className={styles.button} />
References
Styled-components is a CSS-in-JS library that enables you to write regular CSS and attach it to JavaScript components. With styled-components, you can use the CSS you’re already familiar with instead of having to learn a new styling structure.
Utilising tagged template literals (a recent addition to JavaScript) and the power of CSS, styled-components allows you to write actual CSS code to style your components.
References
React and ReactDOM are two distinct libraries that are commonly used together in the development of web applications with React.
React is a JavaScript library focused on building user interfaces. It follows a declarative approach, where developers define what the UI should look like based on the current state of the application. React then efficiently updates and renders components as the state changes. Its design emphasizes flexibility and efficiency, making it a popular choice for developing both web and mobile applications.
ReactDOM, on the other hand, serves as a bridge between React and the DOM (Document Object Model). The DOM is a hierarchical structure representing the HTML content of a web page. ReactDOM provides a set of methods that enable React components to be rendered and updated within the DOM. It ensures that the user interface is synchronized with the underlying HTML structure.
In summary, React is a library for building user interfaces, while ReactDOM handles the interaction with the DOM, rendering React components onto the web page. Although they are often used together, they serve different purposes and can function independently of each other.
Your components will often need to display different things depending on different conditions. In React, you can conditionally render JSX using JavaScript syntax like if
statements, &&
, and ? :
operators.
&&
operator
{ isYes && <A />}
? :
operator
isYes ? Yes() : No()
- In React, you control branching logic with JavaScript.
- You can return a JSX expression conditionally with an if statement.
- You can conditionally save some JSX to a variable and then include it inside other JSX by - using the curly braces.
- In JSX,
{cond ? <A /> : <B />}
means “if cond, render<A />
, otherwise<B />
. - In JSX,
{cond && <A />}
means “if cond, render<A />
, otherwise nothing”. - The shortcuts are common, but you don’t have to use them if you prefer plain if.