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
| select regexp_replace(str, '(foo|foos|fooes)', 'bar', 1, 1, 'i') as val | |
| from (select 'aa_fOo_bb' str from dual); |
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 table tmp_t1 | |
| ( | |
| amount number, | |
| txt varchar2(50 char) | |
| ); | |
| insert into tmp_t1 | |
| (amount, txt) | |
| values | |
| (1, 'text 1'); |
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
| def foo(): | |
| x0 = [[1, 2], [3, 4], [5, 6]] | |
| y = [x2 for x1 in x0 for x2 in x1] | |
| print y | |
| def bar(): | |
| x = [[1, 2], [3, 4], [5, 6]] | |
| x = [x for x in x for x in x] | |
| print x |
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
| import traceback | |
| def foo(): | |
| x = [1, 2, 3] | |
| print(traceback.extract_stack()) | |
| if __name__ == '__main__': | |
| foo() |
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
| a = [[1, 2], [3, 4], [5, 6]] | |
| b = [x for l in a for x in l] | |
| # b = [1, 2, 3, 4, 5, 6] |
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
| # Try it out. It works! | |
| x = [[1,2], [3,4], [5,6]] | |
| x = [x for x in x for x in x] | |
| # x = [1, 2, 3, 4, 5, 6] |
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_number_i_am_interested_in number; | |
| l_dummy number; | |
| begin | |
| api(p1 => l_number_i_am_interested_in, | |
| p2 => l_dummy, | |
| p3 => l_dummy, | |
| p7 => l_dummy, | |
| p8 => l_dummy, | |
| p9 => l_dummy, |
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 api(p1 out number, | |
| p2 out number, | |
| p3 out number, | |
| p4 out number, | |
| p5 out number, | |
| p6 out number, | |
| p7 out number, | |
| p8 out number, | |
| p9 out number) | |
| 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
| declare | |
| l_number_i_am_interested_in number; | |
| l_dummy number; | |
| begin | |
| api(p1 => l_number_i_am_interested_in, | |
| p2 => l_dummy, | |
| p3 => l_dummy); | |
| dbms_output.put_line(l_dummy); | |
| 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
| declare | |
| l_number_i_am_interested_in number; | |
| l_dummy number; | |
| begin | |
| api(p1 => l_number_i_am_interested_in, | |
| p2 => l_dummy, | |
| p3 => l_dummy); | |
| end; |