624 Posted Topics

Member Avatar for erikdeboy
Member Avatar for thines01
0
703
Member Avatar for celop

How are you supposed to be anylizing this data? A formal conecpt analysis requires some parameters (are you looking for even, odds, primes, and squares?) Do you have a tree-like class structure made to hold this data, or is this what you are having troubles creating?

Member Avatar for celop
0
107
Member Avatar for NetJunkie

I started fiddling with QBasic and batch files when I was 10. Funny thing is, my company mostly uses Visual Basic 6 for everything so I am not too far off of what I was doing back then :P (I am 23 now)

Member Avatar for Reverend Jim
0
968
Member Avatar for Dadkhah

What protocols does your PLC support/implement(a very common one is modbus over TCP)? Or are you responsible for writing this as well? Are you comfortable with working directly with sockets, or perhaps your PLC has an API that wraps all the socket stuff for you? More information is required to …

Member Avatar for skatamatic
0
180
Member Avatar for MasterHacker110

How do you plan on writing something as advanced as an OS with a language that you are not even sure can compile to executable files? Do you know what a kernel is? How about a HAL?

Member Avatar for Godfear1
0
203
Member Avatar for lxXTaCoXxl
Member Avatar for skatamatic
0
280
Member Avatar for lxXTaCoXxl
Member Avatar for tpb_rocpile
0
250
Member Avatar for king03

Do a solution wide text search for "class Square" to find where the duplicate is being defined.

Member Avatar for lxXTaCoXxl
0
149
Member Avatar for lxXTaCoXxl

Why not use a class to hold the exponent/variables/bases? class Term { public int Base {get; set;} public string Variable {get; set;} public int Exponent {get; set;} } private string DerivativeOfPolynomial(IList<Term> terms) { return string.Join(" ", from term in terms let tempExponent = term.Exponent - (term.Exponent > 1 ? 1 …

Member Avatar for lxXTaCoXxl
0
146
Member Avatar for Scuzzyy

First of all, this looks like C++ not C#. Second of all, I suspect that the error is either caused by the curly brackets at line 2 and/or 14 as well as the typo on line 13 (get rid of the '>' character).

Member Avatar for skatamatic
0
133
Member Avatar for king03

Errr. I think he just wants to write it to learn something, not to compete with Tetris commercially. What conecpts are you unfamiliar with in creating this game?

Member Avatar for lxXTaCoXxl
0
2K
Member Avatar for nthabiJacq

A perfect number is a number that is equal to the sum of its whole factors, excluding itself. Like 6 (1 + 2 + 3 = 6). So you need a function that calculates the sum of all factors then compare this with the number itself. public static int SumOfFactors(int …

Member Avatar for lxXTaCoXxl
0
228
Member Avatar for ariez88

I wouldn't recommend using arrays at all in C#. They don't play nice with a lot of other objects. A list of lists of ints would probably work best for you here: var JaggedList = new List<List<int>>(); for (int i = 0; i < 50; i++) JaggedList.Add(new List<int>(PossibleNumbers())); You can …

Member Avatar for thines01
0
167
Member Avatar for Panathinaikos22

This looks like a DOS attack. Why would someone volunteer their (presumably paid for) server for this?

Member Avatar for Panathinaikos22
0
132
Member Avatar for lxXTaCoXxl

I'm curious as to how CopyManager.cs can set the HexAddress.Address property if the 'set' has been marked private.

Member Avatar for skatamatic
0
121
Member Avatar for king03

Asteroids is a classic. And is a nice skeleton for building a class hierarchy out of: abstract class GameOjbect {} abstract class MoveableObject : GameObject {} abstract class StaticObject : GameObject {} class Asteroid : MoveableObject {} class Ship : MoveableObject {} class ScoreText : StaticObject {} I could go …

Member Avatar for seslie
0
122
Member Avatar for tendaishava

Have you tried stepping through it? I see some fishy looking lines, namely: if (true) ... else Seems like some useless logic. Try stepping through it and post your findings.

Member Avatar for skatamatic
0
337
Member Avatar for ogsirus

Do you want it to actually animate as if it were clicked (mouse moves, button is depressed)? Or just perform the same functionality? Typically (in my experience anyway) it is best to avoid calling event handlers when unnessecary. It may be benifitial to have the event handler call a method, …

Member Avatar for skatamatic
0
196
Member Avatar for M.Waqas Aslam

[RealVNC](http://www.realvnc.com/) is a good-ish remote connection tool. It's open source and .Net winform controls are available for free as well.

Member Avatar for Max_Trottier
0
168
Member Avatar for king03

Well, if it's written in C# chances are its object oriented. Basically OOP covers anything that has a class hierarchy. I know C# supports a minimal amount of structured and functional programming, but usually this is just an 'effect' and you are actually working with objects, so you can generally …

Member Avatar for muze
0
127
Member Avatar for newbie14

I wouldn't reconnect to the database every timer interval. I would connect to it once then poll it for new data each time and disconnect from it when you don't need the updates anymore. This will eliminate all the overhead of establishing a connection with a database. Also, if you …

Member Avatar for skatamatic
0
1K
Member Avatar for infinitus

Try calling flush after WriteEndDocument. I think it should still be writing everything up until that point though...

Member Avatar for skatamatic
0
179
Member Avatar for PatSharbaugh

Neat tool, could come in pretty handy. And the recursive approach is well thought out. But why not write the xml file the way that you want it rather than making a tool to fix this problem?

Member Avatar for PatSharbaugh
0
2K
Member Avatar for eoop.org

Are you making a web browser? Google Chrome was built using WebKit. [This](http://webkitdotnet.sourceforge.net/) looks like a good implementation of it in C#. But really, you have to ask yourself "Why am I making a webbrowser when the market is clearly dominated by really good ones already?". If the answer is …

Member Avatar for eoop.org
0
150
Member Avatar for VicGirl
Member Avatar for king03

1 - Doesn't have to be. 2 - Possibly, depending on how much time it takes to make the graphics look good 3 - OpenGL has a steep learning curve, XNA is OK but for something simple like tetris simple GDI+ calls would probably be easiest 4 - There is …

Member Avatar for thines01
0
225
Member Avatar for suneye

Depends on how the DVR works. If you are lucky, you can connect to it on a different port per camera and stream video over http. Have you looked into any of the documentation for your DVR? Generally people here give help on the programming aspect, it will be up …

Member Avatar for skatamatic
0
394
Member Avatar for Panathinaikos22

What IP are you using to connect? You will need to make sure you use the **external ip** of the remote endpoint's computer, not the internal NAT IP, then make sure the port gets forwarded to the right computer in the router settings.

Member Avatar for Panathinaikos22
0
411
Member Avatar for CesarG

What do you mean by 'Command Line Caller'? Are you looking to write an application that **accepts** command line arguments, an application that launches applications **with** command line arguments, or something that places VOIP phone calls **from** the command line? All three are pretty simple to accomplish (with a good …

Member Avatar for skatamatic
0
392
Member Avatar for JasonWung

It makes sense to load data from the file in a seperate thread, but is by no means required for this specific situation. The time it takes to load 50 lines of text is probably so small that it won't affect the user in any way, so you can probably …

Member Avatar for JasonWung
0
121
Member Avatar for ghada ali

Yep, we definately need some more code to help you. It seems like **this** is getting disposed of somehow - could you be calling close more than once while another thread is preventing your process from closing? If you are trying to close your program altogether, calling **Application.Exit()** might give …

Member Avatar for skatamatic
0
161
Member Avatar for T0pAz

Have you tried [this](http://social.msdn.microsoft.com/forums/en-US/clr/thread/c957959e-0f0c-422e-a5be-4ccfdd12e63d)?

Member Avatar for T0pAz
0
2K
Member Avatar for riahc3

System.Xml.XPath and System.Xml.Linq both have their strengths and weaknesses. I preffer the Linq approach, but maybe you won't.

Member Avatar for skatamatic
0
744
Member Avatar for riahc3

I couldn't get that to run. Kept throwing an invalid cast exception when casting Thread.CurrentPrincipal. I did, however, get this to work: var x = new WindowsPrincipal(WindowsIdentity.GetCurrent()); if (x.IsInRole(WindowsBuiltInRole.Administrator)) //You are an admin else //Not an admin

Member Avatar for riahc3
0
132
Member Avatar for sh0na
Member Avatar for skatamatic
0
52
Member Avatar for Thethief92

Momerath is right. The message isn't a very good way to determine the exception origin. You can use multiple catch blocks for each expected exception type, and 1 final one with the general exception: try { int i = x / y; } catch (DivideByZeroException ex) { Console.Writeline("Divide by zero …

Member Avatar for skatamatic
0
110
Member Avatar for skatamatic

I am trying to remember a bit of bitwise math to deal with some CAN bus stuff in c#. Basically, I am trying to create a class that takes in an integer that represents an identifier portion of a CAN frame. They look like this: Priority - 3 bits EXT …

0
104
Member Avatar for zachattack05

Depending on how the Dlls are designed, you might need to make some wrapper classes to expose the dll classes in a web-friendly way.

Member Avatar for skatamatic
0
158
Member Avatar for riahc3

Make a form that is derived from a regular form and put that code in it. Then to make forms that use that code just derive them from it. If you want to use it between projects you will need to either make a dll and reference it, or include …

Member Avatar for riahc3
0
90
Member Avatar for kutuup

It really looks like you need to think about your structure, or at least improve the clarity of your logic. It seems, for the most part, that the majority of the logic is used to determine possible moves based on a given 10x10 mapping that might have obstacles or something …

Member Avatar for skatamatic
0
162
Member Avatar for zachattack05

I, personally, would keep them seperate on the SQL side, but possibly have a RecordManager in the client side (C#) that would enumerate these operations. But it's totally up to you! If you are working with others just make sure you document everything, or at the very least make sure …

Member Avatar for zachattack05
0
138
Member Avatar for memomk
Member Avatar for memomk
0
108
Member Avatar for Andy90

Create a form, play with the different 'BorderStyle' properties to make it splash screen esque, then have this form shown in Program.cs instead of your main form (probably called Form1). In this form, have some sort of timer that controls how long it displays for, then when the timer elapses …

Member Avatar for Mitja Bonca
0
160
Member Avatar for Alicito

You can use the extension method .Concat() to combine 2 linked lists together. But yeah, no pointer magic like you are looking for in c#. All of the properties are readonly. I don't imagine it would be that hard to write your own linked list, however. As for accessing items …

Member Avatar for Momerath
0
261
Member Avatar for M.Waqas Aslam

You need to make sure your command is actually returning some data. There is a pretty good chance that it isn't (hence the null reference exception caused by trying to convert a null reference to an int16). If this is the case, I recommend checking for nulls and having a …

Member Avatar for arunkumars
0
183
Member Avatar for hastingo

With sockets and more effort than you put into your post. (Albeit not much more)

Member Avatar for thines01
0
193
Member Avatar for riahc3

Sounds like you need a modal dialogue box. When you are displaying the form, instead of calling Show(), use ShowDialogue(). This will block the calling forms UI until the form completes. It will also return an enumerated DialogResult that you can check (but also need to set). You can use …

Member Avatar for skatamatic
0
74
Member Avatar for Andy90

I don't think it's easily done (I bet there's some sort of Win32 function for it, but good luck finding it). What I would do is wherever SetCursorPos() is being called, set a flag just before it (something like ProgramMovedMouse=true). Then in the Mouse_Move event check this flag before showing …

Member Avatar for skatamatic
0
214
Member Avatar for skatamatic

Lately at work I've been asked to create a .Net form full of DevExpress controls into something easy to work with. DevExpress controls are the opposite of this, most guages with a needle and a display box are actually 10 different controls combined. I am looking to simplify this into …

0
95
Member Avatar for zachattack05

Sounds like you should make your own control. Basically a combination of a label and a checkbox with no text would work. Clicking on the label (the text portion) would fire the select event handler, while clicking on the checkbox would fire the check handler. Although I could just be …

Member Avatar for zachattack05
0
124

The End.