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
| Sub Save_to_PDF() | |
| ' | |
| ' Save_to_PDF Macro | |
| ' | |
| ' | |
| With Dialogs(wdDialogFileSaveAs) | |
| .Format = wdFormatPDF | |
| .Show | |
| End With |
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
| const handleChange = (event, selectedChildNode) => { | |
| const { | |
| target: { value }, | |
| } = event; | |
| console.log(event.target.value); | |
| // allow a maximum of 3 values only | |
| if (annualCompensationProp.length > 2) { | |
| // make a copy so not to mutate original state | |
| let newArray = annualCompensationProp.slice(); | |
| // removes the incoming newItem if it already is in the array |
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
| def json_dump(data: list): | |
| t = [] | |
| for idx, row in enumerate(data): | |
| _t = {'id': idx, 'data': row} | |
| t.append(_t) | |
| with open('test.json', 'w', encoding='utf-8') as f: | |
| json.dump(t, f, | |
| ensure_ascii=False, indent=4) |
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
| // Course Eval | |
| // Set all to 5 | |
| let myElem = document.querySelector("#divStudentCouseForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{console.log(e.childNodes[2]);if (e.childNodes[2] && e.childNodes[2].children[0]) console.log(e.childNodes[6].childNodes[0].checked = true)}) | |
| // Set all to 1 | |
| let myElem = document.querySelector("#divStudentCouseForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{console.log(e.childNodes[2]);if (e.childNodes[2] && e.childNodes[2].children[0]) console.log(e.childNodes[2].childNodes[0].checked = true)}) | |
| // Teacher Eval | |
| // Set all to 5 | |
| let myElem = document.querySelector("#divTeacherEvaluationForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{if (e.childNodes[2].children[0]) console.log(e.childNodes[2].childNodes[0].checked = true)}) | |
| // Set all to 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
| const describeSchema = (obj) => { | |
| let describeSchema = {}; | |
| for (const key of Object.keys(obj.schema.paths)) { | |
| describeSchema[key] = obj.schema.paths[key].instance; | |
| } | |
| return describeSchema; | |
| }; | |
| module.exports = describeSchema; |
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
| ' https://www.get-digital-help.com/excel-udf-lookup-and-return-multiple-values-concatenated-into-one-cell/ | |
| ' 03/08/2022 | |
| ' Minor changes to fix my needs. | |
| 'Name user defined function and define parameters | |
| Function Lookup_concat(Search_string As String, _ | |
| Search_in_col As Range, Return_val_col As Range, delim_in_return As String) | |
| 'Dimension variables and declare data types | |
| Dim i As Long |
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
| function getQueryVariable(variable) { | |
| var svalue = location.search.match( | |
| new RegExp("[?&]" + variable + "=([^&]*)(&?)", "i") | |
| ); | |
| return svalue ? svalue[1] : svalue; | |
| } | |
| // ?page=1 | |
| getQueryVariable("page"); // 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
| javascript: (() => { | |
| function checkLogin() { | |
| username = document.getElementById("Frm_Username"); | |
| password = document.getElementById("Frm_Password"); | |
| loginButton = document.getElementById("LoginId"); | |
| if (username == null) { | |
| first(); | |
| } else { | |
| if (username.value === "") { | |
| username.value = "admin"; |
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
| # Courtesy: https://superuser.com/a/1329702 | |
| # Set Key File Variable: | |
| New-Variable -Name Key -Value "$env:UserProfile\.ssh\id_rsa" | |
| # Remove Inheritance: | |
| Icacls $Key /c /t /Inheritance:d | |
| # Set Ownership to Owner: | |
| Icacls $Key /c /t /Grant $env:UserName:F |
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
| Function GetURL(rng As Range) As String | |
| On Error Resume Next | |
| GetURL = rng.Hyperlinks(1).Address | |
| End Function | |
| ' Usage: GetURL(Cell Number) | |
| ' Output: Associated address with Cell Number |