Skip to content

Instantly share code, notes, and snippets.

/*
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.2.0
*/
body {font:13px 'Helvetica',arial,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}/*ol,ul {list-style:none;}*/caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}
-- Prepare Dynamic SQL
SET @sql = '' +
'SELECT @exists = COUNT(*) from ats.R_RECORD ' +
'WHERE R_ID = @id ' +
CASE
WHEN @R_PARENT IS NULL THEN ''
ELSE 'AND R_PARENT = @R_PARENT '
END +
CASE
WHEN @STAT_ID IS NULL THEN ''
select
cur.R_ID,
cur.ATS_ID,
cur.STAT_NAME,
cur.R_DESCRIPTION,
cur.R_TERM_START,
cur.R_TERM_END,
cur.V_NAME,
cur.VADR_ADDRESS_LINE1,
cur.VADR_ADDRESS_LINE2,
require 'rest_client'
RestClient.post 'http://inventoryscanner.heroku.com/items.json', :item => {:barcode => "test barcode", :latitude => "-1", :longitude => "-1"}
<cfscript>
/*
* This function performs a map operation similar to that seen in functional programming:
* Arguments can be specified as follows:
* - Arrays: [arg1,arg2,arg3]
* - Structures: {"arg1"="value1","arg3"="value3"}
* - Singletons: "arg1"
*/
function map(required any func, required any args){
var ret = ArrayNew(1);
select fy_id, asub_name,
-- Total Sums
sum(r_amount) as totalAmount,
sum(dvdollars) as totalDVAmount,
sum(sbdollars) as totalSBAmount,
sum(mbdollars) as totalMBAmount ,
-- Category Sums
sum([Disabled Veteran]) as DVCategoryAmount,
sum([Small Business]) as SBCategoryAmount,
SELECT @R_RECORD_NO = max(r_record_no) + 1
FROM ats.r_record r
WHERE fy_id = @L_FY_ID
AND asub_id in (select asub_id from ats.asub_acquisition_subtype asub1 where asub_char = (select asub_char from ats.asub_acquisition_subtype where asub_id = @L_ASUB_ID))
component {
public function setupRequest() {
if(structKeyExists(url, "init")) {
setupApplication();
// remove the generated xml files since they don't remove themselves
hibernateFiles = directoryList(ExpandPath(this.ormsettings.cfclocation),false,"path","*.hbmxml");
for(i=1;i LTE arrayLen(hibernateFiles); i++){
FileDelete(hibernateFiles[i]);
}
SELECT FY_ID, RIGHT(YEAR(FY_START_DATE), 2) + '/' + RIGHT(YEAR(FY_END_DATE), 2) AS FY_NAME, CONVERT(varchar, FY_START_DATE, 101) AS FY_START_DATE,
CONVERT(varchar, FY_END_DATE, 101) AS FY_END_DATE, '7/1/' + DATENAME(yyyy, FY_START_DATE) AS q1_start, '9/30/' + DATENAME(yyyy, FY_START_DATE)
AS q1_end, '10/1/' + DATENAME(yyyy, FY_START_DATE) AS q2_start, '12/31/' + DATENAME(yyyy, FY_START_DATE) AS q2_end, '1/1/' + DATENAME(yyyy,
FY_END_DATE) AS q3_start, '3/31/' + DATENAME(yyyy, FY_END_DATE) AS q3_end, '4/1/' + DATENAME(yyyy, FY_END_DATE) AS q4_start, '6/30/' + DATENAME(yyyy,
FY_END_DATE) AS q4_end, CREATED_USER, CREATED_DATE, UPDATED_USER, UPDATED_DATE, DELETED
FROM ats.FY_FISCAL_YEAR
WHERE (FY_END_DATE < DATEADD(year, 6, GETDATE()))
REM FYI: This could be more graceful...
Set RegQry=HKLM\Software\Microsoft\Windows\CurrentVersion\Run
for /f "skip=1" %1 in ('reg query %RegQry% /v Unattend*') do Reg Delete "%RegQry%" /v "%1" /f