jbennet commented: thats not very nice -7
ahihihi... commented: ek-ek.. :) +1
jephthah commented: if you're going to be a jerk, at least have a reason +6
Agh why is there priority queue code mixed in? Kill me now.
Why is your message in code tags?
You're just going to give the code? What?
You people have no sense of humor.
Its indentation is obfuscious and the naming scheme is mendacious.
No, it's not right.
There's nothing wrong with that.
carobee, write a simulator for Conway's Game of Life. And then make it run faster.
It is obviously Matlab code.
Why is your prefix notation and preorder traversal any different?
Your problem is a case of http://en.wikipedia.org/wiki/Bayes'_theorem#Bayes.27_theorem_for_probability_densities
That might be an oversimplification.
They got that one right, didn't they!?
No.
Well any way you use to ensure that there's no more than 1 instance created for a class will be called a 'singleton', so by definition no.
The language versions are called C# 2 and C# 3. It's perfectly fine to start with C# 2.
The paragraph is a bit nonsensical, where it suggests using a singleton factory as a workaround to using a singleton.
Yes, the solution is to make a single instance and pass it around. You can use the private and friend features of C++ to prevent people from creating second copies.
-- if n is greater than 1, count how many times the expression is performed. - Not working at all
co is being incremented just fine.
Don't get an A+ certification unless you're going to use it somehow between the time you get it and the time you get your bachelors in computer science.
It is supposedly trivially easy to get, so don't spend any money on a course.
If you attach a debugger, does it show the line m_IPAddressLbl.Text = "HELLO WORLD";
running?
How are you calling this functions?
you normally would use this singleton method for a configuration accessor class
Hah! If only you knew the Hell I went through thanks to people thinking that.
or a group of data that needs to be shared throught the app without passing a class object around
This situation (the operative word being "needs") never exists.
If you ask me, the best use of singletons is to protect yourself from "junior" programmers who are liable to want to open up a fresh db connection in some inner function.
The same way you normally stop scanning bar codes?
Let's learn some ways to write code more efficiently. If your code is hastily edited and cut for the sake of an example or you can't use things you've never learned and such, you don't need to reply back explaining yourself.
...
const string file = "File.TXT";
// don't declare variables and assign them with values,
// only to overwrite those values later. How can you
// stand it?
string first = cBoxFirst.Text;
string last = cBoxSecond.Text;
// your stream reading code looked good, but note
// you have this function available:
string[] array = File.ReadAllLines(file);
// note that you could have used
// string[] array = nList.ToArray();
// in your previous code.
// you probably would want to sort your array here...
int fIndex = Array.BinarySearch(array, first);
int lIndex = Array.BinarySearch(array, last);
Also, make sure you read the documentation (http://msdn.microsoft.com/en-us/library/y15ef976.aspx) and see where negative numbers might be returned -- like when the string is not found.
Is your array sorted? Binary search only works when the array is sorted. The contents of "File.TXT" would have to be sorted for it to work.
If you're a horrible programmer looking for a horrible programming job, then a certification might impress somebody, somewhere. But any reasonable employer will not count them in your favor. They will only be counted against you. You should have things that actually boost your resume like projects you've worked on for fun, that show how smart you are. A resume that says "I actually did stuff" means a lot more than one that says "I passed some exam and present this as evidence."
Well some people have better things to do than explain why their product can only be configured to use powers of two.
For algorithms that directly require modular arithmetic, such as some encryption algorithms.
For writing log messages every Nth time through a loop.
The "do something every Nth time through a loop" problem is probably where you'll see the modulus operator used most often.
I did that once, and I liked it!
Yes. You can still use them. They're not formally obsolete -- they aren't going away.
But it's better to use List<double> because that gives you better type safety and makes your code easier for others to read.
Computer Science books:
Numerical Methods for Scientists and Engineers (Hamming),
Approximation Algorithms (Vazirani),
Types and Programming Languages (Pierce),
Advanced Types and Programming Languages (Pierce),
Computer Systems: A Programmer's Persective,
Computational Science & Engineering (Strang),
Data Structures and Algorithms in C++ (Goodrich, ...),
Modern Operating Systems (Tanenbaum),
Purely Functional Datastructures (Okasaki),
Intro to the Theory of Computation (Sipser),
Programming Language Pragmatics (Scott)
I think that's it. There are some practical programming books too... do you want a list of those?
Java? What? Are you going into software development or IT?
His problem is just that he needs to think more about the problem, maybe with some sleep in between.
ArrayList is in the System.Collections namespace and List<> is in the System.Collections.Generic namespace. Use List<double> instead of an ArrayList, and use System.Collections.Generic instead of System.Collections. There's no reason to use obsolete collection types here.
But I am not being a bully. I genuinely believe one should have no respect for people's "opinions" and their need to share them.
Not much, the usual intelligence level it seems, maybe you should join multiple forums; maybe a socket question will come up in one of them. Do some RSSing and scraping and you can have a nice socket-related feed.
If you could get a certifiably awesome certification, that would be nice. If you're getting a degree, why do you need a certification? I do not understand the IT world.
Yeah! What if they just post stupid crap that they think makes them sound sorta intellectual? Or posting pedantic crap that worries about 'pure conjecture' - get a life.
Wow, being a bully. How's that working out for you?
Okay, serious answer: just show up for the interview dressed to kill: http://www.zazzle.com/janitor_computer_janitor_tshirt-235616259722072332
Wouldn't this advice depend on your location? Reveal that information to us. I'm guessing by your hair color and sun-exposure level that you're Canadian or Alaskan.
Edit: on the other hand, the lipstick makes me think you must be some kind of english dandy.
I hereby accuse you of being a person I've never met.
You people are so sexually repressed. There's nothing so cathartic as seeing a well-animated tentacle monster trapping a 12-year-old virgin in a library and challenging her to a Boggle contest, where the winner gets tickets to the next Jonas Brothers concert.
No one should be here to throw dirt on anyone elses beliefs, regardless of what they are.
But what if they're stupid? Why shouldn't we throw dirt at stupid beliefs? Like the belief that one should just make pronouncements and feel proud at the fact.
It's pure conjecture.
No, there is past exposure to information influencing people's opinions. Nothing is pure conjecture.
So the question is: How to detect when last character found? You surely know how to do that? Well then, finding the recursive function that outputs them in reverse order is a simple matter of mentally stimulating exploration! Good luck!
This is not a C++ question? This certainly isn't a compiler question...
I would post my "marks", but they are all links to movies involving large groups of black men fornicating with one white female midget, and serious geeks like you wouldn't be interested.
Your ideas are stupid. They would be too expensive. You value your ideas too highly.
I was known as the person most likely to become a serial killer.
Wow, the folks here really love replying to a dead thread.
Edit: me too.
And why are you asking a question like this in the wrong thread.
Well... when do you want it to terminate?
What? Why would I censor myself in afraid of being banned?