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
<?php | |
function cidr_match($ip, $ranges) | |
{ | |
$ranges = (array)$ranges; | |
foreach($ranges as $range) { | |
list($subnet, $mask) = explode('/', $range); | |
if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) { | |
return true; | |
} | |
} |
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 Microsoft.Rtc.Collaboration; | |
using System; | |
namespace SimpleUserUCMA | |
{ | |
class Program | |
{ | |
private const string sipaddress = "sip:from@domain.com"; | |
private const string username = "USERNAME"; | |
private const string password = "PASSWORD"; |
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 PascalName($name){ | |
$parts = $name.Split(" ") | |
for($i = 0 ; $i -lt $parts.Length ; $i++){ | |
$parts[$i] = [char]::ToUpper($parts[$i][0]) + $parts[$i].SubString(1).ToLower(); | |
} | |
$parts -join "" | |
} | |
function GetHeaderBreak($headerRow, $startPoint=0){ | |
$i = $startPoint | |
while( $i + 1 -lt $headerRow.Length) |