Skip to content

Instantly share code, notes, and snippets.

View amithkumarg's full-sized avatar

Amith Kumar amithkumarg

  • Scottsdale, AZ, USA
View GitHub Profile
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.when;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import lombok.RequiredArgsConstructor;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0; url=/#404" />
<title>404 - Page Not Found</title>
</head>
<body style="text-align: center">
<h1>404 - Page Not Found</h1>
</body>
@Controller
public class AppErrorController implements ErrorController {
private static final String PATH = "/error";
@RequestMapping(value = PATH)
public String handleError(HttpServletRequest request) {
Object status = request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
//for brevity, only handling 404
import React from "react";
import styles from "./App.module.css";
import { Route, HashRouter, Switch } from "react-router-dom";
const App = () => {
return (
<div className={styles.App}>
<HashRouter>
<Switch>
<Route exact path="/" component={Home} />
@amithkumarg
amithkumarg / app.page.html
Created October 30, 2019 05:48
Consuming reusable currency input component
<ion-content>
<app-number-input [precision]="precision" [amount]="''" (amountEntered)="amountChanged($event)"></app-number-input>
</ion-content>
@amithkumarg
amithkumarg / number-input.component.html
Last active October 30, 2019 05:38
Reusable currency input ionic component
<ion-item (click)="openInput()">
{{ formattedAmount }}
<ion-input name="dummyFacade" id="dummyFacade" #dummyFacade type="number" inputmode="numeric"
(keyup)="handleKeyUp($event)" (ionInput)="handleInput($event)"></ion-input>
</ion-item>