3,183 Posted Topics

Member Avatar for desmy

Your company's IT department will have either an installation disk or a repair disk for your computer. The former requires a product key that the same department will have, though they'll probably ask to install it themselves rather than give it out to you. Since it's your company's property, I …

Member Avatar for rubberman
-2
409
Member Avatar for nitin1

> Which is faster and why? It's difficult to say, but I'd wager the first would be fastest because the compiler is likely to be substantially better at unrolling loops in the most efficient manner. However, there's an implicit assumption that the loop would be unrolled, so as with any …

Member Avatar for Duoas
0
211
Member Avatar for Stacy_1

You'd want to execute a long running method in a separate thread to avoid the UI thread becoming unresponsive. Just make sure that there's something for the user to look at or interact with while the method is doing its thing, or it won't matter whether the UI is responsive …

Member Avatar for harshchandra
0
202
Member Avatar for rafiakhan492

`cout << thingie` is symbolic for "send `thingie` to `cout`". `cin >> thingie` is symbolic for "send something to `thingie` from `cin`". The angle brackets denote the direction that data moves. Whether `>>` and `<<` are the best symbology for the behavior is up for debate, but it works reasonably …

Member Avatar for Rafiii
0
168
Member Avatar for avishekh.bharati

Depending on how familiar you are with Java (and programming in general), both should be relatively simple to pick up. All three are in the same family, after all. However, I suspect you'd find C++ more comfortable initially since it directly supports OOP.

Member Avatar for vegaseat
0
192
Member Avatar for lewashby

`getline` isn't a standard function, so your book is correct. The problem is your compiler supports that function as an extension, so the easiest approach would be to change the name of the function in your code to something else.

Member Avatar for deceptikon
0
180
Member Avatar for JOLO14

In your `KeyPressEventArgs` object is a `Handled` property. Set that guy before returning from the event handler to disable subsequent control logic on the event.

Member Avatar for deceptikon
0
103
Member Avatar for Maryam_6

Daniweb is not a homework service. Please provide evidence that you've attempted a solution on your own, as per our [rules](https://www.daniweb.com/community/rules).

Member Avatar for Maryam_6
0
77
Member Avatar for nitin1

> But, when I use using namespace std, then I also have to use "string" header file. So what is the difference between them? The header provides you with declarations. `using namespace std` simply tells the compiler to pretend you had qualified a name with `std::` if it can't resolve …

Member Avatar for Itecg
0
275
Member Avatar for Suzie999

[Clickie](http://msdn.microsoft.com/en-us/library/ff602939(v=vs.110).aspx)

Member Avatar for Bhuvan_1
0
119
Member Avatar for Dani

I like the idea in concept, of course the details need to be hammered down carefully if money is involved. In particular I'd like to see a handful of things in particular: 1. The bounty amount can be set from the asker's available pool. This benefits higher priority questions or …

Member Avatar for Dani
0
2K
Member Avatar for Ola Loay

You say you need help, but only posted your homework assignment. Please be more specific about what you want help with.

Member Avatar for Rafiii
0
387
Member Avatar for humorousone

Assuming you're using the Visual Studio designer, what I do is keep part of the default name and replace the useless number with the same tag as the related control. The tag is chosen based on what the controls do or represent. Often if the controls are bound, the tag …

Member Avatar for humorousone
0
261
Member Avatar for muhammadshahroz

Hopelessly vague question and mention of a file with no details or examples. Please try again, kthxbye.

Member Avatar for jtodd
0
183
Member Avatar for kidkardel

> How bout putting the database file into the same directory as your .exe file? That's risky. If the application isn't run with administrative rights, extraneous files may not be accessible if they're in the application folder. A better approach would be to use something like `Environment.SpecialFolder.CommonApplicationData` and storing the …

Member Avatar for mridul.ahuja
0
167
Member Avatar for Vahid_1

How is the second one faulty? The most notable potential problem is you're incrementing `num1` rather than `count`, but whether that's a bug depends on what you expected to happen.

Member Avatar for jnneson
0
91
Member Avatar for Tigr@

> Why doesn't this work in C#? Because you should be using `||` in your loop rather than `&&`. With `&&`, `jaar` will only be compared to 1582 if `TryParse` fails, which is somewhat nonsensical.

Member Avatar for Tigr@
0
168
Member Avatar for huevietnamese

Posting actual code might help instead of paraphrasing lines onesie twosie.

Member Avatar for deceptikon
-2
55
Member Avatar for JOSheaIV

Hmm, either my understanding of CLR integration in SQL Server is woefully out of date, or there's a disconnect somewhere. CLR functions are *server side* entities. You still need vanilla connection strings and T-SQL in your client application. So your problem boils down to two things as I see it: …

Member Avatar for JOSheaIV
0
344
Member Avatar for rfresh

> The design of how this works is really bad. It kind of depends on what controls and how the controls can only be operated by the keyboard. But I'll take your word for it. :) > I don't know if I have the ability to 'hook' into it with …

Member Avatar for rfresh
0
158
Member Avatar for Abdul_30

The error is correct. `nameLabels` is a `string` (as denoted by your `ToString` call earlier to convert the cell value), and `string` is most certainly not a compatible type with `string[]`. Without more details on what values the `"FaceName"` cells contain, I can only speculate, but judging by your description …

Member Avatar for deceptikon
0
324
Member Avatar for antonymatoi
Member Avatar for Weejin

> You could count the number of zeroes inside a number N with the following algorithm And if the number *begins* with zeroes? What if the number exceeds the range of your numeric type? The best approach to handle input as it's typed is to work with it as a …

Member Avatar for Rafiii
0
152
Member Avatar for Alxprog

Ditto cgeier. I'm not a fan of directly managing data sources in Visual Studio; it just feels too inflexible compared to doing it manually with ADO.NET.

Member Avatar for deceptikon
0
312
Member Avatar for gayathiri krish

Um...what? Convert how? And does the picture of the dress need to be processed in some way? Your question is exceptionally vague.

Member Avatar for deceptikon
0
43
Member Avatar for Aizaz

Well, the most widely supported method would be the ctime library: #include <ctime> #include <iostream> #include <utility> #include <string> using namespace std; pair<string, int> weekday(int month, int day, int year) { tm date = {0}; // Set the date properties date.tm_mday = day; date.tm_mon = month - 1; date.tm_year = …

Member Avatar for ddanbe
0
172
Member Avatar for yaya1234

> I tried but it dosn't work ... "Doesn't work" is not a helpful problem report. Please be specific about *how* it doesn't work. However, at a glance there are two immediate problems. One is subtle and the other is glaring: > char* s="Ctor of class Brain Called"; While compilers …

Member Avatar for Maritimo
0
286
Member Avatar for lithium112

Hmm, my initial reaction is to suggest fixing the circular reference. You could try using reflection to invoke methods in a compiled assembly from the other project, but that strikes me as more of a Band-Aid than a solution.

Member Avatar for lithium112
0
124
Member Avatar for Pyler

Define "easier" for your needs. With a vector, I'd probably do the same thing you've done, but there are serialization libraries ([Boost](http://www.boost.org/doc/libs/1_57_0/libs/serialization/doc/index.html) comes to mind), but they can be non-trivial to use.

Member Avatar for deceptikon
0
227
Member Avatar for Roger_2

It sounds like your professor wants you to play with different string representations. Specifically, how to determine length at any given time as that's the usual difference between string types. There are three common ones: * Terminated strings: An extra slot is allocated for storage of a terminating character (usually …

Member Avatar for sbesch
0
1K
Member Avatar for Suzie999

> my first question is whether a deck of cards should have a base class of card It doesn't make sense to me, personally. A deck of cards is not a card, it's a collection of cards, so composition is the better choice over inheritance: public class Deck { public …

Member Avatar for Suzie999
0
257
Member Avatar for thrillride01

Well, a database *is* the way to go, but that's really a pointless statement. What you really want is a [CMS](http://en.wikipedia.org/wiki/Content_management_system). They'll use a database on the back end, but support record metadata for indexing and filtering such that you store only a single instance of the item yet can …

Member Avatar for deceptikon
0
195
Member Avatar for COKEDUDE

> Why does this not need to be int main? Prior to C99, omitting a return type causes the compiler to assume you meant `int`. This is called "implicit int", and it created enough confusion that C99 removed that "feature". > Why no return 0? Either the code is correct …

Member Avatar for vegaseat
0
193
Member Avatar for bostjanv

Off the top of my head, the C standards don't disallow that code in any way. Further, my tests with gcc don't mesh with your results. Please post a complete compilable example *and* the full compiler output including your instantiation of gcc.

Member Avatar for bostjanv
0
114
Member Avatar for Suzie999

It's valid syntax, but guaranteed to be confusing and very likely to become incorrect as more members are added to the class. The `private` qualifier only explicitly applies to `suit`, and the `public` qualifier will only apply to your constructor. `value` will have default visibility, which in this case is …

Member Avatar for Suzie999
0
126
Member Avatar for Blueie

> Isn't the hash/salt value stored in the database table when the user first registers Yes. When the user registers, you generate the salted hash and store it in the database. When the user logs in, you do more or less the same thing with entered credentials and compare with …

Member Avatar for Blueie
0
292
Member Avatar for deceptikon

*Warning: This code is tested, but not as-is. I combined multiple files to simplify the snippet.* One of my specialties is document imaging, and custom tools to handle it. A common request for both scanner sources and file import is correction of when pages are not properly oriented. To avoid …

0
2K
Member Avatar for Himanshu Chawla
Member Avatar for deceptikon
0
295
Member Avatar for prodani

The code you've linked to doesn't compile due to undeclared variables. Could you post the updated code which produces a segfault here, please?

Member Avatar for Maritimo
0
101
Member Avatar for Gopal_2
Member Avatar for rayhaneh

That code is weak in that it makes an assumption about the bit representation of characters. In particular ASCII upper and lower case letters differ only in whether the 6th bit is set, so that code ensures that the bit is the same before doing a comparison. A much better …

Member Avatar for rayhaneh
0
276
Member Avatar for Alex_20

By second programming language do you mean a language you know but don't really use? It seems kind of silly to think in terms of first, second, third, etc...; you should learn as many languages as practical to benefit your skillset. So let's start with this: what language do you …

Member Avatar for janissantony
-1
243
Member Avatar for A***

1. I'm of the opinion that it's always worth learning different languages. However, more important than learning a language in the same family (eg. C# is in the same family as C and C++), learning completely different languages rounds you out as a programmer because you often have to think …

Member Avatar for janissantony
0
175
Member Avatar for ddanbe

> Done :) The result set must *include* delimiters, not remove them. ;) Try this little one-liner: var parts = Regex.Split("abc,123.xyz;praise;end,file,clear", @"([\.,;])");

Member Avatar for xrjf
0
1K
Member Avatar for MasterChat

> How can you make sure that the replies and info we receive are correct? Trust, but verify. If only one source tells you something and others contradict it consistently, that source is likely in the wrong. If multiple sources say the same thing, it's probably correct.

Member Avatar for MasterChat
1
409
Member Avatar for ujjwale

> The problem is i don't even know programming. Yep, that's a problem alright. A big one. I'd start by searching for tutorials on how to write an operating system; there a surprising number out there on the web. Once you have an idea of what's involved, you can start …

Member Avatar for mike_2000_17
0
152
Member Avatar for geko.villegas

> PLEASE PLEASE Please read our rules concerning homework. If you need help with anything specific, ask a specific question. Nobody here will do the work for you.

Member Avatar for deceptikon
0
84
Member Avatar for maria.javed.3990

Your question is essentially "how do I write a program using functions?", which is extremely vague and basic. Do you know how functions work and the syntax for defining them?

Member Avatar for shayan_doust
0
152
Member Avatar for Khan2014

This sounds like a variation of a repository library I wrote. The ID structure wasn't quite that simplistic, but the concept is similar. Something like this would be a start for you: private void buttonLoad_Click(object sender, EventArgs args) { var path = GetImagePath( Folder, Convert.ToInt32(numericUpDownImage.Value), ".tif"); if (File.Exists(path)) { // …

Member Avatar for Khan2014
0
157
Member Avatar for Zorrro

> Even Daniweb promises to never go through private messages. Which seems like a mistake on our part. Daniweb's TOS should probably include a qualifier that PMs may be reviewed in extreme cases (such as excessive harrassment) or shared with law enforcement to assist in any investigation.

Member Avatar for deceptikon
0
293

The End.