This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Fraction{ | |
constructor(top, bottom){ | |
this.num = top; | |
this.den = bottom; | |
} | |
show() { | |
console.log('${this.num}/${this.den}'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BrowserRouter as Router, | |
Link, | |
Route, | |
Switch, | |
} from 'react-router-dom'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { createStore, applyMiddleware } from 'redux'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BrowserRouter as Router, | |
Link, | |
Route, | |
Switch, | |
} from 'react-router-dom'; | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { createStore, applyMiddleware } from 'redux'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BrowserRouter as Router, | |
Link, | |
Route, | |
Switch, | |
} from 'react-router-dom'; | |
import * as React from 'react'; | |
import * as ReactDOM from 'react-dom'; | |
//import { Provider } from 'react-redux'; | |
//import { createStore, applyMiddleware } from 'redux'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {fromJS} from 'immutable'; | |
public compareObjects(...compareArguments): boolean { | |
//For now just two arguments | |
if (!compareArguments) | |
return false; | |
if (compareArguments.length < 2) | |
return false; | |
compareArguments.forEach((curr, index) => { | |
if ((fromJS(curr).equals(fromJS(compareArguments[index + 1]))) == false){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Install netcoreapp2.0 in Linux https://www.microsoft.com/net/download/linux | |
//* Open terminal and create project as | |
//* dotnet new reactredux -o helloworld | |
cd helloworld | |
npm install | |
dotnet run | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildReactExternals(dependenciesArray){ | |
let externals = dependenciesArray.reduce((dependencies, curr, index, array) => { | |
let secondCapIndex = curr.indexOf('-'); | |
let lastCapIndex = curr.lastIndexOf('-'); | |
let firstCap, secondCap, middleCap, valueCap = curr, key, lastCap; | |
firstCap = curr.charAt(0).toUpperCase(); | |
if (secondCapIndex !== -1) { | |
secondCapIndex++; | |
secondCap = valueCap.charAt(secondCapIndex).toUpperCase(); //curr.substring(1, secondCapIndex + 1) + curr.charAt(secondCapIndex+1).toUpperCase() + curr.substring(secondCapIndex + 2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randoms = { | |
[Symbol.iterator]: function() { | |
return { | |
next: function() { | |
return { value: Math.random() }; | |
} | |
}; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Support plugins/Libraries | |
const webpack = require('webpack'); | |
const path = require('path'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
//Files/libraries paths | |
const webroot = "./wwwroot/"; | |
const libraryPath = "./Libraries/"; | |
const webBundlesPath = webroot + "Bundles/"; | |
const webScriptsPath = webroot + "Scripts/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const path = require('path'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const webpack = require('webpack'); | |
module.exports = function (env) { | |
let outputFile = 'bundle'; | |
const plugins = [ | |
new webpack.NoEmitOnErrorsPlugin(), | |
new webpack.DefinePlugin({ |
OlderNewer