Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~9K People Reached
Favorite Tags
Member Avatar for kxjakkk

With a Scanner that has data rate of 1MB/sec and 802.11n wireless has a data rate of 37.5MB/sec, is it possible to use a scanner to scan a document and transmit the data over an 802.11n wireless network at full speed?

Member Avatar for rproffitt
0
341
Member Avatar for kxjakkk

A C/MPI program that is executed using two processes. Process 0 hold a 4 × 4 array A that contains the floating-point values shown below. 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 A[4][4] 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 What is the ordered sequence of the values …

Member Avatar for Nutster
0
195
Member Avatar for kxjakkk

Just started learning MPI and all, need a little help with it though. int main( int argc, char *argv[] ) { int rank, n; MPI_Init( &argc, &argv ); MPI_Comm_size( MPI_COMM_WORLD, &n ); MPI_Comm_rank( MPI_COMM_WORLD, &rank ); int a = rank; int b = 0; int C[n], D[n]; for ( int …

Member Avatar for rproffitt
0
517
Member Avatar for kxjakkk

I'm attempting to make a small program that when a user inputs a string, it counts all the letters. Here's what I've got so far: import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.TreeSet; import java.util.Scanner; public class LetterTypeCount { public static void main(String[] args) { // create HashMap to store …

Member Avatar for JamesCherrill
0
308
Member Avatar for kxjakkk

I'm trying to make a program that removes all occurences of a specified string from a text file. I'm having trouble with tying in everything to make it work, so that the user is prompted to enter a string. This is what I've got: import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; …

Member Avatar for JamesCherrill
0
454
Member Avatar for kxjakkk

http://i.stack.imgur.com/nJGPy.png A physical memory/cache system has the above properties. I need to make a diagram showing how a 12‐bit main memory address is partitioned into the block offset, set index, and tag fields for addressing the cache. Show clearly the bit positions of the 12‐bit address occupied by each field. …

Member Avatar for rubberman
0
132
Member Avatar for kxjakkk

I'm attempting to make a C program that builds a concordance from a piece of text. I need my program to: 1. read the text consisting of one more lines from standard input. 2. parse the lines into individual words and store each word in lower case into a word …

Member Avatar for gtcorwin
0
835
Member Avatar for kxjakkk

I'm trying to make a calendar out of C. I need it to be able to promt the user for a month, and the year, and it should then print the calendar of that. So far the code I've got is: #include<stdio.h> int days_in_month[]= {0,31,28,31,30,31,30,31,31,30,31,30,31}; char *months[]= { " ", …

Member Avatar for ddanbe
0
342
Member Avatar for kxjakkk

My code is the following: import cgi data = cgi.FieldStorage() productdescription = data.getvalue('product_description') listprice = data.getvalue('list_price') discountpercent = data.getvalue('discount_percent') def calc(discountpercent): if discountpercent > 100: raise ValueError("Percentage discount cannot exceed 100%") elif discountpercent < 100: percent = float(discountpercent) / 100 discount = float(listprice) * percent return discount else: raise ValueError("Invalid …

Member Avatar for kxjakkk
0
272
Member Avatar for kxjakkk

I'm trying to make a calculator of a sort in python that works on a local web server. I have the localhost all set up and all. import cgi data = cgi.FieldStorage() product_description = data.getvalue('product_description') list_price = data.getvalue('list_price') discount_percent = data.getvalue('discount_percent') total = data.getvalue('total') def total_price(): data.getvalue('total') - discount return …

Member Avatar for snippsat
0
469
Member Avatar for kxjakkk

I'm trying to modify this code: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) def print_tree_inorder(tree): if tree is None: return print_tree_inorder(tree.left) print(tree.cargo, end=" ") print_tree_inorder(tree.right) So that it adds parentheses around every operator and pair of operands. …

Member Avatar for kxjakkk
0
461
Member Avatar for kxjakkk

I'm trying to write a boolean function that takes two Mytime objects, t1 and t2 as arguments, and returns True if the object falls inbetween the two times. This is a question from the How to Think Like a Computer Scientist book, and I need help. What I've gotten so …

Member Avatar for David W
0
439
Member Avatar for kxjakkk

I wanted to format this string but I don't know how I can do the formatting part at all. class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if …

Member Avatar for sepp2k
0
260
Member Avatar for kxjakkk

This is my code: class MyTime: def __init__(self, hrs=0, mins=0, secs=0): self.hours = hrs self.minutes = mins self.seconds = secs if self.seconds >= 60: self.minutes += self.seconds // 60 self.seconds = self.seconds % 60 if self.minutes >= 60: self.hours += self.minutes // 60 self.minutes = self.minutes % 60 if self.hours …

Member Avatar for kxjakkk
0
283
Member Avatar for kxjakkk

I need to make an object called Accounts that can be used as a banking system. It requires 3 inputs, first name, last name, and initial deposit and 4 member functions: withdraw, deposit, fee and interest. The fee is $20 a month if the amount in the account is less …

Member Avatar for Hiroshe
0
612
Member Avatar for kxjakkk

file_spellcheck = input("Name of the document to be spell-checked: ") with open(file_spellcheck, "r") as i: spellchecking = i.read() for item in spellchecking: items = item.split() if items in with open("file.out", "w") as i: i.write() I need to make a spell checker that uses another file as a dictionary. So let's …

Member Avatar for vegaseat
0
271
Member Avatar for kxjakkk

#Import Story text = open('./alice.txt', 'rb').read() #Split the text into individual words def split_text(text): #Import known words index index = open('./words.dat', 'rb').read().split() index_file = open('./words.dat','wb+') for word in index: index_file.write(word) index_file.write('\n') import string #Remove punctuation out = "".join(c for c in text if c not in string.punctuation).lower() # split the …

Member Avatar for snippsat
0
2K
Member Avatar for kxjakkk

I'm trying to create a program that will prompt the user for a list of text files to read from, then read those text files and build a dictionary of all the unique words found. Then finally put those unique words into another file and make it alphabetical order from …

Member Avatar for kxjakkk
0
636
Member Avatar for kxjakkk

My Rational class code: from __future__ import division import math as _math def _gcf(a, b): # Returns the greatest common factor of a and b. a = abs(a) b = abs(b) while b: a, b = b, a % b return a class Rational(object): def __init__(self, numerator=0, denominator=1): # Contructs …

Member Avatar for Schol-R-LEA
0
300
Member Avatar for kxjakkk

Python keeps getting stuck on this line because there is no attribute "numerator" (and I'm assuming it'd say it has no attribute for denominator either). third = Rational(25, 10) print ("third: 0/1".format(third.numerator(), third.denominator())) For my Rational class, I've got def gcd(a, b): if b == 0: return a else: return …

Member Avatar for Schol-R-LEA
0
621