Forum: XML, XSLT and XPATH 16 Days Ago |
| Replies: 0 Views: 306 I need to make a servlet that takes in a web page url, cleans up the HTML and spits back out a xml file which i need to make conform to a schema.
This is a class assignment and I have no idea how... |
Forum: C# Sep 12th, 2009 |
| Replies: 10 Views: 355 Did you try installing the program? With this reply, I've included the installer. Just run the installer, next, next, next. Then put this data.csv file (attached with this post), in C:\Program... |
Forum: C# Sep 12th, 2009 |
| Replies: 10 Views: 355 The problem with the search mechanism is that when I search a single word in the "I" category, things get messed up.
For example, when you run the program, enter in some sample words like this:
... |
Forum: C# Sep 12th, 2009 |
| Replies: 10 Views: 355 Hi sknake,
Yes, I was looking for some insight if there was maybe a better option than a csv file. I'm still currently a student, so my programming skills are still being worked on. However, I... |
Forum: C# Sep 12th, 2009 |
| Replies: 10 Views: 355 Well I want to paste the code, but its pretty big. =(
Basically, I have a program that loads up a listbox full of Words.
Words is a class that holds a word and a definition;
ie
Word Object =... |
Forum: C# Sep 12th, 2009 |
| Replies: 10 Views: 355 Hello everyone,
I'm having trouble making a search box for my program.
This is a not a school project or anything, just a personal project I've been working on. Therefore, any possible... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 Sounds good, but I at least want to go in with a good argument. Don't feel like upshowing my teacher without having a good basis. =P
Thanks for all your help guys. =) |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 Sorry, but this is only my 4th week into learning C and those concepts seem quite advanced. I haven't learned too much about ASCII and hex. But I'll try to understand from my own knowledge.
... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 I see what you mean. If I initialize the l first, then the union is created with 4 bytes and fits all the other data types right? Therefore, you get:
char c = a
short = 97
int = 97
long = 97... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 What do you mean by initialize the long int first? Do you mean like:
union integer_union
{
long l = 0;
};
Like initialize it inside the union then use it? |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 These are the results I get:
0x00
---
Please enter a char: a
char c = a
short s = 97
int i = 97
long l = 97 |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 What if I initialize the data then? Would that make a substantial difference? I thought this program is initializing the data with the user input (ie. scanf("%c", &value.c);). =( I guess its... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 Thanks, I fixed that part. It didn't make a difference though. =P The program still outputs the same results as before. |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 I'm not sure if I'm in a position to question the homework. I'm assuming this question has been asked over the years or maybe someone else should be having the same problems. Either way, what... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 Form what I understand, a union is basically a structure that allocates the same space to store its data. So the char, short, int and long variables all share the same storage location (size being... |
Forum: C Feb 9th, 2009 |
| Replies: 20 Views: 1,045 Hello,
I've been having trouble trying to duplicate this program.
My output differs from the sample output I was given for homework. I don't understand whats wrong with my code.
void... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,362 And the winner is mrboolf. I managed to solve the problem with your tips. Your answer is much more accurate in regards to what I needed to do. Lemme add to ur rep. ^^
Thanks to everyone else... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,362 I will take a look at wikipedia for a more mathematical answer. Its weird but my teacher's sample output has a different answer than mine even if it is negative lol. Guess theres something else... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,362 Sounds complicated lol, but I sorta get what you mean. =) So assuming a number * itself is = x
so if
2 * 2 = 4 // square root of 4 is equal to 2
-1 * -1 = doesn't work cuz all square roots are... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,362 So you're saying it should be the same as:
int i = -1;
totalReal + totalImag + i;
Seems strange how the square root of -1 = -1... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,362 Hello,
I'm writing a a program in C++ that adds/subtracts complex numbers. I'm having trouble writing the square root of -1 or "i" in a complex number.
Complex number:
realPart + imaginaryPart... |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 746 Apparently, its not good to declare variables inside "case x" like the others have said. Everything worked when I declared it as a local variable outside the switch statement and used the variable... |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 746 It compiles now that I put the steps inside the for loop, but not BEFORE the for loop:
for ( int cmd = 0; commands[ cmd ] != 9; cmd++ )
{
int steps = command[ ++cmd ];
switch (... |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 746 I'm actually still getting a compile error with that code.
error C2360: initialization of 'steps' is skipped by 'case' label
see declaration of 'steps'
I don't think I'm going with the... |
Forum: C++ Nov 1st, 2008 |
| Replies: 7 Views: 746 Hi everyone,
I have a question regarding reading commands from an array for a turtle graphics program.
5, x - Move forward x number of spaces (x being the next number in the array, ie. 5, 5)... |
Forum: C++ Sep 29th, 2008 |
| Replies: 2 Views: 371 I agree, look at my thread and hopefully the answer comes to you too. =) |
Forum: C++ Sep 29th, 2008 |
| Replies: 24 Views: 2,947 True, probably not a good idea anyways. =P
Oh yeah, thanks for your help too dragon. ++ Rep for you too even though it look like u don't need it lol. =P |
Forum: C++ Sep 29th, 2008 |
| Replies: 24 Views: 2,947 OK WOW, its 5:34AM and it all just came to me. I actually have the right answer now. I'm edging to post the code, but I dunno if its allowed here. Either way, thanks for your help grumpier, theres... |
Forum: C++ Sep 29th, 2008 |
| Replies: 24 Views: 2,947 My code after another hour of thinking:
int iterations = 0;
double answer = 1; // result of the current factorial calculation
double result = 1;
int n = 1;
int pow_x = 1; |
Forum: C++ Sep 29th, 2008 |
| Replies: 24 Views: 2,947 after reading your math, I feel my code is close to completion, but the only part that confuses me now is the factorial ( n ) part.
after seeing that formula you provided, I see that the result... |
Forum: C++ Sep 29th, 2008 |
| Replies: 24 Views: 2,947 True, you solving the problem wouldn't help me learn. =) I have one more day to solve this, due Tuesday, so I hope it comes to me by tomorrow. ^^ I feel I am so close, just missing a small piece... |
Forum: C++ Sep 28th, 2008 |
| Replies: 24 Views: 2,947 Maybe you can simply explain what your T, n and x represent? From what I see, x is the value the user inputs and I have no idea where your n comes from. Like in your formula, the most I can see is:... |
Forum: C++ Sep 28th, 2008 |
| Replies: 24 Views: 2,947 Can you explain in detail how your math formula relates to my code? I think you understand the problem, but I can seem to relate that formula to my loop. Another issue is how can you store such a... |
Forum: C++ Sep 28th, 2008 |
| Replies: 24 Views: 2,947 Thanks Dragon for helping me for the last couple hours. I added the teacher's question to see if it helps you any. Strange question tho, the teacher basically said create a program that calculates... |
Forum: C++ Sep 28th, 2008 |
| Replies: 24 Views: 2,947 Thanks for the reply grumpier, and it seems like you know what you are talking about in regards to this issue.
Included here is the teacher's clue:
You can compute the approximation for e^x... |
Forum: C++ Sep 28th, 2008 |
| Replies: 24 Views: 2,947 Well the program is an .exe that he provided and wanted us to mimic the functionality of it. Its basically no different from what I posted above, and I can't view the source code. I can post another... |
Forum: C++ Sep 27th, 2008 |
| Replies: 24 Views: 2,947 Actually, now I see the the problem with the overflow and my calculation.
I'm trying to divide x / 1! + x^2 / 2! + ...
and so forth, so eventually I think the program reaches x^21 / 21! and my... |
Forum: C++ Sep 27th, 2008 |
| Replies: 24 Views: 2,947 I see what you mean now. By printing the results of the factorial loop, once the number gets too big, it starts changing into funny numbers. (The overflow you were talking about).
How do I go... |
Forum: C++ Sep 27th, 2008 |
| Replies: 24 Views: 2,947 Thanks, I tried that, but it didn't do anything to explain the negative number at the end of the results. |
Forum: C++ Sep 27th, 2008 |
| Replies: 24 Views: 2,947 Hi, I've just started a course in C++ about 3 weeks ago. Unfortunately, I'm pretty lost at the moment with this problem and my teacher said I'm on my own now. (I'm guessing he doesn't want to... |