Make the cursor a hand when a user hovers over a list item

Use for li:

li:hover {
    cursor: pointer;

See more cursor properties with examples after running snippet option:

.auto          { cursor: auto; }
.default       { cursor: default; }
.none          { cursor: none; }
.context-menu  { cursor: context-menu; }
.help          { cursor: help; }
.pointer       { cursor: pointer; }
.progress      { cursor: progress; }
.wait          { cursor: wait; }
.cell          { cursor: cell; }
.crosshair     { cursor: crosshair; }
.text          { cursor: text; }
.vertical-text { cursor: vertical-text; }
.alias         { cursor: alias; }
.copy          { cursor: copy; }
.move          { cursor: move; }
.no-drop       { cursor: no-drop; }
.not-allowed   { cursor: not-allowed; }
.all-scroll    { cursor: all-scroll; }
.col-resize    { cursor: col-resize; }
.row-resize    { cursor: row-resize; }
.n-resize      { cursor: n-resize; }
.e-resize      { cursor: e-resize; }
.s-resize      { cursor: s-resize; }
.w-resize      { cursor: w-resize; }
.ns-resize     { cursor: ns-resize; }
.ew-resize     { cursor: ew-resize; }
.ne-resize     { cursor: ne-resize; }
.nw-resize     { cursor: nw-resize; }
.se-resize     { cursor: se-resize; }
.sw-resize     { cursor: sw-resize; }
.nesw-resize   { cursor: nesw-resize; }
.nwse-resize   { cursor: nwse-resize; }

.cursors > div {
    float: left;
    box-sizing: border-box;
    background: #f2f2f2;
    border:1px solid #ccc;
    width: 20%;
    padding: 10px 2px;
    text-align: center;
    white-space: nowrap;
    &:nth-child(even) {
       background: #eee;
    &:hover {
       opacity: 0.25


Delete a Row of a Report with a Dynamic Action

I was asked recently how I implemented the deleting of a row in my demo application, so I thought I would post the answer here in case anyone else was curious.

To accomplish the deletion of a row with a prompt to the user for confirmation you will need a hidden page item and a dynamic action.

On the page that has your report, add a hidden page item – mine is called P20_DELETE_ID. This item will be used by our dynamic action to hold the primary key of the row on which the user clicked the delete icon.

You need to add a link column to your report for the delete icon with the following attributes:

Link Target: URL
URL: javascript:void(null);
Link Text: <span class="t-Icon fa fa-trash delete-note" aria-hidden="true"></span>
Link Attributes: data-id=#REMOVE#
Link Column

Notice in the Link Text that I added a class called delete-note. This is the jQuery selector we will use to trigger our dynamic action. Also, notice the Link Attributes – the column referenced here, in my case #REMOVE#, should hold the primary key for the row. This value will be used to identify the row that needs to be deleted in your delete PL/SQL statement.

Next, we need a dynamic action that fires on click of our jQuery selector, .delete-note. This action will have four true actions:
Delete Row Dynamic Action

True Action #1: Confirm
Text: Are you sure?

True Action #2: Set Value
Set Type: JavaScript Expression
JavaScript Expression: $(this.triggeringElement).parent().data('id')
Affected elements:
Selection Type: Item(s)
Items(s): P20_DELETE_ID <—- your hidden page item
Set Value

True Action #3: Execute PL/SQL Code
PL/SQL Code: delete from jsd_notes where id = :P20_DELETE_ID;
Items to Submit: P20_DELETE_ID <—- your hidden page item
Execute PL/SQL Code

True Action #4: Refresh
Selection Type: Region
Region: Notifications <—- your report region

And that should do it 🙂
– Jackie –

Soruce from

How to show and hide inline dialog in oracle apex using JavaScript

How to show and hide inline dialog in oracle apex using JavaScript

  1. Create a Region named as example “Employee Details:
  2. Assign a Static ID of the region “EMPDTLS”  ( ..Region Property/Advanced/Static ID:)
  3. Create a Page Button Named “ShowDialog”
  4. Go to the button property and set it’s properties as below:
  5. Behavior/Action = Redirect to URL
  6. Target = javascript:openModal('EMPDTLS');
  7. Now Save and run the page. when you click “ShowModal” button the modal dialog will be appeared.
  8. Now for closing the Modal dialog, you can add a new button “closeDialog” in the dialog region and set the properties as below:
  9. Behavior/Action = Redirect to URL
  10. Target = javascript:closeModal(‘EMPDTLS’);
  11. If you want to pass value in the Dialog region then




#EMPNO# – this is applicable when you calling dialog window from Interactive or classic report. here EMPNO is the column name.



How To Convert Number into Words using Oracle SQL Query

How can you convert a number into words using Oracle Sql Query? What I mean by Number to Word is:

12 = Twelve
102 = One Hundred Two
1020 = One Thousand Twenty

Here’s a classy query which will convert number into words.Please see the query below:

select to_char(to_date(:number,'j'),'jsp') from dual;

If I pass 234 in number, then the output will : two hundred thirty-four

SELECT TO_CHAR (TO_DATE (234, 'j'), 'jsp') FROM DUAL;
//Output: two hundred thirty-four

SELECT TO_CHAR (TO_DATE (24834, 'j'), 'jsp') FROM DUAL;
//Output: twenty-four thousand eight hundred thirty-four

SELECT TO_CHAR (TO_DATE (2447834, 'j'), 'jsp') FROM DUAL;
//Output: two million four hundred forty-seven thousand eight hundred thirty-four

So how the query works? Well here’s why:

If you look into the inner most part of the query to_date(:number,'j') the ‘j’ or J is the Julian Date (January 1, 4713 BC), basically this date is been used for astronomical studies.

So to_date(:number,'j') it take the number represented by number and pretend it is a julian date, convert into a date.

If you pass 3 to number, so it will convert date to 3rd Jan 4713 BC, it means 3 is added to the Julian date.

Now to_char(to_date(:number,'j'),'jsp')jsp = Now; take that date(to_date(:number,'j')) and spell the julian number it represents

Limitation & workaround

There is a limitation while using Julian dates ,It ranges from 1 to 5373484. That’s why if you put the values after 5373484, it will throw you an error as shown below:

ORA-01854: julian date must be between 1 and 5373484

To cater the above problem ,create a function,

and with little trick with j->jsp ,you can fetch the desired result.

create or replace FUNCTION spell_number (p_number IN NUMBER)
   TYPE myArray IS TABLE OF VARCHAR2 (255);

   l_str myArray
         := myArray ('',
                     ' thousand ',
                     ' million ',
                     ' billion ',
                     ' trillion ',
                     ' quadrillion ',
                     ' quintillion ',
                     ' sextillion ',
                     ' septillion ',
                     ' octillion ',
                     ' nonillion ',
                     ' decillion ',
                     ' undecillion ',
                     ' duodecillion ');

   l_num      VARCHAR2 (50) DEFAULT TRUNC (p_number);
   l_return   VARCHAR2 (4000);
   l_pisa     varchar2(50);
   FOR i IN 1 .. l_str.COUNT
      EXIT WHEN l_num IS NULL;

      IF (SUBSTR (l_num, LENGTH (l_num) - 2, 3) <> 0)
         l_return :=
            TO_CHAR (TO_DATE (SUBSTR (l_num, LENGTH (l_num) - 2, 3), 'J'),
            || l_str (i)
            || l_return;
      END IF;

      l_num := SUBSTR (l_num, 1, LENGTH (l_num) - 3);

    l_pisa := substr(p_number,instr(p_number,'.')+1,length(p_number)-instr(p_number,'.'));
    if instr(p_number,'.') > 0 and l_pisa < 99  then
    l_return := upper(l_return||' and '|| to_char(to_date(l_pisa, 'J'), 'JSP') ||' Paise Only');
    end if;
   RETURN l_return;

SELECT spell_number (53734555555585.13) FROM DUAL;



Apex – Interactive Report – Hide Column in CSV Download?

You can hide it by putting a condition on the column of type PL/SQL Expression and using the following as the expression:


That will check the APEX bind variable “REQUEST”, and if it is CSV, XLS, PDF, XML, RTF or HTML then the column will not be shown!

More info

To stop a column from showing up for an email, you can use the following:

NVL(wwv_flow.g_widget_action, ‘MY_REQ’) != ‘SEND_EMAIL’


Move the entire row to next page when one or more text fields data overflows to next page

Usually, Clients needs data to be displayed neatly at server UI level though it would be an excel extract or pdf extract.

This tip is useful when report text fields data overflows to next page with wired look and feel.

Solution : 
1) Remove “Detail Over flow” option for all the text elements that are kept on detail band if  the property is already applied.
2) Select the detail band and look into the properties of it.

Chose Split Type = Prevent instead Stretch



Restrict Numbers only in apex 5 input type

Use the below javascript in common js file and change input type in number the input only accept the 0-9 and dot only.

$(document).ready(function() {
    $(".number_field").keydown(function (e) {
        // Allow: backspace, delete, tab, escape, enter and .
        if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
             // Allow: Ctrl+A, Command+A
            (e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) || 
             // Allow: home, end, left, right, down, up
            (e.keyCode >= 35 && e.keyCode <= 40)) {
                 // let it happen, don't do anything
        // Ensure that it is a number and stop the keypress
        if ((e.shiftKey || (e.keyCode  57)) && (e.keyCode  105)) {

oracle: unexpire and unlock accounts

oracle: unexpire and unlock accounts

Some of our customers’ applications are built around Oracle, so we have to fight the beast from time to time. Unfortunately, some of the surprizes the beast has to offer are quite random and rare, and due to this we tend to simply forget how we fixed and/or circumvented the issues previously.

So this is just an attempt of a small cheat sheat to help our overloaded brains :-)

  1. expired and locked accounts – the basics
    Now, as of version 11g, Oracle has enabled account expiration per default for many vital accounts (such as SYSMAN, SYS, …). Quite a weird idea in my view, but who knows what hyper security things some wise engineer had in mind when doing so.Beware that we run Oracle under various Linux flavours, so things might be different for you.

    • become database admin
      First log into your host running oracle and become the oracle user.
      % sqlplus /nolog
      SQL> connect / as SYSDBA
    • find out which accounts are expired
      select username, account_status from dba_users where ACCOUNT_STATUS LIKE '%EXPIRED%';
    • unexpire an account
      once an account has been expired, it can only be revived by assigning it a new password:
      ALTER USER scott IDENTIFIED BY password;
    • unlock an account
    • disable default password expiry [2]
      this all depends on the profile a user belongs to, to disable password expiry for all users assigned the default user profile do this:
  2. Enterprise Manager: unable to connect to instance
    One of the worst things that can happen in that course is if Enterprise Manager reports “Failed to connect to database instance: ORA-28001: the password has expired (DBD ERROR: OCISessionBegin)” and then simply rejects to work with the database.So far, we’ve found two accounts to be potential culprits for the problem: SYSMAN andDBSNMP

    • unexpire SYSMAN [3]
      Quite tricky, because you have to change things on two sides: First unexpire the account as explained above. And now tweak oracle configuration.
      As oracle user:

      1. unexpire and unlock the account as explained above
      2. % emctl stop dbconsole
      3. change into
        ORACLE_HOME/<HostName_SID>/sysman/config, for us this would be for example:
        % cd /opt/oracle/111/klotho_ABSDEV/sysman/config
      4. edit the file
        and change the oracle.sysman.eml.mntr.emdRepPwd property to the new password you gave the SYSMAN user.
        Then change the oracle.sysman.eml.mntr.emdRepPwdEncrypted property fromTRUE to FALSE (sidenote: Oracle will revert to TRUE automagically once it is restarted).
      5. change into
        ORACLE_HOME/<HostName_SID>/sysman/emd, for us this would be for example:
        % cd /opt/oracle/111/klotho_ABSDEV/sysman/emd
      6. edit the target.xml file
        and edit those two properties:
        <Property NAME="UserName" VALUE="SYSMAN" ENCRYPTED="FALSE"/>
        <Property NAME="password" VALUE="TheNewPassword" ENCRYPTED="FALSE"/>
      7. % emctl start dbconsole
      8. under “normal” circumstances, everything should be fine now :-)

So, as said above this is just a “small” cheat sheet for some annoyances we have met with the great oracle, of course there is much much more to know about the beast 😉