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
//email alert for nmt's | |
//need to determine if auctually connected to enrg sql db | |
// | |
//TO-DO: EMAIL http://howtonode.org/sending-e-mails-with-node-and-nodemailer | |
var Connection = require('tedious').Connection, | |
Request = require('tedious').Request, //sql monitering dependency | |
nodemailer = require('nodemailer'); //email dependency | |
var config = { |
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
connected to 192.168.0.113:1433 | |
Sent | |
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00 | |
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........ | |
0020 02000000 000000 ....... | |
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF) | |
State change: Connecting -> SentPrelogin | |
Received |
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
connected to 192.168.0.113:1433 | |
Sent | |
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00 | |
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........ | |
0020 02000000 000000 ....... | |
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF) | |
State change: Connecting -> SentPrelogin | |
Received |
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
connected to 192.168.0.113:1433 | |
Sent | |
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00 | |
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........ | |
0020 02000000 000000 ....... | |
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF) | |
State change: Connecting -> SentPrelogin | |
Received |
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
case 'Ranger #11H - Osprey #22H FRAC': | |
$response = array( | |
'data' => ' | |
<div style="font-size:7px"> | |
<div class="title">NMT Id: </div><div id="nmtId">' . $row['nmtId'] . '</div> | |
<div class="title">Ambient: </div><div id="ambient">' . round($row['ambient'], 1) . 'dB</div> | |
<div class="title">Allowable: </div><div id="allowable">' . $allowable . '</div> | |
<div class="title">Location: </div><div id="nmtId">' . $row['location'] . '</div> | |
</div> | |
' |
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
talking points | |
Django | |
Pros: | |
MVC Framework is well tested | |
Database abstraction | |
each model is a Python class that subclasses Djangos Model class | |
each model attribute represents a database field | |
provides automatically generated db access | |
ex: for voter in Voter.objects.all(): | |
email(voter) |