Nerseus
*Experts*-
Posts
2607 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nerseus
-
You can view the Call Stack (ctrl-alt-c) when your program breaks. It will show you all the code that's been called. I would guess you'll see two lines of code (or maybe a few more) being called over and over. One of them should provide clues. If you can't get it, let us see some more of your code... -Nerseus
-
No built in method that I know of. Check out this article - it might provide answers. -nerseus
-
Actually, they're the SAME engine. You can backup databases, users, etc. from one and restore to the other. The full SQL Server comes with a bunch of nifty tools and the ability to license more users, but costs a lot more. The free version is harder to set up (command line switches, no GUI) and "tweak" without some extra tools, but is free. If you have Visual Studio (not sure which version - I use Enterprise Architect), you can tweak many things in the MSDE database through VS's Server Explorer. You can add tables, keys, etc. there. -nerseus
-
1. Not sure why it didn't work. What properties did you set on your adapter - can we see the relevant code? 2. It's generally faster if you put in the tables and relationships yourself though you can use FillSchema to get the table structure. I don't think FillSchema builds the relationships, but it might - you'd have to test. -nerseus
-
If you check out the help in MSDN, you'll see that Math.Round is supposed to round the way it does. It might not make sense to "most" of us, but it now matches the standards. Go figure. Any easy solution is to offset your number and use Floor. If you want to round to the nearest whole number, use: Math.Floor(d + 0.5) For 1 decimal place: Math.Floor(d + 0.05) For 2 decimals: Math.Floor(d + 0.005) You get the idea. -Nerseus
-
If you use Now.ToString("dd/MM/yyyy") it should override any built in windows settings. I thought the Windows settings were only used for formats like "d" or "D". Can you double check that using the above doesn't work on some machines? -nerseus
-
Seems easiest to me if you: Don't do any flashing :) OR Clear the text and then reset it - always have the color as Red. To "save" the text, maybe put the text in the Tag property. Something like: ' Set this in the designer: Label2.Color = Color.Red ' In your timer/wherever If Label2.Text.Length = 0 Then Label2.Text = Label2.Tag.ToString() Else Label2.Tag = Label2.Text Label2.Text = String.Empty End If -nerseus
-
If you're a Home User running XP Pro (taken from Work maybe?), you're probably running a lot of things you'll never use (services are a prime example). To know what you can remove and can't (or shouldn't), you'd need a lot of reading. You can start with the "tweak" sites, but that's just the beginning. So in this respect, you could potentially speed up Windows a LOT, but you have to have a lot of knowledge to know what to disable, turn off, tweak, etc. There's no easy switch you can flip to speed it up. Actually, if you have an older process (486), you might be able to toggle a switch and speed up your computer. But I doubt you have such a switch and doubly doubt that it would be in the "slow" position. If you had such a computer running Windows XP, you'd have committed suicide a long time ago. -Nerseus
-
Writing a complex program doesn't proclude an individual from learning how the underlying logic works. Hopefully, any complex system is well documented so that an interested user could read the specs and see what's really going on without delving into code. In fact, I would hope that any complex program that needs to be written as a computer program would first be spec'd out before ANY coding was done. You can't code a solution to a problem you don't fully understand. Or at least, not a good solution. Imagine trying to "solve" a calculus formula without really knowing calculus (or at least the parts related to the problem). Making complicated tasks easy is what most applications DO - it's their primary goal. Hopefully a user will already know what it SHOULD do, they just want the application to do it for them. If there are ambiguous parts, they can/should read the spec. No program, in my mind, should be a "black box" - only "clear" boxes. -Nerseus
-
If it inherits from Windows.System.Form (or some other class that inherits from that), then the designer should recognize it automatically. Does the file you chose have the proper extension (cs or vb)? If not, the project may think it's a resource and not compilable source code (you can change that in the file's properties - click on the file in the solution explorer than open the properties window). -Ner
-
Well first, a hashtable is just a quick way to associate keys to values and retrieve them. If you want to store multiple fields, you probably want something more advanced - like a DataSet. But if you really want to use the hashtable, you could convert both the security number and the address to strings, and use the concatenated string as the key. I can't think of a practical use for that, but who knows? -Nerseus
-
I think he wants a custom object to show up in the properties window, complete with a little "+" to allow expanding and showing the variables of the subtype. Will that happen automatically? -Nerseus
-
Uhm... that was the whole point of this thread :) I got mine the day it came out at Best Buy for $39. I think it's back to it's normal price now, $49. These are US prices - not sure what it would cost elsewhere. Definitely worth it for a Cure fan, unless you're a SUPER Cure fan like kahlua001 and already own everything. :) -Nerseus
-
I know this sounds like a blowoff answer, but I wouldn't worry about speeds of ANY language at this point (maybe OOP COBOL) unless you're doing a game. For anything but pure looping and number crunching, pretty much all the major languages and compilers offer blazing fast speed. Now if you're writing a game I'd recommend C++ simply because it's the most "accepted" and would give you best chance of landing a job. While other languages might be just as fast or close (and maybe easier to use), they just haven't been as accepted yet. Maybe not the best reason to choose a language, but there are worse reasons. As for C# becoming more "standard", .NET in general (including C#, VB.NET, etc.) is going to be the new language used by SQL Server, if MS keeps to its plan. Meaning, you'll be writing stored procs in C# or VB.NET. Once that goes live and IF it becomes accepted, that would pretty much assure the future of C# since data access code sticks around for a long time. -Nerseus
-
I would find it very odd indeed if WinZip's software had a "backdoor" that allowed breaking its password protection. To speed up the password attacker, you can usually limit it to certain characters such as letters, numbers, and simple shift-numbers. That should greatly speed up the searching. You can also have it start with 8 chars and work up. I wonder why you can't get the former employee to give up the password? Seems like you'd have grounds to threaten a lawsuit if he refuses to help solve the problem. Now if you just can't find him, that's another story. -Nerseus
-
I'm not sure if there's any "easy" solution to this. One option *might* be to use some new software from MS (or at least, I heard MS bought it) that allows running a "virtual PC". It allows running a program that simulates another PC. The other PC can run DOS, linux, Windows 95, whatever. I've seen a demo and it worked pretty good. It was the slowest thing I'd ever seen (Windows XP was "hosting" a virtual Windows 2000 Server), but it was doable. If it's cheap or free, you might have the virtual PC run an old copy of DOS 6.x (god, I can't even remember the last version anymore) if you can find one. I may have 2 or 3 if you really need it :) -Nerseus
-
I did some VRML about 4 years ago. My experience back then was that it sucked - simply put, there was no "standard" viewer. Last time I checked (about 6 months ago) that was still the case. Meaning, anyone viewing your page would need to install their own VRML viewer. There are two or three major ones but I had less than optimal success. If you really need/want interactive 3D on a webpage for a wide audience, I'd look into other options. Of course, if this is only for a few friends/family or for an intranet (where you can control the software used to view your website), then it might work for you. -Nerseus
-
Ah, you need this as a property on a Control, so that it shows up in the Properties window. That's a bit different :) Unfortunately, I don't know the right decoration to add to get that to work for a custom class. You might try divil as he's the resident Custom Control guru. Or try looking in the MSDN help custom attributes/decorations (things like [WebMethod] that you put before a function/property to tell the compiler to add extra info). -Nerseus
-
I would not store the strings with backslashes - seems more logical to store the data as-is and only add the backslashes as needed, when converting data coming out (a stored procedure, in the query, or through code). For that, I'd use a simple function that escapes everything that's not a letter or digit, just to be safe. If this is on a .NET webserver you can use the Server.HtmlEncode function. If not, I think you can still use the static function - just make a reference to System.Web. -Nerseus
-
You have to make your own struct or class and expose your property as one of that type. Say your "property" is "Vector" with 3 subproperties "X", "Y" and "Z": public struct Vector { public double X; public double Y; public double Z; } public class MyClass { public Vector Vector; } // Farther down in code: MyClass c = new MyClass(); c.Vector.X = 1.0; c.Vector.Y = 2.0; c.Vector.Z = 3.0; NOTE: In C# you can name a field the same as a type, as shown with "public Vector Vector" above. This is semi-common practice when you don't want to extend the Vector class but really just use it as a grouping mechanism for other properties. You can't do this in VB.NET as far as I know as it won't let you declare a variable like that (same name as the type). You might be able to name the struct "_Vector" or something similar, then name your property Vector. -Nerseus
-
My link was for a Canadian man, around 25 or so, selling himself for a Valentine's date. It was actually pretty funny if you read through his comments. His name clinched it for me, lord of the bling. -Nerseus
-
Don't discount cacheing as an alternative, by the way. I don't know how big your tables are or how often they change, but you might be able to get a scheme in place for downloading lookups. For my current project (or set of projects), we utilize client side cacheing for a LOT of things - mostly lookups. For 99% of the lookups we have, they definitely won't be changing very frequently - every few weeks at the most, most just once a year. I pull them down locally and keep them in memory. Even filtered lookups like you're implementing can be done pretty easily. On every keypress (or after 2+ or on a timer, as above), check some local cache for the values. If they're not there, get them and cache them. For example, use a static hashtable variable to keep all the lookups, the key could be the first letter of the lookup - when the user types the first letter, get those lookups and cache them. As they type more letters, just filter the local DataTable. Don't rush to dismiss cacheing because they "won't be as dynamic as getting them each time". That argument only makes sense if they might actually be changing pretty often. -Nerseus
-
You can take "drawing up a contract" however you want - or, what makes sense in your position. If you're doing this all on your own, I'd say a few pages would do. You can probably find something for free or $10 online that says most of what you want. The trouble is, for really small projects, writing up a contract seems like too much work, which is the *exact* type of contract that needs things in writing :) For example, say you agree to do some webpages for someone - all static text. You think it will take 40 hours of work so you tell them it will be $800 (40 * $20), or whatever your rate is. but unless they're giving you the exact text to put in there, chances are good that you're going to go well over that 40 hours. If you're like most, you'll fit it into 40 hours (maybe some extra but you can't charge for them - no written contract to allow for it). You give it to them but they need some typos fixed and a link added and a few other super-easy changes. Sure, super-easy to them, a few hours of work for you. Before you know it, they've eeked out another 8-12 hours of work and you get no money for it because they, and maybe you, think it's Ok. The problem with the above scenario is that there was no contract to provide an expectation. The user has one opinion of what he's getting, you have yours and I can guarantee that they will never, ever be the same. A contract, even a simple one, could list out what they should expect. For example, they must provide the exact text - you just get it formatted and add the proper HTML tags. Or maybe there are extra hours added in because you'll have to talk with them to find out exactly what text they want. There is a LOT more to know about having a good contract. I can't remember the sites I used to use. I had the advantage of learning from a great boss who had done contract work himself. As for whether to sell a program outright or keep the rights yourself, there are generally two rules: they keep the code or you do. If they keep the code, then they pay a higher rate. Say this equates to $30/hour. Now if you're thinking the program has resellable qualities, then tell them "I'll write this program for you, but I get to keep the code and reserve the right to reuse it and resell it later. As a bonus to you, I'll..." and then you can charge them a lower rate or cut out some of the hours. If you want to keep the whole program, all code, then lower your rate - say $15-$20 per hour. If it's a larger program and you only want to reuse a portion, let them know. That way you could get a higher rate for their part, and a lower rate for the reusable part. Unless they want to negotiate some kind of percentage off your reselling (most companies won't), they should feel lucky they're getting a lower rate for the same product. Avoid negotiating anything with them that lets them get some percentage of the code if you reuse it. It will get WAY too complicated, since you're likely to change much of "reusable" code when you go to resell it. In most states (everyone I've worked in), if there is no contract then the code you write becomes the property of the company that paid for it. If you want to reuse it or resell it, make sure you get it in writing. On the bright side, there are many parts of your code that are reusable even if you don't have a contract that states so. For example, there are only so many ways to write a for loop that deletes rows from a DataSet. If you have that in a common function you can reuse that from project to project even if the original project didn't have a contract that stated you keep your code. Now, if you're just writing some webpages for folks you know, chances are you won't want a contract. Just make sure that you let people know up front what they can expect. And remember this, if you show them your progress often, you can avoid redoing work later. If you get a job for 40 hours of work, don't wait til the end to show them what you've done. Show them your progress every day so that they can give you feedback. That's also a good way to let them know EARLY that changes they want made might make your original estimate go over. It's a hard subject to talk about for some, but if you're on your own then you've got to speak up for yourself. -Ners
-
Remoting should be very similar to webservices - just limited to an intranet. It might be ideal for your situation. Do I get points for guessing what you were doing (dynamic filtering of a combo)? :) If your app is like most others, it's got a lot of data entry. Or, once a user gets it they'll mostly be using the keyboard. It can sometimes be hard tell users that what they think they want("I want this combo to show me ALL 10,000 values!"), is different from what they really want. For example, 9 out of 10 times a real end-user will tell you that they want to type in a code, not select it from a list. Maybe it's a medical procedure code and they know it starts with 19 but can't remember if it's 191a or 192c or something close. With that in mind, a custom solution often works great. Two common solutions come to mind: 1. Only fill the combo after at least X number of chars are typed. Once a combo gets 2 chars, run your search and fill the combo. Normally, knowing the first two chars of a lookup table will get you to no more than 100 rows. If they delete a character (back to 1), remove the items and wait for the next char again. 2. Put a timer on the change event. After 200ms (or whatever a user deems appropriate), run a search. With webservices, you could even start the search asyncronously on each change event and fill it when the query was done. But running a query on every keypress is going to have some users annoyed, more if they're keyboard-centric as most data entry end-users are. I'd make sure you're developing prototypes that some end-users or super-users can test before you get too far into prototyping. -Nerseus
-
Where is your code running that calls into the ActiveX control? Is it from a website or from an EXE running through the browser? Is the file being saved to a network share maybe? Is the COM component hosted in COM+ or MTS? If the Access Denies is because of the file system, it's likely that the identity your EXE is running as doesn't have permission to the disk. It might also be that your process can't create the ActiveX object (can you verify where the error occurs)? -Nerseus