Browse I
Alphabetical listing with fast deep pagination.
87858 items • Page 1702 / 1758
import javax.swing.JFrame; import javax.swing.JMenuBar; public class MyJFrame ex
import javax.swing.JFrame; import javax.swing.JMenuBar; public class MyJFrame extends JFrame { JMenuBar bar; MyJFrame(String s) { super(s…
import javax.swing.JOptionPane;
importjavax.swing.JOptionPane;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> public class WordGuesser { private String myHidden; private String…
import javax.swing.JOptionPane; import javax.swing.JFrame; import java.awt.Graph
import javax.swing.JOptionPane; import javax.swing.JFrame; import java.awt.Graphics; public class PalindromeClient extends JFrame { private Palindrome palind; boolean started = fa…
import javax.swing.JOptionPane; public class Average { public static void main(S
import javax.swing.JOptionPane; public class Average { public static void main(String[]args) { String input,amount; double data[], gradetotal1; double sum=0,average; System.out.pr…
import javax.swing.JOptionPane; public class CH3EX4 { public static void main(St
import javax.swing.JOptionPane; public class CH3EX4 { public static void main(String[] args) { String inputStr; String outputStr; int noOfTicketsSoldBox; int noOfTicketsSoldSideli…
import javax.swing.JOptionPane; public class CarRent { public static void main(S
import javax.swing.JOptionPane; public class CarRent { public static void main(String[] args) { char carType = ' '; double rentDays = 0.0, startOdometer = 0.0, endingOdometer = 0.…
import javax.swing.JOptionPane; public class Circle1 { private double radius; pu
import javax.swing.JOptionPane; public class Circle1 { private double radius; public static final double PI = 3.14159; public Circle1(double radius) { this.radius = radius; } publ…
import javax.swing.JOptionPane; public class Circle1 { private double radius; pu
import javax.swing.JOptionPane; public class Circle1 { private double radius; public static final double PI = 3.14159; public Circle1(double radius) { this.radius = radius; } publ…
import javax.swing.JOptionPane; public class Driver { public static void main(St
import javax.swing.JOptionPane; public class Driver { public static void main(String[] args) { Rectangle tennisCourt = null; double width; double length; …
import javax.swing.JOptionPane; public class GameAdvice { public static void mai
import javax.swing.JOptionPane; public class GameAdvice { public static void main(String[] args) { int GameSystem; int GameGenre; int HoursPlayed; …
import javax.swing.JOptionPane; public class GameAdvice { public static void mai
import javax.swing.JOptionPane; public class GameAdvice { public static void main(String[] args) { int GameSystem; int GameGenre; int HoursPlayed; …
import javax.swing.JOptionPane; public class InheritanceTest { public static voi
import javax.swing.JOptionPane; public class InheritanceTest { public static void main(String[] args) { Point[] shapeAR = new Point[3]; try { shapeAR[0] = new Point(0, 0); shapeAR…
import javax.swing.JOptionPane;// needed for display public class Circle1 { //be
import javax.swing.JOptionPane;// needed for display public class Circle1 { //begin class private double radius; public static final double PI = 3.14159; public Circle1(double rad…
import jeliot.io.*; import java.util.*; public class MyClass { public static voi
import jeliot.io.*; import java.util.*; public class MyClass { public static void main(String[]args) { Scanner Kybd = new Scanner(System.in); System.out.println("I…
import jeliot.io.*; import java.util.*; public class MyClass { public static voi
import jeliot.io.*; import java.util.*; public class MyClass { public static void main(String[] args) { Scanner Kybd = new Scanner(System.in); System.out.println("…
import junit.framework.TestCase; /**********************************************
import junit.framework.TestCase; /***************************************************************************** * A Song is a sequence of Note objects. * The song can have a speci…
import lib280.graph.Edge280; import lib280.graph.GraphMatrixRep280; import lib28
import lib280.graph.Edge280; import lib280.graph.GraphMatrixRep280; import lib280.list.LinkedList280; import java.io.File; import java.io.FileNotFoundException; import java.util.S…
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np import matp
import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np import matplotlib.pyplot as plt import pyodbc #server/db connection info server = 'dbproj.database.windows.net…
import numpy as np def myconv(x,h): ############################################
import numpy as np def myconv(x,h): ############################################################################ # A function to generate the output signal y as convolution of inp…
import numpy as np def polym(c, x): # this function evaluates c[0] + c[1]*x + ..
import numpy as np def polym(c, x): # this function evaluates c[0] + c[1]*x + ... c[m]*x**m by summing term by term, # it computes x**i at the i-th iteration (the slowest of all o…
import numpy as np import matplotlib.pyplot as plt def mysin(x, tol=1e-8): \"\"\
import numpy as np import matplotlib.pyplot as plt def mysin(x, tol=1e-8): """ compute sin(x) by summing taylor expansion at 0, sin(x) = x - x^3/3! + x^5/5! +.... + (-1)^k*x^(2k+1…
import numpy as np import random rnstart = random.randint(0, 10) print(rnstart)
import numpy as np import random rnstart = random.randint(0, 10) print(rnstart) x = np.ones((10,2)) for row in x: row[0] = rnstart row[1] = rnstart + 100 rnstart = random.randint(…
import numpy as np import scipy.linalg as linalg #import matplotlib.pyplot as pl
import numpy as np import scipy.linalg as linalg #import matplotlib.pyplot as plt #------------------------------------------ def vandermonde_matrix(n, datafile="vector_data.txt")…
import numpy as np import scipy.linalg as linalg def least_square_poly(xData, yD
import numpy as np import scipy.linalg as linalg def least_square_poly(xData, yData, m, x): ''' least square fit (xData, yData) using a degree m polynomial, return the polynomia…
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt import least_square as LS #then call the function least_square_poly() as LS.least_square_poly() …
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt
import numpy as np import scipy.linalg as linalg import matplotlib.pyplot as plt import csv #needed to read csv file import least_square as LS #will use the least square functio…
import org.jfree.data.xy.AbstractXYDataset; import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.AbstractXYDataset; import org.jfree.data.xy.XYDataset; import java.util.ArrayList; import java.util.List; public class PolyDataset extends AbstractXYDatas…
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertion
import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class StudentTest { // Test that a class gets added to the student's Classes list // Create a …
import os def LabA(): no_of_shares=int(input(\"how many shares to be bought : $\
import os def LabA(): no_of_shares=int(input("how many shares to be bought : $")) pp_share=int(input("Price per share : $")) broker_comm=int(input("percentage commission of broker…
import os number = [] count = 0 sum = 0 fName =input(\"Enter the file name: \")
import os number = [] count = 0 sum = 0 fName =input("Enter the file name: ") if os.path.exists(fName): with open(fName, 'rb') as f: try: for line in f: number.append(int(line)) c…
import pandas as pd import matplotlib import matplotlib.pyplot as plt import sea
import pandas as pd import matplotlib import matplotlib.pyplot as plt import seaborn as sns import numpy as np from sklearn.manifold import TSNE from IPython.core.interactiveshell…
import pygame,svs pygane.init() a = input(\"Please enter the filename of the bac
import pygame,svs pygane.init() a = input("Please enter the filename of the background image:") b pygane.inage.load(a) (width, height) = b.get_rect().size background display = pyg…
import pythongame from pythongame.locals import *pythongame.int() int no.of play
import pythongame from pythongame.locals import *pythongame.int() int no.of players(); screen=pythongame.visible_players((number, //to show the name of players player name = pytho…
import pythongame from pythongame.locals import* pythongame.int(); int number of
import pythongame from pythongame.locals import* pythongame.int(); int number of players; screen=pythongame.visible_players((number, //to show the name of players player name = py…
import pythongame from pythongame.locals import*pythongame.init(); number_of_pla
import pythongame from pythongame.locals import*pythongame.init(); number_of_players = 0 screen=pythongame.visible_players((number, //to show the name of players player name = pyt…
import random def getSuitName (suit): suitname = \"\" if (suit == \'d\'): suitna
import random def getSuitName (suit): suitname = "" if (suit == 'd'): suitname = "Diamonds" elif (suit == 'h'): suitname = "Hearts" elif (suit == 'c'): suitname = "Clubs" else:…
import random def main(): print(\'ROCK PAPER SCISSORS in Python\') print() print
import random def main(): print('ROCK PAPER SCISSORS in Python') print() print('Rules: 1) Rock wins over Scissors.') print(' 2) Scissors wins over Paper.') pri…
import random def write(n): file=open(\'randnum.txt\', \'w\') for i in range(n):
import random def write(n): file=open('randnum.txt', 'w') for i in range(n): file.write(str(random.randint(0,999)) +' ') file.close() def read(): file=open('randnum.txt', 'r') i=0…
import random import math z = 23086243 random.seed(23086243) t = random.uniform(
import random import math z = 23086243 random.seed(23086243) t = random.uniform(0, 1) print(t) ching/2018/mad2502/hw/hw3.pdf Question 1. (2 points) Write a Python program to numer…
import random import string Target=”Hello,world!” def mutate(parent1, parent2):
import random import string Target=”Hello,world!” def mutate(parent1, parent2): child_dna = parent1['dna'][:] # Mix both DNAs start = random.randint(0, len(parent2['dna']…
import random import sys def nqueens(nr): show(min_conflicts(list(range(nr)), nr
import random import sys def nqueens(nr): show(min_conflicts(list(range(nr)), nr), nr) #print the solution if it exists def show(soln, nr): for i in range(nr): row = …
import random import time deforderedSequentialSearch(alist, item): pos = 0 found
import random import time deforderedSequentialSearch(alist, item): pos = 0 found = False stop = False while pos < len(alist) and not found and notstop: …
import re from random import randint def rand_list(): ans = list() for i in rang
import re from random import randint def rand_list(): ans = list() for i in range(6): ans.append(randint(1, 59)) # print(ans) return ans def comparelist(x, y): z = list(set(x).uni…
import recursion.Recursion; // Uncomment this block of code to test Activity 4 /
import recursion.Recursion; // Uncomment this block of code to test Activity 4 /* System.out.println(" Activity 4:"); // Test factorial System.out.println("Factorial:"); for (int …
import static java.lang.System.*; public class Social { private String socialNum
import static java.lang.System.*; public class Social { private String socialNum; //Hold the total of the digits private int sum; private int one, two, three; public Social() {soc…
import static org.junit.Assert. import java.util.ArrayList import org.junit.Befo
import static org.junit.Assert. import java.util.ArrayList import org.junit.Before: import org junit.Testi public class MaxHeapTest private MaxHeap heap: eBefore public void setUp…
import staticArray.ArrayList; import java.util.Date; import java.util.HashSet; i
import staticArray.ArrayList; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Scanner; import javax.swing.text.html.HTMLDocument.Iterator;…
import stdlib.StdAudio; public class PlayChords { public static void playChord(d
import stdlib.StdAudio; public class PlayChords { public static void playChord(double duration, double... frequencies){ final double sliceCount = (int) (StdAudio.SAMPLE_RATE * dur…
import string from graphics import * # tells the user what the program does def
import string from graphics import * # tells the user what the program does def printGreeting(): print "This program finds hailstone sequences of numbers that you input." print "T…
import sys and string Make sure correct number of command-line args were entered
import sys and string Make sure correct number of command-line args were entered, exiting if not Open the file for reading Read the lines in the file into a list of strings (don't…