This file contains 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
/* | |
How to print color text in terminal (Linux terminals, Putty, etc.) | |
"\e[31mI am red\e[0m" <- prints text in red | |
*/ | |
#include <stdio.h> | |
#include <math.h> | |
const char* const ANSI_RED = "\033[31m"; |
This file contains 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
n = 0xffee | |
m = 1999888777 | |
f = 1599.499899 | |
n32 = 0xffeeddcc | |
n64 = 0xffeeddcc80402010 | |
fstring =f''' | |
n = {n} (0x{n:X}), m = {m}, f = {f} | |
n64 = 0x{n64:X}, n32 = 0x{n32:X} |
This file contains 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
import tkinter as tk | |
app = tk.Tk() | |
class Excel(tk.Frame): | |
def __init__(self, master, rows, columns, width): | |
super().__init__(master) | |
for i in range(columns): |
This file contains 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
import tkinter as tk | |
import tkinter.ttk as ttk | |
app = tk.Tk() | |
#app.geometry('800x600') | |
X = 1200 | |
Y = 750 | |
GRID = 25 |
This file contains 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
import java.util.ArrayList; | |
import java.util.List; | |
public class TestListPop { | |
private final List<String> states = new ArrayList<>(); | |
public void push(String state) { | |
states.add(state); | |
} |
This file contains 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
#include <cstdio> | |
void F(int *x, int tab1[2], int tab2[]) { | |
printf("F: sizeof x, tab1, tab2: %ld %ld %ld\n", sizeof(x), sizeof(tab1), sizeof(tab2)); | |
} | |
int main() { | |
int tab[] = {1,2,3,4,5}; | |
int* x = tab; |