Monday, February 17, 2014

// // Leave a Comment

Basic JQuery

A video tutorial that features basic use of jQuery
Read More

Friday, January 6, 2012

// // Leave a Comment

The Must Have WordPress Plugins

Using WordPress alone limits the user to just plain blogging. So I've listed down  some of the plugins every WordPress site should have. Use this to extend the functionality of WordPress. I've listed 9 of them below. In case some of them does not work on your current site due to compatibility issues from upgrades in WordPress core or other plugins, you can always search for an alternative with the same functionality. To install them, just go to plugins > Add New then type in the title of the plugin.

1. OZH Drop Down Admin Menu
  OZH Admin Dropdown
The default sidebar menu of WordPress tends to take up a lot of space and some people experience some difficulties in navigating. To make navigation faster, OZH Drop Down Admin

  2. TinyMCE Advanced
Tiny MCE Advanced 
 Control the buttons that would display on your post editor. It also lets you unlock some buttons that you don't see on the default setting of TinyMCE like the smileys button and other settings. Easy to use since you'll just have to drag and drop the buttons and you can also arrange it.

  3. User Role Editor
  User Role Editor 
 Extend the capability of controlling user roles. Lets you set some permissions for each user role. User Role Editor also lets you create a new custom user role.
 4. Quick Cache
 This plugin is very useful in speeding up your webpage loading. Quick cache creates static pages instead to reduce loading time spent on trying to access the database.
  5. Dynamic Widgets
Dynamic Widgets
This is one of the stuffs Wordpress is missing that gives you full control on your widgets. Dynamic widgets lets you assign your widgets to appear on a particular page, category, tag,  search page, period of time, and much more...  
  6. Configure SMTP
  Configure SMTP 
 Just in case you need to connect to a different mail server, this could come in handy. It also has a setting for connecting to Gmail SMTP.
  7. User Avatar
  Avatar 
 If your users would complain in creating their gravatar account for an avatar, this plugin lets users upload their avatar. It also lets users crop their uploaded images.
  8. Better WordPress reCAPTCHA
  Recaptcha 
 Block spam by integrating Google's recaptcha. It prompts user to enter two words that appear. It also works with Akismet, where you can make it appear only when it detects a spammer, making it convenient for users.
  9. Better Delete Revision
Photobucket 
 Everytime you edit your posts, Wordpress creates a revision log for your post so that you would revert back to the previous post. Revisions were intended to automatically back up your work. Although from time to time editing might cause a lot of space in your database. Say you have 20 posts and did let's say 10 edits, that would make up 200 posts stored in your database. To removed those unused backups, you need Better Delete Revision to delete the previous revisions except the most recent. Just backup your database before doing this because you might still be needing your previous. It also has a feature that purges.
Read More

Thursday, July 14, 2011

// // 1 comment

Mysql Date Calculation

Simple Function for Date Computation.. useful in archive retrieval

ADDDATE(date,INTERVAL expr type)
ADDDATE(date_field,INTERVAL 1 DAY)
ADDDATE(date,INTERVAL 2 DAY)
ADDDATE and SUBDATE perform date arithmetic calculations.

date is a DATETIME or DATE value specifying the starting date.
expr is an expression specifying the interval value to be added or subtracted from the starting date. expr is a string; it may start with a .-. for negative intervals.
type is a unit keyword indicating the units in which the expression should be interpreted.
Type Unit Expected Format
SECOND SECONDS
MINUTE MINUTES
HOUR HOURS
DAY DAYS
WEEK WEEKS
MONTH MONTHS
QUARTER QUARTERS
YEAR YEARS
Here we use the SUBDATE function to select products and their images added within the last month:

SELECT p.id, product_code, product_name, filename, date_added
FROM product_tbl p
INNER JOIN image_tbl i
ON p.id=i.product_id
WHERE date_added>SUBDATE(CURDATE(),INTERVAL 2 MONTH);


Source: Mysql Date Calulation - liamdelahunty.com
Read More

Tuesday, August 24, 2010

// // Leave a Comment

Input Validation in VB.Net

Read More

Sunday, April 25, 2010

// // 1 comment

Basic Backup and Restore for MS SQL Server 2000

Here is a simple tutorial for backup and restore in SQL Server 2000. This tutorial covers the basic procedures in creating backup and restoring databases. In this tutorial, we will be using Northwind Database as our example since it available on the sample databases of SQL Server

Backup



Before we backup our database, we have to create a logical backup device for our database.
On the query analyzer, make the database in use by selecting it on the drop down menu or by executing the code:


Use Northwind



Now we will create our logical backup device. Make sure the path exists when you execute this. If you execute this without errors it means that you are doing right.


EXEC sp_addumpdevice 'disk', 'NWINDBackup',
'c:\NorthwindSystems\Backup\NWind_backup.bak'
--NWINDBackup will be the name of our logical backup drive

After successful execution, you cannot run this code again since it already exists1
Then we will now backup our database with the following code:

As I said(or typed :o)) earlier, you should make sure that the path you created exists2.
BACKUP DATABASE Northwind TO NWINDBackup


Restore


Now we will restore are database based on the backup file we have created.
RESTORE DATABASE Northwind
FROM NWINDBackup
The syntax follows as:
RESTORE DATABASE [your db name]
FROM [logical drive]


Notes:
1"Honestly, I haven't figured out yet how to alter that logical backup thing but please stay tuned for updates. You can also post some suggestions for this"-jereme

2. Tip: Or at least tell your front end application to create folders if it does not exist.
Read More

Friday, April 23, 2010

// // Leave a Comment

Opening Another Program in VB.NET

Hey I got this code from the website www.dreamincode.net/forums


Try
Dim p As New System.Diagnostics.Process
'the location of your program
p.StartInfo.FileName = "K:\Uni\Year 2\Visual Basic\Report\MSDN\Absolute Beginner's Series VB Lesson 1\01 VB Code\Lesson01\HelloWorld.exe"
p.Start()
Catch ex As Exception
MsgBox("Error - " + ex.Message)
End Try

This can be useful in opening other applications (especially Microsoft VB.NET applications). The problems is that there are chances of error especially when the program is missing, or the program has been moved.


As a solution to that problem, I suggest that you would make the separate application relative to your executable file so that
moving the whole project to another location whould not affect the path you specified.
Your file path should look like this.
p.StartInfo.FileName = "Your Program.exe"  'your relative path, no need to include the drive location for portability

Just make sure that the program is located beside the program you are debugging.
You can do this by adding another project as a reference to your main project so that everytime you compile, the executables automatically
proceed to the bin where they would reside as they are executed.
To add a refecence, you can follow these steps:

If the other program (VB Project) is not yet part of the Solution:
1. go to File > Add Existing project
2. Then select the project file of the program you want to link it with.
You will notice in the solution explorer that another project is added.

Now, you can make that program part of the main program by adding it as a reference.
On your solution explorer, right click your main project, Choose Add reference.

As the add reference dialog opens, choose projects then select the project file of the other program.

Add Reference
Pro VB 2008 and the .NET 3.5 Platform (Windows.Net)
Pro VB 2008 and the .NET 3.5 Platform (Windows.Net)
Read More

Thursday, April 8, 2010

// // 3 comments

Query Displayer JAVA Program

As a continuation for my earlier post in JDBC, here is a sample program I got from Java™ How to Program, by H.M. Deitel,
sql,jereme

It looks like a query analyzer. You can use this to test the retrieval of data.

You can download the source at:
Query Displayer.zip


Just modify the following lines of code on DisplayQueryResults.java
static final String JDBC_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
static final String DATABASE_URL = "jdbc:odbc:NWIND";
static final String USERNAME= "";
static final String PASSWORD= "";

// default query selects all rows from authors table
static final String DEFAULT_QUERY = "SELECT * FROM Products";


For a copy of the ebook Java how to Program, visit
javaforbidden.4shared.com
The password is: itspot
(shhh... please don't tell them about this, ok?)
Read More