What do you want to save?
Add Code snippet
New code examples
-
Other 2021-08-27 21:57:02
pixelart pygame
# Simple pygame project for pixelart import pygame screen = pygame.display.set_mode((1280, 720)) pixelart_surface = pygame.Surface((512, 288)) running = True while running: pixelart_surface.fill((0, 0, 0)) for event in pygame.event.get(): if eve... Add solution -
Javascript 2021-08-27 20:21:01
funcao com o botao esc do teclado javascript
document.querySelector('body').addEventListener('keydown', function(event) { var tecla = event.keyCode; if(tecla == 13) { // tecla ENTER } else if(tecla == 27) { // tecla ESC } else if(tecla == 37) { ... Add solution -
Javascript 2021-08-27 09:20:01
show preview of input image javascript react
const React = require('react') class Upload extends React.Component { constructor(props){ super(props) this.state = { file: null } this.handleChange = this.handleChange.bind(this) } handleChange(event) { this.setState({ ... Add solution -
Javascript 2021-08-26 22:27:01
preventdefault on back in vuejs
<script>export default { // ... beforeMount() { window.addEventListener("beforeunload", event => { if (!this.isEditing) return event.preventDefault() // Chrome requires returnValue to be set. event.returnValue =... Add solution -