Skip to content

Instantly share code, notes, and snippets.

export function calculateMonthlyInstallment(loanAmount, tenureInMonths, annualInterestRate) {
let monthlyInterestRate = annualInterestRate / 12 / 100;
let monthlyPayment = loanAmount * monthlyInterestRate / (1 - Math.pow(1 + monthlyInterestRate, -tenureInMonths));
return Math.round(monthlyPayment * 100) / 100;
}

API Security

SQL Injection

Fix for stored procedure
CREATE OR REPLACE PROCEDURE public.update_jdbc_customer(
  existing_customer_id bigint,
  new_full_name character varying)
LANGUAGE 'plpgsql'

BigQuery Course : Resource & Reference

This page is Resource & Reference for BigQuery course.

Table of Contents

Contents are grouped based on lecture title.
The order of contents is same as order at course, although not all lectures has resource.

bq load --source_format=AVRO --use_avro_logical_types --project_id [project_id] course_dataset.sample_employee "gs://biquery_sample_data/load_data_into_bigquery_3/sample_employee_06.avro"
{"tenant_name":"Jogja Chocolate","registered_date":"2018-04-21","buildings":[{"address":"107 Diponegoro Street","type":"Warehouse","size":4000,"occupied":true},{"address":"52 Arjuna Street","type":"Store","size":300,"occupied":true},{"address":"94 Malioboro Street","type":"Store","size":250,"occupied":true}]}
{"tenant_name":"Merapi Batik","registered_date":"2015-02-18","buildings":[{"address":"52 Kaliurang Street","type":"Store","size":800,"occupied":true},{"address":"255 Solo Street","type":"Store","size":400,"occupied":false}]}
@timpamungkasudemy
timpamungkasudemy / InvoiceListener.java
Created October 27, 2019 03:51
Sample Listener if you don't have __TypeID__ but have other header (for example : type)
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;
import com.course.finance.message.invoice.InvoiceCreatedMessage;
import com.course.finance.message.invoice.InvoicePaidMessage;