This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{font-family: Hack,Slack-Lato,appleLogo,sans-serif;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
l_roles owa.vc_arr; | |
l_patterns owa.vc_arr; | |
l_modules owa.vc_arr; | |
BEGIN | |
l_roles(1) := 'SQL Developer'; | |
l_patterns(1):= '/dba/*'; | |
l_modules(1) := 'dba/awr'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set serveroutput on | |
CREATE OR REPLACE PROCEDURE is_adb AS | |
BEGIN | |
$IF $$is_autonomous $THEN | |
dbms_output.put_line('Yup'); | |
$ELSE | |
dbms_output.put_line('No'); | |
$END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Add to ORDS config | |
REM <entry key="procedure.rest.preHook">klrice.my_ords_ctx.populate</entry> | |
REM Create a context | |
CREATE OR REPLACE CONTEXT ords_params USING my_ords_ctx; | |
REM PKG to populate the context | |
CREATE OR REPLACE PACKAGE my_ords_ctx AS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'),fs = require('fs'),colors = require('colors'); | |
var url = "http://KLRICE:klrice@localhost:9090/ords/klrice/_/sql" | |
// loop args 0="node" 1="compile" 2...= files to send | |
for (var i = 2; i < process.argv.length; i++) { | |
fs.createReadStream(process.argv[i]).pipe(request.post({ | |
url : url, | |
proxy:'', | |
method: 'POST', | |
time:true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install java | |
var java = require("java"); | |
java.classpath.push("ojdbc8.jar"); | |
java.classpath.push("oracle.dbtools-common.jar"); | |
java.classpath.push("oracle.dbtools.http.jar"); | |
java.classpath.push("oracle.dbtools.jdbcrest.jar"); | |
java.classpath.push("oracle.sqldeveloper.sqlcl.jar"); | |
java.classpath.push("xmlparserv2.jar"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ddl = (function () { | |
function DDL() { | |
this.options = { | |
//columnNamePrefix: "?", | |
"Object Prefix": {value:"a"}, | |
Schema: {value:"hr"}, | |
"On Delete": {value:'Cascade',check:['Cascade','Restrict','Set Null']}, | |
Compression: {value:'No',check:['Yes','No']}, | |
"Include Drops": {value:'No',check:['Yes','No']}, | |
"Date Data Type":{value:'DATE',check:['DATE','TIMESTAMP','Timestamp with time zone','Timestamp with local time zone']}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tree = (function(){ | |
var tab= ' '; | |
function ddlnode( x, inputLine, parent ) { | |
this.x = x; | |
this.y = function() { | |
if( this.children.length == 0 ) | |
return this.x+1; | |
else | |
return this.children[this.children.length-1].y(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table emoji; | |
create table emoji ( keyword varchar2(30), emoji varchar2(200)); | |
script | |
// read text content from the given URL | |
function readText(url) { | |
// Using JavaImporter to resolve classes | |
// from specified java packages within the | |
// 'with' statement below | |
with (new JavaImporter(java.io, java.net)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// grab the results of the page | |
var PAGE = prev == null ? null : prev.getResponseDataAsString(); | |
// debug | |
OUT.println('PRE PROCESSING...'); | |
function put(id){ | |
vars.put(id, getValue(PAGE,id,'')); | |
} | |
// simple function to grab the value from the page or return the default x | |
function getValue(page,id,v){ |