Skip to content

Instantly share code, notes, and snippets.

View nastanford's full-sized avatar
🏠
Busy Coding

Nathan Stanford Sr nastanford

🏠
Busy Coding
View GitHub Profile
@nastanford
nastanford / callDuplicates.sql
Created June 28, 2013 18:17
query an oracle to get duplicates.
select column_name, count(column_name)
from table
group by column_name
having count (column_name) > 1;
@nastanford
nastanford / showHide.html
Last active December 6, 2019 04:24
JavaScript Show Hide Scripts Samples
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
@nastanford
nastanford / loopFormFields.cfm
Last active December 19, 2015 01:49
Loop through form fields
<cfloop index="thefield" list="#form.fieldnames#">
<cfset fields="#thefield# = #form[thefield]#">
<cfset fields="#thefield# = #evaluate(thefield)#">
<cfoutput>#fields#</cfoutput><br>
</cfloop>
Example making the form fields into hidden Form Fields
<!--- ********************************************** --->
<cfloop index="thefield" list="#form.fieldnames#">
<input type="hidden" name="#thefield#" value="#form[thefield]#" />
@nastanford
nastanford / OracleOwner_TableAndColumns.cfm
Created June 21, 2013 17:11
Oracle - List Tables and Columns for each table for an Owner
<basefont face="arial" />
<CFSET REQUEST.DSN = "yourdatasource" />
<CFSET REQUEST.OWNER = "owner" />
<CFQUERY NAME="tables" Datasource="#REQUEST.DSN#" >
SELECT table_name
FROM all_tables
WHERE owner = '#REQUEST.OWNER#'
ORDER BY TABLE_NAME
</CFQUERY>
@nastanford
nastanford / Windows7SendTo.txt
Created June 12, 2013 16:15
Find the Send To folder to add shortcuts.
Path in Explorer to SendTo:
%APPDATA%\Microsoft\Windows\SendTo
@nastanford
nastanford / CFFunctionAlternatingRow.cfm
Created September 4, 2012 11:52
ColdFusion - Function - Alternating Row Colors
<cfscript>
// Alternating Row (classes, bgcolor, or any other alternating row useage)
// example: alternatingRow(TheCurrentRowCount,EvenRowText,OddRowText)
function alternatingRow(currentRow,evenRow,oddRow) {
var returnVar = IIF(currentRow Mod 2, DE(evenrow), DE(oddrow));
return returnVar;
}
</cfscript>