- Parameter Expansion:
${} - Command Substitution:
$() - Arithmetic Expansion:
$(())
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 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
| BEGIN:VCALENDAR | |
| METHOD:PUBLISH | |
| VERSION:2.0 | |
| PRODID:Ted | |
| X-APPLE-CALENDAR-COLOR:#63DA38 | |
| X-WR-TIMEZONE:Europe/London | |
| CALSCALE:GREGORIAN | |
| BEGIN:VTIMEZONE | |
| TZID:Europe/London | |
| BEGIN:DAYLIGHT |
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
| NSDictionary* bleUUIDs = | |
| @{ | |
| @"service": | |
| @{ | |
| @"1800": @"Generic Access", | |
| @"1801": @"Generic Attribute", | |
| @"1802": @"Immediate Alert", | |
| @"1803": @"Link Loss", | |
| @"1804": @"Tx Power", | |
| @"1805": @"Current Time", |
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 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
| filename=$(basename $1 .png) | |
| for res in 1024 512 256 128 64 32 16 | |
| do | |
| convert $1 -resize "${res}x${res}" "${filename}-${res}.png" | |
| done |
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 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
| import struct | |
| import wave | |
| import os | |
| from math import sin, tau | |
| sample_rate = 44100.0 | |
| duration = 2.0 | |
| frequency = 440.0 | |
| num_samples = int(sample_rate * duration) | |
| bit_depth = 16 |
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
| //----------------------------------------------------------- | |
| // Play an audio stream on the default audio rendering | |
| // device. The PlayAudioStream function allocates a shared | |
| // buffer big enough to hold one second of PCM audio data. | |
| // The function uses this buffer to stream data to the | |
| // rendering device. The inner loop runs every 1/2 second. | |
| //----------------------------------------------------------- | |
| #include <iostream> | |
| #include <windows.h> |