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
@mixin hideScrollbar { | |
// https://blogs.msdn.microsoft.com/kurlak/2013/11/03/hiding-vertical-scrollbars-with-pure-css-in-chrome-ie-6-firefox-opera-and-safari/ | |
// There is a CSS rule that can hide scrollbars in Webkit-based browsers (Chrome and Safari). | |
&::-webkit-scrollbar { | |
width: 0 !important | |
} | |
// There is a CSS rule that can hide scrollbars in IE 10+. | |
-ms-overflow-style: none; | |
// Use -ms-autohiding-scrollbar if you wish to display on hover. |
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 camelCaseToSentenceCase(word) { | |
const result = word.replace(/([A-Z])/g, ' $1'); | |
const finalResult = result.charAt(0).toUpperCase() + result.slice(1); | |
return ( | |
<span>{finalResult}</span> | |
); | |
} |
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 React from 'react'; | |
import { render } from 'react-dom'; | |
import { BrowserRouter as Router, Route } from 'react-router-dom'; | |
import { createBrowserHistory } from 'history'; | |
const addScrollAnimation = () => { | |
const anchorLinks = document.querySelectorAll('[href*="#"]'); | |
anchorLinks.forEach((anchorLink) => { | |
anchorLink.addEventListener('click', (e) => { | |
const href = e.target.getAttribute('href'); |
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
// add overflowing text indicator for cards with longer texts | |
var win2dOptionValues = document.getElementsByClassName('win2dOption-value'); | |
for (var i=0; i < win2dOptionValues.length; i++) { | |
var curOverflow = win2dOptionValues[i].style.overflow; | |
var isOverflowing = win2dOptionValues[i].clientWidth < win2dOptionValues[i].scrollWidth || | |
win2dOptionValues[i].clientHeight < win2dOptionValues[i].scrollHeight; | |
if (isOverflowing) { | |
win2dOptionValues[i].className += " win2dOption-value--overflowing"; | |
win2dOptionValues[i].style.overflowy = "scroll"; |
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
SilverStripe\MimeValidator\MimeUploadValidator: | |
MimeTypes: | |
'json': 'text/plain' |
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
SilverStripe\MimeValidator\MimeUploadValidator: | |
MimeTypes: | |
'json': 'text/plain' |
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
# obtained from https://stackoverflow.com/questions/8439650/how-to-drop-all-tables-in-a-sql-server-database | |
DECLARE @Sql NVARCHAR(500) DECLARE @Cursor CURSOR | |
SET @Cursor = CURSOR FAST_FORWARD FOR | |
SELECT DISTINCT sql = 'ALTER TABLE [' + tc2.TABLE_NAME + '] DROP [' + rc1.CONSTRAINT_NAME + ']' | |
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc1 | |
LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc2 ON tc2.CONSTRAINT_NAME =rc1.CONSTRAINT_NAME | |
OPEN @Cursor FETCH NEXT FROM @Cursor INTO @Sql |
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
/** | |
* convertCharactersToHtml | |
* ======================= | |
* Converts HTML characters to HTML elements, such as replacing greater-than sign ">" with ">". | |
* @param string mixedString String with special characters. | |
* @return string HTML elements. | |
*/ | |
function convertCharactersToHtml($mixedString) { | |
return htmlspecialchars($mixedString); | |
} |
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
/** | |
* getComponentSCSS | |
* ================ | |
* Return corresponding sass code for specific component. | |
* | |
* @param $filePath Source SCSS file. | |
* @return SCSS | |
*/ | |
function getComponentSCSS() { |
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
// source: https://jsfiddle.net/pandauxstudio/k1nq92sk/8/ | |
// create dummy awards object array. | |
const awards = [ | |
{ | |
awardNumber: "1", | |
awardStatus: "CURRENT", | |
awardType: "CERT", | |
awardVersionNumber: 1, | |
caseId: "C11111" | |
}, |
NewerOlder