No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
8 Posted Topics
I'm trying to get a GUI application to display an image. So far I've got this bit of code: [CODE=java] import javax.swing.*; import java.awt.*; public class DemoImage extends JFrame { public void showImage() { // creates the actual frame with title 'My GUI' and dimensions JFrame frame = new JFrame("My … | |
Hi, I've got a method that returns 'null' for a linked list [CODE] public LinkedList<names> Relate(names Student) { return null; [/CODE] How can i get it to return an empty List, so that I dont get a null pointer exception? Thanks in advance, | |
Hi I have a simple code snippet here that writes to a file called Student.txt : [CODE="java"] import java.io.*; import java.util.*; public class Streams { public static void main(String[] args) { String studentFirstName = "Bob "; String studentLastName = " Smith "; String finalGrade = "A"; try { PrintWriter out … | |
Hi, I have a code that creates a class 'Person' : [ICODE] class Person: def __init__(self, fname, lname): self._fname = fname self._lname = lname def fname(self): return self._fname def set_fname(self, fname): self._fname = fname def lname(self): return self._lname def set_lname(self, lname): self._lname = lname def name(self): return self._fname + ' … | |
Hi, I'm going over this topic in unix and i'd be glad if someone could explain this bit of script: [ICODE]sed 's/\(abc\)*/xyz/'[/ICODE] so the input would be [ICODE]abcabcabc[/ICODE] which results in [ICODE]xyz[/ICODE] Also how come 'xyz' doesnt repeat 3 times because the input is 'abc' x 3 ? Thanks in … | |
Hi all, I tried to write in a fibonacci sequence using python: [ICODE] unum = int(raw_input('Enter Limit Number to run Fibonacci sequence: ')) numlist = [1,1] for i in range(unum): fib2 = numlist[i+1] + numlist[i] numlist.append(fib2) print "Here's Fibonacci!" for w in numlist: print w, [/ICODE] This works fine. But … | |
Hi, I have a cgi script in python that outputs a html table, but i also need to count the number of rows in that specific table. Any ideas on how i can proceed? Thanks in advance, ymf | |
Hi, I am writing a cgi script for a web database query "results" page and I need to display the results in an html table. My question: 'Is there a way to print out a list of words without the commas and the square brackets?' e.g if this is the … |
The End.