This file contains 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
By | |
Sarah Ellison and | |
Elahe Izadi | |
July 23, 2020 at 9:20 a.m. EDT | |
This is what was on Thomas Chatterton Wiliams’s mind when he decided to write a short letter on the risks to liberalism and open discourse and get some like-minded thinkers to sign on. | |
He was thinking of the Poetry Foundation, whose leaders resigned after their four-sentence statement in support of Black Lives Matter was deemed too tepid by 1,800-plus petition-signers. And the National Book Critics Circle, whose board imploded over its own attempt at such a statement. | |
He was thinking of David Shor, a political scientist who was fired after tweeting about a study suggesting that violent street protests helped tip the 1968 election to the GOP; and Colin Kaepernick, a quarterback who was shunned from the NFL after his anti-racism activism ran afoul of conservative fans. |
This file contains 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
String.prototype.toSmallCaps = (function () { | |
var letters = "abcdefghijklmnopqrstuvwxyz"; | |
var caps = "ᴀʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘǫʀsᴛᴜᴠᴡxʏᴢ"; | |
function translate(character) { | |
var index = letters.indexOf(character); | |
return index !== -1 ? caps.charAt(index) : character; | |
} | |
function mapReduce(value, transform) { |
This file contains 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
window.toSmallCaps = (function () { | |
var letters = "abcdefghijklmnopqrstuvwxyz"; | |
var caps = "ᴀʙᴄᴅᴇғɢʜɪᴊᴋʟᴍɴᴏᴘǫʀsᴛᴜᴠᴡxʏᴢ"; | |
return function replace(value) { | |
var newValue = ''; | |
for (i = 0; i < value.length; i++) { | |
var letter = value[i]; | |
var index = letters.indexOf(letter); |
This file contains 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
App.Utils.Array = (function () { | |
'use strict'; | |
var utils = { | |
// TESTED | |
// check to see if a value is one of any of the supplied values | |
anyValue: function (value, values) { | |
return this.any(values, function (item) { | |
return item === value; | |
}); |
This file contains 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
/// <summary> | |
/// Determines whether the string is a palindrome. | |
/// </summary> | |
public static bool IsPalindrome(string value) { | |
int min = 0; | |
int max = value.Length - 1; | |
while (true) { | |
if (min > max) { | |
return true; | |
} |
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using System.Data.SqlClient; | |
namespace Greenshades.Online.Data.Settings { |
This file contains 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; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace TopWords { | |
internal class Program { | |
private static void Main(string[] args) { | |
const int maxWords = 298; | |
const int minWordLength = 4; |
This file contains 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
public bool ExportWorkbookToPdf(string workbookPath, string outputPath) | |
{ | |
// If either required string is null or empty, stop and bail out | |
if (string.IsNullOrEmpty(workbookPath) || string.IsNullOrEmpty(outputPath)) | |
{ | |
return false; | |
} | |
// Create COM Objects | |
Microsoft.Office.Interop.Excel.Application excelApplication; |
This file contains 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
// Amazon Glacier has a 3 to 5 hour access time. | |
// Glacier Archive and Restore Requests are $0.05 per 1,000 requests | |
// Glacier is designed with the expectation that restores are infrequent and unusual, and data will be stored for extended periods of time. | |
// You can restore up to 5% of your average monthly Glacier storage (pro-rated daily) for free each month. | |
// If you choose to restore more than this amount of data in a month, you are charged a restore fee starting at $0.01 per gigabyte. | |
// Amazon charges 0.01 per 1,000 requests (10,000 for GET requests). | |
// Azure charges 0.01 per 100,000 transactions. | |
// To make the Azure and Amazon lines not overlap, I added one one hundredth of a penny to the Amazon prices. |