PHP: Get Differences Date from Minutes to (Year, Month, Day, Hour, Minute)


This program will be uses php's STRTOTIME function to get the difference two dates. It will display either in year, month, week, day, hour or minute.

The php function:

function get_ago($minute)
{
    $ago = "";
    if ($minute > 525949 ) {
        $ago = round($minute/525949)." Year Ago";
    } else if ($minute > 43829) {
        $ago = round($minute/43829)." Month  Ago";
    } else if ($minute > 10080) {
        $ago = round($minute/10080)." Week  Ago";
    } else if ($minute > 1440) {
        $ago = round($minute/1440)." Day  Ago";
    } else if ($minute > 60) {
        $ago = round($minute/60)." Hour  Ago";
    } else if ($minute > 0) {
        $ago = round($minute)." Minute  Ago";
    } else {
        $ago = "1 Minute  Ago";
    }
    return $ago;
}

The Calling function:

$to_time = strtotime(date("Y-m-d H:i:s")); //current date
$from_time = strtotime("2012-11-20 20:30:30");
$ago = get_ago(round(abs("$to_time - $from_time") / 60,2));


POSTED BY juong

JSP: Passing a Variable to an Included File.


In JSP there are three ways of including other jsp/html/css pages.

<%@include file="page/index.jsp"%> 

<jsp:include page="page/index.jsp"> </jsp:include>

<% String page = "page/"; %>
<% pageContext.include(page+"index.jsp"); %>



POSTED BY juong

How to Remove FB Like Box Border


Do you have develop fb like box before? If does't having yet, you can develop it on Facebook Developer site. After completely develop, then you can see fb like box with the border something like this:


Remove that border with adding "border_color = 'white'". Below is the full code example:


<div class="fb-like-box" 
data-href="http://www.facebook.com/platform" 
data-width="292" 
data-show-faces="true" 
data-stream="false" 
data-header="false"
border_color ="white"></div>


Then it will be display fb like box without border as below:



Done.

POSTED BY juong

Setting Default to Large Icons for All Folders


a. Select any one folder, Click on view in the tool bar, select the settings you need like Large icons sort by etc.
b. Click on Organize, select Folder and Search option.
c. Click on View and then click on Apply to folders.
d. You will get a pop-up “Do you want all folders of this type to match this folder’s view settings” Click on yes and hit OK.

POSTED BY juong

Development of Islamic History Learning Content for Early Childhood


Generally, this post is about my final year project (FYP) in BSc Information Systems Engineering(ISE). I hope this post will help your guys in developing learning content as below:
1. To find the concept of SCORM,
2. The concept of Learning Object (LO), 
3. The methodology used to enhance your development and
4. The authoring tools was used


Learning content is a digital resource that can be reused to support learning (Wiley, 2002). A learning content can be a single file material such as animations, audios, videos, texts, or it could be a collection of contextualized files that make up a learning sequence. It is a digital resource that can be identified, tracked, referenced, used and reused for a variety of learning purposes. Learning content also called as Learning Objects (LO) or courseware (Press S.L, 2002).
The learning content that will be developed for Islamic history for Nuh’s Ark Kindergarten and it will be based on current features of learning content which are interoperable on various platforms, reusable of contents module and properly attributed cannot be achieved without standardization. Many kind of the standard body or standard learning content can be uses as a guideline to develop a learning content. According to Press S.L (2002), the most popular standard bodies for learning content such as International Organization for Standardization (ISO), Institute of Electrical and Electronics Engineers / Learning Technology Standard Committee (IEEE /LTSC), IMS Global Learning Consortium (IMS Consortium), Sharable Content Object Reference Model (SCORM), Aviation Industry CBT (AICC) and Advanced Distributed Learning Initiative (ADL).
The development of learning content for Nuh’s Ark Kindergarten is using the most standards that are widely used by organizations or developers, SCORM. SCORM and IMS standards are easier to follow to develop a learning content. Furthermore, the SCORM standard is also easier to implement the learning content to the internet network.
The SCORM and IMS standards are should work with others standard bodies such as IEEE and AICC to achieve the features of learning content specifications as a reusable, shareable and interoperable. Furthermore, the standards bodies are not only uses for developing the content, but it also can be uses as a guidelines to deploy the content on the internet network.
The Islamic History learning content will be done and publish on the internet network by using various Learning Management System (LMS) that are supporting the SCORM standards. Currently, many vendors are supporting the SCORM standards such as eFront, Moodle and Dekeos. In other words, the SCORM standard allows compliant learning content to be deployed on any LMS and assembled with other SCORM-compliant learning content to create a course that brings together best of breed learning components (ADL, 2006).
The development of learning content are required a full storyboard for a module. Then, the development will be continuing after the storyboard that has been verified by the stakeholders or Subject Matter Expert (SME). How to develop a standards learning content? To develop a standard learning content, many authoring tools can be used to develop a learning content compliant with SCORM standard. An e-learning authoring tool is enable trainers (teachers) at kindergarten to integrate elements of object to create interactive learning content. The example of authoring tools can be used are Adobe Dreamweaver, Photoshop and RELOAD Editor.
After the development has been completed, the deployment of the content will be continued. Learning content will deploy in any Learning Management System (LMS) such as eFront and Moodle. Basically, the features of the LMS are must be support the SCORM concept which are can be track, share the content and interoperability with another LMS. 


 References:
1. A.Wiley, D. (2002). Connecting learning objects to instructional design theory. Retrieved October 17, 2011, from http://www.reusability.org/read/chapters/wiley.doc.
2.Press, S. L. (2002). A Guide to Purchasing, Developing, and Deploying Standards-Conformant e-Learning.
3.ADL. (2006). Sharable Content Object Reference Model (SCORM ®) 2004. Retrieved November 25 , 2011, from http://www.ADLNet.gov
4. Rustici, M. (2009). SCORM Versions – An eLearning Standards Roadmap. Retrieved November 27, 2011, from http://scorm.com/scorm-explained/business-of-scorm/scorm-versions/
5. Reload Editor . Retrieved from http://www.reload.ac.uk/editor.htm


POSTED BY juong

[How to] Export/Import a Table in ORACLE 10G


-------------------------------------------------------------------------------------------------------------

CREDIT TO:
Rohit Khurana (February 7, 2012) http://www.oraclecommunity.net/profiles/blogs/how-to-export-a-table-in-oracle-10g

-------------------------------------------------------------------------------------------------------------

CONNECT WITH YOUR DATABASE


SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 6 23:14:43 2012

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

STEP -1)

####### CREATE A FOLDER IN YOUR SYSTEM DRIVE WHERE YOU CAN DEFINE THE PATH OF DIRECTORY #######

CREATE A DIRECTORY

SQL> CREATE DIRECTORY EXPORT_EXAMPLE AS 'C:\ROHIT_BLOG\';

Directory created.

SQL> SELECT * FROM DBA_DIRECTORIES;

OWNER DIRECTORY_NAME DIRECTORY_PATH
------------------------------ ------------------------------ --------------------------------------
SYS EXPORT_EXAMPLE C:\rohit_blog\
SYS SUBDIR D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\/2002/Se
SYS XMLDIR D:\oracle\product\10.2.0\db_1\demo\schema\order_entry\
SYS MEDIA_DIR D:\oracle\product\10.2.0\db_1\demo\schema\product_media\
SYS LOG_FILE_DIR D:\oracle\product\10.2.0\db_1\demo\schema\log\
SYS WORK_DIR C:\ADE\aime_10.2_nt_push\oracle/work
SYS DATA_FILE_DIR D:\oracle\product\10.2.0\db_1\demo\schema\sales_history\
SYS DATA_PUMP_DIR D:\oracle\product\10.2.0\admin\orcl\dpdump\
SYS ADMIN_DIR C:\ADE\aime_10.2_nt_push\oracle/md/admin

9 rows selected.

SQL> SHOW USER
USER is "SYS"

STEP -2) CONNECT WITH THE USER IN WHICH YOU WANT TO CREATE A TABLE

SQL> CONN HR/HR
Connected.

SQL> CREATE TABLE ORACLE_MASTER
2 AS
3 SELECT * FROM HR.EMPLOYEES;

Table created.


SQL> INSERT INTO ORACLE_MASTER SELECT * FROM HR.EMPLOYEES;

107 rows created.

SQL> COMMIT;

Commit complete.

######## WE CREATE A TABLE ORACLE_MASTER IN HR SCHEMA #########

CHECK OUT IT EXISTENSE

SQL> SELECT * FROM TAB;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JOY TABLE
REGIONS TABLE
COUNTRIES TABLE
LOCATIONS TABLE
DEPARTMENTS TABLE
JOBS TABLE
EMPLOYEES TABLE
JOB_HISTORY TABLE
EMP_DETAILS_VIEW VIEW
CORRUPTION TABLE
ORACLE_MASTER TABLE

11 rows selected.


STEP -3) OPEN THE CMD (COMMAND PROMT)

NOW I'LL TAKE A EXPORT OF A TABLE NAMED CALLED ORACLE_MASTER WHICH EXIST IN HR USER
I'LL GIVE A NAMED CALLED ORM TO MY DUMPFILE WHICH ACTUALLY KEEP THE BACKUP OF ORACLE_MASTER TABLE

SYNTAX FOR EXPORTING A TABLE
EXPDP USERNAME/PASSWORD@SERVICE DIRECTORY=DIRECTORY_NAME TABLES=TABLE_NAME DUMPFILE=ANY_NAME.DMP

EXPDP = >MEANS YOU WANT TO IMPORT
USER_NAME => ASSIGN THE USER NAME
SERVICE_NAME => NOT NECESSARY BUT IF YOU HAVE MYLTIPLE DATABASE ON SERVER THEN IT'S BECOME MANDATORY
DIRECTORY => DIRECTORY IT'S A LOGICAL PART WHICH YOU CREATE IN YOUR DATABASE
TABLES => WHICH TABLE YOU WANT TO EXPORT
DUMPFILE => YOU CAN GIVE ANY WORTHFULL NAME TO YOUR EXPORT FILE .... (.DMP ) IS THE EXTENSION WHICH IS ALSO MANDATORY


C:\> EXPDP HR/HR DIRECTORY=EXPORT_EXAMPLE TABLES=ORACLE_MASTER DUMPFILE=ORM.DMP;

Export: Release 10.2.0.1.0 - Production on Monday, 06 February, 2012 23:46:08

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Starting "HR"."SYS_EXPORT_TABLE_01": HR/******** DIRECTORY=EXPORT_EXAMPLE TABLE
S=ORACLE_MASTER DUMPFILE=ORM.DMP;
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "HR"."ORACLE_MASTER" 23.32 KB 214 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
C:\ROHIT_BLOG\ORM.DMP;
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 23:46:21


STEP -4) AFTER TAKING A EXPORT OF A TABLE OUR NEXT STEP WILL BE DROP THE EXISTNG TABLE NAMED ORACLE_MASTER

SQL> DROP TABLE ORACLE_MASTER PURGE;

Table dropped.

NOW CHECK THE ORACLE_MASTER TABLE IN UR SCHEMA IS IT EXIST OR NOT ??

SQL> SELECT * FROM ORACLE_MASTER;
SELECT * FROM ORACLE_MASTER
*
ERROR at line 1:
ORA-00942: table or view does not exist

NOPES IT DOESNT EXISTING ANY MORE

STEP -5) OPEN THE CMD (COMMAND PROMT)

NOW I'LL IMPORT THE FILE ORM.DMP WHICH EXIST IN MY C:\rohit_blog\orm.dmp

SYNTAX FOR IMPORTING A TABLE
IMPDP USERNAME/PASSWORD@SERVICE DIRECTORY=DIRECTORY_NAME TABLES=TABLE_NAME DUMPFILE=ANY_NAME.DMP

IMP = MEANS YOU WANT TO IMPORT
USER_NAME = ASSIGN THE USER NAME
SERVICE_NAME = NOT NECESSARY BUT IF YOU HAVE MYLTIPLE DATABASE ON SERVER THEN IT'S BECOME MANDATORY
DIRECTORY = DIRECTORY IT'S A LOGICAL PART WHICH YOU CREATE IN YOUR DATABASE
TABLES = WHICH TABLE YOU WANT TO IMPORT
DUMPFILE = SELECT THE DUMPFILE WHO HAVE THE EXPORT OF YOUR TABLE (.DMP ) IS THE EXTENSION WHICH IS ALSO MANDATORY


C:\> IMPDP HR/HR DIRECTORY=EXPORT_EXAMPLE TABLES=ORACLE_MASTER DUMPFILE=ORM.DMP;

Import: Release 10.2.0.1.0 - Production on Monday, 06 February, 2012 23:47:55

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Master table "HR"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": HR/******** DIRECTORY=EXPORT_EXAMPLE TABLE
S=ORACLE_MASTER DUMPFILE=ORM.DMP;
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."ORACLE_MASTER" 23.32 KB 214 rows
Job "HR"."SYS_IMPORT_TABLE_01" successfully completed at 23:47:58


STEP -6) NOW CHECK TABLE NAMED ORACLE_MASTER TABLE IN THE HR SCHEMA HAD WE RECOVER IT OR NOT ?

SQL> SELECT * FROM TAB;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
JOY TABLE
REGIONS TABLE
COUNTRIES TABLE
LOCATIONS TABLE
DEPARTMENTS TABLE
JOBS TABLE
EMPLOYEES TABLE
JOB_HISTORY TABLE
EMP_DETAILS_VIEW VIEW
CORRUPTION TABLE
ORACLE_MASTER TABLE

11 rows selected.

SQL> SELECT COUNT(*) FROM ORACLE_MASTER;

COUNT(*)
----------
214

####### We Recover The ORACLE_MASTER Table Successfully ##########


DONE :-)




POSTED BY juong

Introduce to Filemaker Software


FileMaker Pro is a cross-platform relational database application from FileMaker Inc., formerly Claris, a subsidiary of Apple Inc. It integrates a database engine with a GUI-based interface, allowing users to modify the database by dragging new elements into layouts, screens, or forms.

Current versions: FileMaker Pro 11, FileMaker Pro Advanced 11, FileMaker Server 11, FileMaker Server Advanced 11, and FileMaker Go for iPhone and iPad.


FileMaker Pro
FileMaker Pro is powerful, easy-to-use database software to help in tackle any task.

Filemaker Pro Advanced
For more customization and development options.

Filemaker Server
Add FileMaker Server to FileMaker Pro to securely manage groups of databases for higher reliability.

Filemaker Server Advanced
Use FileMaker Server Advanced for more sharing options.

Filemaker Go
Add FileMaker Go to access your FileMaker Pro databases on your iPhone and iPad anywhere you go.

Benefits of Filemakers
Most projects utilize FileMaker Pro because it provides an extremely versatile and scalable toolkit and framework for rapidly building data processing solutions.

  • cross-platform multi-user relational database engine
  • integrated forms designer, calculator, and batch processor
  • programmable calculation grids, lists, array structures
  • flexible scripting language, comprehensive function library
  • strong validation controls, enforceable cascading selection lists
  • extremely versatile macro and batch processing capabilities
  • friendly and efficient multi-user record locking scheme
  • read and write data to text, ODBC, HTML, PDF, XML
  • connect to SQL databases, e-mail servers, file systems
  • utilize ASP, PHP, HTTP, IMAP, POP3, SMTP, FTP, XML
  • secure data communications by using SSL encryption
  • deploy as desktop, kiosk, iPhone or iPad application
By leveraging the best capabilities of FileMaker Pro businesses can quickly build and deploy robust, secure applications that are simple to maintain and iterate.


Sources:
1. http://www.filemaker.com/products/filemaker-pro/
2. http://en.wikipedia.org/wiki/FileMaker
3. http://basicdata.net/advantages.htm



POSTED BY juong

[How to:] Remove Unnecessary Space Between lines in Dreamweaver


Easier way:
1. Open the file
2. Click CTRL + F
3. Select "Current document" in "Find in" (You can also select the folder if you have multiple files)
4. Search in "Source code"
5. Tick "Use regular expression"
6. Type "[\r\n]{2,}" (without quotes) in "Find"
7. Type "\n" (without quotes) in "Replace"
8. Press "Replace All"

Done.

Sample:



POSTED BY juong

Online Test Xpath


This webpage contains a handy XPath test-bed ideal for experimenting with XPath without having to write lots of code. please go to:

http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm

POSTED BY juong

Popular Posts

.

Back to Top