Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~17.3K People Reached
Favorite Tags

44 Posted Topics

Member Avatar for Pyler

Is there a way to install the latest cordova plugin in my project via the command line terminal Something along the lines of cordova plugin add org.apache.cordova.plugin @ 2.0.4

Member Avatar for Pyler
0
73
Member Avatar for Pyler
Member Avatar for deceptikon
0
227
Member Avatar for Pyler

I can serialize an object if it's class definition has attributes. So if I have an object whose class does not have attributes, do I serialize the attributes importedi in it's class definition? For example; suppose I have the following class, #ifndef BREAD_H #define BREAD_H #include "EGGS.h"; #include "FLOUR.h"; class …

Member Avatar for mike_2000_17
0
278
Member Avatar for Pyler

So I'm trying to remove 2 brackets from lines I'm reading from a file. For some reason when I run my program the characters in between the delimeters is removed. for example `greetings pe()ple` would end up as `greetings pe` I'm using a char array of delimiters. `char delimiters[] = …

Member Avatar for Pyler
0
207
Member Avatar for Pyler

So I'm trying to remove 2 brackets from lines I'm reading from a file. For some reason when I run my program the characters in between the delimeters is removed. for example `greetings pe()ple` would end up as `greetings pe` I'm using a char array of delimiters. `char delimiters[] = …

Member Avatar for Banfa
0
1K
Member Avatar for Pyler

Suppose I have the following class in a header file //tray.h #include <vector> #include "Eggs.h" #ifndef TRAY_H #define TRAY_H class Tray{ std::vector<Eggs> dozen; public: Tray(); ~Tray(); std::vector<Eggs> getTray() const; }; #endif And the following class file //tray.cpp #include "Tray.h" #include <string> Tray::Tray(){ } Tray::~Tray(){ } How do I initialize the …

Member Avatar for rubberman
0
259
Member Avatar for Pyler

when compiling code from my main function ireceive the following error `error: conversion from 'rectangle*' to non0scalar type 'rectangle' requested` My code is quite simple; Here's my main function #include <iostream> #inclde "rectangle.h" using namespace std; int main() { rectangle rect = new rectangle(3,4); cout<<rect.area()<<endl; cout<<rect.perimeter()<<endl; return 0; } here's …

Member Avatar for Moschops
0
176
Member Avatar for Pyler

I'm almost giving up on this problem. How to convert an integer to it's hexadecimal equivalent. I'm not looking to printout the hexadecimal equivalent of the integer in printf() but for a hexadecimal number.

Member Avatar for Lardmeister
0
395
Member Avatar for Pyler
Member Avatar for Pyler

The sign-extend unit works for I-type instructions, what would be it's output for R-type instructions? 32 zeros?

Member Avatar for Hiroshe
0
67
Member Avatar for Pyler

Are these two instructions equivalent, i.e do they both do the exact same thing? `addi $s0,$s0,0` and `add $s0, $s0, $zero`

Member Avatar for Hiroshe
0
243
Member Avatar for Pyler

I recently moved both my eclipse and Android folder into the same location. I didn't know that this would mess up eclipse. My themes are gone and eclipse can no longer locate the Android SDK. I've looked for ways to fix this online but most of the answers involve reinstalling …

Member Avatar for peter_budo
0
320
Member Avatar for Pyler

Eclipse throws an error whenever I start it up (see attachment). Any help is greatly appreciated.

Member Avatar for peter_budo
0
162
Member Avatar for Pyler

Right now I'm typing in consolas, a favorite font among programmers but as soon as I submit this post, all that I've written will be in Arial. I'm sorry but, I hate Arial. I can't stand the narrow words. I almost always have to stop and examine each word individually …

Member Avatar for ddanbe
0
280
Member Avatar for Pyler

Supposed I want to build a Queue using a LinkedList structure how would I go about doing this. I'm only allowed to use offer(), remove() or poll(), isEmpty() and size() methods, how do I implement a method to add items onto the queue?

Member Avatar for Pyler
0
104
Member Avatar for Pyler

I have a generic class that contains a compareTo() method I'm getting an error on the method it'self that goes something like; Name clash: the method compareTo(T) of type twos<T N> has the same erasure as compareTo(T) of type Compareable<T> but does not override it. How do I fix it? …

Member Avatar for Pyler
0
186
Member Avatar for Pyler
Member Avatar for Pyler

I'm implementing a generi method that's supposed to traverse a binary tree in PostOrder but when I attempt to use it, the Iterator doesn't work as It should when I attempt to use ot on a Binary Tree, can anyone spot my mistake in the code? Thanks. The method makes …

Member Avatar for iamthwee
0
218
Member Avatar for Pyler

What is the difference between `CoffeeInterface<Beverage> cup1 = new Coffee<Beverage>()` and `Coffee<Beverage> cup2 = new Coffee<Beverage>()` `Coffee` is a class that extends the `CoffeeInterface` Is `cup1` an object or can it be used as one. Are there any differences betweeen `cup1` and `cup2`?

Member Avatar for JamesCherrill
0
248
Member Avatar for Pyler

I have two classes A Dog class whose constructor does not accept arguments, `public class Dog<pet> extends Animal<pet>{}` whose constructor does not accept any arguments and `public class Animal<pet>{}` whose constructor accepts one argument public class Dog<pet> extends Animal<pet>{ public Dog(){ super(/*what should go here?*/); //Constructor accepts no arguments } …

Member Avatar for stultuske
0
245
Member Avatar for Pyler

I have two strings, `String one = new String("word");` `String two = new String("word");` Why does `System.out.println(one.equals(two));` Return true given that one and two are two different `String` objects.

Member Avatar for jwenting
0
155
Member Avatar for Pyler

Suppose I have the following generic classes; Queue<T> KellysCoffee CheckOut and the following generic interfaces QueueInterface OrderLineInterface Suppose I want `KellysCoffee` to extend Queue class and implement `OrderLineInterface` This is how I've done it private class KellyCoffee<Order extends Queue<Order>> implements OrderLineInterface{} Now when I try to implement `CheckOut` public class …

Member Avatar for Pyler
0
297
Member Avatar for Pyler

How's the result to this 7? void foo(int i){ if(i>1){foo(i/2);foo(i/2);}cout<<"#"<<endl;}

Member Avatar for vmanes
-1
221
Member Avatar for Pyler

Node inside a linkedlist SomeInterface has an addLast() method that should add a node at the end of the list public LinkedList<T> implements SomeInterface<T>{protected class Node<T>{ privateT data; private Node<T> head,tail; protected Node(T data,Node<T>tail){ this.data=data;head=null;this.tail=tail;} private T getInfo(){return this.data;} private void setTail(Node<T>newTail){this.tail=newTail;} private void setLink(Node<T>newHead){this.head=newHead;} private Node<T> getLink(){return tail;} }} …

Member Avatar for Pyler
0
200
Member Avatar for Pyler

I'm trying to implement a hangman game using linked lists but not getting anywhere. I want guessed characters to be inserted in a Linked list of chars at a position that corresponds to the character's position in the word they are trying to guess.(See example at bottom.) For some reason …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Pyler

would you just do @Override public boolean contains(T param){ return hashTable[function(param)]!=null; }

Member Avatar for JamesCherrill
0
218
Member Avatar for Pyler

I have the following public class bucket<String,Integer>{ private Integer num; . . . public bucket(){ num=new Integer(100); } } Eclipse spits out an error saying that it cannot instantiate the type Integer. Why is it saying this?

Member Avatar for JamesCherrill
0
218
Member Avatar for Pyler

Multiple generic arrays is it possible to create something like <String, Integer>[] a; If I wanted to create an array that stores objects of String and Integer?

Member Avatar for jwenting
0
154
Member Avatar for Pyler

import java.util.NoSuchElementException; import java.util.Stack; public class StackList<T> implements SomeList<E>{ /* Comments * only use offer(), poll()/remove, isEmpty(), and size() methods*/ private Stack<T> stack=new Stack<T>(); public StackList(){ Stack<T> stack=new Stack<T>(); stack=stack1; } public void push(T thing){ stack1.push(thing); } @Override public T pop(){ if(this.isEmpty()){throw new StackOverflowError();} return stack1.pop(); } @Override public void …

Member Avatar for JamesCherrill
0
229
Member Avatar for Pyler

I'm trying to create a list stack that implements some interface called SomeList The list stack should only use stack with no links. the itnerface has a number of methods that I would like to implement. So for SomeList I have something like public interface SomeList<T>{public void plus(T something);public E …

Member Avatar for JamesCherrill
0
407
Member Avatar for Pyler

This method is supposed to reverse a stack by making a new stack and pushing popped items from this stack to the revertStack and then returning the reverted stack. When I run some tests, it returns an empty stack in stead. Any clues? public LinkedStack<E> reversed() { LinkedStack<E> revertStack = …

Member Avatar for JamesCherrill
0
222
Member Avatar for Pyler

Reverse method won't work This method is supposed to return a copy of a this object, reversed. So it creates a new stack called that such that when all the items from this are popped onto that, this will reference that and the `reversed()` method will return this. When this …

Member Avatar for gusano79
0
260
Member Avatar for Pyler

I'm having trouble pinpointing the exact definition of a generic linkedstack class Suppose I have public class LinkedStack<T> { //some variables //would this be right LinkedStack(){ } //for a generic constructor of type T for the LinkedStack class of type T? }

Member Avatar for JamesCherrill
0
131
Member Avatar for Pyler

I have a stack method that's supposed to return a reversed *copy* of the this object. I need this to link this to that, the reversed copy of the this stack. Thanks public FancyStack<E> reversed() { FancyStack<E> that= new FancyStack<E>(); if(this.isEmpty()){ return this; } else{ while(top!=null) { revertStack.push(pop()); } } …

Member Avatar for stultuske
0
276
Member Avatar for Pyler

I have a generic LinkedStack class with a LinkedStack reversed method It creates a new LinkedStack say newLinkedstack and pushes items from the current stack by popping them. So at the end of the operation the current stack is left empty and newLinkedStack contains the same items/elements that were in …

Member Avatar for stultuske
0
175
Member Avatar for Pyler

Hi I'm trying to write a toString() method for a generic LinkedStack but I'm having trouble My class has two push methods. One pushes elements of some type onto the stack. It takes in some generic element and pushes it onto the stack. The other method takes in some generic …

Member Avatar for Pyler
0
1K
Member Avatar for Pyler

Suppose I have a class with a constructor that takes in two strings is it okay to write the constructor this way? public class box{ private String s1; private String s2; public box(**String str1,String str2**){ s1=str1; s2=str2; } } Or can I just say public box(String str1,str2)?

Member Avatar for JamesCherrill
0
132
Member Avatar for Pyler

consider public class awah{ private int x=0; private int y; private int w; public awah(int width){ w=width; } public void sety(){ y=(Int)(Math.random()*4);}//meth1 public int gety(){ return y; } public void setx (){ x+=this.gety(); } public int getx(){ return x; } public void showUpdate(){ System.out.println(x); } }//end of awah public static …

Member Avatar for Taywin
0
215
Member Avatar for Pyler

I use dr java for linux to run my code. I've been running into a bunch of errors recently while running this simple program. The code compiles fine but whenever I run the java file, I get the error; Static Error: Undefined name here's my code; (I've got two files, …

Member Avatar for TrustyTony
0
2K
Member Avatar for Pyler

/*Ok I have code that's behaving unexpectedly The following program is supposed to print prime numbers for n1=100,n2=1000,n3=10000 and n4=100000 except that for n1=100, it prints the squares of primes less than 10. I can implement this same program in c++ and wouldn't get such output. I need another pair …

Member Avatar for VernonDozier
0
236
Member Avatar for Pyler

Do you need to implement a class in order for an object to access the class's functions/methods? When should you implement a class? When shouldn't you?

Member Avatar for rubberman
0
341
Member Avatar for Pyler

Could some one point out what's wrong with the classes of this program? #include <iostream> using namespace std; class box { private: int height; int length; int width; public: box();//constructor int surface_area(); int volume(); void set_dim(int ,int, int); }; //implementation box::box(){ int height; int width; int length;} box::int surface_area(){ int …

Member Avatar for WaltP
0
2K
Member Avatar for Pyler

#include <iostream> #include <string> using namespace std; double distance(double x[],double y[]){ return sqrt((y[0]-x[0])*(y[0]-x[0])+(y[1]-x[1])*(y[1]-x[1])); } int main(){ double d; double x[]={1,2}; double y[]={4,3}; cout<<distance(x[2],y[2])<<endl; //cout<<d<<endl; cin.get(); return 0;} why wont it work I also tried d=distance(x[],y[]); cout<<d<<endl; but it wont work either

Member Avatar for NathanOliver
0
84
Member Avatar for Pyler

I wanted to write a simple program that uses classes but I've been running into errors. Anyone have a clue as to what is wrong with my code because I can't seem to figure it out. #include <iostream> #include <iomanip> #include <cmath> using namespace std; class cone{ private: double radius; …

Member Avatar for Rashakil Fol
0
255

The End.