Technology Insights

How to Make a Patch using Diff

I have had a lot of questions lately about making patches. On Backtrack we get a lot of user submissions and many times we need a patch rather than a modified source file. The reason being is that a patch can be documented and contains the specific changes made to the source file and can also be easily reverted. Patching is also crucial if you fix a bug in a program and would like to submit the fix to the author. In any case being able to create a patch is very  useful if you are working with Linux or any sort of programing stuff.

I decided to make a short post on how to make a patch and apply it:

Code Snippets

Use JavaScript To Require Data To Be Entered Into A Form Field Before It Can Be Submitted

I needed a simple way to require data in a form field before it could be submitted. There are chunks of JavaScript code all of the Internet that allow you to do this easily so I selected one and added it to my form with ease. One small issue I had was it required that the name attribute be modified for it to work which caused an issue with the application I was adding it to. The issue was the name attribute was modified thus it would not save the data to the proper database table column. Below I explain how to add this bit of JavaScript to your form and modify your form for it to function properly.