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
console.log('Client-side code running'); | |
const button = document.getElementById('myButton'); | |
button.addEventListener('click', function(e) { | |
console.log('button was clicked'); | |
fetch('/clicked', {method: 'POST'}) | |
.then(function(response) { | |
if(response.ok) { | |
console.log('click was recorded'); |
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
# -*- coding: utf-8 -*- | |
from PyQt4 import QtCore, QtGui | |
from PyQt4.QtGui import * | |
from PyQt4.QtCore import * | |
from urllib2 import * | |
class DownloaderApp(QtGui.QMainWindow): | |
def __init__(self, parent = None): | |
super(DownloaderApp, self).__init__(parent) |
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
from PyQt5 import QtGui | |
from PyQt5.QtWidgets import QApplication, QDialog, QProgressBar, QPushButton, QVBoxLayout | |
import sys | |
from PyQt5.QtCore import Qt, QThread, pyqtSignal | |
import time | |
class MyThread(QThread): | |
# Create a counter thread | |
change_value = pyqtSignal(int) |