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
@IBAction func onViewTimelinePressed(sender: UIButton) | |
{ | |
var storyboard = UIStoryboard(name: "timeline", bundle: nil) | |
var controller = storyboard.instantiateViewControllerWithIdentifier("InitialController") as UIViewController | |
self.presentViewController(controller, animated: true, completion: nil) | |
} | |
@IBAction func onFriendsViewPressed(sender: UIButton) | |
{ |
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
<?php //functions.php | |
add_filter('metaslider_flex_slider_parameters', 'metaslider_flex_params', 10, 3); | |
function metaslider_flex_params($options, $slider_id, $settings) | |
{ | |
$options['after'][] = "onHomePageSlideChanged(slider);"; | |
return $options; | |
} |
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
function onHomePageSlideChanged(slider) | |
{ | |
var activeSlide = jQuery(slider).find(".flex-active-slide"); | |
// do something with the active slide... | |
} |
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
// some code has been omitted for brevity | |
public sealed partial class MainPage : Page | |
{ | |
private UniversalAudioPlayer player = new UniversalAudioPlayer(); | |
private Dictionary<string, IBuffer> buffers = new Dictionary<string, IBuffer>(); | |
private async Task ToggleSample(string name, bool isPlaying) | |
{ | |
// name = someFile.wav |
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
override func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) | |
{ | |
// if first cell tapped | |
if(indexPath.row == 0) | |
{ | |
var storyboard = UIStoryboard(name: "myStoryBoard", bundle: nil) | |
var controller = storyboard.instantiateViewControllerWithIdentifier("MycontrollerIdentifier") as UIViewController | |
self.presentViewController(controller, animated: true, completion: nil) | |
} |
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
public static class WebApiConfig | |
{ | |
public static void Register() | |
{ | |
var options = new ConfigOptions(); | |
// Create ConfigBuilder with another constructor | |
var builder = new ConfigBuilder(options, ConfigureDependencies); | |
var config = ServiceConfig.Initialize(builder); | |
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
var viewModel = kendo.observable({ | |
users: new kendo.data.DataSource({ | |
transport: { | |
read: { | |
url: "http://localhost:10243/api/users", | |
type: "GET", | |
dataType: "json" | |
} |
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
var resetApp = angular.module('resetApp', [ "kendo.directives" ]); | |
resetApp.controller('resetUploadController', function ($scope, $compile) { | |
var uploadTemplate = '<input type="file" id="files" name="files" kendo-upload/>'; | |
$scope.resetUpload = function() { | |
// used to reset upload control | |
var uploadContainer = jQuery("#uploadContainer").empty(); |
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
[MobileAppController] | |
public class AuthController : ApiController | |
{ | |
public HttpResponseMessage Post(string username, string password) | |
{ | |
// return error if password is not correct | |
if (!this.IsPasswordValid(username, password)) | |
{ | |
return this.Request.CreateUnauthorizedResponse(); | |
} |
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
public class AuthController : ApiController | |
{ | |
public HttpResponseMessage Post(LoginChallenge challenge) | |
{ | |
// return error if password is not correct | |
if (!this.IsPasswordValid(challenge.Username, challenge.Password)) | |
{ | |
return this.Request.CreateUnauthorizedResponse(); | |
} | |
OlderNewer