Skip to content

Instantly share code, notes, and snippets.

View paramsingh's full-sized avatar

param paramsingh

View GitHub Profile
def fetch_listens_from_storage(self, user_name, from_ts, to_ts, limit, order):
""" The timestamps are stored as UTC in the postgres datebase while on retrieving
the value they are converted to the local server's timezone. So to compare
datetime object we need to create a object in the same timezone as the server.
from_ts: seconds since epoch, in float
to_ts: seconds since epoch, in float
"""
# Quote single quote characters which could be used to mount an injection attack.
import java.util.*;
class Author
{
int authorno;
String authorname;
Author()
{
authorno=0;
authorname="";
}
import java.util.*;
class date
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
System.out.println("Enter the day number");
int dayNumber=Integer.parseInt(in.nextLine());
System.out.println("Enter the year");
int year=Integer.parseInt(in.nextLine());