Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Steve Ruben Tryptich

🏠
Working from home
View GitHub Profile
@Tryptich
Tryptich / copyfile.plsql
Created Jan 10, 2019
copy file in oracle, utl_file.fcopy doesn't work for some type of file and the only way to copy a file is to do it as raw file. So here is an example.
View copyfile.plsql
CREATE OR REPLACE PROCEDURE copyfile (in_director in varchar2, in_filename IN VARCHAR2, out_directory in varchar2, out_filename IN VARCHAR2)
IS
in_file UTL_FILE.file_type;
out_file UTL_FILE.file_type;
buffer_size CONSTANT INTEGER := 32767; -- Max Buffer Size = 32767
buffer RAW (32767);
buffer_length INTEGER;
BEGIN
-- Open a handle to the location where you are going to read the Text or Binary file from
-- NOTE: The 'rb' parameter means "read in byte mode" and is only available
@Tryptich
Tryptich / FileIOHelper.java
Created Nov 3, 2018
Remote file management on FTP server using Java
View FileIOHelper.java
import java.awt.image.BufferedImage;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@Tryptich
Tryptich / dashboard.component.ts
Created Aug 25, 2017
sample chart with highchart
View dashboard.component.ts
import {AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
import 'highcharts/adapters/standalone-framework.src';
declare var require: any;
const Highcharts = require('highcharts/highcharts.src');
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
@Tryptich
Tryptich / timer.cc
Created Jul 30, 2016
Timer based coordination in ns3
View timer.cc
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/netanim-module.h"
#include "ns3/ipv4-address.h"
#include "ns3/netanim-module.h"
@Tryptich
Tryptich / client.cpp
Created Oct 21, 2015
Multiple streaming in c++ using opencv; OpenCV video streaming over TCP/IP
View client.cpp
/**
* OpenCV video streaming over TCP/IP
* Client: Receives video from server and display it
* by Steve Tuenkam
*/
#include "opencv2/opencv.hpp"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>