system.cpu.idle: % Idle CPUsystem.cpu.system: % System CPUsystem.cpu.user: % User CPU
| # -- coding: utf-8 -- | |
| from win32api import * | |
| from win32gui import * | |
| import win32con | |
| import sys, os | |
| import struct | |
| import time | |
| class WindowsBalloonTip: |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:
#!/usr/bin/expect
| 'use strict'; | |
| /** | |
| * Mobiscroll directives set | |
| * @type {*} | |
| */ | |
| var mobiscroll = angular.module('mobiscroll', []); | |
| /* | |
| * Native style datetime picker | |
| */ |
| #include <stdio.h> | |
| void DumpHex(const void* data, size_t size) { | |
| char ascii[17]; | |
| size_t i, j; | |
| ascii[16] = '\0'; | |
| for (i = 0; i < size; ++i) { | |
| printf("%02X ", ((unsigned char*)data)[i]); | |
| if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { | |
| ascii[i % 16] = ((unsigned char*)data)[i]; |
| if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
| // path/to/whatever does not exist | |
| } | |
| if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) { | |
| // path/to/whatever exists | |
| } |
| /* | |
| Reliability and Flow Control Example | |
| From "Networking for Game Programmers" - http://www.gaffer.org/networking-for-game-programmers | |
| Author: Glenn Fiedler <[email protected]> | |
| */ | |
| #include <iostream> | |
| #include <fstream> | |
| #include <string> | |
| #include <vector> |
Based on https://www.gnu.org/software/make/manual/html_node/Quick-Reference.html
| Directive | Description |
|---|---|
define variable define variable = define variable := define variable ::= define variable += define variable ?= endef |
Define multi-line variables. |
undefine variable |
Undefining variables. |
If you want resources offline to learn about programming and web technologies MDN is for you! and I recommend to use MDN over w3school because w3school is outdated.
Download it offline (2.1gb) at https://mdn-downloads.s3-us-west-2.amazonaws.com/developer.mozilla.org.tar.gz