student-question

Why does does my stack overflow error occur after 518669 specifically?

I created a java program to count up toward infinity: class up { public static void up (int n) { System.out.println (n) ; up (n+1) ; } public static void main (String[] arg) { up (1) ; } } i didn't actually expect it to get there but the thing that i noticed that was a bit curious was that it st...

What's wrong with this conditional?

I am trying to make a method that tests to see if 3 lengths can make a triangle. I think i'm making some kind of syntax error but i can't figure out what it is. Here is the relevant bit of code: (its in java) public static void trya (int a, int b, int c) { if (c>(a+b)) { System.out.println ("yes") ; } else ...

Entity Relationship diagram - Composition

Hi, I am implementing a small database(university Project) and i am facing the following problem. I created a class diagram where i have a class Train {Id, Name, Details} And a class RollingStock which is than generalized in Locomotive and FreightWagon. A train is Composed by multiple RollingStock at a certain time(on different da...

Execute javascript from link

Hi, i am just trying to create a link which execute some JavaScript in stead to redirect the user to a particular page I tried the following but it doesn t work <a href="#" onclick="javascript:location.replace('http://http://stackoverflow.com/questions/ask');"&gt;www.google.com&lt;/a&gt;&lt;br /> <a href="javascript:location.replace...

how to implement video and audio merger program ?

Hi guys I want to make a program which takes video and audio and merges them. Video Type or audio type is not important for me. I just want to make so- called program. How can i make this ? does any library exist for this ? (I know there are many program about this topic but i want to learn how to implement such a program.) Help me ple...

special debugging lines (java)

Recently i've found myself writing a lot of methods with what i can only think to call debugging scaffolding. Here's an example: public static void printArray (String[] array, boolean bug) { for (int i = 0; i<array.lenght; i++) { if (bug) System.out.print (i) ; //this line is what i'm calling the debugging scaffoldi...

Winforms vs WPF

I am a student and I do freelance here and there when I have opportunity. I believe my strongest language is C#. I don't really know what is going on in real programming world, so I was wondering if WPF did take over WinForms? I know the differences between two and how two can be used simultaneously but, I just don't want to invest my ti...

Free Fall Question

OK, I'm going to try my best to explain my problem. I have this program where you can select 5 balls. When you select one, you can drag it while you have the mouse button pressed and the cursor is within the ball's radius. The problem is that I need a way to make the ball go up when the user stop pressing the mouse button, like he sent ...

Casting problem cant convert from void to float C++

as i said i get this horrible error i dont really know what to do anymore float n= xAxis[i].Normalize(); thats where i get the error and i get it cuz normalize is a void function this is it void CVector::normalize() { float len=Magnitude(); this->x /= len; this->y /= len; } i need normalize to stay as void tho i tried norma...

missing subscript c++

right now c++ is giving me this error: error C2087 'color' missing subscript first time i get this and i dont know what to do >.< hope any1 can help me struct Color{ float r; float g; float b; }; Color color[][]; and im using it here for(int i=0;i<cubes;i++) { color[i][0].r = fRand();color[i][0].g=fRand(.5);color[i][...

Trying to modify a monthly report to a weekly. Aspen Sql

I am very new to SQL programming. I am trying to modify a monthly runtime report so that I can get the information on a weekly time interval. My code just outputs 0's when the starttime and endtime are in the same month. I can't figure out why. Function TagCount ( Tag1Name char(24), Tag1Cond integer, Tag2Name char(24), Tag2Cond integer...

Any way to use multiple encryptions on one string without doubling or expanding the size of the output string?

My input string suppose is: 256 Bytes Ascii text. Let's assume I encrypted it with an encryption algo. But when I re-encrypt the same encrypted result string which was output of the first encryption, the size of the second result string from the second encryption from the same encryption algo increases, even doubles! Dear friends! Is th...

Cannot Convert struct** to const POINT* for argument?

hi everyone im using winapi and i want to do a square in 3d im defining the points to unite them with a function and ive been trying 3 functions but i cant make them work i get the same error in the 3 of em >.< The Error says In member function `void Cube::Show(void)':| cannot convert `const Cube::Show()::POINT3D**' to `const POIN...

Are framework and .net the same?

I am a little bit confused, what is the difference between framework, asp.net, ado.net and c#? ...

where to start?

from where i have to start?i have to learn c# first or visual basic first? ...

What program to write?

Good night, I'm Ukrainian student, I want to address you with no ordinary matter. This year I need to write a thesis. I do not know what topic to choose, you may be able to advise what is the direction? My knowledge of C #, wpf, java (database mysql \ mssql). If the matter is prohibited on this resource apologize. ...

Why is PHP considered Object Oriented?

I have been reading around the definition of OOP and couldn´t get why PHP is considered object oriented. Can this have anything to do that the "basic level" of PHP isn´t and more advanced features are? Thanks in advance! ...

Can this if-else statement be made cleaner

I am trying to improve a C++ assignment to make it more efficient. I am a beginner with the language (and programming in general too), so I am only using what I know so far (if, else). I have a function that converts scores into levels, so anything under 30 = 1, 30-49 = 2, 50-79 = 3 and so on... Here is how I am doing it: if (score1 ...

FizzBuzz comment that confused me - are hard coded conditions wrong?

Hi All, I discovered the "FizzBuzz" question today at coding horror. Great article. However, something in one of the user-comments confused me -- here's the quote: Geez guys - EVERY ONE of you who gave example code - EVERY ONE - hard coded the FIZZ and BUZZ conditions... It sounds to me like this poster is ridiculing people...

Creating a .tgz with windows ?

Hi, Sorry, just a quick question before I submit an assignment online. I just followed this guide - http://www.ehow.com/how_6104990_create-_tgz-file-windows.html to make a .tgz file from one of my folder. I then renamed the file created from .tar.gz to a .tgz. I was just wondering would this have the exact same result as the instruct...