https://medium.com/@todd_10692/creating-push-notification-job-with-sns-lambda-and-node-js-3fcf3903e205
Monday, 31 August 2020
Friday, 28 August 2020
Java ENUM ecxample
// Java program to demonstrate how values can
// be assigned to enums.
enum TrafficSignal
{
// This will call enum constructor with one
// String argument
RED(1,"STOP"), GREEN(2,"GO"), ORANGE(3,"SLOW DOWN");
// declaring private variable for getting values
private String action;
private Integer code;
// getter method
public String getAction()
{
return this.action;
}
public Integer getCode(){
return this.code;
}
// enum constructor - cannot be public or protected
private TrafficSignal(Integer code,String action)
{
System.out.println("code"+code+"action"+action);
this.action = action;
this.code=code;
}
}
// Driver code
public class EnumConstructorExample
{
public static void main(String args[])
{
// let's print name of each enum and there action
// - Enum values() examples
TrafficSignal[] signals = TrafficSignal.values();
for (TrafficSignal signal : signals)
{
// use getter method to get the value
System.out.println("name : " + signal.name() +
" action: " + signal.getAction() +"code"+signal.getCode());
}
}
}
Wednesday, 26 August 2020
node js HTTP call
var request = require("request");
Convert array to array list and and get impact
import java.util.ArrayList;
Thursday, 20 August 2020
Thursday, 13 August 2020
timezone wise get expired company list
----------------------------------------------------------------------------------------------------------
SELECT
sh_company.company_id,
sh_timezone.tz_name,
sh_timezone.tz_id,
sh_timezone.tz_unit_hm,
CONVERT_TZ(sh_company.paywall_end_date,
sh_timezone.tz_name,
sh_timezone.tz_name) AS time,
CONVERT_TZ(sh_company.paywall_end_date,
'utc',
sh_timezone.tz_name) AS time1,
sh_company.paywall_end_date
FROM
sh_company
LEFT JOIN
sh_location ON sh_location.company_id = sh_company.company_id
LEFT JOIN
sh_timezone ON sh_timezone.tz_id = sh_location.tz_id
WHERE
paywall_status = 'INACTIVE'
AND CONVERT_TZ(paywall_end_date,
sh_timezone.tz_name,
sh_timezone.tz_name) <= CONVERT_TZ('2020-08-14 23:59:59',
'utc',
sh_timezone.tz_name)
AND paywall_end_date != '0000-00-00 00:00:00'
AND name != '1Huddle'
AND sh_location.head_location = 1;
-------------------------------------------------------------------------------------------------------------