What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-22 01:40:37
return a tuple c++ python 3
# C++ CODE void divide_modulo(int a, int b, int *div, int *rest) { *div = a / b; *rest = a % b; } # COMPILE WITH gcc -o libexample.so -shared example.c # OR C++ g++ -o libfoo.so -shared example.cpp # PYTHON 3.7 CODE import ctypes lib = ctypes.c... Add solution -
Other 2021-12-23 17:22:22
tkinter trig calculator
import tkinter as tk from tkinter import ttk window = tk.Tk() v = tk.IntVar() v.set(1) x1String = "x1: " x2String = "x2: " y1String = "y1: " y2String = "y2: " window.geometry("640x860") submit = tk.Bu... Add solution -
C++ 2021-12-23 16:23:22
Dijkstra's Weighted Graph Shortest Path in c++
#include <limits.h> #include <stdio.h> #define V 9 int minDistance(int dist[], bool sptSet[]) { int min = INT_MAX, min_index; for (int v = 0; v < V; v++) if (sptSet[v] == false && dist[v] <= min... Add solution -
Other 2021-11-22 12:11:58
arrow functions basic usages in javascript
// An empty arrow function returns undefined let empty = () => {}; (() => 'foobar')(); // Returns "foobar" // (this is an Immediately Invoked Function Expression) var simple = a => a > 15 ? 15 : a; simple(16); // 15 simple(10); // ... Add solution -
Other 2021-11-22 12:11:33
arrow functions basic usages in javascript
// An empty arrow function returns undefined let empty = () => {}; (() => 'foobar')(); // Returns "foobar" // (this is an Immediately Invoked Function Expression) var simple = a => a > 15 ? 15 : a; simple(16); // 15 simple(10); // ... Add solution -
Other 2021-11-22 12:11:23
arrow functions basic usages in javascript
// An empty arrow function returns undefined let empty = () => {}; (() => 'foobar')(); // Returns "foobar" // (this is an Immediately Invoked Function Expression) var simple = a => a > 15 ? 15 : a; simple(16); // 15 simple(10); // ... Add solution -
Other 2021-11-22 12:10:53
arrow functions basic usages in javascript
// An empty arrow function returns undefined let empty = () => {}; (() => 'foobar')(); // Returns "foobar" // (this is an Immediately Invoked Function Expression) var simple = a => a > 15 ? 15 : a; simple(16); // 15 simple(10); // ... Add solution