Skip to content

Commit

Permalink
Kscope16 Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
martindsouza committed Jun 27, 2016
1 parent e122bc2 commit 880a571
Show file tree
Hide file tree
Showing 18 changed files with 462 additions and 92 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ Run `./scripts/gh-pages-rebase.sh` in root folder to rebase for web.
## Images

Some open source images are available [here](https://www.flickr.com/creativecommons/).

## reveal.js

For future apps: `git submodule add https://github.com/hakimel/reveal.js`
225 changes: 225 additions & 0 deletions demo/oos_utils.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
-- TODO mdsouza: review what is/isnt' commented before running
-- *** OOS_UTIL_APEX **

-- * oos_util_apex.is_developer *

-- APEX demo
/*
Condition:
oos_util_apex.is_developer
*/


-- * oos_util_apex.create_session *
declare
l_body clob;
begin
l_body := 'this is a demo';

apex_mail.send(
p_to => '[email protected]',
p_from => '[email protected]',
p_body => l_body,
p_subj => 'demo mail from plsql');

apex_mail.push_queue;
end;
/


/* Results in:
Error report -
ORA-20001: This procedure must be invoked from within an application session.
ORA-06512: at "APEX_050000.WWV_FLOW_MAIL", line 562
ORA-06512: at "APEX_050000.WWV_FLOW_MAIL", line 688
ORA-06512: at "APEX_050000.WWV_FLOW_MAIL", line 720
ORA-06512: at "APEX_050000.WWV_FLOW_MAIL_API", line 69
ORA-06512: at line 6
*/

declare
l_body clob;
begin
oos_util_apex.create_session(
p_app_id => 136,
p_user_name => 'giffy'
);

l_body := 'this is a demo';

apex_mail.send(
p_to => '[email protected]',
p_from => '[email protected]',
p_body => l_body,
p_subj => 'demo mail from plsql');

apex_mail.push_queue;
end;
/


-- Disconnect / reconnect

-- * oos_util_apex.join_session *
select *
from apex_collections;

-- Only real way is to look at the debug tab
-- What about views built ontop of collections?

begin
oos_util_apex.join_session('CHANGEME');
end;
/

select *
from apex_collections;

-- Notes:
-- snapshot of APEX items at point in time (working on it)


-- *** OOS_UTIL_STING ***

-- * to_char *

declare
l_bool boolean := true;
begin
dbms_output.put_line(l_bool);
end;
/


-- Old
declare
l_bool boolean := true;
begin
dbms_output.put_line(case when l_bool then 'TRUE' else 'FALSE');
end;
/

-- New
declare
l_bool boolean := true;
begin
dbms_output.put_line(oos_util_string.to_char(l_bool));
end;
/




-- * oos_util_string.sprintf *

select
'hello' || e.ename || 'you make ' || e.sal || 'a year'
-- oos_util_string.sprintf('hello %s1 you make %s1 a year', e.ename, e.sal)
from emp e;


select oos_util_string.sprintf('hello %s you make %s a year', e.ename, e.sal)
from emp e;


select oos_util_string.sprintf('hello %s2 you make %s1 a year', e.ename, e.sal)
from emp e;




-- * oos_util_string.listunagg *
select ename from emp;

select listagg(e.deptno, ':') within group (order by e.ename)
from emp e;

select d.dname
from dept d,
(
select rownum, to_number(column_value) deptno
from table(oos_util_string.listunagg('20:30:30:10:20:30:20:10:30:10:20:20:30:30', ':'))
) x
where 1=1
and d.deptno = x.deptno
;
-- Handles clobs as well!!!


-- * oos_util_string.truncate *
select
ad.apex_view_name,
ad.comments
-- ,case
-- when length(ad.comments) > 35-3 then
-- substr(ad.comments, 1, 35-3) || '...'
-- else
-- ad.comments
-- end comments_trunc
-- ,
-- oos_util_string.truncate(
-- p_str => ad.comments,
-- p_length => 35
---- , p_by_word => 'N'
-- )
from apex_dictionary ad
where 1=1
and ad.column_id = 0
order by ad.apex_view_name
;





-- *** oos_util_validation ***

declare
l_apex_item varchar2(255) := '123.45';
l_num number;
begin

l_num := to_number(l_apex_item);
dbms_output.put_line('Valid Number');
exception
when others then
dbms_output.put_line('Invalid Number');
end;
/


declare
begin
dbms_output.put_line(oos_util_string.to_char(oos_util_validation.is_number('123.45')));
end;
/



-- *** OOS_UTIL_WEB ***

-- oos_util_web.get_mime_type
select oos_util_web.get_mime_type('oos_utils.xls')
from dual;


-- Download File (APEX)
declare
l_row apex_application_static_files%rowtype;
begin
select *
into l_row
from apex_application_static_files
where 1=1
and application_id = 160
and file_name = 'image.png';

oos_util_web.download_file(
p_filename => l_row.file_name,
p_blob => l_row.file_content);
-- and file_name = 'readme.txt';
--
-- oos_util_apex.download_file(
-- p_filename => l_row.file_name,
-- p_clob => oos_util_lob.blob2clob(l_row.file_content));
end;
16 changes: 16 additions & 0 deletions demo/plmd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Setup:
- Have OOS_Utils project open
- Open ReadTheDocs
- Open Github page

- Story behind it (Logger / OOS Utils)
- Show docs on Github & ReadTheDocs

cd ~/Documents/GitHub/oraopensource/plsql-md-doc/
node app oos-utils

Make file change

node app oos-utils

Show diff
18 changes: 18 additions & 0 deletions demo/setup.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- Close Menu Bar
- Turn off notifications


PL/MD Doc
- Read Setup


cd ~/Documents/GitHub/martindsouza/pres-gulp-loader
npm start


AFEB:
cd ~/Temp/apex_gulp/src/css
atom test.css

cd ~/Documents/GitHub/oraopensource/apex-frontend-boost
npm start -- --project=vcentos
5 changes: 3 additions & 2 deletions slides/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- Oracle / APEX ~10 years
- Wrote a few [books](http://www.talkapex.com/p/books.html)
- Sr. Consultant at [Insum Solutions](http://www.insum.ca)
- Director at [ODTUG](http://odtug.com)
- Vice President at [ODTUG](http://odtug.com)


new-slide-vertical
Expand Down Expand Up @@ -36,4 +36,5 @@ new-slide-vertical

Notes:
- North America's largest APEX company.</br>
- PL/SQL and APEX consulting services.
- Services: application development, coaching, consulting, EBS extensions, and Forms migration.</br>
- 80 employees and growing
36 changes: 36 additions & 0 deletions slides/conclusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ Notes:

new-slide-vertical

## Insum Presentations

### *Monday*
- Classic Reports: Tips & Techniques to Make Them Sing *3:15 pm*
- [Jorge Rimblas](https://twitter.com/rimblas)

new-slide-vertical
## Insum Presentations

### *Tuesday*
- Insum Vendor Pres: *9:45am*
- APEX and Essbase: Together at Last: *2:00pm*
- [Jorge Rimblas](https://twitter.com/rimblas)
- Enriching APEX Apps w. Semantics: *3:30pm*
- [Adrian Png](https://twitter.com/fuzziebrain)
- Getting Good at an Obsolete Technology: *4:45pm*
- [Vincent Morneau](https://twitter.com/vincentmorneau)

new-slide-vertical

## Insum Presentations

### *Wednesday*
- Shaping Up Theme Roller Beyond UT: *10:15am*
- [Vincent Morneau](https://twitter.com/vincentmorneau)
- **Bridging Desktop and Web Applications**: *12:45pm*
- [Martin D'Souza](https://twitter.com/martindsouza)

new-slide-vertical

# `end;`

<p class="no-bullet"></p>
Expand All @@ -26,3 +56,9 @@ new-slide-vertical
- <i class="fa fa-building-o"></i> [Insum Solutions](http://www.insum.ca)

Slides: [github.com/martindsouza/pres-open-source-apex](https://github.com/martindsouza/pres-open-source-apex)


Notes:
- I mentioned over 10 active projects at the start
- Only had time to show a few of them, check out OOS and also get involved.
- Only possible by the community. Use the tools, submit issues/suggestions, help out, create your own project!
Loading

0 comments on commit 880a571

Please sign in to comment.