Skip to content

Instantly share code, notes, and snippets.

package com.fidelity.service;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import java.util.Scanner;
import java.util.regex.Pattern;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
public class EndpointA {
private UserService userService;
private AService aService;
/*constructor */
public EndpointA(UserService userService,AService aService){
this.userService = userService;
this.aService= aService;
}
}
@anirudh83
anirudh83 / gist:5925928
Last active December 19, 2015 08:29
git-fireworks
#!/bin/bash
rows=$(tput lines)
cols=$(tput cols)
colors=(red green blue purple cyan yellow brown)
lock_file=
lock_file_base=/tmp/$(basename $0 .sh)
multiple=0
if [[ "$1" ]]; then
@anirudh83
anirudh83 / MealDayRestService.java
Created October 17, 2012 18:08
using approve in REST URL
/**
* @author Jagmeet
* @author anirudh
*/
@Component
@Validated
public class MealDayRestService {
private static final String MEAL_DAY_ID = "mealDayId";
private static final String USER_ID = "userId";
//Convert date in one time zone to other time zone
public static Date convertTimeZone(Date date,String timeZoneFrom,String timeZoneTo){
Date utcDate = convertDateFromUserTimeZoneToUTC(date,timeZoneFrom);
TimeZone timeZone = TimeZone.getTimeZone(timeZoneTo);
return changeTimeZoneOfUTCDate(utcDate,timeZone);
}