What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-17 07:48:03
c++ menu selection with arrow keys
// Menu example for tjnapster #include <iostream> #include <conio.h> #include <windows.h> #include <cstdlib> using namespace std; HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE); // used for goto COORD CursorPosition; // used fo... Add solution -
Javascript 2021-09-25 08:39:02
defer parsing of javascript wordpress
// Only for Javascript function defer_parsing_of_js( $url ) { if ( is_user_logged_in() ) return $url; //don't break WP Admin if ( FALSE === strpos( $url, '.js' ) ) return $url; if ( strpos( $url, 'jquery.js' ) ) return $url; return str_re... Add solution -
Python 2021-09-24 13:44:03
Exception has occurred: NameError name 'self' is not defined
""" Default argument values are evaluated at function define-time, but self is an argument only available at function call time. This arguments in the argument list cannot refer each other. It's a common pattern to default an argument to No... Add solution -
Other 2021-09-22 04:11:05
best calcculator c program
// Calculator example using C code #include<stdio.h> #include<conio.h> #include<math.h> #include<stdlib.h> #define KEY "Enter the calculator Operation you want to do:" // Function prototype declaration void addition(); ... Add solution -
Javascript 2021-09-20 18:42:04
javascript sum of all the multiples of 3 or 5 below 1000 running total
(() => { // sum35 :: Int -> Int const sum35 = n => { // The sum of all positive multiples of // 3 or 5 below n. const f = sumMults(n); return f(3) + f(5) - f(15); }; // sumMults ... Add solution -
Javascript 2021-09-20 16:11:02
10.4.1.2. Using return is Optional // Functions
/*As we saw with our initial examples of function definitions, not every function explicitly returns a value. At its simplest, a function can even have an empty body.*/ function doNothing() {} /*As written, this function is completely valid, but useles... Add solution