What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-25 15:57:04
d3 violin plot with points
<script> // set the dimensions and margins of the graph var margin = {top: 10, right: 30, bottom: 30, left: 40}, width = 460 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; // append the svg object to the body of t... Add solution -
Javascript 2021-09-25 09:52:02
code a space scene in js
//{ var OuterSpace = function(){ var s = 300; var v = 100; var n = 200; var w = 10; var r = 30; var U = 100; var keys = []; keyPressed = function(){ keys[keyCode] = true; }; keyReleased = function(){ keys[keyCode] = false; }; var Background = fun... Add solution -
Python 2021-09-21 17:49:03
how to make text change lines pygame
import pygame pygame.init() SIZE = WIDTH, HEIGHT = (1024, 720) FPS = 30 screen = pygame.display.set_mode(SIZE, pygame.RESIZABLE) clock = pygame.time.Clock() def blit_text(surface, text, pos, font, color=pygame.Color('black')): words = [word.split(... Add solution -
Java 2021-09-21 00:27:03
number to words java
class NumberToWordExample1 { //user-defined static method that converts a number into words static void numberToWords(char num[]) { //determines the number of digits in the given number int len = num.length; //checks the given number has nu... Add solution -
C++ 2021-09-19 22:22:04
flowchart to display factors of a number
#include<iostream> using namespace std; int main() { int num = 20, i; cout << "The factors of " << num << " are : "; for(i=1; i <= num; i++) { if (n... Add solution -
Other 2021-09-18 09:30:03
add teacher name latex
\documentclass{article} \makeatletter \renewcommand{\maketitle}{ \begin{center} \pagestyle{empty} \phantom{.} %necessary to add space on top before the title \vspace{3cm} {\Huge \bf \@title\par} \vspace{2.5cm} {\LARGE Your Name}\\[1cm] {\Large\@date}... Add solution -
C++ 2021-09-17 20:52:02
inline in class in C++
#include <iostream> using namespace std; inline int Max(int x, int y) { return (x > y)? x : y; } // Main function for the program int main() { cout << "Max (20,10): " << Max(20,10) << endl; cout << &... Add solution -
C++ 2021-09-16 03:36:03
c++ changing string to double
#include <iostream> using namespace std; int main() { char s[20] = "18.2894 is a number"; char *p; double result; result = strtod(s, &p); cout<<"The number aft... Add solution -
Javascript 2021-09-15 17:23:05
Telephone Number Validator
const telephoneCheck = str => { const regExp = /^1?\s?(\(\d{3}\)|\d{3})(\s|-)?\d{3}(\s|-)?\d{4}$/gm return regExp.test(str) } telephoneCheck("27576227382"); /* Regular Expression Explanation Below !!! */ /* Expression : /^1?\s... Add solution
Best helpers
Mushi.f
+5
Ivan T.
+5
Bianco
+5
Graffito
+5
Mari Yoongi
+5
Tyr
+5
Christophrrb
+5
Vary
+5
Del Findley
+5
Ryan Friend
+5
Millemila
+5
Soumee
+5
Gftern
+5
Davesmiths
+5
Vocaro
+5
Vbence
+5