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
-- Is this a new publish status for the given org chart? | |
DECLARE @matchingStatus INT | |
SET @matchingStatus = (SELECT count(Id) | |
FROM [doa].[OrgChart] | |
WHERE PublishedStatusId = @publishedStatusId | |
AND Id = @id) | |
IF (@matchingStatus = 0) -- If so, update child records | |
BEGIN | |
UPDATE [doa].[OrgChart] set PublishedStatusId = @publishedStatusId |
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
SELECT Child.Id, Child.LFT, Child.RGT | |
FROM [doa].[OrgChart] AS Parent, [doa].[OrgChart] AS Child | |
WHERE | |
Child.LFT BETWEEN Parent.LFT AND Parent.RGT | |
AND NOT EXISTS ( -- No Middle Node | |
SELECT * | |
FROM [doa].[OrgChart] AS Mid | |
WHERE Mid.LFT BETWEEN Parent.LFT AND Parent.RGT | |
AND Child.LFT BETWEEN Mid.LFT AND Mid.RGT | |
AND Mid.Id NOT IN (Parent.Id, Child.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
SELECT c.TermCode | |
, c.Crn | |
, c.Subject | |
, c.CourseNumb | |
, c.Sequence | |
, c.Name | |
, s.SectionType | |
, s.StartDate | |
, s.EndDate | |
, s.StartTime |
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
select distinct s.Email from ClassTimeEvaluations cte | |
inner join students s on s.ClassTimeId = cte.ClassTimeId | |
left join CompletedEvaluations ce on (ce.ClassTimeEvaluationId = cte.id AND ce.StudentId = s.Id) | |
where [start] < GETUTCDATE() | |
AND [end] > GETUTCDATE() | |
AND ce.Completed is null | |
AND s.Email is not null |
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
using System.Collections.Generic; | |
using System.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web.Configuration; | |
using Ace.Resources; | |
using Ace.Services.Caching; | |
namespace Ace.Services | |
{ |
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
<!-- GZip static file content. Overrides the server default which only compresses static files over 2700 bytes --> | |
<httpCompression directory="%SystemDrive%\websites\_compressed" minFileSizeForComp="1024"> | |
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> | |
<staticTypes> | |
<add mimeType="text/*" enabled="true" /> | |
<add mimeType="message/*" enabled="true" /> | |
<add mimeType="application/javascript" enabled="true" /> | |
<add mimeType="application/json" enabled="true" /> | |
<add mimeType="*/*" enabled="false" /> | |
</staticTypes> |
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
var md5 = System.Security.Cryptography.MD5.Create(); | |
var hash = md5.ComputeHash(System.Text.Encoding.ASCII.GetBytes(test ?? "Something")); | |
var str = BitConverter.ToString(hash).Replace("-", ""); |
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
select *, CONVERT(varchar(32), HASHBYTES('MD5', Prompt + ':' + QuestionType + ':' + ScaleTerms), 2) as hashs from archive.responses |
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
@model dynamic | |
@{ | |
ViewBag.Title = "Inline Edit"; | |
} | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.3.2/ckeditor.js"></script> | |
<h2>Inline Edit</h2> |
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
var combinedTask = Task.WhenAll(instructorSummaries | |
.Select(instructorSummary => | |
_instructorTable | |
.ExecuteAsync(TableOperation.InsertOrReplace(instructorSummary)))) | |
.ConfigureAwait(false); | |
var evaluationTask = _evaluationTable.ExecuteAsync(TableOperation.InsertOrReplace(overallSummary)).ConfigureAwait(false); | |
var result = new EvaluationTableResult | |
{ |