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 | |
| type json_path_map_type is table of boolean index by varchar2 (4000); | |
| no_preserved_paths json_path_map_type; | |
| subtype array_merge_type is pls_integer range 0 .. 1; | |
| array_merge_replace constant array_merge_type := 0; | |
| array_merge_append constant array_merge_type := 1; | |
| type merge_options_type is record ( | |
| preserved_paths json_path_map_type default no_preserved_paths, | |
| array_merge array_merge_type default array_merge_replace, |
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_src json_object_t := new json_object_t('{"a":{"b":"c","d":"x"},"b":[1,"x",false],"c":"d","d":10,"e":true,"f":[{"a":"b0","c":"d0"},{"a":"b1","e":"f1"},{"a":"b2","c":"d2","e":"f2"}]}'); | |
| l_do_trace boolean; | |
| procedure trace( | |
| p1 in varchar2, | |
| p2 in varchar2 default null, | |
| p3 in varchar2 default null | |
| ) is | |
| begin | |
| if l_do_trace then |
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
| 1. Setup a project | |
| 2. Add groovy SDK support: | |
| https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA | |
| 3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl | |
| - this will give you the .gdsl file - download this to the src folder of your project. | |
| 4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root |
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
| //The global script scope | |
| def ctx = context(scope: scriptScope()) | |
| //What things can be on the script scope | |
| contributor(ctx) { | |
| method(name: 'pipeline', type: 'Object', params: [body: Closure]) | |
| method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job') | |
| method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job') | |
| method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message') | |
| method(name: 'emailextrecipients', type: 'Object', params: [recipientProviders: 'Map'], doc: 'Extended Email Recipients') |
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 x ; | |
| drop type integer_tab_type; | |
| create table x (id integer primary key, v varchar2(10)); | |
| create type integer_tab_type as table of integer; | |
| insert into x values (1, 'a'); | |
| insert into x values (2, 'b'); | |
| commit; |
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
| -- text literal | |
| select sql_text, regexp_replace(sql_text, '''.*?''', '?') from v$sql where regexp_like(sql_text, '''.*?'''); | |
| -- numeric literal | |
| select sql_text, regexp_replace(sql_text, '([^a-zA-Z_$#0-9]+?)([0-9.]*[0-9]+)', '\1?') from v$sql where regexp_like(sql_text, '[0-9]+'); | |
| -- all literals | |
| select sql_text, regexp_replace(regexp_replace(sql_text, '''.*?''', '?'), '([^a-zA-Z_$#0-9]+?)([0-9.]*[0-9]+)', '\1?') from v$sql where sql_id = '9ng8wuk77s0jf'; |
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 # copy stats back after partition exchange | |
| rem | |
| rem ## exp tab.partition.stats > tab.partition <-> tmp tab > imp tab.partition.stats | |
| rem | |
| clear | |
| prompt > copy stats back after partition exchange | |
| prompt |
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
| on newNumbersFromEventInfos(calendarNames, selectedYearMonth, theEventInfos) | |
| -- get max col count | |
| set colCount to 0 | |
| repeat with rowIndex from 1 to length of theEventInfos | |
| if colCount < length of item rowIndex of theEventInfos then | |
| set colCount to length of item rowIndex of theEventInfos | |
| end if | |
| end repeat | |
| -- | |
| tell application "Numbers" |
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_handle_filter integer; | |
| l_handle_remap integer; | |
| l_handle_transform integer; | |
| begin | |
| -- create filter handle and filter objects to transform | |
| l_handle_filter := dbms_metadata.open('TABLE', version => 'LATEST'); | |
| dbms_metadata.set_filter(l_handle_filter, 'SCHEMA', user); | |
| dbms_metadata.set_filter(l_handle_filter, 'NAME', 'ETL_PROCESS'); | |
| -- create transform handle |
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
| -- GMT vs. CET | |
| with dates as | |
| (select from_tz(cast(trunc(sysdate, 'YYYY') + level as timestamp), 'GMT') as gmt from dual connect by level <= 365), | |
| tzs as | |
| (select gmt, gmt at time zone 'CET' as cet from dates) | |
| select to_date(to_char(gmt, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') as gmt, | |
| to_date(to_char(cet, 'YYYY-MM-DD HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') as cet | |
| from tzs; |
NewerOlder