Skip to content

Instantly share code, notes, and snippets.

View SteveRuben's full-sized avatar
🏠
I may be slow to respond.

Steve Ruben SteveRuben

🏠
I may be slow to respond.
View GitHub Profile
@SteveRuben
SteveRuben / copyfile.plsql
Created January 10, 2019 10:59
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.
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
@SteveRuben
SteveRuben / FileIOHelper.java
Created November 3, 2018 12:01
Remote file management on FTP server using 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;
@SteveRuben
SteveRuben / dashboard.component.ts
Created August 25, 2017 09:43
sample chart with highchart
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']
})
@SteveRuben
SteveRuben / timer.cc
Created July 30, 2016 14:42
Timer based coordination in ns3
#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"
@SteveRuben
SteveRuben / client.cpp
Created October 21, 2015 08:30
Multiple streaming in c++ using opencv; OpenCV video streaming over TCP/IP
/**
* 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>