|
Oh. I think we all took that as read.
|
|
|
|
|
cheat cheat cheat
what
i want help from you and you can't help me to depend on my self
and i thanxs you
i ended the exam and not passed
if one can help me in any time not now i will thank him very much
|
|
|
|
|
do you really think we're that stupid?
oh, wait, you're a cheater... so yeah, you do think we're that stupid.
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
i don`t know what i can say to you
but
Thank you think
|
|
|
|
|
Look. It's easy.
You have an array. Iterate over the array and check to see if each item is a prime. If it's a prime, increment your prime count and check to see if it's lower than any other primes you've found. At the end of the function, compare the count of primes with the lowest prime value.
There are various optimisations that you can apply, but this is the basic functionality. If you want to have a career that doesn't involve flipping burgers then you need to apply critical thinking to problems. The question gave you all the information that you needed, but you chose to waste your time here rather than breaking the problem down into small steps.
|
|
|
|
|
For me, I'm glad you did not pass.
As a mentor, I would not want to waste my time interviewing, never mind hiring, someone who wants to cheat on an exam, because these are the same people who will cheat in the workplace and life in general.
Sorry if this sounds mean, but you got what you earned.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi, i am making an app and im using postgre, so im making my connection with npgsql, but i need to make a report and im trying to use crystalreport, but i have no idea how to use crystal + npgsql. Can anyone help me please? thanks a lot
|
|
|
|
|
I have this RegEx - "BR[0-9][0-9][0-9]"
How do I modify it so that it works for "BR108" and "CC129" and only those?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I will answer this if you post it in the Regular Expressions forum.
|
|
|
|
|
I don't see a "regex forum? anywhere
Everything makes sense in someone's mind
|
|
|
|
|
On the left hand side of your screen, labelled "Regular Expressions".
There is a short cut here[^]
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Ahh, found it.. Thanks
Everything makes sense in someone's mind
|
|
|
|
|
"(BR108)|(CC129)"
although why use a regex in that case? just do two string compares.
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
Probably because the regex will still work if there is other info in the string:
Shipment ID: 212857,1212,Invoice No: BR108, 25-JAN-10 (PDF) Would match as a Regex, but it could take two String.Contains method calls to check for either substring.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
ah, yes, good point
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
You didn't give the OP a chance to post in the Regex forum.
And you didn't obfuscate that regex enough:
^(?![Bb][Rr]12|[Cc]{2,2}10|trogdor)([Bb][Rr]|[Cc]{2})1(08|29)$
There, much better.
|
|
|
|
|
lol,
i looked in the regex forum for his post, but he didn't post there so i answered here.
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
Thats right, you start off with one problem and introduce a Regex expression and now you have two problems.
Architecture is extensible, code is minimal.
|
|
|
|
|
Hi all,
Is there an equivalent of the stl::vector<>.reserve() function for .NET Collections?
I'm building a large menu dynamically and it's a slow process and I either need to speed it up (hence my question) or do it all a different way.
|
|
|
|
|
Remember C# is managed code, the whole notion is to free you up from allocation/deallocating.
Which .NET collection class are you using? May be if you post your code snippets it may be helpful understanding as to what is going on on your code.
|
|
|
|
|
Generic collections offer at least one constructor that takes an initial capacity; having said that, I don't believe it is the growth of the collection itself that causes a noticeable slowdown. Telling more about your app, maybe showing some relevant code, would enable people to give some specific advice.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: Generic collections offer at least one constructor that takes an initial capacity
Thanks Luc, I'd missed that one. I was dynamically filling a ContextMenuStrip from an XML file that had over 400 entries each in two submenus, but I've changed it to use statically filled ToolStripComboBox es instead and it starts immediately.
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Collections such as List<T> (starting with a default capacity of 4) double their capacity once filled...
List<int> list = new List<int>();
Console.WriteLine(list.Capacity);
list.Add(0);
Console.WriteLine(list.Capacity);
list.AddRange(new int[] { 1, 2, 3, 4 });
Console.WriteLine(list.Capacity);
list.AddRange(new int[] { 5, 6, 7, 8 });
Console.WriteLine(list.Capacity);
list.AddRange(new int[] { 9, 10, 11, 12, 13, 14, 15, 16 });
Console.WriteLine(list.Capacity);
I believe they do this by allocating a new area in memory big enough to create the wrapped inner array with the new capacity then copying the existing elements to the new array. If these are large collections then that could be the source of the slowness, but unlikely unless the collection is having to resize many times.
You can avoid the new memory allocation and copying by specifying a suitable capacity for the collection in the constructor...
List<int> list = new List<int>(DesiredCapacity);
|
|
|
|