Run PowerShell as Admin
$machineName = "MachineName"
Enable-PSRemoting -force
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $machineName
Enter-PSSession -ComputerName $machineName -Credential (Get-Credential)
Run PowerShell as Admin
$machineName = "MachineName"
Enable-PSRemoting -force
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $machineName
Enter-PSSession -ComputerName $machineName -Credential (Get-Credential)
function getList(name, cb){ | |
var serviceUrl = 'http://yoursite/_vti_bin/listdata.svc/'; | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', serviceUrl + name); | |
xhr.setRequestHeader('accept', 'application/json;odata=verbose'); | |
xhr.onreadystatechange = function(){ | |
if(this.readyState === 4){ | |
var obj = JSON.parse(this.response); | |
cb(obj.d.results); |
<html> | |
<head> | |
<style> | |
a:hover > svg > .hexagon{ | |
fill:#faa; | |
} | |
.hexagon{ | |
fill:#aaf; | |
stroke:black; |
/* | |
Open Schema Values enumerated in JavaScript | |
https://docs.microsoft.com/en-us/sql/ado/reference/ado-api/schemaenum?view=sql-server-2017 | |
*/ | |
const openSchema = { | |
adSchemaAsserts: 0, | |
adSchemaCatalogs: 1, | |
adSchemaCharacterSets: 2, | |
adSchemaCheckConstraints: 5, |
(function(){ | |
var href = location.href; | |
if(href.indexOf('logout') !== -1){return ;} | |
var userAgree = sessionStorage.getItem('user_agree'); | |
if(userAgree !== 'true'){ | |
var msg = 'You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.\n' + | |
'By using this IS (which includes any device attached to this IS), you consent to the following conditions:\n'+ |
function JSAssert_print() { | |
var win=window.open("","_blank","width=400,height=300,toolbar=no,scrollbars=yes"); | |
win.document.writeln("<TITLE>JSUnit</TITLE><PRE>"); | |
win.document.writeln(""+this.count+" test(s): "+this.done+" ok, "+this.failed+" failed\n---"); | |
win.document.writeln(this.text); | |
win.document.close(); | |
} | |
function JSAssert_add(f, t) { | |
this.count++; |
/* | |
Usage: | |
const file = document.getElementById('a_file').files[0]; | |
const fh = new FileHandler(file); | |
console.log(fh.fields.name, fh.fields.email); | |
*/ | |