Skip to content

Instantly share code, notes, and snippets.

View AmrAbdeen's full-sized avatar

Amr AmrAbdeen

  • Egypt, Northern coast
View GitHub Profile
@AmrAbdeen
AmrAbdeen / automount_drive
Last active March 6, 2024 23:01
Linux mint | How to automount drive on startup system
To automount drive on startup system
Follow this steps .. | tested on mint 17.2
Go to the Startup Applications..
Write a name for this operation such as "Mount ntfs drives".
Then in command input box, write this
udisks --mount /dev/sda2
to automount the ntfs partition.
Note: You need to replace the /dev/sda2 with your actual NTFS partition number.
run>>
SQL> ALTER system SET CONTROL_MANAGEMENT_PACK_ACCESS='DIAGNOSTIC+TUNING';
SQL> GRANT advisor, administer SQL tuning SET,SELECT any dictionary TO &USER;
SQL> grant advisor to &USER;
SQL> grant administer sql tuning set to &USER;
SQL> exec DBMS_STATS.DELETE_SCHEMA_STATS ('&USER');
--
And show this toturial to help you
@AmrAbdeen
AmrAbdeen / Configuring_RESTful_Services
Created September 1, 2015 08:55
How configure RESTful Services in Oracle Application Express. source: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29159
Configuring RESTful Services
To configure RESTful Services in Oracle Application Express:
Change your working directory to the apex directory where you unzipped the installation software.
Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS specifying the SYSDBA role. For example:
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog
SQL> CONNECT SYS as SYSDBA
We already support running GlassFish V3 as a service on Solaris 10 and Windows platforms (see my blog). I have been investigating how to provide support for automatically starting GlassFish V3 as a service on Linux. Of course before I can hope to do that -- I must be able to set it up manually. In this blog I will take you through the manual steps needed to run GlassFish V3 as a service on Linux.
This procedure was worked out on my Linux system which happens to be Ubuntu. Other flavors of Linux may have slightly different procedures.
One decision you need to make right up front is what Linux user should "own" GlassFish V3. Typically root is used as the owner. If you choose root as the user you get the advantage that you can use ports < 1024 without complex configuration changes to the system. For this blog I used root.
Here are the steps -- the file named "glassfish" in step 4 is the simple init script which appears at the end of this blog.
Install JDK 6 if needed
Have root install GlassFish like
@AmrAbdeen
AmrAbdeen / Installing_GlassFish
Created August 31, 2015 21:30
How to install glassfish server v4.1 on linux mint 17.2 source: http://www.lyonlabs.org/howto/howdoi-glassfish.html
#Download the ZIP file from Oracle. Make sure you have a current JDK installed on your machine (Glassfish 4.1 supports Java 8).
As root, enter the directory you want to install to (I install it in /usr/share) and extract the ZIP file there.
#Add the binaries directory of your new installation to the PATH. One way of doing this is to use a profile script in /etc/profile.d. Create a file there whose name ends in .sh, make it executable, and add this line:
export PATH=/usr/share/glassfish4/glassfish/bin:$PATH
Log out and back in to make the change take effect.
#Create a group and a user for GlassFish.
@AmrAbdeen
AmrAbdeen / unable_mount
Created August 30, 2015 18:05
unable to mount ntfs partition _problem
1- $ sudo fdisk -l
2- $ sudo ntfsfix /dev/<sda?>
@AmrAbdeen
AmrAbdeen / installing_JAVA_XE_SQLDEV_ONLINUX
Last active August 28, 2015 16:21
Installing Java, Oracle 11g R2 Express Edition and SQL Developer on Ubuntu/Mint 64-bit @http://blog.whitehorses.nl/2014/03/18/installing-java-oracle-11g-r2-express-edition-and-sql-developer-on-ubuntu-64-bit/
A while ago I tried to install Oracle 11g R2 Express Edition on a 64-bit Ubuntu machine. This proved to be not as easy as you would expect. There are many blogs and articles about this subject and I tried a number of them. Unfortunately neither of the instructions seemed to work completely on my machine. With the combined information from the authors, I finally got it to work and I’ll gladly share my recipe in this blog. I have also included the installation steps for SQL Developer en Java (which is needed to install SQL Developer) in this blog. The installation was performed on a Ubuntu 12.04 VM with the following software.
Oracle Java 1.7.0_51
Oracle XE 11.2.0 (http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html)
SQL Developer 4.0.0.13.80 (http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html)
Installing Java
We start with installing Java on the machine. My personal preference is to use Oracle Java JDK. Installing this JDK co
@AmrAbdeen
AmrAbdeen / encounter_section_with_no_package_problem
Last active August 28, 2015 14:26
E: encounter a section with no package, E:problem with merge list @ https://bugs.launchpad.net/linuxmint/+bug/1348235
I'm using linux mint 17 (Qiana) cinnamon. When i update, using the command --> sudo apt-get update
I got these error messages below:
E: Encountered a section with no Package: header
E: Problem with Mergelist /var/lib/apt/lists/packages.linuxmint.com_dists_qiana_upstream_i18n_Translation-en
E: The package lists or status file could not be parsed or opened
I encountered these similar problems already 3 times. So I search on the internet, and found that many people already encountered such kind of error messages. Some blogs and forums suggested this command below to solve the problem.
sudo rm /var/lib/apt/lists/* -vf
@AmrAbdeen
AmrAbdeen / rpm_to_deb
Created August 28, 2015 14:20
How to change .rpm package into .deb and vice versa
.rpm packages are those packages used by Red Hat linux and .deb are those installer files used by Debian Distros. Some time you must have to convert .rpm packages into .deb and vice versa. fot that you must install a program called Alien
Insatalling Alien in Debian Distros
just type the following command in linux
sudo apt-get install alien
Convert .rpm into .dev
Step 1
Get your Javascript function to add-up the total ready. I have created a simple function which you can customise for your application. You will need to know the ID of the tabular form element you are trying to add.
All editable APEX tabular forms that are ID'ed like f0x_000x. You can find them out by using Firebug (chrome, firefox) or IE Developer Tool by hitting F12 as below.
In my case I need add up the total in Salary column as I add rows or edit entries and add it to the Total Salary text field above the tabular form.
So here is the script. Find out the ID of your field and update the italics part.
STEP 2. Test out the javascript.
Its a good idea to make sure your code works before putting it page attribute.