What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-26 13:40:11
generate all prime number less than n java
/** Author: Jeffrey Huang As far as I know this is almost the fastest method in java for generating prime numbers less than n. A way to make it faster would be to implement Math.sqrt(i) instead of i/2. I don't know if you could implement sieve of eratost... Add solution -
Javascript 2022-03-25 05:35:50
jquery event on class change
(function(){ var originalAddClassMethod = jQuery.fn.addClass; var originalRemoveClassMethod = jQuery.fn.removeClass; jQuery.fn.addClass = function(){ var result = originalAddClassMethod.apply( this, arguments ); jQuery(this).tr... Add solution -
C++ 2022-03-25 00:20:07
clase estatica c++
class MyClass { public: static int var; //Declaración de una variable 'static' static void oneMethod(); //Declaración de un método 'static' }; int MyClass::var = 100; //Definición de la variable 'static' void MyClass::one... Add solution -
Python 2022-03-25 00:20:06
Function to a button in tkinter
from tkinter import * #Creating a win win = Tk() #Giving a Function To The Button def btn1(): print("I Don't Know Your Name") #Creating The Button button1 = Button(win, text="Click Me To Print SomeThing", command=btn1) #put on scree... Add solution -
Python 2022-03-25 00:20:01
python list as stack and queue
def isEmpty(stk): # checks whether the stack is empty or not if stk==[]: return True else: return False def Push(stk,item): # Allow additions to the stack stk.append(item) &... Add solution -
Swift 2022-03-25 00:20:01
closure swift
// The basic closure syntax is: // { (parameter: Type) -> Type in <statements> } // // While closures can be assigned to a variable like in // the example below, they become much more useful once // they're passed into a function such as a list'... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5