407 Posted Topics
Re: At a quick glance, your `switch` statement should look like this: switch(HighLow) { case 1: ... break; case 2: ... break; default: ... break; } | |
Re: Few questions: Are you using WinForms or WPF? What panel control are you using? Is the panel doing the layout or are you (i.e. do you specifically set the position of each textbox)? What's your code for rearranging the order/layout of the textboxes? | |
Re: Show the code you need help with. We won't "help" by giving you the code. | |
Re: Your `isPrime()` method cannot be contained within the `main()` method. You have to keep them separate, like this: public class PrimeNumber { public static void main(String[] args) { ... } public static boolean isPrime(int n) { ... } } You could then call the method, from `main()`, by doing a … | |
Re: > for i = 3 to i * i < number // start at 3 since 1 and 2 are prime Shouldn't it be `i * i <= number`? Otherwise some square numbers will be improperly considered prime (e.g. 9 or 25). | |
Re: An external variable has a specific type. Therefore the compiler will do type-checking when compiling. You can also assign a value to a global variable at run-time. As WaltP said, Macros are very different. When a Macro is referenced, the compiler simply copies the value and pastes it in the … | |
Re: > Well you could parse the c-string with strtok. And why would you rely on a simple C function in a managed language? > how can I put an incrasing variable (for n splitted words) instead of 'Console.WriteLine(word)' I honestly have no idea what you're asking here. Could you elaborate? | |
Re: Please show your code, and explain what the issues are before expecting any help here. We're not here to do your homework for you. | |
Re: Try [this](http://lmgtfy.com/?q=c%23+face+recognition). | |
Re: You should create a `Random` class at the beginning of the method, instead of using the `Math` class. The `Random` class gives you the option to generate `int`s directly. `nextInt(n)` returns an integer in the range 0 (inclusive) and `n` (exclusive). So, in your case, you would need to use … | |
Re: It is as **JamesCherrill** said. I'll try to explain each of your question as best I can. To simplify, let's assume there's a class called `NewGenericDemo<E>` that derives from `GenericDemo<E>`. K, here we go: 1. In your class, `E` refers to a class which dervices from `GenericDemo`. When it does … | |
Re: It's possible... you'd have to use Reflection (essentially it makes the program source code aware). I would highly recommend you do not do this, as it can be very prone to bugs/errors and is generally reserved for debugging (or possibley very speciallized circumstances). What are you trying to achieve? | |
Re: There is an exception being thrown, you can see it by changing your event handler: private void watcher_Changed(object sender, FileSystemEventArgs e) { try { ... } catch(Exception exc) { MessageBox.Show(exc.ToString()); //Or Debug.WriteLine(exc.ToString()); ... } } The issue is that the FileSystemWatcher fires the event from a different thread then the … | |
Re: You generally can't, but you can try the Flag Bad Post link to get the attention of the moderators. Quick thing, Visual Studio Express doesn't have an evaluation period; maybe you downloaded the trial version by mistake...? Try this [link](http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express), and download Visual C# 2010 Express. The programs are split … | |
Re: According to the second line, its occurring in the `ProjectGUI.findbuttonActionPerformed()` method at line 278 in the ProjectGUI.java file. We'd need to see your source code to help you figure out why... | |
Re: Is there a question here other than doing your assignment for you? Show some effort and ask some specific questions if you want help here. | |
Re: The spec tells you to use void methods for everything except for the calculation of gross pay, and they are referring to the return type. They want you to use the [out](http://msdn.microsoft.com/en-us/library/ee332485(v=vs.100).aspx) and [ref](http://msdn.microsoft.com/en-us/library/14akc2c7(v=vs.100).aspx) modifiers to "return" the value to the calling method. Check the links for more info, but … | |
Re: `Thread`s only support two types of delegates, ones with no parameters, and ones with a single object parameter. You can use structs (or classes, depending on the circumstances) to pass in multiple parameters, like so: public struct MyParams { public string Name; public int Id; } ... public void RunThread(object … | |
Re: If you want to set an instance variable an any Object (including a Form), the variable itself must be public. The access level of the function it is instantiated in doesn't matter. If it is declared in a function, then it is a local variable to that function, and inaccessible … | |
Re: You shouldn't have to download it; it should be included with the .NET Framework. If you are using Visual Studio: 1. Right click on **References**, in **Solution Explorer** under the project you want the reference included in. 2. Click **Add Reference...**. 3. Click the **.NET** tab. 4. Select **Microsoft.VisualBasic**. If … | |
Re: Could you post some code to show what you are trying to accomplish? And please quit bumping your posts; I can't speak for others, but I tend to read posts with 0 replies first. | |
Re: What about `SetTimer()` (see [Timers](http://msdn.microsoft.com/en-us/library/windows/desktop/ms632592(v=vs.85).aspx))?. This allows you to specify a Window handle, so a `WM_TIMER` message will be posted to the message loop when it expires. Keep in mind that this won't be incredibly accurate. | |
Re: You just need another `For Each` loop, instead of the `If` statement, to iterate through each `XElement` of `product.Elements("productsessiondata")`. | |
Re: Nobody is going to do your work for you. Give it a try, show us some work and ask specific questions if you run into any issues, if you want any help. | |
Re: You could use the [Card Layout](http://docs.oracle.com/javase/tutorial/uiswing/layout/card.html) for this. Basically, you add `JPanel`s to a container, and call the `show()` method on `CardLayout` object to specify which panel to display. | |
Re: Just so I'm clear, you are instantiating a new instance of your Form (i.e. `new SomethingForm();`) before each call to `ShowDialog();`, correct? I tried your code, and it seems to be working. Also, a stack trace is nice, but what is the actual exception you are getting (class and message)? | |
Re: It's shorthand for: carry = carry / 10; You can use it for many operators, see the **Compound assignment** section of [this article](http://www.cplusplus.com/doc/tutorial/operators/). | |
Re: That seems way more complex then it needs to be. You should be able to do that with one for-loop and without the `dp` array. You can use a few of variables, such as `count`, `max_count` and `max_num`. Use `count` for each sequence. Once your done with a sequence (i.e. … | |
Re: This isn't a free tutoring service. There are plenty of free easy online tutorials for just about any programming language. | |
Re: If we're just talking about C#/.NET, I've had a much better experience with WPF over WinForms. As long as you know what you are doing, it can be pretty easy to make some fairly complex GUI's work very well across different systems. No solution will ever be perfect though... | |
Re: Try [this](http://www.dreamincode.net/forums/topic/45693-controlling-sound-volume-in-c%23/). Changing the system volume relies on the Windows API, which requires [COM Interop](http://en.wikipedia.org/wiki/COM_Interop), so there will be no simple way to do it (aside from finding a third-party library that provides a simplified interface, which I haven't seen). There is no way to do it directly with the … | |
Re: How is it any different? What's your code for exporting in a Form? And what's not working about it in a console application? You might simply be missing references... | |
Re: Were you asking a question, or protesting proper use of OO design? | |
Re: The `^` is used for XOR operations; see [Boolean Operations](http://www.cplusplus.com/doc/boolean/). | |
Re: Couple things: 1. Titles that start with "PLEASE HELP ME" are annoying. 2. Using all caps in bold for your post is even more annoying. Now, as for your code. I don't understand what a "sequence" is supposed to be; it looks like your putting one result into a text … | |
Re: Did you have a question? Or did you want someone to do your homework for you? | |
Re: Here ya go: [Win32 Assembly GUI](http://lmgtfy.com/?q=win32+assembly+gui). | |
Re: Start by declaring a boolean variable before the for-loop: bool correct_pass = false; Then, you set it to true inside the for-loop, when the password is correctly entered: for (int i=0;i<3;i++) { ... if (pass=2468) { correct_pass = true; break; } ... } Then you just check to see if … | |
Re: Try [this](http://lmgtfy.com/?q=open+source+bpm). | |
![]() | Re: If you want performance, you should use a low level language (such as C/C++). If you want to simplify the coding, you could use a managed language (such as Java, C# or VB.NET). That is not to say that a managed language wouldn't be more than sufficient. For instance, [Paint.NET](http://www.getpaint.net/) … |
Re: If you're using WinForms, you could use the [MaskedTextBox](http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx) control. | |
Re: > Pls Be early To provide code in two three days. And when did you start signing my paycheques? > I am new in programming Well, this is a great opportunity to learn. Give it a try. | |
Re: From [WM_TIMER message](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644902(v=vs.85).aspx) in the WinAPI documentation: > The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue. | |
Re: Start with the [basics](http://lmgtfy.com/?q=win32+tutorial) of getting a window to display, and go from there. | |
Re: I ran your code, and it seems to be working fine (although you should probably use `e.Index` instead of `checkedListBox1.SelectedItem`). Did you register the methods with the corresponding events, either through Visual Studio's properties panel, or with the following code (in the Form's constructor)? checkedListBox1.ItemCheck += checkedListBox1_ItemCheck; checkedListBox1.SelectedIndexChanged += checkedListBox1_SelectedIndexChanged; | |
Re: What do you mean by "upload"? Assuming you want an image to stretch/zoom to fill the PictureBox, you can use the [PictureBox.SizeMode](http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.sizemode.aspx) property. | |
Re: Unless you have a system with a MIPS architecture, you'll need to use a simulator to run it. A quick Google search turned up [MARS MIPS Simulator](http://courses.missouristate.edu/kenvollmar/mars/). FYI, a program to converters assembly language into machine code is generally called an assembler. |
The End.