This file contains hidden or 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 | |
| COALESCE(contact.preferred_name, contact.firstname) AS "FIRSTNAME", | |
| contact.surname | |
| FROM contact | |
| ORDER BY contact.surname, contact.preferred_name, contact.firstname |
This file contains hidden or 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
| WITH included_students AS | |
| ( | |
| SELECT | |
| student.student_id, | |
| TRIM(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(LOWER(form.short_name),'yr',''),'year',''),'y',''),'ib',''),'oc','')) AS YEAR_LEVEL, | |
| CASE WHEN contact.gender_id = 2 THEN 1 ELSE 0 END AS MALE, | |
| CASE WHEN contact.gender_id = 3 THEN 1 ELSE 0 END AS FEMALE, | |
| CASE WHEN contact.gender_id = 2 AND student.indigenous_id IN (2,3,4) THEN 1 ELSE 0 END IND_MALE, | |
| CASE WHEN contact.gender_id = 3 AND student.indigenous_id IN (2,3,4) THEN 1 ELSE 0 END IND_FEMALE, | |
| student_form_run.start_date, |
This file contains hidden or 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
| @echo off | |
| cls | |
| set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe" | |
| set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe" | |
| echo Closing OneDrive process. | |
| echo. | |
| taskkill /f /im OneDrive.exe > NUL 2>&1 | |
| ping 127.0.0.1 -n 5 > NUL 2>&1 |
This file contains hidden or 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
| // One | |
| edumate.query(config, sql, {clean: true}).then(function (results) { | |
| console.log(results); | |
| }, function (error) { | |
| console.error(error); | |
| }); | |
| // Two | |
| edumate.query(config, sql, {clean: true}) | |
| .then(function (results) { |
This file contains hidden or 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
| for (var key in queries) { | |
| if (queries.hasOwnProperty(key)) { | |
| var value = queries[key]; | |
| populateTables(value); | |
| } | |
| } |
This file contains hidden or 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 | |
| student_welfare.student_id, | |
| student_welfare.staff_id, | |
| student_welfare.what_happened_id, | |
| student_welfare.class_id, | |
| class.class | |
| FROM student_welfare | |
| INNER JOIN class ON class.class_id = student_welfare.class_id |
This file contains hidden or 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
| config.init = { | |
| libpath: ('./drivers/db2jcc.jar'), | |
| drivername: 'com.ibm.db2.jcc.DB2Driver', | |
| url: 'jdbc:' + 'db2://' + config.db2.host + ':' + config.db2.port + config.db2.suffix + ':user=' + config.db2.username + ';password=' + config.db2.password + ';' | |
| }; |
This file contains hidden or 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
| var config = {}; | |
| config.express = { | |
| host: "http://localhost", | |
| port: 3000 | |
| }; | |
| config.db2 = { | |
| host: 'xyz', | |
| port: '123456', |
This file contains hidden or 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
| app.get('/', function(req, res){ | |
| res.render('index', { user: req.user }); | |
| }); |
This file contains hidden or 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
| var output = {}; | |
| output.results = []; | |
| _.each(data.results, function(object) { | |
| var records = {}; | |
| var keys = Object.keys(object); | |
| for (var i = 0; i < keys.length; i++) { | |
| records[camelCase(keys[i])] = object[keys[i]]; | |
| }; | |
| output.results.push(records); | |
| }); |