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
<MediaElement Name="media" AutoPlay="True"></MediaElement> |
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
private void Image_PointerPressed(object sender, PointerRoutedEventArgs e) | |
{ | |
var img = e.OriginalSource as Windows.UI.Xaml.Controls.Image; | |
if (img == null) return; | |
var title = img.Tag as string; | |
// The object for controlling the speech-synthesis engine (voice). | |
var synth = new Windows.Media.SpeechSynthesis.SpeechSynthesizer(); |
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
private async void Image_PointerPressed(object sender, PointerRoutedEventArgs e) | |
{ | |
var img = e.OriginalSource as Windows.UI.Xaml.Controls.Image; | |
if (img == null) return; | |
var title = img.Tag as string; | |
// The object for controlling the speech-synthesis engine (voice). | |
var synth = new Windows.Media.SpeechSynthesis.SpeechSynthesizer(); |
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
test( "size error", function() { | |
expect( 2 ); | |
var testValue = ""; | |
var testKey = "test"; | |
// Generates a 4095 byte cookie. | |
for (var i = 0; i < 4089 - testKey.length; i++) { testValue += "a"; } | |
raises( function() { $.cookie( testKey, testValue ) }, "size error thrown"); |
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
describe('reveal:', function() { | |
beforeEach(function() { | |
this.addMatchers({ | |
// Place reveal-specific matchers here... | |
}); | |
var origFunc = $.fn.foundation; | |
spyOn($.fn, 'foundation').andCallFake(function() { | |
var result = origFunc.apply(this, arguments); | |
jasmine.Clock.tick(1000); // Let things settle... |
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 data = [ | |
[9235], | |
[9096, 637], | |
[973, 3269, 7039], | |
[3399, 3350, 4788, 7546], | |
[1739, 8032, 9427, 976, 2476], | |
[703, 9642, 4232, 1890, 704, 6463], | |
[9601, 1921, 5655, 1119, 3115, 5920, 1808], | |
[645, 3674, 246, 2023, 4440, 9607, 4112, 3215], |
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
// Get documents directory | |
NSString *documentsDirectory = nil; | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
documentsDirectory = [paths objectAtIndex: 0]; | |
NSString *targetPath = [documentsDirectory stringByAppendingPathComponent:@"todo.db"]; | |
if (![[NSFileManager defaultManager] fileExistsAtPath: targetPath]) { | |
NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"todo" ofType:@"db"]; |
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
/* | |
File: Reachability.m | |
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. | |
Version: 2.2 | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. | |
("Apple") in consideration of your agreement to the following terms, and your | |
use, installation, modification or redistribution of this Apple software |
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
/* Reachability *networkReachability = [Reachability reachabilityForInternetConnection]; | |
NetworkStatus networkStatus = [networkReachability currentReachabilityStatus]; | |
if (networkStatus == NotReachable) { | |
NSLog(@"There IS NO internet connection"); | |
} else { | |
NSLog(@"There IS internet connection"); | |
} */ |
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
/* | |
File: Reachability.h | |
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. | |
Version: 2.2 | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. | |
("Apple") in consideration of your agreement to the following terms, and your | |
use, installation, modification or redistribution of this Apple software |
OlderNewer