624 Posted Topics
Re: I think internally the delegates that subscribe to events are held in a list. Therefore they are fired in the same order as they are added, from start to finish (or maybe finish to start but almost certainly 1 of the 2). If you are really worried, write a program … | |
Re: Why would you want to compare memory like that? If you want to get that low level use a different language. If you **really** need this to work in C#, you will need to DllImport whatever windows library that contains memcmp, marshall each parameter and return value to conform to … | |
Re: Eeek. I sugguest putting a Thread.Sleep() in that loop to avoid murdering your CPU. As for the actual problem, what logic are you trying to accomplish? You seem to have a bunch of extra brackets that are reducing clarity, even though logically none of them are required: while (t3.IsAlive || … | |
Re: The positions are worth whatever the employer makes them worth. Both positions are valuable in IT, but neither are a management position. I wouldn't lose too much hair over it and just do whatever you feel is best for you. | |
Re: Depends how you are displaying it. If you display it in a richtextbox or as an html page then there are flag constructs for that. If you are displaying it in a console or some other 'dumb' display then no, you can't. If you REALLY need it to work in … | |
Re: Have you considered simply calling Show() and Hide()? This way you don't have to reinitialize all the data between controls that are switched between often. | |
Re: Arrays aren't very suited for C#, in a language like C++ this problem would be much simpler since you can treat a multidimensional array like a flat array. Linq doesn't play nicely with arrays, and neither do many .net objects. In C# you need to convert it, which is a … | |
Re: Hmmmm... it looks like Feed is your document element. This means that it is the highest level node and therefore every other node is a child of it. This being the case, you will need to simply loop through iterate through its child nodes until its child's element name is … | |
Re: I really don't see how that error could happen (despite the terrible tabs). Your best bet is to figuire out what s is when it throws the exception, and make sure there's an actual file there. | |
Re: A really basic way would be to hash their input key and compare it with a constant hash key. It's important to keep the constant key hashed so that the actual key can't be determined. MD5 is a pretty decent hashing algorithm you could check out. There's lots of other … | |
Re: Non sequential hard drive access is slow. Really slow. So if you have a lot of files, and no idea what's in them (locations of every word aren't pre-determined) then there's little you can do about this bottleneck. As thines said, if you want to do the indexing you could … | |
Re: It is very hard for you, the developer, to know when a different thread is accessing a control at the same time as a another thread. Basically you can consider the collision occurences random, since there are too many determening factors to consider. Say, for example, your richtextbox control was … | |
Re: If you are sending the same file to many different clients, it may be wise to keep the entire file(s) in memory to avoid harddrive bottlenecking. FTP and TCP are pretty viable options. But for speed and less server bandwidth consumption you could also look into the [URL="http://en.wikipedia.org/wiki/BitTorrent_(protocol)"]bittorrent protocol[/URL]. | |
Re: [QUOTE=thines01;1781685]I know this is not exactly what was prescribed, but it can be modified (as it will be good practice). I used Linq To XML for a portion of it because the elements have the same type only being separated by ID and name. The [I]real magic[/I] (and time-saver) comes … | |
Re: The WIN32 API is a set of libraries that allow you to interact with windows. In C#, you shouldn't need to use them very often (although that is not to say never!). This is because C# utilizes the .Net framework - which wraps a lot of the WIN32 API functions … | |
Re: You will need a flag (boolean member will work) that indicates the first click has been saved, then check this flag in the OnClick event. If the flag is set, save the point to a different location. Clear the flag after the second click has been processed (this is assuming … | |
Re: It's a way to uniquely identify your program and its assemblies in a registry. (Rather than using the version/name/date modified etc) | |
Re: Windows has a limit of 2GB of memory per process. How big is the file that you are trying to read? | |
Re: [URL="http://www.google.ca/search?source=ig&hl=en&rlz=&=&q=PDF+api"]This[/URL] is a good place to start | |
Re: [QUOTE=RomeoX;1777663]Thankx JX Man you are great, I wish one day I can be perfect in C# like you[/QUOTE] lol! Looks like you have a fan | |
Re: So you want to literally replace strings in your python script? Or did I just read that wrong. A side note, it seems like your quest data is more suited to an XML file than plain text: [code=xml] <quests> <quest name="MyQuest" objective="Some objective" required="false" ID="(Some GUID)"> <goals> <collection_goal item="Wolf bones" … | |
Re: [QUOTE=BitBlt;1769389]However, that's not the largest problem with the whole scenario. To the Original Poster: this kind of case statement is a common error in range evaluation. What happens with your boundary conditions? If the value was (for instance) exactly 12, should that be a child or a teenager? The way … | |
Re: You can't print the whole project but that's understandable since it's possible that the project has a lot of stuff in it that can't (or shouldn't) be printed such as binary resources, designer files, etc. Although I agree, there probably should be a macro to print every [B]source[/B] file. You … | |
Re: Where are you getting the data to fill them with? Is this using a relational database like INNODB? | |
Re: Looks like you will need to search by name for a driver in your list of depots. There's a few ways to do this - are you familiar with LINQ? [code] var FindDriverDepots = from x in mydepots where (x.drivers.FindAll(y => y.name == "Steven").Count != 0) select x; [/code] This … | |
How do you set the Z order on a control in VB6? There doesn't seem to be a property for it... It seems as though I have no control over which control takes the foreground :( I suspect it is based on the order they are declared in the .frm … | |
Re: Hmmm I am not too sure when the event OnPreInit fires but I suspect it is prior to any control init code (hence, on preinitialization). Try putting the code in a different event that fires on load, but after the control initialization (such as OnLoad or something similar). Bascially your … | |
Re: Try using the .Top and .Left properties of the control. You can make it relative to the form by using the buttons .Width and .Height members as well as the form's width and height. Although anchoring and docking will keep these ratios even for you. | |
Re: I would suggest you implement a DrawDice() method that takes a number as an argument, and draws the dice accordingly. Then you can call it with your random number :) | |
Re: Are you wanting to write this yourself or use something that has already been written? | |
Re: Static members and methods are instance independent. Internal members and methods are only accessible within the current assembly (similar to protected, but even derived classes outside the assembly cannot access them). | |
Re: Although this probably doesn't help your problem, there is a shorthand in c# for exactly what you are doing [code] if (cell.Value is Image) { ... } [/code] Edit: I [URL="http://blogs.msdn.com/b/vancem/archive/2006/10/01/779503.aspx"]looked it up[/URL] and your method actually runs faster. But if performance isn't what you're after then this is a … | |
Re: Post the image. What control are you using to show the picture? Most controls have a mouse enter and mouse leave event you can subscribe to, which you could use to trigger a timer or something to handle your fading. | |
Re: You could always use [icode]out[/icode] parameters to return the 2 roots. | |
I am having a problem with a COM interop in VB6. I am trying to write a .Net class in C# to access from within vb6 (something I've done too many time to count), and it works pretty well except that there's a strange error if I try to run … | |
Re: In C# ^ means XOR by default (to datatypes that support it, anyway) but I don't see why you couldn't overload it to make it a power. | |
I have a [I]fairly[/I] simply query that is taking a long time when run from C# via [icode]MySql.Data.MySqlClient.MySQLCommand[/icode] but the same query runs about 100x faster when I run it through the MySQL Workbench (GUI utility) Here's the code in C#: [code] tCom.CommandText = "(SELECT ID, Timestamp FROM jobdata WHERE … | |
Re: Hmmm do you know how to build a string (or list of strings) out of these numbers? [code] private string GetEvenNums(int Min, int Max) { string returnString = ""; for (int i = Min; i <= Max; i++) if (i % 2 == 0) returnString += i.ToString() + Environment.Newline; return … | |
Re: Are you looking for the internal, or the external IP (or both)? It is not very trivial to figuire out your external IP (the one the rest of the world uses to talk to you, not the one assigned to you by a NAT router) - in fact the only … | |
Re: Are you sure that the actual MusicVolume float is actually wrong, or is it the string that is converting it wrong? | |
Re: And considering this thread already has an answer to that question; read it and don't start a new thread >.< | |
Re: Ummm...Are you trying to convert a bool into text? If you are, try using .ToString() on the return value (this will convert a bool to its 'True' and 'False' string representation). If that's not what you are after, I have no idea what you are asking. | |
Re: Does the login interact with the same SQL db that the data is bound to? | |
Re: [QUOTE=thines01;1765579]I recommend ASP.NET with a C# back-end. If done with class-libraries (in assemblies), you can use ANY dot net language as long as your "stub" is in either VB or C#. ...but I still recommend C#.[/QUOTE] Aren't VB and C# the [B]only[/B] .Net languages? (I'm pretty sure J# and F# … | |
Re: [URL="http://www.codeproject.com/Articles/17031/A-Network-Sniffer-in-C"]This[/URL] does exactly what you are looking for (I think). | |
Re: [icode]System.IO.Directory.CreateDirectory()[/icode] is what you are looking for. | |
Re: [URL="http://stackoverflow.com/questions/2561104/c-sharp-winform-show-form-in-second-screen-and-vice-versa"]This link[/URL] talks about ways to calculate the .Left and .Top parameters to display forms on other screens. You do [B]not[/B] want to communicate directly with a VGA driver - your software will only work with 1 type of device with 1 type of driver hense the abstraction through things … | |
Re: Lol! I hope you aren't charging for software written with an illegal copy of an IDE! | |
Re: I would sugguest, for the sake of portability, you never use system() calls. Instead clear the screen manually, or just print a large number of end lines. | |
Re: C# and C++ are very similar in syntax (although quite a bit different under the hood). Pointers more or less get replaced with references (although you can still use pointers if you enable them using the [B]unsafe[/B] keyword) and everything is derived from a base class called 'object'. Once you … |
The End.