Sunday, November 30, 2014

Fwd: ��小女孩太�害了!她父母到底怎�教的呢?



Sent from my iPad

Begin forwarded message:

From: Jensie Tou <pandjtou@aol.com>
Date: November 30, 2014 at 1:45:29 PM CST
To: Jensie Tou <pandjtou@aol.com>
Subject: Fwd: 這個小女孩太厲害了!她父母到底怎麼教的呢?



Sent from my iPad

Begin forwarded message:




這個小女孩太厲害了!她父母到底怎麼教的呢?http://m.v.qq.com/page/c/3/w/c0141c7zn3w.html?from=timeline&isappinstalled=0












Digest for comp.lang.c++@googlegroups.com - 2 updates in 2 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
blackball <bugway@gmail.com>: Nov 29 07:24PM -0800

Two different questions in one thread ? I have the same confusion with the first author.
red floyd <no.spam.here@its.invalid>: Nov 29 05:09PM -0800

On 11/28/2014 2:12 PM, Paavo Helde wrote:
> zero byte automatically).
 
> hth
> Paavo
 
I like the #define NUL solution. It just comes out as more "readable".
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

Saturday, November 29, 2014

Digest for comp.lang.c++@googlegroups.com - 3 updates in 1 topic

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
woodbrian77@gmail.com: Nov 29 02:27PM -0800

Currently all messages between my back and middle tiers
are compressed. The following shows the messages the
middle tier sends to the back tier.
 
middle_messages_back
@out (messageid_t, ::std::vector<cmw_account_info>)
@out (messageid_t, ::cmw::marshalling_integer, cui_generator)
@out (messageid_t)
}
 
The first message there is a login request. The second
is a code generation request and the last is a keep alive.
The keep alive is just a messageid_t which, in this case,
is one byte. After being compressed, the keep alive
message increases to 12 bytes. I think compression is
helpful for the code generation request message, but not
for the keep alive message. I'd guess compression isn't
helping with the login message either, but am not sure.
I've worked on systems that use compression for
everything or not at all. Have you ever worked on a
system that uses both compressed and non-compressed
messages? I'd like to find some info on systems like that.
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Nov 29 10:59PM

> everything or not at all. Have you ever worked on a
> system that uses both compressed and non-compressed
> messages? I'd like to find some info on systems like that.
 
Sausages.
 
/Flibble
Ian Collins <ian-news@hotmail.com>: Nov 30 12:10PM +1300

> everything or not at all. Have you ever worked on a
> system that uses both compressed and non-compressed
> messages? I'd like to find some info on systems like that.
 
Compression is seldom any use for anything other than bulk transfer of
compressible data or sausages.
 
For inter-process or intra-process messages the overheads incurred by
compression tend to outweigh any benefits for short messages and for
LAN/WAN messaging packet latency has much more of a performance impact
than packet size.
 
One example is the application I use to distribute filesystems between
local and geographically distributed hosts, there I only consider
compression for full (not incremental) transfers of filesystems with a
worthwhile compress ratio.
 
--
Ian Collins
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

Digest for comp.programming.threads@googlegroups.com - 4 updates in 2 topics

comp.programming.threads@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.programming.threads+unsubscribe@googlegroups.com.
anastasiossouris@gmail.com: Nov 29 02:33AM -0800

On Monday, November 24, 2014 11:08:58 PM UTC+2, Ramine wrote:
> dangerous ?
 
> Thank you,
> Amine Moulay Ramdane.
 
That's an issue for hardware folks... Relaxed memory ordering performs better because the cores in a manycore machine can avoid doing extra work...
 
Think that if an architecture implemented a sequential consistent memory model you would only need to perform atomic loads and stores and no memory barriers at all. So it is easier for you the programmer. BUT, the architecture underneath will implement in hardware those memory fences for you in EVERY load and store you perform.
 
Next one realizes that ordering memory actions between different processors is not essential for every load and store. But only when you need it...
 
So the hardware guys say to you:
Well get those cheap load and stores you want. And if you want to order memory actions then i give to you those extra memory barriers instructions (which are costly with respect to other instructions), and you have to place them where they are needed.
So, the hardware runs fast in the common case and CAN also run fast in the case where synchronization is needed if you succeed in placing only the required memory fences and no more.
This certainly adds to the complexity a programmer has to face when implementing a lock-free algorithm and that's why you don't like it! :)
Ramine <ramine@1.1>: Nov 28 02:11PM -0800

Hello,
 
 
I have just received an email from the president Normand Peladeau
of the Provalis Research that is a world-leading developer of text
analysis software with ground-breaking qualitative, quantitative and
mixed methods programs. Here is the website of his company:
 
http://provalisresearch.com/company/
 
 
He saws my work on my Parallel projects that i have done with Delphi and
Freepascal and i think he wants me to work for them, here is the
email that i have received from him:
 
-----
 
Amine,
 
 
 
I saw one of your posting on the web and saw that you were probably in
Quebec (videotron.ca). Are you looking for a programming job? Someone
with Delphi skills and mathematical and statistical background would
probably have a good chance to get an interesting programming job at my
company.
 
If you are interested in either a job or some contracts, please send me
your CV or some notes.
 
 
 
Normand Peladeau
 
Provalis Research
 
----
 
 
Thank you,
Amine Moulay Ramdane.
"Chris M. Thomasson" <no@spam.invalid>: Nov 28 03:44PM -0800


> http://provalisresearch.com/company/
 
 
> He saws my work on my Parallel projects that i have done with Delphi and
> Freepascal and i think he wants me to work for them
 
That is great news; I wish you all the luck in the world.
 
One little point, please _try_ running your algorithms through a
race detector like
 
https://code.google.com/p/data-race-test/wiki/ThreadSanitizer
 
or
 
http://www.1024cores.net/home/relacy-race-detector
 
:^)
Gerald Breuer <Gerald.Breuer@gmail.com>: Nov 29 01:55AM +0100

Ramine wrote:
 
> He saws my work on my Parallel projects that i have done with Delphi
> and Freepascal and i think he wants me to work for them, here is the
> email that i have received from him:
 
I hope he will notice your bug-frequency.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

Friday, November 28, 2014

Digest for comp.lang.c++@googlegroups.com - 17 updates in 5 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
Paavo Helde <myfirstname@osa.pri.ee>: Nov 27 05:29PM -0600

Chicken Mcnuggets <chicken@mcnuggets.com> wrote in
> {
> netstring.push_back(c_netstring[i]);
> }
 
I understand this is just helper code, but you can achieve the same in a
bit shorter and more reliable way:
 
const char c_netstring[] = "13:SCGI\01\0,Test";
std::vector<char> netstring
{ std::begin(c_netstring), std::end(c_netstring) };
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 28 01:05PM

On 27/11/14 23:10, Ben Bacarisse wrote:
> then *always* increments it. Are you certain that the condition that
> ends the loop (it != raw_scgi_netstring.end()) is going to fire and not
> be "skipped"?
 
I've removed all the the manual iterator increments in the loop and
replaced them with continue (which in hindsight is what I meant to do
originally anyway).
 
I still get the same error which is unfortunate. I'm a bit stuck here.
I've changed the iterator to a const iterator just to make sure I'm not
doing anything stupid with it by accident and I still get the out of
range exception. I could loop through it manually but that kinda defeats
the purpose of using C++ in the first place. I might as well just write
C style code for this if I do that way which I'm attempting to avoid.
 
> string. The std::string class has lots of member function that can help
> with this sort of task.
 
> <snip>
 
Yeah I started off with std::string and using the const char and string
length constructor but hit the same issue there as I did here with out
of range exceptions. I assumed it was because it was getting confused
with all the NULLs but from the looks of it it was something more than
that since the vector is exhibiting something similar.
 
I can't keep swapping backwards and forwards. I'll stick with vector
until I can get it working and then I'll think about a string
implementation. I guess I could have a constructor for each so the user
can choose how they want it stored internally if they like. Either way
it can't hurt.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 28 04:18PM

On 28/11/14 13:29, Stefan Ram wrote:
> Someone writes:
>> Subject: Dealing with strings with NULL characters in the middle
 
> The ASCII character is spelled »NUL«.
 
Ah. Yes. Thank you for the correction.
Ben Bacarisse <ben.usenet@bsb.me.uk>: Nov 28 04:30PM

Chicken Mcnuggets <chicken@mcnuggets.com> writes:
<snip>
> I still get the same error which is unfortunate. I'm a bit stuck
> here.
 
It's unlikely anyone can help without seeing the code. Ideally
executable code.
 
<snip>
--
Ben.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 28 04:52PM

On 28/11/14 13:05, Chicken Mcnuggets wrote:
> implementation. I guess I could have a constructor for each so the user
> can choose how they want it stored internally if they like. Either way
> it can't hurt.
 
Updated source code:
 
http://ideone.com/3g6fW5
 
Produces the following output:
 
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name: S
Header Value:
Header Name: SC
Header Value:
Header Name: SCG
Header Value:
Header Name: SCGI
Header Value:
Header Name: SCGI
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
Header Name:
Header Value:
 
The code works fine up until the NUL character and then fails for some
reason. It appears that it doesn't see the NUL character as an
individual character and then mucks up when you try and compare to it.
 
I got rid of the iterators since that wasn't working and the new loop at
least seems to produce some output to help with debugging.
 
I've just run it through GDB and I think I've found the problem. My
string that I am using is as follows:
 
const char *c_netstring = "13:SCGI\01\0,Test";
 
Notice the first NUL character followed by a 1. In GDB it appears that
the std::vector<char> interprets that as a single character (an ASCII 1
character aka SOH or Start of Heading or \001) rather than correctly
interpreting it as an NUL (ASCII 0 or \000) followed by a 1 (ASCII 49 or
\061).
 
Now I know what the problem is. How do I fix this? I can't put a
separator between the two characters because that would break the
protocol so I'm kinda stuck here.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 28 04:53PM

On 28/11/14 16:30, Ben Bacarisse wrote:
 
> It's unlikely anyone can help without seeing the code. Ideally
> executable code.
 
> <snip>
 
See my other post I just made with results from GDB and an explanation
of what the problem is.
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Nov 28 10:34AM -0700

On Fri, 28 Nov 2014 16:52:09 +0000, Chicken Mcnuggets
<chicken@mcnuggets.com> wrote:
 
<snip>
>character aka SOH or Start of Heading or \001) rather than correctly
>interpreting it as an NUL (ASCII 0 or \000) followed by a 1 (ASCII 49 or
>\061).
 
My reaction is probably the same as a lot of other folks: I should
have seen that. This isn't a problem isn't with std::vector<char>;
the compiler is handling the octal conversion \01 properly, and
std::vector<char> is seeing the resulting byte.
 
If I'm not mistaken, \1, \01 and \001 should all give the same result,
a byte with a value of 1.
 
 
>Now I know what the problem is. How do I fix this? I can't put a
>separator between the two characters because that would break the
>protocol so I'm kinda stuck here.
 
\0001 should give you a nul byte followed by an ASCII '1'.
 
Louis
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 28 06:20PM

On 28/11/14 17:34, Louis Krupp wrote:
>> protocol so I'm kinda stuck here.
 
> \0001 should give you a nul byte followed by an ASCII '1'.
 
> Louis
 
Awesome!
 
That fixed that issue. Now I just need to fix my parser :P.
 
Thank you everyone for your help, it is much appreciated.
Paavo Helde <myfirstname@osa.pri.ee>: Nov 28 04:12PM -0600

Louis Krupp <lkrupp@nospam.pssw.com.invalid> wrote in
 
> \0001 should give you a nul byte followed by an ASCII '1'.
 
Another a bit more readable option would be
 
const char *c_netstring = "13:SCGI\0" "1\0,Test";
 
or maybe something like
 
#define NUL "\0"
const char *c_netstring = "13:SCGI" NUL "1" NUL ",Test";
 
This defines a C array of 16 characters (the compiler adds one terminating
zero byte automatically).
 
hth
Paavo
Vincenzo Mercuri <invalid@world.net>: Nov 28 02:09AM +0100

Il 27/11/2014 22:31, Mr Flibble ha scritto:
>> const calling the operator< potentially change the ordering :)
 
> That might be the case but the *objects* inside the priority queue are
> not const objects like the OP claimed.
 
And how do you call objects that you cannot modify?
 
--
Vincenzo Mercuri
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Nov 28 01:30AM

On 28/11/2014 01:09, Vincenzo Mercuri wrote:
 
>> That might be the case but the *objects* inside the priority queue are
>> not const objects like the OP claimed.
 
> And how do you call objects that you cannot modify?
 
But you can modify them.
 
const int i = 42; /* (1) a const object */
int j = 43; /* (2) a non-const object */
const int& r = j; /* (3) a reference-to-const to a non-const object */
 
We are talking about case (3) here: the underlying container of
priority_queue is std::vector by default and it is not possible to store
const objects in a std::vector.
 
Theoretically you can use const_cast<> on the priority_queue top()
element to "remove const" and modify it and you should not run into any
problems as long as that change doesn't affect ordering.
 
/Flibble
Vincenzo Mercuri <invalid@world.net>: Nov 28 03:24AM +0100

Il 28/11/2014 02:30, Mr Flibble ha scritto:
 
> We are talking about case (3) here: the underlying container of
> priority_queue is std::vector by default and it is not possible to store
> const objects in a std::vector.
 
That's where our misunderstanding lies. With "stored as const" I mean
that they can only be accessed by means of reference-to-const, also
because it wouldn't make much sense to "store const objects", for the
same reason why a "vector<const int>" is meaningless. In our case,
std::priority_queue uses std::less<> by default (as its Compare type),
which provides a std::less::operator() declared as:
 
bool operator()( const T& lhs, const T& rhs ) const;
 
that in turn requires T (OP's "duty"..) to define operator< which *must*
be const because it's called by a const member function. [If the OP
had to define his/her type for a container like vector, operator<
wouldn't be required to be const anymore].
 
 
> Theoretically you can use const_cast<> on the priority_queue top()
> element to "remove const" and modify it and you should not run into any
> problems as long as that change doesn't affect ordering.
 
I understand that but that was not my point: a reference-to-const
is a reference-to-non-const via const_cast<> as much as an int is
a double via static_cast<>.
 
--
Vincenzo Mercuri
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Nov 28 01:53PM

On 28/11/2014 02:24, Vincenzo Mercuri wrote:
[snip]
 
> I understand that but that was not my point: a reference-to-const
> is a reference-to-non-const via const_cast<> as much as an int is
> a double via static_cast<>.
 
Wrong. The double would be a different object to the int when using
static_cast<> whilst the result of the const_cast<> returns the *same*
object.
 
/Flibble
bleachbot <bleachbot@httrack.com>: Nov 28 05:33AM +0100

ram@zedat.fu-berlin.de (Stefan Ram): Nov 28 01:29PM

Someone writes:
>Subject: Dealing with strings with NULL characters in the middle
 
The ASCII character is spelled »NUL«.
killet@killetsoft.de: Nov 27 11:05PM -0800

Here is a direct link to download a GeoDLL test version:
http://www.killetsoft.de/zip/geodll.zip
BV BV <bv8bv8bv8@gmail.com>: Nov 27 08:33PM -0800

Why is Smiling a Donation?

(And smiling to your brother is donation). This is what the greatest Prophet (All Prayers and Peace of Allah be upon him) said and this is what the latest researches are discovering, so let's read ....
Researchers have studied about smiling influence on others. They have found that smiling contains strong information that can influence the human subconscious mind!
They found that everyone has his particular smile that no one can share with him. Moreover, every smile contains special effect, too. They photographed these smiles and showed it slowly, hence, they noticed some specific movements. Likewise, a person can have more than one kind of smiles, regarding his mental status, what is he speaking about and the person he is speaking to...

Some of the most important information of such researches, researches are talking about what you can give to others through the smile, because it is more than giving a material thing for the following reasons:
When smiling you can transmit joy to others, which is a sort of donation and which can be the most important. Studies showed that sometimes man may need joy and gladness more than food and drink. Also, that joy can treat many diseases starting by heart problems.
Through the smile you can transmit information to others very easily, because a word with a smile has more influence on the brain. Magnetic resonance imaging has shown that expression influence changes too much with a smile. The expression is the same , however, the influenced brain parts differ according to smile type accompanying this information or this expression.
You can calm an atmosphere stain of a given situation with a soft smile. This cannot be done with money. Hence, smile is worthier and more important than money. So, the less you can give to others is smile donation.
Smile and recovery: Many doctors have noticed smile influence on recovery. Therefore, some researches declare that the doctor's smile is a part of the treatment! Then, giving a smile to your friend, your wife or your neighbor, you are giving them a free remedy prescription without feeling, and this is a kind of donation.
For these reasons and others, smile is considered as a sort of donation, giving and generosity. And now dear reader, do you realize why did the prophet of compassion (All Prayers and Peace of Allah be upon him) say: (and smiling to your brother is donation)!!
--------------------
By: Abduldaem Al-Kaheel
www.kaheel7.com/eng
http://www.kaheel7.com/eng/index.php/legislative-miracles/193-why-is-smiling-a-donation-
Source:
· Smile -- And The World Can Hear You, Even If You Hide, www.sciencedaily.com, Jan. 16, 2008.

Thank you
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

Digest for comp.programming.threads@googlegroups.com - 1 update in 1 topic

comp.programming.threads@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.programming.threads+unsubscribe@googlegroups.com.
Ramine <ramine@1.1>: Nov 27 02:48PM -0800

Hello,
 
 
New research lights the way to super-fast computers
 
 
Read more here:
 
http://www.sciencedaily.com/releases/2014/11/141107091447.htm
 
 
 
Thank you,
Amine Moulay Ramdane.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

Thursday, November 27, 2014

Digest for comp.lang.c++@googlegroups.com - 3 updates in 3 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
Ben Bacarisse <ben.usenet@bsb.me.uk>: Nov 27 11:10PM

Chicken Mcnuggets <chicken@mcnuggets.com> writes:
<snip>
 
> unknown location(0): fatal error in "SCGITest": std::out_of_range:
> vector::_M_range_check: __n (which is 49) >= this->size() (which is
> 15)
 
The code increments an iterator in some specific cases. The for loop
then *always* increments it. Are you certain that the condition that
ends the loop (it != raw_scgi_netstring.end()) is going to fire and not
be "skipped"?
 
BTW, the code looks to be making heavy work of parsing out the parts of
string. The std::string class has lots of member function that can help
with this sort of task.
 
<snip>
--
Ben.
Barry Schwarz <schwarzb@dqel.com>: Nov 27 02:55PM -0800

On Thu, 27 Nov 2014 09:38:16 -0800 (PST), elizuniga573@gmail.com
wrote:
 
>Yeah you are right , but the id is not the problem the message is
 
>"instantiated from here" where i declared my priority queue.
 
This is a completely different message than my system generates.
 
>The question is how can a create a priority queue of a class because it seems what i do doesnt work.
 
That is most likely not the question. The more probable question is
how to define the class properly so a priority queue can be
implemented.
 
You need to provide the complete error message and identify the line
of code the compiler is referring to.
 
Go back and look at the hint I gave you in my last message.
 
--
Remove del for email
Nobody <nobody@nowhere.invalid>: Nov 19 09:52AM

On Sun, 16 Nov 2014 14:34:18 -0800, Öö Tiib wrote:
 
 
> You can't. There can be 'istream' whose size is not constant. For example
> it can be some fifo or pipe that other application is writing into from
> other side.
 
It could even be a regular file which some other application is writing
into.
 
In that case, it will have a defined size at any moment in time, but that
doesn't mean that you'll be able to read it all before the size changes.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

Digest for comp.lang.c++@googlegroups.com - 25 updates in 8 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 27 10:36PM

On 25/11/14 20:01, Christopher Pisz wrote:
> You'd probably want a class structure for the entire response and some
> map of name and values inside. I don't know anything about the scgi
> protocol though.
 
I've been playing around with this a little bit this evening and can't
get it to work correctly. This is my code so far (I've put it up on
ideone.com because it wraps in a nasty way when posted here directly):
 
http://ideone.com/TgynzG
 
Unfortunately it throws an out of range exception. This is the actual error:
 
unknown location(0): fatal error in "SCGITest": std::out_of_range:
vector::_M_range_check: __n (which is 49) >= this->size() (which is 15)
 
and I'm stumped. I'm also pretty sure my code is incorrect but haven't
found the right method to parse a std::vector<char> for the correct
values yet.
 
Anyone got any suggestions? Using iterators and containers seem to be a
bit of a pain at the moment. As far as I can tell this should be fine
since I'm using an iterator which should stop at the end of the vector
but it seems that is not the case.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 27 10:39PM

On 27/11/14 22:36, Chicken Mcnuggets wrote:
> bit of a pain at the moment. As far as I can tell this should be fine
> since I'm using an iterator which should stop at the end of the vector
> but it seems that is not the case.
 
Doh forgot to add this is my code for initialising the vector:
 
const char *c_netstring = "13:SCGI\01\0,Test";
const int string_length = 15;
std::vector<char> netstring {};
 
for(int i = 0; i < string_length; ++i)
{
netstring.push_back(c_netstring[i]);
}
elizuniga573@gmail.com: Nov 27 09:08AM -0800

Hi, i have a problem with my priority queue i am trying to create a priority queue of a class called duty with three elements but it produces an error. the sentence is :
 
the .h file is
///////////////////////////////////////////////////////////////////////////
#ifndef DUTY_H
#define DUTY_H
 
 
class duty
{
public:
duty();
virtual ~duty();
 
double costo_reducido;
double costo_real;
unsigned id;
bool operator ==( const duty &d2) ;
bool operator <( const duty &d2) ;
bool operator >( const duty &d2) ;
};
 

Digest for comp.programming.threads@googlegroups.com - 2 updates in 2 topics

comp.programming.threads@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.programming.threads+unsubscribe@googlegroups.com.
Tom <mail2devnull@web.de>: Nov 24 03:18PM +0100

the only one who responds to or comments on your posts is yourself. Does this tell you anything about the usefulness of your posts? or work?
Tom <mail2devnull@web.de>: Nov 24 03:19PM +0100

the only one who responds to or comments on your posts is yourself. Does this tell you anything about the usefulness of your posts? or work?
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

Wednesday, November 26, 2014

Digest for comp.lang.c++@googlegroups.com - 17 updates in 4 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
me <noone@all.net>: Nov 26 02:15AM

On Tue, 25 Nov 2014 11:39:20 +0000, Chicken Mcnuggets wrote:
 
> Servers are a different matter and for that I prefer either OpenBSD or
> the Ubuntu LTS releases (because they have a well defined support life
> cycle).
 
Not worth debating online for the next several months. Fedora is what I
have been using, I know how to tweak it, and it well supports the
rpmfusion repository of packages that don't meet their licensing
guidelines, but are indispensable nonetheless. It's not without its many
annoyances (short release lifecycles, bleeding edge stuff not being well
documented or well tested, etc), but on the beefy machine I run it on and
in the VirtualBox VMs I create, it works for me.
Martijn Lievaart <m@rtij.nl.invlalid>: Nov 26 11:43AM +0100

On Wed, 26 Nov 2014 02:15:58 +0000, me wrote:
 
> many annoyances (short release lifecycles, bleeding edge stuff not being
> well documented or well tested, etc), but on the beefy machine I run it
> on and in the VirtualBox VMs I create, it works for me.
 
Agree, so the following only added for reference to others. I'm not
trying to start a flame war, if anyone replies, keep it factual!
 
I used to use FC/CentOS. I have now switched to Ubuntu (LTS for servers,
latest for desktops), but still have CentOS servers.
 
The annoyances are similar. The difference is superficial mostly.
 
The most important differences I have noticed:
 
- Ubuntu LTS is for the most more recent than the latest CentOS.
 
- Ubuntu LTS may be less stable than the latest CentOS when it comes out,
although the difference is not big.
 
- Upgrading Ubuntu to a newer version is much easier than both FC and
CentOS (may have changed recently?)
 
- RHEL and thus CentOS are better accepted in the market, both at
$ORKPLACES and by commercial software vendors.
 
- Rpmfusion is dependent on a few maintainers, which has recently led to
a standstill (now resolved afaik).
 
- Having seperate ppa's seems to work out much better than having one big
rpmfusion in terms of compatibility. You can safely add lot's of ppa's
adding only exactly what you need, but if you add rpmfusion you get it
all, including their upgrades for existing CentOS packages which you may
not want and can lead to uninstallable packages from CentOS or other
sources.
 
- Having seperate ppa's means there is a much better chance someone
created a ppa for the software you are looking for.
 
- It's nice to have less differences between your servers and desktops,
however, with VMs in abundance you should develop on a VM matching your
target, so the difference becomes more moot.
 
- Both yum/rpm and apt/dpkg have advantages and disadvantages. Despite
the strong voices on this one ('apt is lightyears ahead') I find the
differences not very convincing.
- Apt is much faster (although yum is gaining)
- Dpkg does not allow dependencies between packages be listed as easily
as rpm f.i, something I need regularly.
- I do find the tools for apt/dpkg are much better in general, thanks
to having only one repository standard, but working with rpm is still
slightly easier for a techie like me.
- I personally find both lacking in how they handle configfiles
 
- There is no real debootstrap for RedHat (there is a febootstrap but I
found that to be dangerously buggy, only use in a fakeroot chroot
environment)
 
There are many similarities between FC and Ubuntu latest, which mostly
boil down to 'Lots of stuff is broken which may or may not get fixed'.
 
In the end, I prefer Ubuntu now, but the differences are not as large as
others may make you believe.
 
As I haven't used FC for a while now, the above may be out of date,
although I don't expect it to be.
 
M4
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Nov 26 06:14PM

On 26/11/2014 10:43, Martijn Lievaart wrote:
> others may make you believe.
 
> As I haven't used FC for a while now, the above may be out of date,
> although I don't expect it to be.
 
Linus hates C++ though.
 
/Flibble
Martijn Lievaart <m@rtij.nl.invlalid>: Nov 26 09:00PM +0100

On Wed, 26 Nov 2014 18:14:27 +0000, Mr Flibble wrote:
 
[snip]
 
> Linus hates C++ though.
 
And you really had to quote a hundred lines for this non comment?
 
M4
Melzzzzz <mel@zzzzz.com>: Nov 26 09:17PM +0100

On Wed, 26 Nov 2014 21:00:59 +0100
 
> > Linus hates C++ though.
 
> And you really had to quote a hundred lines for this non comment?
 
> M4
 
Perhaps he writes from cell phone? ;)
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 26 09:16PM

On 26/11/14 10:43, Martijn Lievaart wrote:
 
> Agree, so the following only added for reference to others. I'm not
> trying to start a flame war, if anyone replies, keep it factual!
>[snip]
 
Good list. I've never been a fan of Red Hat based distros but I think it
is primarily down to having a rather bad experience with Red Hat 5 or 6
in 1999 or 2000 or whenever it was back then (this was before Red Hat
went all enterprisey).
 
Since then I've either stuck to Debian based distros or Arch Linux. I
had a brief spell on Linux from Scratch (which was a great learning
experience) but for day to day work LFS really REALLY sucks. More than
Gentoo :P.
 
I hear Linus uses Fedora for his dev machine so I guess it can't be all
bad. Maybe I'll give it a go in a VM or something sometime and see if
RPM has improved at all in the last 14 years or so.
Christopher Pisz <nospam@notanaddress.com>: Nov 26 03:45PM -0600

On 11/26/2014 2:00 PM, Martijn Lievaart wrote:
 
>> Linus hates C++ though.
 
> And you really had to quote a hundred lines for this non comment?
 
> M4
 
I've read all the posts in this thread and see very little to do with
the topic of the newsgroup at all. This is just another "I use Linux!"
"Me too!" "I like this flavor!" "I like this one!" thread.
 
So, technically the entire thread shouldn't be here at all.
woodbrian77@gmail.com: Nov 26 02:02PM -0800

On Wednesday, November 26, 2014 3:46:07 PM UTC-6, Christopher Pisz wrote:
 
> I've read all the posts in this thread and see very little to do with
> the topic of the newsgroup at all. This is just another "I use Linux!"
> "Me too!" "I like this flavor!" "I like this one!" thread.
 
My opinion of Linux isn't as high as it used to be.
I think FreeBSD has better TCP support than Linux.
 
http://freebsd.org
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
porparek@gmail.com: Nov 26 07:46AM -0800

On Friday, October 31, 2014 7:46:37 PM UTC+1, Paavo Helde wrote:
> the specified address. This requires some cooperation between the caller
> and the called function. For details see
 
> http://en.wikipedia.org/wiki/Return_value_optimization
 
Thanks to both of you for the reply. It looks like I wasn't aware of how powerfull the RVO is. Now I agree with you.
fl <rxjwg98@gmail.com>: Nov 25 09:15PM -0800

Hi,
 
Sorry, I forgot the wrap problem in my first post.
 
 
 
I have a question about transferring data from a class to another.
Today, I see the following line:
 
We can use a class object for transferring data to another class.
 
 
from a forum. But I do not have a clue on how to get it in C++.
Could you explain it to me, especially by an example?
 
 
Thanks,
red floyd <no.spam.here@its.invalid>: Nov 25 09:49PM -0800

On 11/25/2014 9:15 PM, fl wrote:
 
> We can use a class object for transferring data to another class.
 
> from a forum. But I do not have a clue on how to get it in C++.
> Could you explain it to me, especially by an example?
 
And once again, you have given insufficient information.
The simple answer is "use the appropriate methods".
 
A more detailed answer can be found at:
 
http://www.catb.org/esr/faqs/smart-questions.html
Robert Wessel <robertwessel2@yahoo.com>: Nov 26 12:19AM -0600

On Tue, 25 Nov 2014 21:15:53 -0800 (PST), fl <rxjwg98@gmail.com>
wrote:
 
 
>We can use a class object for transferring data to another class.
 
>from a forum. But I do not have a clue on how to get it in C++.
>Could you explain it to me, especially by an example?
 
 
Well that's for the formatting fix, at least. But Ian also asked for
some context. Your question is pretty hard to decipher as it is.
 
In general, think of all the method that you might use for getting
data out of an object, and all of the methods for getting data in to
an object, and then do the problem appropriate form of that somewhere.
 
Really, what are you trying to do?
"Öö Tiib" <ootiib@hot.ee>: Nov 25 11:13PM -0800

On Wednesday, 26 November 2014 07:16:12 UTC+2, fl wrote:
 
> We can use a class object for transferring data to another class.
 
> from a forum. But I do not have a clue on how to get it in C++.
> Could you explain it to me, especially by an example?
 
Internet is full of forums where lot of sentences are posted.
The sentences usually do not contain much wisdom. It is
hard to tell what the one you posted talks about.
 
In C++ we call member functions of object's class to inspect
or to modify object's state. Member functions are transferring
data into or out of object.
"Osmium" <r124c4u102@comcast.net>: Nov 26 08:40AM -0600

"fl" wrote:
 
 
> We can use a class object for transferring data to another class.
 
> from a forum. But I do not have a clue on how to get it in C++. Could you
> explain it to me, especially by an example?
 
Are you still working on the problem you posed in July or is this a new
problem? Assuming this is the July problem I doubt if there enough
substance in the thing you are Asking about here to help. Your question in
July was, as I understood it, not how to transfer data but how to do it in a
super low overhead way. Remember that a class is an odd-ball structure.
 
Doing something and doing it almost perfectly are two quite different
things. If all else fails start a new question with an actual question in
the text of the message.
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 26 11:16AM

On 25/11/14 20:01, Christopher Pisz wrote:
> You'd probably want a class structure for the entire response and some
> map of name and values inside. I don't know anything about the scgi
> protocol though.
 
There are four primary reasons I am doing this rather than using an
existing library:
 
1) I'm learning C++ and I need the practice.
2) I want my implementation to play nicely with my async networking
implementation (using epoll etc).
3) I need BSD / MIT / Boost / public domain licensed code.
4) I don't like the implementation of most SCGI libraries I have looked at.
 
Now the libraries out there may very well play nicely in an async
environment but I have strong requirements for the public interface
exposed by the SCGI library so that it will integrate with the rest of
the system and because the rest of the library is BSD licensed I can't
use GPL or LGPL code in the code base.
 
I'll give the std::vector<char> a go and see how I get on.
 
Thanks.
Martijn Lievaart <m@rtij.nl.invlalid>: Nov 26 01:52PM +0100

On Wed, 26 Nov 2014 11:16:28 +0000, Chicken Mcnuggets wrote:
 
> I'll give the std::vector<char> a go and see how I get on.
 
As others already pointed out, you may want to have a look at the
std::string(const char*, size_t) constructor. You also may want to look
at std::array<char> and std::deque<char>.
 
HTH,
M4
Chicken Mcnuggets <chicken@mcnuggets.com>: Nov 26 02:08PM

On 26/11/14 12:52, Martijn Lievaart wrote:
> at std::array<char> and std::deque<char>.
 
> HTH,
> M4
 
Cool. Thanks for the tips.
 
I'll dig into my books and see what I can come up with.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.