Skip to main content

Posts

Javascript : Read & Write File from Browser

<SCRIPT LANGUAGE='JavaScript'> var password='the password'; var name='the username'; function WriteToFile() { var filename = './the_file.txt'; var fso = new ActiveXObject('Scripting.FileSystemObject'); if (fso.FileExists(filename)) { var a, ForAppending, file; ForAppending = 8; file = fso.OpenTextFile(filename, ForAppending, false); file.WriteLine(name); file.WriteLine(passwthe ord); } else { var file = fso.CreateTextFile(filename, true); file.WriteLine(password); file.WriteLine(name); } file.Close(); } function ReadFile() { var filename = './the_file.txt' if (confirm('Do you want to see what we put on your computer...

Javascript : SQL old yet powerful

<button onclick="(function(){alert('hoy!'); document.getElementById('demo').innerHTML = 'Hello Earth'; var objConnection = new ActiveXObject('ADODB.Connection'); alert(22); var strConn = 'Data Source=[SERVER_NAME];Initial Catalog=[DATA_BASE];Persist Security Info=True;User Id[USERNAME]Password=[PASSWORD];Provider=SQLOLEDB;'; alert(33); objConnection.Open(strConn); alert(44); var rs = new ActiveXObject('ADODB.Recordset');alert(55); var strQuery = 'SELECT * FROM sysobjects'; alert(strQuery); alert(66); rs.Open(strQuery, objConnection); alert(77); alert(rs); rs.MoveFirst(); alert(88); alert(rs); alert(99); while (!rs.EOF) { document.getElementById('demo').innerHTML += rs.fields(0) + ' '; rs.MoveNext();}})()">Click me</button> <p id="demo"></p> <br /> <BUTTON onclick="(function(){alert('hoy!'); document.getElementById('demo').innerHTML = 'Hel...

ubuntu 16.04 LTS : killing stubborn npm process (npm start "Port 3000 is already in use" | kill -9 PID)

mccrazy@mccrazy-Lenovo-N22:~$ cd Documents/mern2018/men_api/node-rest-auth/ baliw$ npm start > node-rest-auth@0.0.0 start /home/mccrazy/Documents/mern2018/men_api/node-rest-auth > node ./bin/www GET / 304 1080.607 ms - - GET /stylesheets/style.css 304 11.545 ms - - ^Z [1]+  Stopped                 npm start baliw$ npm start > node-rest-auth@0.0.0 start /home/mccrazy/Documents/mern2018/men_api/node-rest-auth > node ./bin/www Port 3000 is already in use npm ERR! Linux 4.15.0-34-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" npm ERR! node v4.2.6 npm ERR! npm  v3.5.2 npm ERR! code ELIFECYCLE npm ERR! node-rest-auth@0.0.0 start: `node ./bin/www` npm ERR! Exit status 1 npm ERR!  npm ERR! Failed at the node-rest-auth@0.0.0 start script 'node ./bin/www'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-rest-auth package, npm ERR! not with...

Biztalk : T SQL script listing your biztalk artifacts (Orchestrations, Send Ports, Receive Ports/Location, Pipelines

USE BizTalkMgmtDb SELECT app.nvcName AS [Application], ass.nvcName AS [Assembly], orc.nvcName AS [Orchestration], orc.nOrchestrationStatus AS [Status], orp.nvcName AS [Orchestration Port], pt.nvcName AS [Port Type], pto.nvcName AS [Port Type Operation], rp.nvcName AS [Receive Port], rl.Name AS [Receive Location], rppl.Name AS [Receive Pipeline], sp.nvcName AS [Send Port], sppl.Name AS [Send Pipeline], spg.nvcName AS [Send Port Group] FROM bts_application app WITH(NOLOCK) LEFT OUTER JOIN bts_assembly ass WITH(NOLOCK) ON app.nID = ass.nApplicationId LEFT OUTER JOIN bts_orchestration orc WITH(NOLOCK) ON ass.nID = orc.nAssemblyId LEFT OUTER JOIN bts_orchestration_port orp WITH(NOLOCK) ON orc.nID = orp.nOrchestrationId LEFT OUTER JOIN bts_porttype pt WITH(NOLOCK) ON orp.nPortTypeID = pt.nID LEFT OUTER JOIN bts_porttype_operation pto WITH(NOLOCK) ON pt.nID = pto.nPortTypeID LEFT OUTER JOIN bts_orchestration_port_binding opp WITH(NOLOCK) ON orp.nID = opp.nOrcPortID L...