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
const | |
SHighResCounterError = 'High resolution counter error'; | |
function CPUClockFrequency: Word64; | |
var | |
Freq : int64; | |
begin | |
Freq := 0; | |
if not QueryPerformanceFrequency(Freq) then | |
xraise (ETimerError2.Create(SHighResCounterError)); |
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
procedure RegEX_ExtractDemo; | |
var regEx: TRegExpr; //or OleVariant if HISUtils; | |
InStr, ResStr: String; | |
begin | |
ResStr:=''; | |
InStr:= 'Please e-mail us at support@mycompany.com or to sales@mycompany.com'; | |
// Create a regular expression | |
regEx:= TRegExpr.create; //HISUtils.RegExpr; | |
// Set regular expression pattern that specifies an e-mail address | |
regEx.Expression:='\w+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,6}'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#my_default_dict = {} | |
from collections import defaultdict | |
# to prevent key error - KeyError: 't' | |
my_default_dict = defaultdict(int) | |
for letter in 'the red maXbox fox ran as fast as it could': | |
my_default_dict[letter] += 1 | |
print(my_default_dict) |
NewerOlder