Skip to content

Instantly share code, notes, and snippets.

View akkida746's full-sized avatar
💭
Creating some cool stuffs

Akkicodes akkida746

💭
Creating some cool stuffs
View GitHub Profile
@akkida746
akkida746 / Remove .DBF file from oracle db 12c
Created July 6, 2018 12:52
ORA-01157: cannot identify/lock data file
http://amit7oracledba.blogspot.com/2013/02/ora-01157-cannot-identifylock-data-file.html
@akkida746
akkida746 / Nodejs proxy settings.txt
Created April 12, 2018 00:46
Nodejs proxy settings
Write proxy settings
npm config set proxy http://192.168.20.20:3128
npm config set https-proxy http://192.168.20.20:3128
Delete Proxy
npm config delete http-proxy
npm config delete https-proxy
@akkida746
akkida746 / PLSQl XML parsing
Created March 20, 2018 00:00
PLSQL XML parsing and staging data into tables
create or replace
PROCEDURE ELR_XCN_EMP_IMPORT
AS
-- constants declaration
c_interface_name CONSTANT integrator.tbl_interface_inbound.iinb_object_type%TYPE := 'PersonnelEMEA';
c_process_name CONSTANT el_intstpee.process_name%TYPE := 'ELR_XCN_EMP_IMPORT';
-- constants for error type
c_middleware CONSTANT el_intstsee.job_err_type%TYPE := 'MIDDLEWARE';
c_setup CONSTANT el_intstsee.job_err_type%TYPE := 'SETUP';
@akkida746
akkida746 / GRPC_plugin_commands_generate_Java_objects
Created November 16, 2017 12:34
Windows gRPC plugin commands to generate java objects
protoc --proto_path=F:\MyProjects\GRPC_Demo_MVN\src\main\java\main --java_out=F:\MyProjects\GRPC_Demo_MVN\src\main\java F:\MyProjects\GRPC_Demo_MVN\src\main\java\main\*.proto
protoc --grpc-java_out=lite:F:/MyProjects/GRPC_Demo_MVN/src/main/java --proto_path="F:/MyProjects/GRPC_Demo_MVN/src/main/java/main" "hello.proto"
@akkida746
akkida746 / MultiThreadedFileRead.java
Last active June 20, 2017 04:57
Multithreaded File Reading in Java
import java.io.*;
import java.lang.*;
class MultiThreadedFileRead extends Thread
{
InputStream in;
MultiThreadedFileRead(String fname) throws Exception
{
in=new FileInputStream(fname);
this.start();
}
@akkida746
akkida746 / xyz.java
Created January 5, 2017 11:20
Marshall Object to XML java
public static Order getOrder(String orderxml) throws GdiSomException
{
try {
JAXBContext jaxbContext;
jaxbContext = JAXBContext.newInstance(Order.class);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
StringReader reader = new StringReader(orderxml);
Order order= (Order) jaxbUnmarshaller.unmarshal(reader);
return order;
@akkida746
akkida746 / OrderItemProcessListener.java
Created January 5, 2017 11:18
Spring ItemProcessListener<Object,Object>
/**
*We use this process listener if we want to process the items before inserting into the database.
*Only used for custom processing.
*/
public class OrderItemProcessListener implements ItemProcessListener<Object,Object> {
private OrderDao orderDao;
private static final Logger logger = Logger.getLogger(OrderItemProcessListener.class);
@akkida746
akkida746 / OrderArchiveErrorJobListener.java
Created January 5, 2017 11:16
Spring batch job execution listener
package com.xyz.batch.listener;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.text.DateFormat;
@akkida746
akkida746 / PropertiesConfugurer.java
Created December 27, 2016 12:23
Read properties file outside war in Spring application
@Configuration
public class PropertiesConfugurer implements WebApplicationInitializer, ApplicationContextAware,
ApplicationContextInitializer<ConfigurableApplicationContext> {
private static final Logger logger = Logger.getLogger(XmlFormatter.class);
private static ApplicationContext context;
private static String relativePath;
@Override
@akkida746
akkida746 / jetty-web.xml
Created December 22, 2016 10:06
Set application context path in jetty-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- File: web-app/WEB-INF/jetty-web.xml -->
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- Application name is 'gdi_som' -->
<Set name="contextPath">/gdi_som</Set>
</Configure>