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 java.util.Properties; | |
/** | |
* Created by moksha on 07/02/16. | |
*/ | |
public class JavaSystemProperties { | |
public static void main(String args[]) { | |
System.out.println("******************************System Props*****************************"); | |
Properties systemProperties = System.getProperties(); |
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 java.util.Map; | |
import java.util.Properties; | |
/** | |
* Created by moksha on 07/02/16. | |
*/ | |
public class JavaEnvironmentVariables { | |
public static void main(String args[]){ |
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 java.util.Map; | |
import java.util.Properties; | |
/** | |
* Created by moksha on 07/02/16. | |
*/ | |
public class JavaEnvironmentVariables { | |
public static void main(String args[]){ |
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
[, , textToRepeat, limit] = process.argv; | |
for (let i = 1; i <= limit; i++) { | |
console.log(`${i}-${textToRepeat}`); | |
} |
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 React from 'react'; | |
import cloudLogger from './cloud-logger'; | |
class TryCatch extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { hasError: false }; | |
} | |
componentDidCatch(error, info) { |
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
<TryCatch> | |
<Booking/> | |
</TryCatch> | |
<TryCatch> | |
<Payment/> | |
</TryCatch> |
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 React, {Component} from 'react'; | |
class TryCatch extends Component { | |
constructor(props) { | |
super(props); | |
/* | |
initial state. hasError property is used to conditionally render fallback UI. | |
Please not hasError property name is arbitarily chosen and can be any name of your choice | |
*/ | |
this.state = {hasError: 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import registerServiceWorker from './registerServiceWorker'; | |
import TryCatch from './TryCatch' | |
ReactDOM.render( | |
/* | |
App component is wrapped inside TryCatch( error boundary component ). Hence any error in the App or children DOM tree, |
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
server { | |
listen 80 default deferred; | |
server_name myapp.com; | |
root /var/www/project-folder/; | |
# Nginx and Angularjs with html mode 5 - https://gist.github.com/cjus/b46a243ba610661a7efb | |
index index.html; |
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
<cdk-virtual-scroll-viewport itemSize="50" class="example-viewport"> | |
<div *cdkVirtualFor="let item of items" class="example-item">{{item}}</div> | |
</cdk-virtual-scroll-viewport> |
OlderNewer