Powered By Blogger

রবিবার, ২৫ আগস্ট, ২০২৪

How to show and hide password in oracle apex

 1.    Go to P9999_PASSWORD Item >> Icon >> Paste the following code- 

           fa-key

2.     Advanced >> Custom Attributes >> Paste the following code

        onchange="htmldb_item_change(this)"  onkeydown="if (event.keyCode == 13)                                                     document.getElementById('LOGIN').focus();"

3.     Post Text >> paste the following code:

<span id="pass-status" class="fa fa-eye field-icon" aria-hidden="true" onClick="viewPassword()">

</span>

4.      Go to Page Properties >> Function and Global Variable Declaration >> Paste the following code- 

        function viewPassword()

{  var passwordInput = document.getElementById('P9999_PASSWORD');

  var passStatus = document.getElementById('pass-status');

  if (passwordInput.type == 'password'){

    passwordInput.type='text';

    passStatus.className='fa fa-eye-slash field-icon';    

  }

  else{

    passwordInput.type='password';

    passStatus.className='fa fa-eye field-icon';

  }}

5.    Page Properties >> Inline >> Paste the following code- 

        .field-icon {

    right : 5px;

    margin-left: -25px;

    margin-top: 14px;

    position: relative;

    z-index: 2;}

সোমবার, ২৭ মে, ২০২৪

Date difference to hour minute (Duty time calculation)

 CREATE OR REPLACE FUNCTION DF_DATE_DIFF_TO_HOUR_MIN (pSDATE   DATE,

                                                     pEDATE   DATE)

    RETURN VARCHAR2

AS

    vHOUR_MIN   VARCHAR2 (200);

BEGIN

    SELECT    NVL(TO_CHAR (TRUNC (Seconds_ / (60 * 60)), 'FM9900'),0)

           || ':'

           || NVL(TRUNC (MOD (Seconds_, 60 * 60) / 60),0)

           || ':'

           || NVL(TRUNC(MOD (Seconds_, 60),2),0) INTO   vHOUR_MIN

      FROM (SELECT (pEDATE - (pSDATE - 0 / 24)) * 24 * 60 * 60    AS Seconds_

              FROM DUAL);


    RETURN vHOUR_MIN;

END;


SELECT DF_DATE_DIFF_TO_HOUR_MIN(:pSDATE, :pEDATE) FROM DUAL;

রবিবার, ১৯ মে, ২০২৪

To Resolve connected to idle instance

1. Connect the DB sqlplus / as sysdba

2. startup nomount

3. alter database mount;

4. Clear an unarchived redo logs

alter database clear unarchived logfile group 1;

alter database clear unarchived logfile group 2;

alter database clear unarchived logfile group 3;

5. shutdown immediate

6.startup

alter session set container=pdbdbname;

Row-level “Add” icon using a virtual column (APEX-safe)

1️⃣ Enable Insert in the Interactive Grid IG → Attributes Edit → Allowed Add Row → Yes 2️⃣ Add a New Column (Icon column) Column...