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.Linq; | |
using System.Web; | |
using Microsoft.AspNet.SignalR; | |
namespace WebApplication1 | |
{ | |
public class DocumentHub : Hub | |
{ |
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 xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<script src="/Scripts/jquery-1.6.4.js"></script> | |
<script src="/Scripts/jquery.signalR-2.0.3.js"></script> | |
<script src="/Scripts/jquery.layout.js"></script> | |
<script src="/signalr/hubs"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.1.3/ace.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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Sample | |
{ | |
public class UppercaseSearcher | |
{ |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Sample.WithLimits | |
{ | |
class UppercaseSearcher | |
{ |
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 Promise(){ | |
var self = this; | |
var thenCallback = null; | |
var failCallback = null; | |
var alwaysCallback = null; | |
self.then = function(callback){ | |
thenCallback = callback; | |
return self; |
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
# set-executionpolicy unrestricted | |
function Disable-InternetExplorerESC { | |
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" | |
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" | |
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force | |
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force | |
Stop-Process -Name Explorer -Force | |
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green | |
} |
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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Disable-InternetExplorerESC | |
Install-WindowsUpdate | |
Disable-MicrosoftUpdate | |
cinst IIS-WebServerRole -source windowsfeatures | |
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
def chop (target: Int, searchBox: Array[Int]) : Int = { | |
val size = searchBox.size | |
if (size == 0) { | |
return -1 | |
} | |
if (size == 1){ | |
if(searchBox(0) == target){ | |
return 0 | |
} else { |
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
def assert(expected: Int, actual: Int){ | |
if(expected == actual){ | |
println("OK"); | |
} | |
else { | |
println("Error, expected: " + expected + " actual: "+ actual); | |
} | |
} |
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
def main(args: Array[String]){ | |
test(-1, 2, Array.emptyIntArray) | |
test(0, 1, Array(1,2,3,4,5)) | |
test(2, 3, Array(1,2,3,4,5)) | |
test(2, 3, Array(1,2,3)) | |
test(0, 1, Array(1)) | |
test(4, 5, Array(1,2,3,4,5)) | |
test(3, 4, Array(1,2,3,4,5)) | |
test(1, 2, Array(1,2,3,4,5)) | |
test(-1, 0, Array(1,2,3,4,5)) |
OlderNewer