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
import SwiftUI | |
final class SizeClassNotifier: ObservableObject { | |
@Published var currentSizeClass: UserInterfaceSizeClass = | |
.compact | |
func updateSizeClass(sizeClass: UserInterfaceSizeClass?) { | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { | |
self.currentSizeClass = sizeClass ?? .compact |
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
import UIKit | |
import PlaygroundSupport | |
import SwiftUI | |
struct ContentView: View { | |
var jumpAmount: CGFloat { | |
CGFloat(-time * time + time) | |
} | |
var scaleX: CGFloat { 1/scaleY } |
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
import ARKit | |
// Example usage: | |
// let twentyCentimeters: Float = 20.cm | |
// let twoMeters: Float = 2.m | |
// let oneMillimeter: Float = 1.mm | |
// let extent: float3 = float3(20.cm, 10.cm, 1.m) | |
extension Int { | |
var mm: Float { |
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
CXX= g++ | |
CXXFILES= pysmilebridge.cpp | |
CXXINTERMEDIATE= pysmilebridge.o | |
CXXOUTPUTLIBS= libpysmilebridge.so | |
CXXFLAGS= -O3 -DNDEBUG -ffast-math -Wall -fPIC | |
LIBS = -L/path/to/smile/ -lsmile | |
all: lib | |
lib: |
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
#import <UIKit/UIKit.h> | |
#import "WebViewController.h" | |
@interface ViewController : WebViewController | |
@end |
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
#import <UIKit/UIKit.h> | |
@class WebViewControllerDelegate; | |
@interface WebViewController : UIViewController <UIWebViewDelegate> | |
@property (nonatomic, strong) UIWebView *webView; | |
@property (nonatomic, strong) WebViewControllerDelegate *functionDelegate; | |
-(void)loadPageWithURL:(NSString *)url; | |
-(void)loadPageFromFile:(NSString *)html; |
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
<!doctype html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<link rel="stylesheet" href="style.css"> | |
<script src="jquery-1.6.2.min.js"></script> | |
<script defer src="script.js"></script> | |
</head> | |
<body id="body"> |
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
/** | |
* WebViewController is responsible for all | |
* messages that can be used in HTML | |
*/ | |
@class WebViewController; | |
@interface WebViewControllerDelegate : NSObject <UINavigationControllerDelegate, UIImagePickerControllerDelegate> | |
@property (nonatomic, weak) WebViewController *webViewController; |
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
<!-- iPhone SPLASHSCREEN--> | |
<link href="/img/ios/iphone-splash.jpeg" media="screen and (max-device-width: 320px)" rel="apple-touch-startup-image"> | |
<!-- iPhone (Retina) SPLASHSCREEN--> | |
<link href="/img/ios/iphone-splash@2x.jpeg" media="(device-height: 480px) and (-webkit-min-device-pixel-ratio: 2)" rel="apple-touch-startup-image"> | |
<!-- iPhone 5 SPLASHSCREEN --> | |
<link href="/img/ios/iphone5-splash.jpeg" media="(device-height: 568px) and (-webkit-min-device-pixel-ratio: 2)" rel="apple-touch-startup-image"> | |
<!-- iPad (portrait) SPLASHSCREEN--> | |
<link href="/img/ios/ipad-portrait-splash.jpeg" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image"> | |
<!-- iPad (landscape) SPLASHSCREEN--> |
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
var _ = require('underscore') | |
var lines = [ | |
"#The test", | |
"###Hello World", | |
"This is a new paragraph.", | |
"It has a second line", | |
"", | |
"This is my new paragraph" | |
]; |
NewerOlder