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
| path sep dirs | | |
sep := (Smalltalk os isWindows) ifTrue: [ $; ] ifFalse: [ $: ]. | |
path := Smalltalk os environment at: 'path'. | |
dirs := sep split: path. | |
dirs reject: [ :each | File exists: each ]. |
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
// https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt | |
// https://source.chromium.org/chromium/chromium/src/+/main:base/win/scoped_com_initializer.h | |
// https://source.chromium.org/chromium/chromium/src/+/main:base/win/scoped_bstr.h | |
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/services/util_win/av_products.cc (FillAntiVirusProductsFromWSC) | |
// C | |
#include <cassert> | |
#include <clocale> |
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
#include <linux/if_packet.h> | |
#include <net/if.h> | |
#include <netdb.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <ifaddrs.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int |
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
var style = document.createElement('style'); | |
style.innerHTML = 'html::-webkit-scrollbar { display: none; }'; | |
document.head.appendChild(style); |
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
;; style 1 | |
(let [console (System/console) | |
password-char-array (.readPassword console "Password (hidden): " (to-array ())) | |
password (String. password-char-array) | |
quoted (fn [s] (str \' s \'))] | |
(println (quoted password))) | |
;; style 2 |
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
import Data.Bits (Bits (testBit), FiniteBits(countLeadingZeros, finiteBitSize)) | |
import Data.Char (intToDigit) | |
toBinary :: FiniteBits a => a -> [Char] | |
toBinary n = [charOfBitAt i n | i <- reverse [0..(bitLength n - 1)]] | |
where | |
bitLength = (-) <$> finiteBitSize <*> countLeadingZeros | |
charOfBitAt i = intToDigit . fromEnum . flip testBit i |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 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
"Longitude (x)","Latitude (y)","Station Name","Climate ID","Date/Time (LST)","Year","Month","Day","Time (LST)","Temp (°C)","Temp Flag","Dew Point Temp (°C)","Dew Point Temp Flag","Rel Hum (%)","Rel Hum Flag","Precip. Amount (mm)","Precip. Amount Flag","Wind Dir (10s deg)","Wind Dir Flag","Wind Spd (km/h)","Wind Spd Flag","Visibility (km)","Visibility Flag","Stn Press (kPa)","Stn Press Flag","Hmdx","Hmdx Flag","Wind Chill","Wind Chill Flag","Weather" | |
"-73.75","45.47","MONTREAL/PIERRE ELLIOTT TRUDEAU INTL A","7025250","2012-03-01 00:00","2012","03","01","00:00","-5.5","","-9.7","","72","","","","5","","24","","4.0","","100.97","","","","-13","","Snow" | |
"-73.75","45.47","MONTREAL/PIERRE ELLIOTT TRUDEAU INTL A","7025250","2012-03-01 01:00","2012","03","01","01:00","-5.7","","-8.7","","79","","","","6","","26","","2.4","","100.87","","","","-13","","Snow" | |
"-73.75","45.47","MONTREAL/PIERRE ELLIOTT TRUDEAU INTL A","7025250","2012-03-01 02:00","2012","03","01","02:00","-5.4","","-8.3","","80","","","","5","","28",""," |
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
// https://eigen.tuxfamily.org/dox/GettingStarted.html | |
// https://eigen.tuxfamily.org/dox/group__TutorialMatrixArithmetic.html | |
// | |
// SeeAlso: https://www.boost.org/doc/libs/1_79_0/libs/qvm/doc/html/index.html | |
#define EIGEN_INITIALIZE_MATRICES_BY_ZERO | |
#include <iostream> | |
#include <Eigen/Dense> |
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
import sys | |
from typing import Iterator, Optional | |
ascii_range = range(32, 128) | |
def is_non_ascii(b): | |
return b not in ascii_range | |
def non_ascii_iter(bs): | |
return (b for b in bs if is_non_ascii(b)) |
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
#!/usr/bin/env escript | |
%% Before | |
%% erl> h(maps). => There is no documentation for maps | |
%% After | |
%% erl> h(maps). => This module contains functions for maps processing... | |
%% Usage: | |
%% | |
%% 1. Install the documentation |