Download activity data from Garmin Forerunner 310XT on Linux

My everyday computer is running CentOS. There is no way install Garmin connect to upload data from my old 310XT. I am sure there are other ways to do so, but the following works for me.
There are two software packages need to install: openant and ant-fs.

1. Steps to install openant
 git clone https://github.com/Tigge/openant
cd openant
sudo python setup.py install

2. steps to install ANT-FS
git clone https://github.com/Tigge/antfs-cli
cd antfs-cli
sudo python setup.py install

3. Pair your ant receiver with your watch
antfs-cli  --pair

4. Read data from your watch
antfs-cli 
The downloaded fit data from your watch is saved at
~/.config/antfs-cli/###/activities/


Highlight Search Keyword in Oracle Apex 5


Follow the steps below:
1. Copy and paste the following JavaScript to the page "Function and Global Variable Declaration" section
http://johannburkard.de/resources/Johann/jquery.highlight-5.js

2. Add the following style sheet to the page CSS inline section:
.highlight { background-color: yellow }

3. Create interactive report, set static id: highlight_report
4. Create two dynamic actions for the interactive report region
4.1 before refresh: 
Name: before refresh
Event: Before refresh
Region: is your interactive region
True Action: execute JavaScript Code

gv_search = $('#highlight_report_search_field').val()

4.2 After refresh
Name: after refresh
Event: After refresh
Region: is your interactive region
True Action: execute JavaScript Code

if (gv_search) {
$('td').highlight(gv_search);
}


Demo, go to use demo/demo and choose "Highlight Search Field"




Use IcoMoon to create Font Awesome style icon fonts and use with Apex 5

Create Font in IcoMoon

1. Go to IcoMoon online application website.
2. Click import icons to upload your own icon to the application and they are must in SVG format.

3. Once they are uploaded, click the icons you want to included into the font file. You could also choose some free icons provided by IcoMoon.

4. Click Generate Font button at bottom right, in the next page, click download.

Before downloading, you could also make some configuration adjustments by clicking Preferences.





















Use Icons in Apex 5
1. Go to your apex 5 application, find "Static Applications Files" under Shared Components. Upload the downloaded zip file from IcoMoon. Choose unzip file, yes.



2. Look for the reference for style.css in these uploaded static files, #APP_IMAGES#style.css
in my case and copy it to: User interface >> Themes >> Universal theme (or the one you are using)>>JavaScript and Cascading Style Sheets >>CSS File URLs section


3. To use, put the class in <i> tag, for example

select '<i class="im im-pharmacy" style="color:green; font-size:40px;"></i>' display_icon, 'Pharmacy' display_word from dual;

Apex 5: failed to parse SQL query in Classic Report



I tried to use Classic Report in a single row vertical display in Apex 5. When visit the page, it shows the following error:

failed to parse SQL query:

ORA-00933: SQL command not properly ended

Everything was fine about the SQL query. After checking around, I found uncheck the "sort" checkbox for every column in "Report Attributes" page will fix the error.
Apex 5: How to fix column width for interactive report

1. Set a static ID for the column which you want to set the width


2. Add css setting to the inline section of page CSS settings

Can not prevent firewall from starting on CentOS?

I have disabled iptables from starting at booting time using chkconfig. Upon checking the status,

sudo chkconfig iptables --list
iptables       0:off 1:off 2:off 3:off 4:off 5:off 6:off

However, after rebooting the host, iptables was not disabled. What's going on?
Well, in  my case, I have daemon libvirtd starts at booting time which depends on iptables, automatically creates iptables rules for each started qemu network. After disable it from start, iptables was disbaled too.

sudo chkconfig libvirtd off

if this is not the case for you, please do check the content of /etc/rc.local file, to look for any active firewall rule, such as
/sbin/iptables -I INPUT -m iprange --src-range 10.208.42.196-10.255.255.255 -j DROP

and disbable it. Some other things to look at are, init script, cron jobs.
As a quick hack until it is solved, you could run echo "service iptables stop" >> /etc/rc.local



Dell H310 RAID Controller

My workstation running CentOS 6.7 hangups unexpected recently every since I re-imaged it. A little improvement has been seen by adding "elevator=noop" to the boot parameter. But it does not fix the source of the problem.
I has always been suspecting the raid controller, Dell H310. First I tried updating the firmware without any improvement. To update firmware in Linux, you could use Rufus (http://rufus.akeo.ie) to create a FreeDOS bootable USB driver and put the windows version of the firmware to the USB driver.
All these fixes did not eliminate the problem from source, I wrote an email to Dell support. Finally, I got confirmed from Dell tech support that "....While the controller can do RAID 5, we in tech support really only recommend RAID 0 or RAID 1 with that controller....."
After changing to RAID 0 and running a month now, I have never encountered the hangup again.

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...