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
:: You can name this file <anything>.bat, and it will execute the corresponding program, eg. mvn.bat | |
@powershell -executionpolicy bypass -file "%~dp0ps-wsl-wrapper.ps1" %~n0 %* |
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
. . . . . . . . . . | |
. . . . . . . . . | |
. . . . . . . . . . | |
. . . . . . . . . |
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
Code: | |
a) initialize variables min, mid, hr | |
b) read variable values from user input | |
c) while hr <= 23 | |
c1) while min <= 59 | |
c1.1) output hr, mid, min | |
c1.2) increment min | |
c2) set min = 0 | |
c3) increment hr | |
d) print "00" mid "00 you are in the matrix" |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
for (int y=1;y<=10;y++) | |
{ | |
int x = y * 2; | |
cout << "2 x " << y << " = " << x << endl; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<canvas id="canvas" style="width:100vw; height:100vh;"></canvas> | |
<button id="undo" style="position: absolute; left: 10px; top: 10px;">Undo</button> |
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
document.addEventListener("deviceready", function() { | |
if (!localStorage.getItem("coords")) { | |
$.ajax({ | |
url:"https://cloud.estimote.com/v2/devices/", | |
headers:{authorization:`Basic ${btoa('long:str')}`}, | |
success:function(beacons) { | |
console.log(JSON.stringify(beacons)); | |
$.each(beacons, function(k, v) { | |
$.ajax({ | |
url:"https://cloud.estimote.com/v2/devices/"+v.identifier, |
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
#!/usr/bin/env python3 | |
with open(__file__, "a") as myfile: | |
myfile.write("\nprint('hi there!')") |
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
$ mkfifo input | |
$ mkfifo output | |
$ python3 <input >output | |
$ echo "print('hello world')" >input | |
$ cat output | |
hello world |
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
class User: | |
# ... | |
def __init__(self, email_address, mail_service): | |
self.email_address = email_address | |
self.mail_service = mail_service | |
def send_mail(self, content): | |
# ... | |
self.mail_service.send_mail(self.email_address, content) | |
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
/* Copyright 2017 Ilmo Euro | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |