Skip to content

Instantly share code, notes, and snippets.

View AmrAbdeen's full-sized avatar

Amr AmrAbdeen

  • Egypt, Northern coast
View GitHub Profile
/** ###### PLEASE TAKE ATTENTION ###### //
* (( $v(), $s(), $x(), apex.item )) are APEX API "SHOULD BE" using them instead of JQ, Just i added some JQ here as more info for you - in some cases the JQ returns some diff results so the API is better to use it always .. Take care..
---------------------------------------------------------------------------- */
// Getting Item Value
$v("P2_ENAME"); /* it's same same */ apex.item( "P2_ENAME" ).getValue(); /* it's same same */ $("#P2_ENAME").val();
// Set Item with Value
$s("P2_ENAME",'AMR'); /* it's same same */ apex.item( "P2_ENAME" ).setValue('AMR'); /* it's same same */ $("#P2_ENAME").val('AMR');
@AmrAbdeen
AmrAbdeen / apex_err_msg.sql
Last active November 10, 2016 05:22
apex error msg
apex_error.add_error (p_message => 'check total after dedecation(Discount)',
p_display_location => apex_error.c_inline_in_notification );
APEX_ERROR.ADD_ERROR (
p_message => 'The employee name can´t be null',
p_display_location => apex_error.c_inline_with_field_and_notif ,
p_page_item_name => 'P1_ENAME');
@AmrAbdeen
AmrAbdeen / numonly.js
Created January 30, 2016 20:32
Number Only accepted into JS
function numonly(evt){
//onkeypress="return numonly(event)"
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
window.onerror = function () {alert("##############");}
@AmrAbdeen
AmrAbdeen / Update_JAVA_AND_JRE_HOME.bash
Created January 18, 2016 22:39
Update JRE_HOME and JAVA_HOME
sudo update-alternatives --config java
@AmrAbdeen
AmrAbdeen / Default Apex 5 Main Navigation to Closed.js
Created January 5, 2016 00:59
Default Apex 5 Main Navigation to Closed/Collapsed
Please include the following block of code on all pages in which you want the navbar to always start collapsed by default:
$(window).on("theme42ready", function() {
if ($("body").hasClass("js-navExpanded")) {
$("#t_Button_navControl").click();
}
});
@AmrAbdeen
AmrAbdeen / best_code.txt
Created November 6, 2015 18:41
code best of #oracle_sql
Case 1
I use
COALESCE( v('APP_USER'),USER );
instead of
NVL( V('APP_USER'),USER );
Cause:
More performance.
@AmrAbdeen
AmrAbdeen / desc
Last active September 20, 2024 14:01
Fix| Error E:Encountered a section with no Package: header, E:Problem with MergeList
Error “E:Encountered a section with no Package: header, E:Problem with MergeList …….”
Fix it by this steps .. #linux_mint_17.2
1- Clean up..
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge
sudo apt-get autoremove -y
sudo rm -fv /var/lib/apt/lists/*
@AmrAbdeen
AmrAbdeen / 503_Service_Unavailable.txt
Created October 15, 2015 12:33
Solved|| Error: 503 - Service Unavailable @https://community.oracle.com/message/13168925#13168925
This is the root cause of your issue.
The apex pool in ORDS corresponds to the database APEX_PUBLIC_USER and it is not correctly configured.
Connect to the SQL Plus prompt with SYS user and SYSDBA privileges and run the following query:
// select username
, account_status
, profile
from dba_users
where username in ('APEX_PUBLIC_USER','APEX_LISTENER','APEX_REST_PUBLIC_USER');
@AmrAbdeen
AmrAbdeen / PasswordExpiration11g.txt
Last active April 22, 2019 21:26
Password Expiration in Oracle Database 11g @http://alanarentsen.blogspot.in/2013/02/about-password-expiration-in-oracle.html
Apex Installation Guide you will find the following paragraph:
"In the default profile in Oracle Database 11g, the parameter PASSWORD_LIFE_TIME is set to 180. If you are using Oracle Database 11g with Oracle Application Express, this causes the password for APEX_PUBLIC_USER to expire in 180 days. As a result, your Oracle Application Express instance will become unusable until you change the password.
To prevent this behavior, create another profile in which the PASSWORD_LIFE_TIME parameter is set to unlimited and alter the APEX_PUBLIC_USER account and assign it to the new profile."
Of course with a little help from google you can find out how to do this. I summarized it for you:
First let's see what the limits of the default profile (or the profile of your APEX_PUBLIC_USER) are:
/* --------------------------------------- */