3,183 Posted Topics
Re: Provided the DLL references appropriate assemblies for your presentation (WinForms or WPF), displaying a form and returning the result is a no-brainer. The key will be deciding *how* you want your application to call into the DLL. It can be as simple as exposing a public dialog form and doing … | |
Re: > Can you acomplish the same thing with arrays for example an array containing both ints and strings? Yes, actually you can. The reason `ArrayList` works with multiple types is that it technically holds type `object`, which is your highest level base class. You can create an array of `object` … | |
Re: The .NET framework has three `Timer` classes. One is in `System.Windows.Forms`, one is in `System.Timers`, and one is in `System.Threading`. When you include more than one namespace with the same class name as a meber, the type must be fully qualified to resolve the ambiguity: var MyTimer = new System.Timers.Timer(); | |
Re: > What actual real type could I use instead of var? The type is `Form1`, since that's the name of the class, and it derives from `System.Windows.Forms.Form`: Form1 instance = new Form1(); | |
Re: This is untested, but off the top of my head seems reasonable: rowCount = dgv.SelectedCells.OfType(Of DataGridViewCell)().Select(Function(x) x.RowIndex).Distinct().Count() Essentially, each of the selected cells has a RowIndex property. You can use that to determine the count of rows and also any of the selected cell row indices if needed (which is … | |
Re: Note that `ToList` is a LINQ extension method, so apply references and `using`s appropriately. | |
Re: You're storing passwords in the clear? That's really not a good thing. :P A better system is to store at least a non-reversible hash of the password. Then when the user forgets their password, give them a temporary link to a reset form. | |
Re: > In C# what is the difference between arrays and lists? An array has a pre-defined size that cannot change. A list has a dynamic size. > Can we store the same type in a list as an array? Yes. > Can an list store objects and references to other … | |
Re: > So if you dont declare protection it is default set to private? Enumerations and interfaces are `public` by default when nested in a class. Top level types default to `internal`. Everything else is `private` by default. | |
Re: Yes. There are a number of APIs out there, including one that comes with Office, that will support this functionality. | |
I love barcodes. In my line of work (image processing and document imaging), barcodes play an integral part in high quality automation. As such, I've developed code from the lowest level of encoding and decoding barcodes up to using a number of libraries for working with barcodes. The biggest problem … | |
Re: You're going to get a cellclick event if a click is registered within the cell. That's at a higher level than focus of the internal control, so you can't avoid it. Your best bet would be to determine the mouse position for the click and cancel the cellclick if it's … | |
Re: > Reuben (12 years old, wanting to be a programmer when older) - please don't take my age into a beignner like you should learn python, it is a simple programming language you can do alot with it... Just verifying, you're 12 years old? Also, note that Python isn't some … | |
Re: > As soon as i open the program back up the data disappears. That sounds like you're doing something to truncate the table(s) when the application loads. I'd start by tracing what happens as the application loads in the debugger and keep an eye on the database to narrow down … | |
Re: The error says your `Button` class is missing a default constructor yet an object of that class is being created as such. Can you post the lines in particular from Chest.cs that are mentioned in the error? | |
Re: How does your database store slots? If the first available slot simply isn't present in the table, a simpler approach would be to query for used slots: select slot from inventory order by slot; Then figure out the first unused one in code: int next_slot = 1; for (auto it … | |
Re: I don't understand the question. Are you looking for a grayscale conversion and edge detection algorithm? Are you looking for some undefined range of image processing that includes those? Please clarify. | |
Re: > Cheating is a huge problem, and I understand it's not your problem, but you should reconsider your policies to help prevent it Our policies already prevent the cheating that we can control. For the cheating we cannot control, school policies and disciplinary measures can easily take over without us … | |
Re: I don't have the code readily available at the moment, but I could have sworn that source file types were allowed, including `.txt` and `.java`. What browser are you using? We've noticed issues before with different browsers as concerns file upload. | |
Re: > However, for the short term, the idea was to split this monster up into functionally related groups using the include mechanism. What I hope to learn here is if there are any hidden dangers in this technique. Provided the "modules" are independent enough to justify breaking them down, *or* … | |
Re: > Why can a private variable be accessed by a get and set modifier if its supposed to be private? Isnt a private variable supposed to be protected from modification from outside its class? A private member is supposed to be protected from *uncontrolled* modification. A property or method that … | |
Re: > You can program and do not need to understand what algorithm/data structure is Actually you do, even if it's informally. Algorithms and data structures are the core of programming. Any time you process data somehow, that's an algorithm. Any time you collect data in storage, that's a data structure. … | |
Re: While I agree in concept, in practice that would be too much to ask of the thread owner. Even the way things are we have problems getting thread owners to mark the thread as solved. Making the process harder by asking them to go through the thread and pick out … | |
Re: > Every job asked for a Bachelors plus a large handfull of other programming skills I was lacking. That's normal, unfortunately. HR departments are usually the first gatekeeper and will demand between reasonable and unreasonable credentials. This is where knowing someone on the inside is a good thing. > The … | |
Re: I'll answer your question with another question: what does string.compare return and what does that value represent? | |
Re: `cin>>x` reads the first word in the stream. `getline(cin,x)` reads the rest of the line. If there's nothing else on the line, `getline` won't read anything. It seems like you're expecting these two operations to not remove what they read from the stream, which isn't the case. | |
Re: > They re both alot alike, so which one would be better to learn? There you go. They're similar languages, and thus this makes it easier to learn both. So learn both. :) | |
Re: 1. Adding arguments inline is faster, but more dangerous due to the ease of SQL injection attacks. Using parameters is safer, but a smidge less efficient. In this case your first example is better. 2. Transactions have overhead, so you shouldn't use them if they're not needed. In this case, … | |
Re: > What if i put in the password is "8Aa9$" and i want it to be viewed as a strong password ? Even though it's not a strong password at all? ;3 Anyway, I'd probably go with something like this for your specified requirement: Private Function PasswordStrength(ByVal password As String) … | |
Re: > Yes, but this is in C#. Don't know if it can be done in VB. Just as C# does not have all the possibilities of VB. That's in terms of language syntax, and the gap is shrinking with each new version. In terms of framework support, anything you can … | |
Re: I'm reasonably sure (please correct me if I'm wrong) that VB6 isn't freely availably legally. As such, any discussion of acquiring a pirated copy is against Daniweb rules. Likewise with the packaged hardcopy documentation, though that's more of a gray area. | |
Re: Far be it from me to put forth a logical fallacy (which guarantees that what follows will be exactly that, I'm well aware), but can you point out a forum that implements a voting system which requires some form of comment? You have forums that support a reputation system with … | |
Re: Looks like the `void main` stuff has been fixed, but there's *no* exposition at all. Throwing code at beginners with no explanation won't accomplish much. While it's good to be exposed to examples, the examples must be high quality and carefully explained such that readers understand why they're high quality … | |
Re: Input Employees What does Input accomplish when the variable is an array? FOR K = 1 Add 1 to Average Then Average is 0 at this point, so your loop would never execute. If the goal is to populate the arrays, it should be either this: FOR K = 1 … | |
Re: To elaborate a little bit, the `if` keyword and condition doesn't constitute a statement. To be described as a statement the body must be included. If the condition ends with a semicolon, you have an empty body that does nothing at all: // An if statement if (condition) body // … | |
Re: Daniweb is not a homework service. We expect *you* to write the code you need, but will assist with specific problems or questions you might have. | |
Re: You may want to post in our viruses and malware forum, because it sounds like you've got something unsavory going down on the machine. | |
Re: At this point the only benefit of a built-in array would be slightly more concise declaration syntax. But the functional benefits of std::array blow that out of the water. As a rule of thumb, I'd say prefer std::array until you have a good reason to pick a built-in array. | |
Re: Very close, and conceptually you've got it perfect. The only problem is a mismatch of `new[]` and `delete` when releasing `a`. This is what you want: int **a; a = new int *[bin->height]; for (int i=0;i<bin->height;i++) a[i] = new int [bin->width]; for (int i=0;i<bin->height;i++) delete [] a[i]; delete [] a; … | |
Re: 1. 15, for 18 years. 2. C#, C++, and C, presently. 3. Of course. | |
Re: I'll let you know right now that "programming" courses and computer science tracks won't teach you jack diddly about being a software developer. However, a bachelor's or master's in computer science is your best bet to keep HR departments from throwing your resume out without looking at it. More important … | |
Re: > Flexera has a version called Install Shield LE which is free for Visual Studio owners. I heard a lot of whining about InstallShield LE and thought they were overreacting until I tried to use it and immediately ran into limitations that jacked me up. For the most basic of … | |
![]() | Re: > They should be forced to pick a relevant forum -unless their question doesn't include any of the sub forums I'm having trouble thinking of a way to do this that isn't terribly intrusive for the average case of knowing which sub forum is most appropriate. Barring, of course, the … ![]() |
![]() | Re: Overly simplified, but first the language is designed, a grammar is devised, and then a compiler is written in another language. A common way to test a new language is to write a bootstrapping compiler (ie. a compiler written in the language itself). But the first compiler basically must be … |
Re: Possible? Yes. Off the top of my head, I'd probably approach it as storing the settings in an embedded resource, then replacing that resource when settings change. However, this strikes me as an unnnecessary complication. I don't see any good reason why you can't distribute a config file along with … | |
Re: "{\b Wenisday}" RTF is a formatting language, so you'd do well to look up the specification for what's possible and how to do it. | |
I'm putting together a new gaming machine, but would like some opinions on the motherboard since I'm weaker in that area. Here are the minimum requirements based on other components I've pretty much nailed down for my needs: * i5-3570K CPU (LGA1155 socket) *-- already purchased, hard requirement* * 16-32GB … | |
![]() | Re: > Do you think I have an obsession or a passion with tech and software? Passion, yes. Borderline obsession too. Not that there's anything wrong with it as long as it doesn't take over your life; I have a similar passion when it comes to software development. |
Re: It's the other way. Reputation adds a vote, but votes don't add reputation. Endorsements are a separate feature entirely, where people endorse you (hopefully) when you show expertise in a certain forum. | |
Re: > Besides, 5 posts, 5 days of membership, and 15 rep points is not that hard to earn. IIRC, it's 5 posts + 5 days *or* 15 reputation points. So you can unlock functionality with the default rep allocation, or you can unlock it sooner by earning rep. |
The End.