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
/* SPDX-License-Identifier: MIT | |
Copyright (c) 2024 by Ji Luo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
/* | |
Copyright 2024 by Ji Luo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
/* | |
An implementation of the finite field of order 2^256. | |
The MIT License (MIT) | |
Copyright (c) 2024 Ji Luo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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://twitter.com/geelaw95/status/1697748857541800366 | |
Copyright (c) 2023 Ji Luo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
Option Explicit | |
Sub CopyLocalLink() | |
Dim activeWin As Object | |
Dim targetItem As Object | |
Dim targetMsg As MailItem | |
Dim targetFolder As Folder | |
Dim urlData As Object |
Starting from an unknown version of Windows 10, programs can no longer access dehydrated (online-only, placeholder) files with CreateFile(Ex)
normally.
Consider the following excerpt:
// By default (if the program does not have a manifest, so it runs in Windows Vista mode),
// RtlQueryProcessPlaceholderCompatibilityMode returns PHCM_DISGUISE_PLACEHOLDER, and
// RtlQueryThreadPlaceholderCompatibilityMode returns PHCM_APPLICATION_DEFAULT.
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
Option Explicit | |
Sub CreateAppointmentFromMessage() | |
Dim activeWin As Object | |
Dim targetItem As Object | |
Dim targetMsg As MailItem | |
Dim targetFolder As Folder | |
Dim newAppointment As AppointmentItem | |
Dim msgInspector As Inspector |
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
/**** Benchmarking CRTP without virtual dispatch in C#. | |
See https://geelaw.blog/entries/csharp-crtp-static-polymorphism-friendship/ | |
Results on my Surface Book 2: | |
| milliseconds | struct, non-virtual | struct, virtual | virtual | | |
| :----------: | :-----------------: | :-------------: | :-----: | | |
| x86 Core 3.1 | 1065 | 1405 | 1431 | | |
| x64 Core 3.1 | 1015 | 1371 | 1418 | | |
| x86 Fx 4.7.2 | 1160 | 1501 | 1490 | |
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
/* See https://geelaw.blog/entries/csharp-generics-duck-typing/ for the context. | |
Copyright (c) 2020 by Gee Law | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the “Software”), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom | |
the Software is furnished to do so, subject to the following conditions: |
NewerOlder