What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-11 17:04:11
ternary search algorithm
def ternary_search(f, left, right, absolute_precision) -> float: """Find maximum of unimodal function f() within [left, right] To find the minimum, reverse the if/else statement or reverse the comparison. """ ... Add solution -
Javascript 2021-11-11 14:05:11
javascript show popup on page refresh unsaved changes
var onReloadCheck = function () { $(window).on('beforeunload', function () { var modal = $('#myModal').hasClass('show'); if (modal) { return "If you leave before saving, your changes will be lost."... Add solution -
Python 2021-11-11 00:06:17
cdf empírica python
# fit an empirical cdf to a bimodal dataset from matplotlib import pyplot from numpy.random import normal from numpy import hstack from statsmodels.distributions.empirical_distribution import ECDF # generate a sample sample1 = normal(loc=20, scale=5, size... Add solution -
Other 2021-11-10 15:53:09
ionic modal not full screen
// I made this by adding a custom class while presenting modal this.notifyService.presentModal({ component: AwesomeComponent, cssClass: 'small-modal', backdropDismiss: true }); // and than defined the scss/css in global.scss .small-moda... Add solution -
Html 2021-11-10 11:59:26
bootstrap modal on image click codepen
<a href="#" id="pop"> <img id="imageresource" src="https://picsum.photos/200/300" style="width: 400px; height: 264px;"> Click to Enlarge </a> <!-- Creates the bootstrap modal ... Add solution