<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com.nf/group/comp.lang.c++</id>
  <title type="text">comp.lang.c++ Google Group</title>
  <subtitle type="text">
  The object-oriented C++ language.
  </subtitle>
  <link href="/group/comp.lang.c++/feed/atom_v1_0_msgs.xml" rel="self" title="comp.lang.c++ feed"/>
  <updated>2009-11-21T19:34:15Z</updated>
  <generator uri="http://groups.google.com.nf" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>Pavel</name>
  <email>pauldontspamt...@removeyourself.dontspam.yahoo</email>
  </author>
  <updated>2009-11-21T19:34:15Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/21e47512ffcaf8a2/0e572817cc8905d0?show_docid=0e572817cc8905d0</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/21e47512ffcaf8a2/0e572817cc8905d0?show_docid=0e572817cc8905d0"/>
  <title type="text">How to get an insertion hint for an unordered associated container?</title>
  <summary type="html" xml:space="preserve">
  I am trying to figure out if I can use tr1/C++0x std::unordered_map to &lt;br&gt; speed-up an algorithm I did before using an ordered map. &lt;br&gt; The problem is quite common: &lt;br&gt; BEGIN &lt;br&gt; Given a key &#39;k&#39;, if no equivalent of &#39;k&#39; is on the container, create &lt;br&gt; value and insert it; otherwise, update part of the value that is already
  </summary>
  </entry>
  <entry>
  <author>
  <name>Pavel</name>
  <email>pauldontspamt...@removeyourself.dontspam.yahoo</email>
  </author>
  <updated>2009-11-21T19:02:03Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/e46e9b3e07711d05/60fa546b171d7575?show_docid=60fa546b171d7575</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/e46e9b3e07711d05/60fa546b171d7575?show_docid=60fa546b171d7575"/>
  <title type="text">Re: Article on possible improvements to C++</title>
  <summary type="html" xml:space="preserve">
  It&#39;s of no use if the client code wants to know about the failure in few &lt;br&gt; higher-level callers. Of course you can create a class for every &lt;br&gt; overloaded + operator that can overflow, create a method &amp;quot;onOverflow()&amp;quot; &lt;br&gt; in it etc. but what level of cooperation would it require from the &lt;br&gt; client code to add and remove interested parties?
  </summary>
  </entry>
  <entry>
  <author>
  <name>A.G.McDowell</name>
  <email>mcdowe...@nospam.co.uk</email>
  </author>
  <updated>2009-11-21T18:46:21Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/7e9e2b3bb4198774?show_docid=7e9e2b3bb4198774</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/7e9e2b3bb4198774?show_docid=7e9e2b3bb4198774"/>
  <title type="text">Re: Math/CompSci Interview Question - Thoughts?</title>
  <summary type="html" xml:space="preserve">
  In article &amp;lt;6a8340b8-19b0-4fda-96d5-e744a ead1...@m26g2000yqb.googlegrou p &lt;br&gt; s.com&amp;gt;, Andrew Tomazos &amp;lt;and...@tomazos.com&amp;gt; writes &lt;br&gt; This sort of problem is covered by articles on Data Stream Processing in &lt;br&gt; CACM Oct 2009. (CACM is a lot more interesting these days than it was &lt;br&gt; some years ago). There are some very neat ideas in there, of which the
  </summary>
  </entry>
  <entry>
  <author>
  <name>Richard Harter</name>
  <email>c...@tiac.net</email>
  </author>
  <updated>2009-11-21T18:33:38Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/6755bf1370f0a809?show_docid=6755bf1370f0a809</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/6755bf1370f0a809?show_docid=6755bf1370f0a809"/>
  <title type="text">Re: Math/CompSci Interview Question - Thoughts?</title>
  <summary type="html" xml:space="preserve">
  On Sat, 21 Nov 2009 08:12:53 -0800 (PST), Andrew Tomazos &lt;br&gt; [snip code] &lt;br&gt; I hope &amp;quot;masters-equivilant&amp;quot; isn&#39;t on your resume. &lt;br&gt; &lt;p&gt;Probably not, but that is not necessarily a good thing. &lt;br&gt; That&#39;s an interesting question with an interesting &lt;br&gt; presupposition. The first thing to understand is that this is a &lt;br&gt; puzzle rather than a programming problem. The presupposition is
  </summary>
  </entry>
  <entry>
  <author>
  <name>White Wolf</name>
  <email>wo...@freemail.hu</email>
  </author>
  <updated>2009-11-21T17:46:55Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/b311d5af9ec3652d?show_docid=b311d5af9ec3652d</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/b311d5af9ec3652d?show_docid=b311d5af9ec3652d"/>
  <title type="text">Re: Why do some code bases don&#39;t use exceptions?</title>
  <summary type="html" xml:space="preserve">
  I was referring to an &amp;quot;unprecedented amount&amp;quot;. I mean if we disregard &lt;br&gt; the known trolls. I do not regard the OP as a troll, so it made me very &lt;br&gt; sad to see so many bad assumptions.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Alf P. Steinbach</name>
  <email>al...@start.no</email>
  </author>
  <updated>2009-11-21T17:34:39Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/eaa0986165497109?show_docid=eaa0986165497109</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/eaa0986165497109?show_docid=eaa0986165497109"/>
  <title type="text">Re: Defining hash-keys?</title>
  <summary type="html" xml:space="preserve">
  * James Kanze: &lt;br&gt; It depends. Like how exactly the hash table handles collisions (search for next &lt;br&gt; available, overflow list, what?), and whether values tend to be bundled in small &lt;br&gt; intervals. I think doing the randomization thing is safest, but considering how &lt;br&gt; it might lead to excessive paging I&#39;m not even sure about that -- depends also
  </summary>
  </entry>
  <entry>
  <author>
  <name>GJ Woeginger</name>
  <email>gwo...@figipc78.tu-graz.ac.at</email>
  </author>
  <updated>2009-11-21T17:29:14Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/3f7269c65f9bea33?show_docid=3f7269c65f9bea33</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/3f7269c65f9bea33?show_docid=3f7269c65f9bea33"/>
  <title type="text">Re: Math/CompSci Interview Question - Thoughts?</title>
  <summary type="html" xml:space="preserve">
  There is an old analysis of this problem by Fischer and Salzberg. &lt;br&gt; M.J. Fisher and S.L. Salzberg (1982) &lt;br&gt; Finding a majority among n votes. &lt;br&gt; Journal of Algorithms 3, pp 143-152. &lt;br&gt; If 2k elements contain a majority element (= an element that occurs at &lt;br&gt; least k+1 times), then you can find it with 3k-2 element comparisons
  </summary>
  </entry>
  <entry>
  <author>
  <name>Pascal J. Bourguignon</name>
  <email>p...@informatimago.com</email>
  </author>
  <updated>2009-11-21T17:24:10Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/8a56560174359123?show_docid=8a56560174359123</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/8a56560174359123?show_docid=8a56560174359123"/>
  <title type="text">Re: Math/CompSci Interview Question - Thoughts?</title>
  <summary type="html" xml:space="preserve">
  If what you&#39;re asking is whether anybody having a master in CS and &lt;br&gt; maths would have been able to come up with this solution in the &lt;br&gt; interview time, I guess we can answer that definitely no, otherwise &lt;br&gt; there would be no point in trying to select candidates with this test. &lt;br&gt; Obviously, it&#39;s because some people (with or without a master diploma,
  </summary>
  </entry>
  <entry>
  <author>
  <name>James Kanze</name>
  <email>james.ka...@gmail.com</email>
  </author>
  <updated>2009-11-21T16:50:02Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/9d98e867714754e1?show_docid=9d98e867714754e1</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/9d98e867714754e1?show_docid=9d98e867714754e1"/>
  <title type="text">Re: Why do some code bases don&#39;t use exceptions?</title>
  <summary type="html" xml:space="preserve">
  Just a linguistic nit, but formally, &amp;quot;unprecedented&amp;quot; means that &lt;br&gt; there is no precedent---no one has done it before. Given this &lt;br&gt; definition, I wouldn&#39;t call posting a web page on a subject you &lt;br&gt; know nothing about exactly &amp;quot;unprecedented&amp;quot;:-). &lt;br&gt; Not that that that changes anything with regards to your &lt;br&gt; argument.
  </summary>
  </entry>
  <entry>
  <author>
  <name>James Kanze</name>
  <email>james.ka...@gmail.com</email>
  </author>
  <updated>2009-11-21T16:45:48Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/3021cce4a29afcb7?show_docid=3021cce4a29afcb7</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/c255001068888229/3021cce4a29afcb7?show_docid=3021cce4a29afcb7"/>
  <title type="text">Re: Why do some code bases don&#39;t use exceptions?</title>
  <summary type="html" xml:space="preserve">
  What is the perceived problem? And why is aborting (as a &lt;br&gt; default behavior) a bad solution? Violating an exception &lt;br&gt; specification is a contract violation, so aborting *is* about &lt;br&gt; the only appropriate default behavior. The question is: what &lt;br&gt; problem is solved by supporting contracts in which a function
  </summary>
  </entry>
  <entry>
  <author>
  <name>James Kanze</name>
  <email>james.ka...@gmail.com</email>
  </author>
  <updated>2009-11-21T16:34:43Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/a45b76adf005406c?show_docid=a45b76adf005406c</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/a45b76adf005406c?show_docid=a45b76adf005406c"/>
  <title type="text">Re: Defining hash-keys?</title>
  <summary type="html" xml:space="preserve">
  std::map will take an std::vector&amp;lt;int&amp;gt; as a key. No need to &lt;br&gt; convert to string. (The access will still be O(lg n), rather &lt;br&gt; than O(1), but that&#39;s often enough.)
  </summary>
  </entry>
  <entry>
  <author>
  <name>James Kanze</name>
  <email>james.ka...@gmail.com</email>
  </author>
  <updated>2009-11-21T16:29:31Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/8c5aa84fa14cc3aa?show_docid=8c5aa84fa14cc3aa</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/8c5aa84fa14cc3aa?show_docid=8c5aa84fa14cc3aa"/>
  <title type="text">Re: Defining hash-keys?</title>
  <summary type="html" xml:space="preserve">
  That&#39;s a lot more work than necessary. The better string hash &lt;br&gt; functions actually treat the string as a sequence of unsigned &lt;br&gt; char---small unsigned integers. Depending on the algorithm and &lt;br&gt; your data types (and values), either just converting the &lt;br&gt; elements to unsigned (if this results in no loss of information
  </summary>
  </entry>
  <entry>
  <author>
  <name>James Kanze</name>
  <email>james.ka...@gmail.com</email>
  </author>
  <updated>2009-11-21T16:25:44Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/23502344afc3ba47?show_docid=23502344afc3ba47</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/5ecbd9d1f6cef507/23502344afc3ba47?show_docid=23502344afc3ba47"/>
  <title type="text">Re: Defining hash-keys?</title>
  <summary type="html" xml:space="preserve">
  Don&#39;t forget the most important characteristic of the hash &lt;br&gt; function: if a == b, then hash(a) == hash(b). This could easily &lt;br&gt; be a problem with floats (where +/- O might hash differently, if &lt;br&gt; the hash function was done naïvely) or unordered collections &lt;br&gt; (where different ordering of the same values might hash
  </summary>
  </entry>
  <entry>
  <author>
  <name>Andrew Tomazos</name>
  <email>and...@tomazos.com</email>
  </author>
  <updated>2009-11-21T16:12:53Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/bab334d1f4280b5c?show_docid=bab334d1f4280b5c</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/a1cffd71c99a2dd0/bab334d1f4280b5c?show_docid=bab334d1f4280b5c"/>
  <title type="text">Math/CompSci Interview Question - Thoughts?</title>
  <summary type="html" xml:space="preserve">
  I was posed the following question in a technical interview for a &lt;br&gt; Software Engineering position by a major multinational NASDAQ company: &lt;br&gt; [Paraphrasing] &amp;quot;You are given an array of 1,000,000 32-bit integers. &lt;br&gt; One int value x occurs 500,001 times or more in the array. Specify an &lt;br&gt; algorithm to determine x.&amp;quot;
  </summary>
  </entry>
  <entry>
  <author>
  <name>tradeworldbiz</name>
  <email>sophieyua...@yahoo.com</email>
  </author>
  <updated>2009-11-21T15:41:42Z</updated>
  <id>http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/28d628e4f093dc8a/0d9859c93e5ff9fa?show_docid=0d9859c93e5ff9fa</id>
  <link href="http://groups.google.com.nf/group/comp.lang.c++/browse_thread/thread/28d628e4f093dc8a/0d9859c93e5ff9fa?show_docid=0d9859c93e5ff9fa"/>
  <title type="text">★★ Factory Promotion Special Offer→Polo T-Shirts,ED hardy T-Shirts Low Price Welcome To Our Site www.ebaychinaonline.com</title>
  <summary type="html" xml:space="preserve">
  For more information,please contact Sophie,Yahoo: &lt;br&gt; globaltrade2...@yahoo.com.cn &lt;br&gt; Minimum order is one,factory price also!Paypal payment free &lt;br&gt; shipping,ship time will take 4-7 working days. &lt;br&gt; Offer various brand tshirts,shirts,blouse,pants,be ach &lt;br&gt; shorts,dress,underwear as follows,free shipping,worldwide &lt;br&gt; express,paypal payment
  </summary>
  </entry>
</feed>
