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
f[x_]:=x | |
f[5] ==> 5 | |
f[x: Quantity[_, unit_]?(CompatibleUnitQ[#, "feet"] &)]:=x (* Important that parameters in list do not have underscore *) | |
f[5] ==> f[5] | |
f[Quantity[5, "feet"]] ==> 5 ft | |
f[Quantity[5, "meters"]] ==> 5 m | |
f[Quantity[5, "pound"]] ==> f[5 lb] |
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 * from files | |
WHERE hash IN ( | |
SELECT hash --, COUNT(source) | |
FROM | |
(SELECT *, COUNT(source) FROM files | |
GROUP BY hash, source) AS A | |
GROUP BY hash | |
HAVING COUNT(source) > 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
#!/bin/bash | |
# If the functionality of a GNU command (vs BSD) is needed, instead of checking for $OSTYPE, check if command is installed. | |
# This method isn't perfect, because you could have the case where the preferred command isn't installed when you expect it to be | |
# (e.g. Mac has no gdate installed). Perhaps in combination with $OSTYPE for better coverage. | |
# This checks if gdate is installed (likely beacuse running in a Mac environment). If not, use the normal date command. | |
DATE=$(type -p gdate date | head -n 1) | |
# Execute the command |
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
// In Chrome Dev-Tools, run the following commands, substituting the date for the earliest cutoff you want | |
earliest = new Date("2021-10-22T08:00:00Z"); // T08:00:00Z Means Midnight Pacific Time when CA is on UTC-800 | |
bc = $("bc-grouped-dates"); bc.children().filter( (i, el) => new Date($(el).data("datetime")) < earliest).remove(); bccr = $("bc-chat-room"); bccr.css("overflow", "visible"); bcip = $("bc-infinite-page"); bcip.css("overflow", "visible") |
OlderNewer