-
show.bs.modal: fired just before the modal is open. -
shown.bs.modal: fired after the modal is shown. -
hide.bs.modal: fired just before the modal is hidden. -
hidden.bs.modal: fired after the modal is closed. -
loaded.bs.modal: fired when remote content is successfully loaded in the modal’s content area using the remote option mentioned above.
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
| /* Extra small devices only (phones, less than 768px) */ | |
| @media (max-width: 767px) { ... } | |
| /* Small devices only (tablets, @screen-sm-min) */ | |
| @media (min-width: 768px) and (max-width: 991px) { ... } | |
| /* Medium devices only (desktops, @screen-md-min) */ | |
| @media (min-width: 992px) and (max-width: 1199px) { ... } | |
| /* Large devices only (large desktops, @screen-lg-min) */ |
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
| $('.panel').on('hidden.bs.collapse', function () { | |
| $(this).addClass('collapsed'); | |
| }).on('show.bs.collapse', function () { | |
| $(this).removeClass('collapsed'); | |
| }); |
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 map(x, inMin, inMax, outMin, outMax) { | |
| return (x-inMin) * (outMax-outMin) / (inMax-inMin) + outMin; | |
| } |
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
| // Show error code | |
| // Shows the given error code in binary format at the passed pin | |
| // A short blink represents a binary "0", long blink a binary "1". | |
| // MSB first | |
| // | |
| // @param uint8_t code: The error code to "blink", [0;255] | |
| // @param uint8_t pin: The output pin to use, default: 13 | |
| // | |
| // @return void | |
| void showErrorCode(uint8_t code, uint8_t pin = 13) { |
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
| // smooth scrolling of links like <a href="#bla"> | |
| var $viewport = $('html, body'); | |
| $('a[href*="#"]:not([href="#"])').on('click', function(e) { | |
| if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) { | |
| var target = $(this.hash); | |
| target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
| if (target.length) { | |
| $viewport.animate({ | |
| scrollTop: target.offset().top // scroll to target | |
| }, 1000); |
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
| // events - a super-basic Javascript (publish subscribe) pattern | |
| const events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |
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
| array.sort(function(a,b){ | |
| // Turn your strings into dates, and then subtract them | |
| // to get a value that is either negative, positive, or zero. | |
| return new Date(b.date) - new Date(a.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
| function showBrowserNotification(text) { | |
| // check if the browser supports notifications | |
| if (!("Notification" in window)) { | |
| // no support | |
| } | |
| // check whether notification permissions have already been granted | |
| else if (Notification.permission === "granted") { | |
| var notification = new Notification(text); | |
| } |
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
| \begin{tikzpicture} | |
| \pgfplotsset{ | |
| scale only axis, | |
| } | |
| \begin{axis}[ | |
| %axis x line*=bottom, | |
| %axis y line*=left, | |
| xlabel=$A$, |
OlderNewer