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
<div id="mapContainer"></div> | |
<script type="text/javascript"> | |
// attach map to mapContainer | |
var map = $("#mapContainer").dxVectorMap({ | |
// config goes here... | |
}).dxVectorMap('instance'); | |
// remove the border around the map | |
$("#mapContainer").children("svg:first").children("rect:first").attr("stroke-width", "0"); | |
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
// Dilemma, should I use this code: | |
// NOTE: existingJobDetail.Id is defined as a regular (non-nullable) int. | |
int? parentJobDetailId = existingJobDetail != null ? existingJobDetail.Id as int? : null; | |
// Or this code: | |
int? parentJobDetailId = existingJobDetail != null ? (int?)existingJobDetail.Id : null; | |
// Or (less likely): |
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
<pre class="line-numbers"><code class="language-csharp">static void Main(string[] args) | |
{ | |
for (int i = 0; i < 10; i++) | |
{ | |
// toggle between words and paragraphs | |
bool isEven = (i % 2) == 0; | |
bool isThird = (i % 3) == 0; | |
LipsumType lipsumType = isEven ? LipsumType.Paragraphs : LipsumType.Words; | |
// only start with Lorem Ipsum every third call |
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 strict"; | |
/************************************************************************************************ | |
* Navbar Icons | |
* | |
* To make this work, you will need navigation links that use classes that match what you send | |
* to the calls above. | |
* | |
* Example: | |
* |
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
for (int i = 1; i <= 100; i++) | |
{ | |
if ((i % 3 == 0) && (i % 5 == 0)) | |
{ | |
Debug.WriteLine("FizzBuzz"); | |
} | |
else if (i % 3 == 0) | |
{ | |
Debug.WriteLine("Fizz"); | |
} |
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> | |
<html> | |
<head> | |
<title>Settings page for Pebble</title> | |
<meta charset="utf-8" /> | |
<link href="../Content/bootstrap.min.css" rel="stylesheet" /> | |
<link href="../Content/Site.css" rel="stylesheet" /> | |
<script src="../Scripts/bootstrap.min.js"></script> | |
</head> | |
<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
<!DOCTYPE root [ | |
<!ENTITY Aacute "Á"> | |
<!ENTITY aacute "á"> | |
<!ENTITY Abreve "Ă"> | |
<!ENTITY abreve "ă"> | |
<!ENTITY ac "∾"> | |
<!ENTITY acd "∿"> | |
<!ENTITY Acirc "Â"> | |
<!ENTITY acirc "â"> | |
<!ENTITY acute "´"> |
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 baseUrl = 'http://localhost:49587/api'; | |
angular.module('app').controller('SampleController', function ($scope, $http, $cookieStore, Base64) { | |
$scope.refreshData = function () { | |
//Used to display the data | |
if ($cookieStore.get('basicCredentials')) | |
{ | |
$http.defaults.headers.common['Authorization'] = 'Basic ' + $cookieStore.get('basicCredentials'); | |
} |
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
function CredentialsController($scope, $http, $cookieStore, Base64) { | |
$scope.login = function (userName, password) { | |
var encodedUserNameAndPassword = Base64.encode(userName + ':' + password); | |
$http.defaults.headers.common['Authorization'] = 'Basic ' + encodedUserNameAndPassword; | |
$cookieStore.put('basicCredentials', encodedUserNameAndPassword); | |
$http.get(baseUrl + '/Values') | |
.success(function() { | |
$scope.$broadcast('event:auth-loginConfirmed'); | |
$scope.password = ''; | |
}) |
NewerOlder