- install ghpages
npm i -D gh-pages
- add below script
"scripts": {
"build:prd": "ng build --prod",
"deploy:gh": "gh-pages -d dist",
"publish": "run-s build:prd deploy:gh"
}
const { | |
createSelector | |
} = Reselect; | |
const form = { | |
firstName: 'Rakesh', | |
lastName: 'Verma', | |
age: 12, | |
height: 157 | |
}; |
import Html exposing (text) | |
{- | |
type List a | |
= Nil -- [] | |
| Cons a (List a) -- :: | |
-} | |
l1 = [] | |
l2 = 1 :: [] | |
l3 = 1 :: (2 :: []) | |
l4 = [1,2] |
// getData function is pretending that it is fetching data and after 2 second it received data. | |
// $ is jQuery | |
function getData() { | |
//creating on dererred object | |
var deferred = $.Deferred(); | |
// after 2 second resolve promise with data. | |
setTimeout(function() { | |
deferred.resolve([1,2,3]); | |
}, 2000); |
log(); | |
var log = function(msg) { | |
alert(msg); | |
} | |
/* | |
* in this case log function is a expression type and log varibale will be hoisted at the top | |
* and initialized with undefined therefore, we will get | |
* Uncaught TypeError: log is not a function | |
*/ |
var x = 5; | |
function print() { | |
if(x==5) { | |
var x = 6; | |
alert(x); | |
} else { | |
x = 7; | |
alert(x); | |
} | |
} |
/* | |
In Javascript inner function has access to the outer functions variables and arguments is called as closure. | |
Inner function scope has 3 access. | |
1. Access to its local scope variables | |
2. Access to global scope variables | |
3. Access to its outer function variables and args. | |
*/ | |
/* Here is an example | |
Even though inner function printVersion has returned its value. |
/** | |
* In JavaScript there are only 2 scopes, one is global scope and the other is Function scope. | |
* In Ecma Script 5 they have introduced 'let' variable which has lexical scope also. | |
*/ | |
/* | |
* In below example log method has 2 things in scope one is global variable 'message' and the other is local variable 'prefix' | |
*/ | |
var message = "hello world"; | |
function log() { |
https://openlibrary.org/search.json?q=test |
// You can drive your browsers from appsettings. And then in each TestFixture you just use this broswer settings. | |
// One thing to note is dont quit browser on teardown. | |
// Browsers.cs | |
public class Browsers | |
{ | |
private static IWebDriver webDriver; | |
private static string baseURL = ConfigurationManager.AppSettings["url"]; | |
private static string browser = ConfigurationManager.AppSettings["browser"]; | |
public static void Init() | |
{ |