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
    
  
  
    
  | logconfig = { | |
| "version": 1, | |
| "disable_existing_loggers": 0, | |
| "root": { | |
| "level": "DEBUG", | |
| "handlers": [ | |
| "console", | |
| "file", | |
| "debugfile" | |
| ] | 
  
    
      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
    
  
  
    
  | with | |
| -- NoFormat Start | |
| regexp as ( | |
| select '^[[:blank:]=v]*(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[a-zA-Z0-9\.-]*)?(\+[a-zA-Z0-9\.-]*)?[[:blank:]]*$' as expression from dual | |
| ), | |
| sample as ( | |
| select '' test_value, '<null>,<null>,<null>,<null>,<null>' expected from dual union all | |
| select '1.2.3' test_value, '1,2,3,<null>,<null>' expected from dual union all | |
| select ' 1.2.3' test_value, '1,2,3,<null>,<null>' expected from dual union all | |
| select ' 1.2.3 ' test_value, '1,2,3,<null>,<null>' expected from dual union all | 
  
    
      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 clob2file | |
| ( | |
| clob_in IN CLOB, | |
| directory_name IN VARCHAR2, | |
| file_name IN VARCHAR2 | |
| ) IS | |
| -- this is safe value less then 6400 as recommended by utl_file comments, rounded to multiple of 1024 | |
| lc_amount CONSTANT INTEGER := 6144; | |
| l_file utl_file.file_type; | |
| l_blob_buffer BLOB; | 
  
    
      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
    
  
  
    
  | // Dependency resolution, adapted from https://gist.github.com/1232505/f16308bc14966c8d003c2686b1c258ec41303c1f | |
| function resolve(graph) { | |
| var sorted = [], // sorted list of IDs ( returned value ) | |
| visited = {}; // hash: id of already visited node => true | |
| // 2. topological sort | |
| Object.keys(graph).forEach(function visit(name, ancestors) { | |
| if (!Array.isArray(ancestors)) ancestors = []; | |
| ancestors.push(name); | |
| visited[name] = 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
    
  
  
    
  | DECLARE | |
| l_exception EXCEPTION; | |
| lc_max_tries CONSTANT PLS_INTEGER := 3; | |
| --- | |
| l_unsuccessful_tries PLS_INTEGER := 2; | |
| BEGIN | |
| <<some_loop>> | |
| FOR iterator IN 1 .. lc_max_tries LOOP | |
| BEGIN | |
| dbms_output.put_line('try #' || iterator); | 
  
    
      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
    
  
  
    
  | FUNCTION formatString | |
| ( | |
| p_string IN VARCHAR2, | |
| p_placeholder1 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder2 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder3 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder4 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder5 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder6 IN VARCHAR2 DEFAULT NULL, | |
| p_placeholder7 IN VARCHAR2 DEFAULT NULL, | 
  
    
      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 saveFolder to (choose folder) as string | |
| tell application "OmniGraffle" | |
| set theDocument to front document | |
| set area type of the current export settings to all graphics | |
| repeat with thisCanvas in canvases of theDocument | |
| set canvas of front window to thisCanvas | |
| save theDocument as "png" in file (saveFolder & name of thisCanvas & ".png") | 
NewerOlder