What do you want to save?
Add Code snippet
New code examples
-
Swift 2021-09-20 08:50:02
uipageviewcontroller stop scrolling
The documented way to prevent the UIPageViewController from scrolling is to not assign the dataSource property. If you assign the data source it will move into 'gesture-based' navigation mode which is what you're trying to prevent. Add solution -
Java 2021-09-20 03:37:03
java itemstatechanged called twice
comboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if(e.getStateChange() == ItemEvent.SELECTED) { // Check if the value got selected, ignore if it has been deselected //Do stuff } ... Add solution -
Javascript 2021-09-20 02:45:01
window.addEventListener("online");
window.addEventListener('load', function() { var status = document.getElementById("status"); var log = document.getElementById("log"); function updateOnlineStatus(event) { var condition = navigator.onLine ? "online"... Add solution -
Other 2021-09-20 00:10:02
ionic reload app
<!-- Custom Refresher Properties --> <ion-content> <ion-refresher slot="fixed" pullFactor="0.5" pullMin="100" pullMax="200"> <ion-refresher-content></ion-refresher-content> <... Add solution -
Python 2021-09-19 00:13:02
draw box with mouse on image in canvas tkinter
import PIL.Image import Image import ImageTk from Tkinter import * class ExampleApp(Frame): def __init__(self,master): Frame.__init__(self,master=None) self.x = self.y = 0 self.canvas = Canvas(self, cursor="cross&qu... Add solution -
Javascript 2021-09-18 10:25:06
vanilla js post form data
document.addEventListener('submit', function (event) { event.preventDefault(); fetch('https://jsonplaceholder.typicode.com/posts', { method: 'POST', body: JSON.stringify(Object.fromEntries(new FormData(event.target))), headers: { 'Content-typ... Add solution -
Javascript 2021-09-18 09:26:03
angular format phone number while typing
export class PhoneMaskDirective { constructor(public ngControl: NgControl) { } @HostListener('ngModelChange', ['$event']) onModelChange(event) { this.onInputChange(event, false); } @HostListener('keydown.backspace', ['$event']) keydownB... Add solution -
Java 2021-09-18 01:18:03
how to switch between two stylesheets in javafx.
import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.geometry.Pos; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.con... Add solution