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
import {ApplicationRef} from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import {enableDebugTools} from '@angular/platform-browser'; | |
platformBrowserDynamic().bootstrapModule(AppModule).then(moduleRef => { | |
const applicationRef = moduleRef.injector.get(ApplicationRef); | |
const componentRef = applicationRef.components[0]; | |
// allows to run `ng.profiler.timeChangeDetection();` | |
enableDebugTools(componentRef); |
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
funtion parseWitoutActiveX(str) | |
var doc= null; | |
var xmlIsland = document.createElement('xml'); | |
if(xmlIsland){ | |
xmlIsland.setAttribute('id','xmlActiveXGetRid'); | |
xmlIsland.innerHTML = str; | |
document.body.appendChild(xmlIsland); | |
var doc = xmlIsland.XMLDocument; | |
document.body.removeChild(xmlIsland); | |
return doc; |
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
SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections, | |
loginame as LoginName | |
FROM sys.sysprocesses | |
WHERE dbid > 0 | |
GROUP BY dbid, loginame |
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 getUniqueId () { | |
return Math.round(Math.random() * 9999999999); | |
} |
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
//escape the text in order to make it secure for embedding in JavaScript. | |
function jsEscape(content) { | |
return content.replace(/(['\\])/g, '\\$1') | |
.replace(/[\f]/g, "\\f") | |
.replace(/[\b]/g, "\\b") | |
.replace(/[\n]/g, "\\n") | |
.replace(/[\t]/g, "\\t") | |
.replace(/[\r]/g, "\\r") | |
.replace(/[\u2028]/g, "\\u2028") | |
.replace(/[\u2029]/g, "\\u2029"); |