Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Here is a regular expression to validate email.
***
function validateEmail(email) {
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
}
***
3 years ago
There is no difference between inner join and join. The inner join is used as the default join. So we can exclude the inner word and just use join. But for other join operation, we need to specify it like left outer join, right inner join, etc
3 years ago
You can use
***
command1 && command2
***
It runs the first command and then runs the second command only if the first command completed successfully.

***
(Command1 & command 2)
***
Use to group or nest multiple commands.
3 years ago
For renaming the columns use
***
df.rename(columns={'$a': 'a', '$b': 'b', '$c': 'c', '$d': 'd', '$e': 'e'}, inplace=True)
***
3 years ago
Use for-of on object.keys()
***
let object = {
"key1": "value1",
"key2": "value2",
"key3": "value3"
};

for (let key of Object.keys(object)) {
console.log(key + " : " + object[key])
}
***
3 years ago
In the versions above 1.1.5, you can use the ng-if directive. This would remove the element if the expression provided returns false and re-inserts the element in the DOM if the expression returns true. Can be used as follows.






3 years ago
In C, the type specifier keywords of structures, unions, and enumerations are mandatory, ie you always have to prefix the type's name (its tag) with struct, union, or enum when referring to the type.

You can get rid of prefixing keywords by using a typedef, which is a form of information hiding as the actual type of an object will no longer be visible when declaring it.
3 years ago
There are multiple way to use boolean values in C
Option 1
***
#include
***
Option 2
***
typedef enum { false, true } bool;
***
Option 3
***
typedef int bool;
enum { false, true };
***
Option 4
***
typedef int bool;
#define true 1
#define false 0
***
3 years ago
A library is a collection of objects, functions,or methods depending on the language used. It is a reusable code usually shared among multiple applications.
A framework can be everything used for software deployment. It can be a collection of a library, a collection of scripts, or any piece of software to create an application.
For example, jquery is a library and bootstrap is a framework
3 years ago
***
var active = $('#modal-check-visible').prop("checked") ? 1 : 0 ;
***
If checked, it'll return 1; otherwise, it'll return 0
3 years ago
The CSS alternative for cellpadding would be:
***
td {
padding: 10px;
}
***
For cellspacing the CSS code would be:
***
table {
border-spacing: 10px;
}
***
3 years ago
Just use the autocomplete attribute:
***

***
This would be useful when a text input is one among CAPTCHA , one time password or passsword.
3 years ago