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
CREATE OR REPLACE FUNCTION is_apex_session_cloned RETURN BOOLEAN IS | |
-- | |
l_referer VARCHAR2(4000); | |
l_referer_query_string VARCHAR2(4000); | |
l_session_before NUMBER; | |
l_bool BOOLEAN := FALSE; | |
-- cursor to find session id of referer (page before) | |
-- 3rd splitted part holds APEX session id | |
CURSOR l_cur_session_before IS | |
SELECT to_number(referer_tab.column_value) AS session_before |
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
CREATE OR REPLACE FUNCTION get_binds(p_sql_statement IN CLOB) RETURN apex_t_varchar2 AS | |
-- | |
l_statement CLOB := p_sql_statement; | |
l_block_comment_start_pos PLS_INTEGER; | |
l_line_comment_start_pos PLS_INTEGER; | |
l_string_literal_start_pos PLS_INTEGER; | |
l_q_quote_char VARCHAR2(1); | |
l_closing_token VARCHAR2(2); | |
l_token_start_pos PLS_INTEGER; | |
l_token_end_pos PLS_INTEGER; |
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
CREATE OR REPLACE FUNCTION gen_xe_space_percent RETURN NUMBER IS | |
-- | |
l_return NUMBER := 0; | |
l_xe_max_size NUMBER := 11811160064; | |
l_used_size NUMBER := 0; | |
-- | |
CURSOR l_cur_dba_ts_size IS | |
SELECT a.tablespace_name ts, | |
a.file_id, | |
SUM(b.bytes) / COUNT(*) - SUM(a.bytes) used |
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
CREATE OR REPLACE PROCEDURE get_apex_temp_file(i_item_value IN VARCHAR2, | |
o_blob OUT BLOB, | |
o_filename OUT VARCHAR, | |
o_mime_type OUT VARCHAR2) IS | |
-- | |
l_workspace_id NUMBER; | |
l_app_id NUMBER; | |
-- | |
CURSOR l_cur_apex_blob IS | |
SELECT atf.blob_content, |
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
CREATE OR REPLACE PROCEDURE zip_add_file_clob(p_zipped_blob IN OUT NOCOPY BLOB, | |
p_name IN VARCHAR2, | |
p_content IN CLOB) AS | |
-- | |
l_tmp BLOB; | |
l_dest_offset INTEGER := 1; | |
l_src_offset INTEGER := 1; | |
l_warning INTEGER; | |
l_lang_ctx INTEGER := dbms_lob.default_lang_ctx; | |
-- |
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
CREATE OR REPLACE FUNCTION is_pageitem_rendered(p_item_name IN VARCHAR2) RETURN BOOLEAN IS | |
-- | |
l_bool BOOLEAN; | |
-- | |
CURSOR l_cur_item IS | |
SELECT aapi.build_option_id, | |
aapi.condition_type_code, | |
aapi.condition_expression1, | |
aapi.condition_expression2, | |
aapi.authorization_scheme_id |
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
#!/bin/sh | |
# | |
# Mac OSX Adblocker Script for IPv4 | |
# Description: Blocks ads using system hosts file /private/etc/hosts, Ad-Domains would be redirected to 0.0.0.0 | |
# Author: Daniel Hochleitner | |
# Created: 10.09.2015 | |
# Use: sudo ./adblock_hosts.sh | |
# Get original hosts file from /private/etc/hosts |