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
// This is the completed Circle layout sample. Use CircleLayoutExercise.swift as a starting point if you want to try on your own. | |
import SwiftUI | |
struct MiniCircle : View { | |
var title: String | |
var body: some View { | |
Circle() | |
.strokeBorder(Color.white,lineWidth: 2) | |
.background(Circle().foregroundColor(Color.accentColor)) |
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
use std::io::{Read, Write}; | |
use std::ops::{Deref, DerefMut}; | |
use dh::Dh; | |
use error::ErrorStack; | |
use pkey::PKeyRef; | |
use ssl::{ | |
self, HandshakeError, Ssl, SslContext, SslContextBuilder, SslMethod, SslRef, SslStream, | |
SSL_VERIFY_PEER, | |
}; |
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> | |
int main(int argc, char *argv[]) | |
{ | |
// Buffer to store num converted to string | |
char empty[9]; | |
memset(empty, 0, sizeof(empty)); | |
// Lookup table | |
const char* table[16] = { empty, empty, empty, "fizz\0 ", empty, |
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
--- a/modules/legacy/src/dpstereo.cpp | |
+++ b/modules/legacy/src/dpstereo.cpp | |
@@ -76,7 +76,7 @@ typedef struct _CvRightImData | |
uchar min_val, max_val; | |
} _CvRightImData; | |
-#define CV_IMAX3(a,b,c) ((temp3 = (a) >= (b) ? (a) : (b)),(temp3 >= (c) ? temp3 : (c))) | |
+#define CV_IMAX3(a,b,c) ((temp2 = (a) >= (b) ? (a) : (b)),(temp2 >= (c) ? temp2 : (c))) | |
#define CV_IMIN3(a,b,c) ((temp3 = (a) <= (b) ? (a) : (b)),(temp3 <= (c) ? temp3 : (c))) | |
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
Handlebars.registerHelper('currency', function(amount, options) { | |
if (typeof(amount) === 'string') { amount = options.contexts[0].get(amount); } | |
var rounded = Math.round(amount * 100); | |
var dec = rounded % 100; | |
var whole = rounded / 100 - dec / 100; | |
var decStr = '' + dec; | |
return '$' + whole + '.' + decStr + ( decStr.length < 2 ? '0' : ''); | |
}); | |
test("USD", function () { |