This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH duplicates (name, address, city, state, id) | |
| AS ( | |
| SELECT name, address, city, state, ROW_NUMBER() OVER ( | |
| PARTITION BY name, address, city, state | |
| ORDER BY address desc | |
| ) AS id | |
| FROM source | |
| ) | |
| DELETE FROM duplicates | |
| WHERE id > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;with rankings as ( | |
| select id, campus | |
| , dense_rank() over (partition by id, campus order by date desc ) /* frequency weight */ | |
| * ( 6 - dense_rank() over (partition by id order by date desc)) /* date weight */ | |
| as 'freqrank' | |
| from attendance | |
| ), | |
| filter as ( | |
| select id, campus, row_number() over ( | |
| partition by id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| var checkboxChange = function () { | |
| $(this).parent().next('div').toggle(); | |
| } | |
| $('.togglePanel').on('change', checkboxChange); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Standard HTML --> | |
| h3 class="header-text" >Confirm your Contribution: </h3> | |
| <p> | |
| <b>John Doe</b>, you're about to give <b>$400.00</b> to the <b>General Fund</b> and <b>$50.00</b> to the <b>Building Fund</b>. | |
| Your total gift of <b>$450.00</b> will be given using a <b>Visa</b> credit card ending in <b>3456</b>. | |
| </p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (typeof console === "undefined" || typeof console.log === "undefined") { | |
| console = {}; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @OldDatabase varchar(50) | |
| DECLARE @NewDatabase varchar(50) | |
| SELECT @OldDatabase = '4-22-NS' | |
| SELECT @NewDatabase = '4-25-NS' | |
| ;WITH tableSchema AS ( | |
| SELECT k.* FROM information_schema.columns c | |
| INNER JOIN information_schema.key_column_usage k | |
| ON c.column_name = k.column_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DBCC UPDATEUSAGE(0) WITH COUNT_ROWS, NO_INFOMSGS | |
| SELECT DBName = DB_NAME(), | |
| SchemaName = USER_NAME(so.UID), | |
| TableName = so.Name, | |
| TableID = so.ID, | |
| MinRowSize = MIN(si.MinLen), | |
| MaxRowSize = MAX(si.XMaxLen), | |
| ReservedKB = SUM(CASE WHEN si.IndID IN (0,1,255) THEN si.Reserved ELSE 0 END) * pkb.PageKB, | |
| DataKB = SUM(CASE WHEN si.IndID IN (0,1 ) THEN si.DPages ELSE 0 END) * pkb.PageKB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for request in requests | |
| console.log( request.queries.request[0].siteSearchFilter ) | |
| isQueryInclusive = request.queries.request[0].siteSearchFilter is 'i' | |
| Results.findOne({ | |
| '_query': query._id | |
| 'isInclusive': isQueryInclusive | |
| }, (error, result) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # src/server/app/methods/stash.coffee | |
| ### | |
| Saves the original search result to the DB | |
| #### | |
| Query = require('../models/search').Query | |
| Results = require('../models/search').Results |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "_id" : ObjectId("53cd5ff7a4c52be74d000002"), | |
| "lastUpdated" : ISODate("2014-07-21T18:46:15.244Z"), | |
| "created" : ISODate("2014-07-21T18:46:15.244Z"), | |
| "pagination" : { | |
| "request" : [ | |
| { | |
| "siteSearchFilter" : "i", | |
| "siteSearch" : "localhost:3000", | |
| "cx" : "008512432210388260844:3scn19cslty", |
OlderNewer