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
template<typename T> | |
typename T::size_type | |
last_index_of(const T &s, const T &q) | |
{ | |
typename T::size_type | |
pos = std::string::npos, | |
res = std::string::npos; | |
while( (pos = s.find(q, (pos == std::string::npos ? 0 : pos + q.size()))) != T::npos) { | |
res = pos; | |
} |
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 python | |
# | |
# Executes the given command line by applying file globbing to all | |
# arguments but the first one. Example: | |
# | |
# ./glob_exec.py ls '*.py' | |
# | |
# This is useful for shells like Windows cmd which doesn't have native | |
# file globbing. | |
# |
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
DIM angle AS SHARED DOUBLE | |
DIM COL AS SHARED INTEGER | |
DIM SCALE AS SHARED DOUBLE | |
'------------------------------------------------------------------- | |
' Make a turn in the curve, given in degrees | |
'------------------------------------------------------------------- | |
SUB turn (degrees AS DOUBLE) | |
angle = angle + degrees*3.14159265/180 | |
END SUB |
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
;*********************************************************************; | |
;* V I O S P A *; | |
;*-------------------------------------------------------------------*; | |
;* Task : Creates a function for determining the type *; | |
;* of video card installed on a system. This *; | |
;* routine must be assembled into an OBJ file, *; | |
;* then linked to a Turbo Pascal program. *; | |
;*-------------------------------------------------------------------*; | |
;* Author : Michael Tischer *; | |
;* Developed on : 10/02/88 *; |
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
$CPU 80286 | |
$LIB EGA ON | |
$ERROR ALL OFF | |
$OPTIMIZE SPEED | |
$COMPILE EXE | |
defint A-Z | |
REM ================= | |
REM Global variables |
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 <conio.h> | |
#include <stdio.h> | |
int main() | |
{ | |
unsigned char i; | |
int j; | |
asm mov ah, 0x00; | |
asm mov al, 0x13; | |
asm int 0x10; |
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 <memory> | |
#include <iostream> | |
#include <thread> | |
int main() | |
{ | |
std::shared_ptr<std::thread> mythread; | |
mythread.reset( |
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 <iostream> | |
#include <memory> | |
class Base | |
{ | |
public: | |
Base() { std::cout << "Base constructor" << std::endl; } | |
virtual ~Base() { std::cout << "Base destructor" << std::endl; } | |
}; |
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
Homebrew build logs for guile on "CentOS release 6.9 (Final)" | |
Build date: 2019-01-15 05:52:06 |
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
Homebrew build logs for shellcheck on Ubuntu 18.04.1 LTS | |
Build date: 2018-12-20 14:24:55 |
NewerOlder