2016年4月21日 星期四

Vertical Menu made by Livecomposer

Vertical Menu made by Livecomposer
透過 Menu style 的設定, 我們可以製作 Vertical Menu.
  1. 編輯 Navigation Module 的屬性
  1. 路徑 Styling > General
  1. 找到 Orientation 屬性,設為 Vertical。

  1. 你可以在 menu box 上下及左右增加空白.

  1. 你可以設定 Menu box 的最小高度

  1. 你可以設定 Menu Box 邊框

  1. 你可以設定 Menu Box 中的背景圖片屬性

background image attachment 屬性補充 &背景教學

  1. 你可以調整Menu box 中的文字的左右對齊

2016年4月20日 星期三

Livecomposer tips 01: 新增 Menu 至頁面

Livecomposer tips 01: 新增 Menu 至頁面


Livecomposer plugin 可以讓我們自由的將 menu 放在頁面中的位置.


步驟



  1. 登入 WP 的控制台,路徑 Live Composer > Navigation Module

C:\Users\steven\AppData\Local\Temp\SNAGHTML1cfa94.PNG
  1. 新增一個選單位置 Menu1


  1. 路徑: 外觀 > 選單,新增一個 Menu。
  1. 建立一個選單 newMenu01,該選單的位在 Menu1 上。儲存選單。


  1. 開啟要編輯的頁面,啟動 Live Composer Editor。新增一個 Module Area 至頁面。
  1. 在 Element Module 中選擇 Navigation Module,並拖拉到前步驟的 Module Area 中。
  1. 設定 Navigation Module 的Functionality 屬性,選擇 Menu 1。
  1. 按下 Confirm,便可看到自訂位置的選單。


補充資料:

Conditional menu 可參考: https://themify.me/conditional-menus
Vertical menu 可參考:

2016年4月17日 星期日

Nested Table Example 01

/**
   Demo the nested table. Use it in the schema. 
*/
-- Create a nested table type 
create or replace type scores_type as table of number;
/

-- Create a table with a nested table
-- You need to specify the table name for the nested table using
-- "nested table store as" clause.
create table student_scores (s_id number, scores scores_type)
nested table scores store as scores_tab;
/
-- 
select * from student_scores;

-- Insert values 
-- Use the type name as the constructor to create scores_type instances and store them
-- in the scores_tab table
insert into student_scores values (10, scores_type(100, 100));

-- Update
update student_scores
set scores = scores_type(90,100);

commit;

VARRAY Example 01


/*
  Demo the varray.
  
*/

-- create a varray with the maximum size 6.
create or replace type options_type as varray(6) of varchar2(30);
/

-- create a table with varray
-- You don't have to create another table to store the varray. 
create table questions(q_id number, options options_type);

-- insert values
insert into questions values(1, options_type('Option A', 'Option B', 'Option C',
'Option D'));
commit;

select * from questions;

-- Use PL/SQL codes to insert values to questions table.
set serveroutput on
declare
 options questions.options%type;
begin
  options := options_type('A', 'B', 'C', 'D', 'E', 'F');
  -- Insert a new question.
  insert into questions values (2, options);
  
  -- Print out the rows in the Question table
  for question in (select * from questions) loop
    dbms_output.put(question.q_id || ' ');
 -- Print out the options in a question.
    for i in 1..question.options.count loop
        dbms_output.put(question.options(i) || ' ');
    end loop;
    dbms_output.put_line(' ');
  end loop;
end;
/
rollback;

2016年4月16日 星期六

PL/SQL Reference

Handling Exceptions

Oracle 11g Database error messages
ORA-00984 : 若在 SQL Statement 中使用了 SQLCODE 及 SQLERRM 這兩個 functions, 會產生編譯錯誤,之後再產生 OAR-00984 例外。

Handling PL/SQL Errors from Oracle PL/SQL Language Reference


Date functions
Trunc(Date): 對日期的不同單位, 如年、月、日, 進行捨去與進位. 預設為捨入到最近的一天。