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 lang="en" ng-app="app" ng-controller="MainController"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<google-sign-in-button on-sign-in="onSignIn(response)" g-client-id="CLIENTID.apps.googleusercontent.com"></google-sign-in-button> | |
<script src="https://apis.google.com/js/platform.js"></script> |
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
<?xml version="1.0"?> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<system.webServer> | |
<proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" | |
reverseRewriteHostInResponseHeaders="false" /> | |
<rewrite> | |
<allowedServerVariables> | |
<add name="X-Prerender-Token" xdt:Transform="InsertIfMissing" /> | |
</allowedServerVariables> | |
</rewrite> |
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
$('#calendar').clndr({ | |
render: function (data) { | |
return renderCalendar(data); | |
} | |
}); | |
} | |
function renderCalendar(data){ | |
var html='', | |
i= 0, | |
day; |
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 () { | |
$.fn.checkList = function (options) { | |
var self = this, | |
checkedItems = options.checkedItems ? options.checkedItems.slice() : [], //take a copy | |
unCheckedItems = options.unCheckedItems ? options.unCheckedItems.slice() : [], //take a copy | |
valuePath = options.valuePath, | |
textPath = options.textPath; | |
this.addClass('list-group'); |
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
$('.js-table-checkable th :checkbox') | |
.off('click') | |
.on('change', function () { | |
var $this = $(this), | |
checked = $this.prop('checked'), | |
tr = $this.closest('.js-table-checkable') | |
.find('td :checkbox') | |
.prop('checked', checked) | |
.closest('tr'); | |
if(checked){ |
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
*{ | |
margin: 0; | |
padding: 0; | |
} | |
.outer{ | |
height: 500px; | |
width: 100%; | |
overflow: scroll; | |
overflow-x: hidden; | |
} |
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
longestOrderedPart = '' | |
randomString = 'ljdflkjdfabcdljfbcdxyzlsjmlkjqsmfslkjfqllldflsdlfsldmlsqmslfdk' | |
orderedPart = randomString[0] | |
# loop over randomString | |
for i in range(0, len(randomString) -1): #don't run over last character or nextCharacter will go outside of the bounds of the string | |
currentCharacter = randomString[i] | |
nextCharacter = randomString[i+1] | |
#if nextCharacter is bigger or equal than currentCharacter, than it was in correct order |
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
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Google.Apis.Auth.OAuth2; | |
using Google.Apis.Auth.OAuth2.Flows; | |
using Google.Apis.Auth.OAuth2.Requests; | |
using Google.Apis.Util.Store; | |
namespace YourNameSpace.Google |
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 on(key, listener){ | |
addEventListener(this.events, key, listener); | |
} | |
function off(key, listener){ | |
if(listener) removeEventListener(this.events, key, listener); | |
else removeEventListeners(this.events, key); | |
} | |
function emit(key, eventArgs){ | |
for(let listener of this.events[key]){ | |
listener(eventArgs); |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Two way binding</title> | |
</head> | |
<body> | |
<h1>Two way sync</h1> | |
<select id="month1"> |