Copy Paste this on terminal.
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
‘The Journey’ is all about the different tastes and flavours…. wandering among the virtual streets…different Paths and Destinations… from Technology to Gadgets… from Humor to Practical Lessons…from Truth to Fictions… from current issues to market conditions… and wat’s not…
Copy Paste this on terminal.
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
component
ng generate component <name> [options]
ng g component <name> [options]
Creates a new generic component definition in the given or default project.
Refer:https://angular.io/cli/generate
OR
In command prompt type
ng generate component YOURCOMPONENTNAME
There are even shorthands for this: the commands generate
can be used as g
and component
as c
:
ng g c YOURCOMPONENTNAME
you can use ng --help
, ng g --help
or ng g c --help
for the docs.
Refer: https://stackoverflow.com/questions/44151427/how-to-create-a-new-component-in-angular-4-using-cli
Add environment variable
C:\Program Files\nodejs\
To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.
After that, reopen your command prompt and type (run cmd as admin.)
npm
- Open the Control Panel (Click the Start button, then click Control Panel)
- Click User Accounts
- Click Change my environment variables
- Select PATH and click the Edit... button
- At the end of the Variable value, add
;C:\Program Files\nodejs
- Click Ok on the "Edit User Variable" window, then click Ok on the "Environment Variables" window
- Start a command prompt window (Start button, then type cmd into the search and hit enter)
- At the prompt (
C:\>
) type npm and hit enter; you should now see some help text (Usage: npm <command>
etc.) rather than "npm is not recognized..."
Fix : Run the command from PowerShell! (PowerShell as Administrator )
If above solution does not work - try this
Dont work for me: and in cmd, and powershell, in all cases script was runned with admin permission, but I get the same error.
I`m also try to run it from npm folder where its located.
PS C:\Users\mishelen\AppData\Roaming\npm> npm-windows-upgrade
npm-windows-upgrade 0.5.1
? This tool will upgrade npm. Do you want to continue? Yes
Scripts cannot be executed on this system.
To fix, run the command below as Administrator in PowerShell and try again:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
Refer:
https://github.com/felixrieseberg/npm-windows-upgrade/issues/35
Solution to below issue ( in Mac)
Could not find /Users/keypairs/key-pair.pem
Connecting to: server at IP 90.xx.x.xxx with keypair key-pair
Warning: Identity file /Users/key-pair.pem not accessible: No such file or directory.
ec2-user@90.xx.x.xxx : Permission denied (publickey).
indexOf()
MethodThe simplest and fastest way to check whether a string contains a substring or not in JavaScript is the indexOf()
method. This method returns the index or position of the first occurrence of substring within the string, otherwise, it returns -1 if no match found. Here is an example:
<script>
// Sample string
var str = "The quick brown fox jumps over the lazy dog."
// Check if the substring exists inside the string
var index = str.indexOf("fox");
if(index !== -1){
alert("Substring found!");
} else{
alert("Substring not found!");
}
</script>
In ES6 you can use the includes()
method to check if a contains a substring. This method simply returns true
or false
instead of the index. Let's check out an example:
<script>
// Sample string
var str = "The quick brown fox jumps over the lazy dog."
// Check if string contains substring
if(str.includes("fox")){
alert("Substring found!");
} else{
alert("Substring not found!");
}
</script>
Check out the tutorial on JavaScript ES6 features to learn about new features introduced in ES6.
Further, you can use the search()
method to search a particular piece of text or pattern (using regular expression) inside a string. Like indexOf()
method the search()
method also returns the index of the first match, and returns -1 if no matches were found.
<script>
// Sample string
var str = "Color red looks brighter than color blue."
// Search the string for a match
var index = str.search(/color/i);
if(index !== -1){
alert("Substring found!");
} else{
alert("Substring not found!");
}
</script>
Benefits of Cashews. Healthy food is an integral part of healthy body. Regular exercises such as Yoga and healthy diet is important to...