| I have access to these tools with their exact parameters |
|---|
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
| """ | |
| An examnple of the use of threading to allow simultaneous operations in a | |
| tkinter gui (which is locked to a single thread) | |
| """ | |
| import threading | |
| import tkinter as tk | |
| from tkinter import ttk |
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
| package tech.alvarez.today; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.support.annotation.NonNull; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.view.View; | |
| import android.widget.ProgressBar; | |
| import android.widget.Toast; |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
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
| #!/bin/bash -e | |
| # /usr/local/sbin/raspi-monitor | |
| # Script to enable and disable the HDMI signal of the Raspberry PI | |
| # Inspiration: http://www.raspberrypi.org/forums/viewtopic.php?t=16472&p=176258 | |
| CMD="$1" | |
| function on { | |
| /opt/vc/bin/tvservice --preferred |
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
| #!/usr/bin/env python | |
| """ | |
| - read subprocess output without threads using Tkinter | |
| - show the output in the GUI | |
| - stop subprocess on a button press | |
| """ | |
| import logging | |
| import os | |
| import sys | |
| from subprocess import Popen, PIPE, STDOUT |
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
| public static ISessionFactory SessionFactory { get; private set; } | |
| protected void Application_Start() | |
| { | |
| AreaRegistration.RegisterAllAreas(); | |
| RegisterGlobalFilters(GlobalFilters.Filters); | |
| RegisterRoutes(RouteTable.Routes); | |
| //Configure NHibernate and create a session factory for the application | |
| var nhibernateConiguration = new NHibernate.Cfg.Configuration(); |