Wednesday, March 26, 2014

Fwd: one cool lady!!!! Mayor of Mississauga, Ontario



Subject: Fwd: one cool lady!!!!  Mayor of Mississauga, Ontario



Some one who should be the model for us all !

Subject: Fwd: one cool lady!!!!

Monday, March 24, 2014

Fwd: 中�土豪 - Riches in China

朱門酒肉臭,路有凍死骨!

Sent from my iPad

Begin forwarded message:

From: Selina Tsang <selinatsang@yahoo.com>
Date: March 24, 2014 12:22:23 AM CDT
To: Tina Soong <tsoongtotherim@aol.com>, woo ping wong <wpwongho@gmail.com>
Subject: Fwd: 中國土豪  - Riches in China



Sent from my iPad
劉韻怡. Selina  Tsang

Begin forwarded message:

From: Susan Lau <sue_lau@hotmail.com>
Date: March 23, 2014 11:57:05 PM CDT
Subject: FW: 中國土豪  - Riches in China





中國土豪痴迷奢侈品成全奢侈品市場支柱
來源:圖吧

美國《外交政策》雜誌報導?"土豪"成為中國新出現的一個網絡流行語。這個帶有諷刺和蔑視意味的流行語指的就是中國越來越多的暴發戶。現在?中國的土豪們已經成為全球奢侈品市場的一大支柱。
 
從金條到像牙手機?再從城堡到黃金廁所?盤點中國土豪們熱? 缘纳莩奁贰?/span>


2006
12?在廣州一場展覽上亮相的象牙手機。


2005
2?香港九龍民樂街的"黃金廁所"?耗資3800萬港幣?380公斤黃金配以鑽石、天然寶石以及6000多顆珍珠打造?每顆珍珠的價值都超過1000港幣。


2011
3?青島?一名銷售人員正在展示極度奢侈的iphoneipad配件。


2011
?哈藥集團製藥六廠的辦公樓?仿照凡爾賽宮建造?堪稱世界上最奢侈的辦公樓。如果用一句話形容這座辦公樓?那就是"很土豪"


北京的一家大型百貨商場?兩名年輕姑娘俯身注視著閃閃發光的金條。


2010
9?北京昌平的拉斐特城堡酒店?仿照17世紀法國巴洛克風格的拉斐特城堡。


2011
3?一輛純金打造的英菲尼迪黃金跑車停在寶慶銀樓尚品城外面?吸引了很多人的目光。


2007
?北京中國國際珠寶展現場?黃金打造的運動鞋和車模土豪味兒十足。


2013
7?澳門銀河娛樂場展出的黃金寶馬。


2007
2?安徽阜陽市潁泉區政府大樓?因模仿美國白宮?也被稱之為"阜陽白宮"
 
 
 


Fwd: 80 年前一年��本



Sent from my iPad

Begin forwarded message:

From: Sharon K <sharon62kahn@gmail.com>
Date: March 24, 2014 8:06:07 AM CDT
To: undisclosed-recipients:;
Subject: Fwd: Fw: 80 年前一年級課本




Subject: Fw: FW: 80 年前一年級課本


由於 avast! 防毒軟體 已開啟防護,所以此封電子郵件將不受病毒及惡意軟體的侵害。

I don't think this book was for the first grade kids.  Instead, per last page of this book, I found this book supposed to be for the fourth grade students.









Fwd: �航

馬上消失!

大約又是那位現代李白寫的。此人有些歪才。

Sent from my iPad

Begin forwarded message

Subject: Fwd: 馬航






Subject:  馬航

說得那麼巧合, 只是解不了這個謎

上联:没钱的坐火车莫名其妙被砍了         
下联:有钱的坐飞机莫名其妙消失了        
横批:天地不容!         
好端端的一个马年,都是说,马上有钱,马到成功,一马当先!
这下好了,让马来西亚搞了个马上消失!Emoji[流泪]

李白早知道马航会出事!马航飞机失踪,李白早有预言。不信?看他《腾云》一诗:
 
马腾驾祥云,
航行阔海郡。
失于蓬莱阁,
踪迹无处寻。
 
看吧,把首字连起来,就是"马航失踪"。Emoji
           
 
 













Thursday, March 20, 2014

Fwd: 新任��大使 - Max Baucus

翻譯高手!

Sent from my iPad

Begin forwarded message:

From: Hsiao-Hung Kao <k6hsi@aol.com>
Date: March 13, 2014 4:52:58 PM CDT
Subject: Fwd: 新任駐華大使 - Max Baucus



Good translation! 

北京的空气确实不太行。
 
翻譯社:
新任美駐華大使 Max Baucus ( 没咳死 · 包咳死 ) 的任命已獲國會通過,不日將携夫人 Cuslado ( 咳死拉倒 ) 和女兒 Woomay ( 霧霾 來華履新。
 


This email is free from viruses and malware because avast! Antivirus protection is active.





Wednesday, March 19, 2014

Fwd: Diaoyu+Islands+-+The+Truth-HD.mp4 - Google Drive ����端�史,中日百年血海深仇,日本在世界各地犯下的罪行,美��制��片 - 42 分� - 英文解�



Sent from my iPad

Begin forwarded message:

From: Hsiao-Hung Kao <k6hsi@aol.com>
Date: March 15, 2014 10:13:00 PM CDT
Subject: Fwd: Diaoyu+Islands+-+The+Truth-HD.mp4 - Google Drive 釣魚島爭端歷史,中日百年血海深仇,日本在世界各地犯下的罪行,美國攝制紀錄片 - 42 分鐘 - 英文解說


 
U.S. documented and narrated in English about Diaoyu Island, China - Japan history, and American involvement. It's worth every minute of your time.



Subject: Diaoyu+Islands+-+The+Truth-HD.mp4 - Google Drive

https://docs.google.com/file/d/0B8LeM_BKfRiSVUZna2ZiSmlZZEk/preview?pli=1




Fwd: 日本人最恨的中�名星



Sent from my iPad

Begin forwarded message:

From: Dolores Kuo <doloresmkuo@gmail.com>
Date: March 19, 2014 8:15:10 PM CDT
To: Jensie Tou <pandjtou@aol.com>, Tina Soong <tsoongtotherim@aol.com>, Nancy Chao <nancyhychao@yahoo.com>
Subject: Fwd: 日本人最恨的中國名星



Sent from my iPhone

Begin forwarded message:

From: Ronny Lin <ronny_lin@hotmail.com>
Date: March 18, 2014 at 10:24:14 PM CDT
Subject: FW: 日本人最恨的中國名星


 
























Tuesday, March 18, 2014

Fwd: 送�最好的朋友@@@



Sent from my iPad

Begin forwarded message:

From: Lu Pao-ching <pda6666@gmail.com>
Date: March 18, 2014 3:53:03 AM CDT
To: undisclosed-recipients:;
Subject: Fwd: 送給最好的朋友@@@




~~ 送給最好的朋友 ~~~

以下是香港某記者和達賴喇嘛的幾組經典對話 , 很有禪理喔!

———與各位分享!

1 失去的東西,有必要去追討嗎?

活佛:失去的東西,其實從未曾真正地屬於你,不必惋惜,更不必追討。

2.、生活太累,如何輕鬆?

活佛:生活累,一小半源于生存,一小半源於欲望與攀比。

3 昨天與今天,我們該如何把握?

活佛:不要讓太多昨天佔據你的今天。

4、如何對自己,對他人?

活佛:對自己好點,因為一輩子不長;對身邊的人好點,因為下輩子不一定能夠遇見。

5、您如何詮釋禮貌?

活佛:對不起是一種真誠,沒關係是一種風度。

如果你付出了真誠,卻得不到風度,那只能說明對方的無知與粗俗。

6、我們如何確定自己的目標?

活佛:如果你知道去哪,全世界都會為你讓路。

7、怎樣平衡快樂與悲傷?

活佛:一個人只有一個心臟,卻有兩個心房。一個住著快樂,一個住著悲傷,

不要笑得太大聲,不然會吵醒旁邊的悲傷。

8、我們怎樣做才叫"腳踏實地"?

活佛:只要你的腳還在地面上,就別把自己看得太輕;只要你還生活在地球上,

就別把自己看得太大。

9、有人說愛情會因為時間而沖淡,您認為呢?

活佛:愛情使人忘記時間,時間也使人忘記愛情。

10.、兩個相愛的人不能在一起,怎麼辦?

活佛:不能在一起就不能在一起吧,其實一輩子也沒那麼長.

--------------------------------------------------------

山有山的高度,

水有水的深度,

沒必要攀比,

每個人都有自己的長處。

風有風的自由,

雲有雲的溫柔,

沒必要模仿,

每個人都有自己的個性。

您認為快樂的,就去尋找。

您認為值得的,就去守候。

您認為幸福的,就去珍惜。

依心而行,無憾今生。

(fourleafclover)人生1條路:

     走自己的路。

(fourleafclover)人生2件寶:

    身體好、心情好。

(fourleafclover)人生有4苦:

   看不透、捨不得、輸不起、放不下。

(fourleafclover)人生5句話:

     再難也要堅持,再好也要淡泊,再差也要自信, 再多也要節省, 再冷也要熱

情。

(fourleafclover)人生6財富:

     身體、知識、夢想、信念、自信 、骨氣。

送給您最好的朋友,想起誰,就送給誰吧!


Saturday, March 15, 2014

Fwd: 转发:郎朗



Sent from my iPad

Begin forwarded message:

From: Sharon K <sharon62kahn@angmail.com>
Date: March 14, 2014 8:05:12 AM CDT
To: undisclosed-recipients:;
Subject: Fwd: 转发:郎朗




 

是谁杀了郎朗?


首先声明,这不是犯罪小说,郎朗没死,但是那个举世闻名的,使千百万粉丝(我也是其中一个)倾心的,可爱的,年轻天才的中国钢琴家郎朗不复存在了. 我们现在看到的是一个庸俗的,利用自己的天才在音乐文化舞台赚大钱,登上了社会顶峰,而马上将坠落的明星暴发户郎朗!
曾几何时我们还是那么兴奋,谁不知道中国出了个音乐天才,神童钢琴家郎朗。在和德国朋友聊天时常免不了侃几句关于郎朗的新闻,比如什么时候听了郎朗的演奏,盛况如何,郎朗下次什么时候来德表演等等。像我这种很节约的人,也买了郎朗演出他的出名之作的CD盘。那是当年郎朗被他恩师,著名指挥家Eschenbach选中,合作演出贝多芬4号钢琴协奏曲。从此郎朗一举成名,成了世界闻名的钢琴家。他弹得实在好!唯一一点不好的印象是在采访中他自夸太多了点,如果多谈谈他对曲子的理解和对恩师的感谢肯定更好。不过对一个二十多岁的青年,对他的幼稚和自负人们可以原谅。我当时以为这是因为他多年在美国学习,学会了做广告。这也是生存所迫,可以理解嘛,我想。不久他硬是把他的那没等级的"音乐工作者"父亲带上了国际音乐舞台,父子一起在欧洲表演钢琴和二胡合奏"二泉映月"。 中国人明白这是在报父养育之恩,德国的友好评论说,郎朗不仅在钢琴上卓有成就,也致力促进东西方文化的交流。我们真觉得他为中国人露了脸。
然而随着事业的走红,郎朗变了。如果说这几年他在音乐上没有更高的建树,那是可以理解的。已经达到高峰的人,想再进一步是很困难的事。网上许多人对郎朗的装束,大名牌一古腦兒穿上身,抨击很多。我也认为这是小事,艺术家应当享有他的时装自由。然而问题是存在的。郎朗作的广告满天飞,他的钢琴音乐会一年有一百五十多次。我看了一个西方关于郎朗的新闻报导片,拍的全是实况和事实。郎朗几乎每两天就要换一个城市。坐的自然是私人专机,住的是高级宾馆。他没有时间练习弹琴,也没有人谈心。好心的国际音乐评论家开始担心,这个天才将很快会被毁灭。在网上早就传说了郎朗与他父亲的紧张关系。流言蜚语是不可信,但是从影片上看到的片段可以判断,两人的感情的确是个大问题。郎爸已不再是几年前那个朴实的中国知识分子了,他那一身打扮,也许都是名牌货,使人联想起一个跑单帮而成功的暴发户。一脸狡诈,在儿子面前却尽力阿谀奉承。看来媒体的报道是真的,郎朗说:「我小時候,他是老闆;現在,我是老闆!」郎妈做了儿子的经纪人,郎朗的一切的一切都在她的管理之中。在德国金色摄影机发奖大会上,作为领奖人之一的郎朗的母亲自然被安排坐在第一排当中。如果说她不会外语,不懂西方文化,那是没关系的,她只要给出一个善良谦虚的中国母亲的形象就足够了。然而她的表现却使人看了难受和不解。满脸涂了不知多少脂粉,从头到尾她对一切都不感兴趣,只把她的那个小相机对着郎朗,没完没了地按快门。
关于郎爸说"皇家女才配得上我兒子"的事最好报道原话,以免断章取义。关于郎朗的婚姻,他说:"找有權有勢的吧,有下臺的時候;找有錢的,郎朗的錢夠花,吃穿不愁,而且我們是藝術家,注重精神上的享受;找皇家的還不錯,我們和查理斯王子的關係特好,可他沒女兒……"他可以说这是开玩笑的话,但是词句间的市侩气也足够说明问题了。
去年欧洲足球联赛开幕式,郎朗居然也去演奏。不知是谁拉的这门生意,郎朗从中得了多少钱。看得我为之脸红。对欧洲社会稍有一点常识的人都知道,足球俱乐部是欧洲最富有,最有权势的社会集团。那些球星们被几千万元地被买进卖出。政客们为了选票得罪谁也决不敢得罪足球迷。但是艺术家是可以在这里清高一下的。这是两个不相及的领域。没有必要到那里去露一手。开幕式开始了,郎朗开始演奏,没人听他的,10万观众向他们心目中的英雄欢呼起来,那些有价值千万欧元的大腿的足球明星。郎朗的这笔生意的后果是什么呢?郎朗说,"人付出了代價,為什麼不掙錢?商業是必然的過程。"这个商业過程的结果会很快显示出来,在今明年中郎朗还会得到多少邀请呢?拿到多少合同呢?当郎家三口意识到自己的坠落后,可能会迁怒于媒体,特别是互联网。人说社会杀人不见血,是这样。少年出名的风险是很大,人言可畏也是事实。我这里只写了郎家三口的表现。如果把这明星的坠落都说成是他们自作自受,的确是不公平的。他们的表现反映了中国社会的道德沦落,不顾一切地追名逐利,以致到了无以复加的地步。近年来那些腰缠万贯的社会名流一个接一个地坠落。人们似乎着了魔,只会作黄金梦,不会思考了。也许这并不奇怪,只要仔细想一想,堂堂北大的校长以北大出了最多的百万富翁而自豪,那么这个社会不向钱看,还会向哪里看呢?
来源:作者投稿









 



Friday, March 14, 2014

Fwd: World sisterhood day!

Happy WORLD  SISTERHOOD DAY!

            

Sent from my iPad

Begin 





好精辟的一段話    


女人生了娃,
腹部成西瓜!
胸部成苦瓜!
腰部成冬瓜!
原本愛你的人找了野花!

只有對自己好,多保養,才能鏟除西瓜!

丢掉苦瓜 !

修正冬瓜!

幹掉野花!

成為鲜花!
所以女人,不要對自己不捨得花!
你不花!總有人 幫你花!


祝褔妳  姐妹 日快樂
永遠做個聰明的快樂女人
1、不當三瓶→年輕時是花瓶,中年時是醋瓶,老年時是藥瓶。
2、做三忘女人→忘記年齡、忘記病痛、忘記恩怨。
3、做三養女人→修養、涵養、保養。
4、做三麗女人→美麗、能力、魅力。
5、做三獨女人→思想獨立、能力獨立、經濟獨立。


今明兩天是世界姐妹日,想起誰,發給誰!


Thursday, March 13, 2014

Fwd: TO ALL MY FRIENDS THAT PARK AT WALMART......



Sent from my iPad


Subject: Fw: TO ALL MY FRIENDS THAT PARK AT WALMART.....
TO ALL MY FRIENDS THAT PARK AT WALMART


 

-

Not all the entertainment is in the aisles of Wal-Mart - There is some really strange stuff in the parking lot, too!

 

 

 



 


 

 

 

No virus found in this message.
Checked by AVG - http://www.avg.com/
Version: 2014.0.4259 / Virus Database: 3697/7089 - Release Date: 02/13/14

 

 

 

 

 

 

 

 




This email is free from viruses and malware because avast! Antivirus protection is active.


Tuesday, March 4, 2014

comp.lang.c++ - 26 new messages in 5 topics - digest

comp.lang.c++
http://groups.google.com/group/comp.lang.c++?hl=en

comp.lang.c++@googlegroups.com

Today's topics:

* Working with Large Values (double) - 12 messages, 9 authors
http://groups.google.com/group/comp.lang.c++/t/e42843c9cdf13724?hl=en
* How to download Microsoft Visuail c++ software - 8 messages, 6 authors
http://groups.google.com/group/comp.lang.c++/t/1aa05d6584f1e293?hl=en
* OT: Problem building libc++ - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/177ee9b847d7540f?hl=en
* EVOLUTIONISTS DESTROYED IN 5 SECONDS - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/e18502459ce73309?hl=en
* calling placement new for elements of a deque - 4 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/a896b7c648e29553?hl=en

==============================================================================
TOPIC: Working with Large Values (double)
http://groups.google.com/group/comp.lang.c++/t/e42843c9cdf13724?hl=en
==============================================================================

== 1 of 12 ==
Date: Tues, Feb 25 2014 4:46 pm
From: Robert Wessel


On Wed, 26 Feb 2014 09:39:11 +1300, Ian Collins <ian-news@hotmail.com>
wrote:

>Scott Lurndal wrote:
>> Gerhard Fiedler <gelists@gmail.com> writes:
>>
>>> Try letting the compiler check the argument types when using a variable
>>> as formatting string.
>>
>> I've never seen a case where it makes sense to use a variable as a
>> formatting string[*]. Can you describe a case where it does make sense
>> and it doesn't cause a potential security problem?
>
>Simple internationalisation. I've worked on embedded projects where we
>used different sets of format strings for different languages. No
>security risks there.


Unfortunately the strictly positional nature of the input parameters
in the printf functions has always led us to use our own replacement.




== 2 of 12 ==
Date: Tues, Feb 25 2014 4:50 pm
From: Ian Collins


David Brown wrote:
> On 25/02/14 21:39, Ian Collins wrote:
>> Scott Lurndal wrote:
>>> Gerhard Fiedler <gelists@gmail.com> writes:
>>>
>>>> Try letting the compiler check the argument types when using a variable
>>>> as formatting string.
>>>
>>> I've never seen a case where it makes sense to use a variable as a
>>> formatting string[*]. Can you describe a case where it does make sense
>>> and it doesn't cause a potential security problem?
>>
>> Simple internationalisation. I've worked on embedded projects where we
>> used different sets of format strings for different languages. No
>> security risks there.
>
> That would be my thought. You might have something like this:
>
> typedef enum { formatUK, formatUS } dateFormatChoices;
> static const char dateFormatStrings[] = {
> "%1$02d/%2$02d/%3$04d", "%2$02d/%1$02d/%3$04d"
> }
> void printDate(dateFormatChoices i, int day, int month, int year) {
> printf(dateFormatStrings[i], day, month, year);
> }
>
> (That particular example relies on posix printf with parameters - if you
> can't re-arrange parameter order like that, variable format strings are,
> I think, significantly less useful.)

The case I was thinking of was a monitoring device that displayed the
name of a unit (such as "Battery Time Remaining") or menu items in the
language selected by the user. Nothing fancy.

--
Ian Collins




== 3 of 12 ==
Date: Tues, Feb 25 2014 5:09 pm
From: Robert Wessel


On Tue, 25 Feb 2014 14:41:41 GMT, scott@slp53.sl.home (Scott Lurndal)
wrote:

>Robert Wessel <robertwessel2@yahoo.com> writes:
>>On Mon, 24 Feb 2014 22:05:44 +0100, jacob navia <jacob@spamsink.net>
>>wrote:
>>
>>>Le 24/02/2014 21:40, Victor Bazarov a écrit :
>>>> What Wouter wrote was to show you that to make a mistake using the
>>>> "preferred" form is just as easy as with the other form, and it's just
>>>> as _undiagnosable_.
>>>Yes.
>>>
>>>There is no way to specify a list of arguments of the same type in C (or
>>>in C++ for that matter).
>>>
>>>So, that could crash.
>>>
>>>Contrary to what many people here believe, I do not think that a trivial
>>>error like that is very difficult to solve/fix/find.
>>>
>>>Yes, it is a PITA, as all bugs, but not as bad as MANY other bugs that
>>>can happen also with the overloaded functions. For instance typing a
>>>wrong variable name in a function call, etc. The compiler can warn you
>>>if the type is wrong, but if it is right that is also
>>>
>>>_undiagnosable_
>>>
>>>Let's face it, the perfect compiler/language combination doesn't exist.
>>>
>>>My point was that operator overloading is NOT the best paradigm for
>>>output formatting, to come back to the original discussion. The C
>>>paradigm in *that* case is (for the time being) much better.
>>>
>>>C gives you a mini-language and a fast run time interpreter for it. This
>>>is a very fast and flexible solution that can be used in the C++
>>>context. It wouldn't be very hard to figure out a standard way of
>>>expanding the mini-language with wild cards that would give it the
>>>possibility of formatting arrays/ new types/ etc.
>>>
>>>But no, C++ got driven away from sanity by an initial WRONG DESIGN
>>>DECISION that persists to this day.
>>>
>>>That's all I am saying.
>>>
>>>Printf extensions have been proposed and implemented. The trio printf
>>>proposed array formatting for instance. Having implemented printf in my
>>>compiler system I find the whole idea simple yet incredibly powerful.
>>>
>>>Like the C language. A simple yet powerful language.
>>>
>>>It would be more productive for everyone if C++recognized that design
>>>mistake and would work towards a better implementation of output
>>>formatting (maybe) using that simple idea:
>>>
>>>A simple and small formatting LANGUAGE and an associated run time
>>>interpreter.
>>
>>
>>I don't think anyone really thinks C++ streams are pretty. IMO,
>>they're darn ugly. And overloading the shift operators is at least a
>>little perverse. OTOH, the shift operators as such are fairly rare in
>>code, so while a new operator might have been a bit better, it's
>>really not that big a deal.
>>
>>OTOH, streams *are* type safe and extensible (please don't bother
>>reiterating your argument that many compilers add partial type safety
>>to the printf functions, I've heard you, and, IMO, the argument is
>>insufficient, but we're unlikely to convince each other).
>
>I think one might argue that type-safety is a red-herring in the
>snprintf case, but YMMV.


Just don't use %n...

But seriously, while on (many) systems messing up the match between
the format string and the parameters results in nothing worse than
garbage output (memory overflows on sprintf and the like excepted),
that's still a place where type safety is useful in allowing the
compiler to diagnose that problem.




== 4 of 12 ==
Date: Wed, Feb 26 2014 1:09 am
From: David Brown


On 26/02/14 01:50, Ian Collins wrote:
> David Brown wrote:
>> On 25/02/14 21:39, Ian Collins wrote:
>>> Scott Lurndal wrote:
>>>> Gerhard Fiedler <gelists@gmail.com> writes:
>>>>
>>>>> Try letting the compiler check the argument types when using a
>>>>> variable
>>>>> as formatting string.
>>>>
>>>> I've never seen a case where it makes sense to use a variable as a
>>>> formatting string[*]. Can you describe a case where it does make
>>>> sense
>>>> and it doesn't cause a potential security problem?
>>>
>>> Simple internationalisation. I've worked on embedded projects where we
>>> used different sets of format strings for different languages. No
>>> security risks there.
>>
>> That would be my thought. You might have something like this:
>>
>> typedef enum { formatUK, formatUS } dateFormatChoices;
>> static const char dateFormatStrings[] = {
>> "%1$02d/%2$02d/%3$04d", "%2$02d/%1$02d/%3$04d"
>> }
>> void printDate(dateFormatChoices i, int day, int month, int year) {
>> printf(dateFormatStrings[i], day, month, year);
>> }
>>
>> (That particular example relies on posix printf with parameters - if you
>> can't re-arrange parameter order like that, variable format strings are,
>> I think, significantly less useful.)
>
> The case I was thinking of was a monitoring device that displayed the
> name of a unit (such as "Battery Time Remaining") or menu items in the
> language selected by the user. Nothing fancy.
>

In cases like that (if I am reading you correctly), for printing a
variable char* p

printf(p);

you could use

printf("%s", p);

That version is arguably safer (it is /definitely/ safer if your strings
come from elsewhere, but I don't expect that applies in your case), and
probably runs faster.





== 5 of 12 ==
Date: Wed, Feb 26 2014 1:10 am
From: David Brown


On 26/02/14 01:46, Robert Wessel wrote:
> On Wed, 26 Feb 2014 09:39:11 +1300, Ian Collins <ian-news@hotmail.com>
> wrote:
>
>> Scott Lurndal wrote:
>>> Gerhard Fiedler <gelists@gmail.com> writes:
>>>
>>>> Try letting the compiler check the argument types when using a variable
>>>> as formatting string.
>>>
>>> I've never seen a case where it makes sense to use a variable as a
>>> formatting string[*]. Can you describe a case where it does make sense
>>> and it doesn't cause a potential security problem?
>>
>> Simple internationalisation. I've worked on embedded projects where we
>> used different sets of format strings for different languages. No
>> security risks there.
>
>
> Unfortunately the strictly positional nature of the input parameters
> in the printf functions has always led us to use our own replacement.
>

If you've got a posix extended printf, then the input parameters don't
have to be strictly positional (see my example).





== 6 of 12 ==
Date: Wed, Feb 26 2014 4:00 am
From: Gerhard Fiedler


Scott Lurndal wrote:

> Gerhard Fiedler <gelists@gmail.com> writes:
>
>> Try letting the compiler check the argument types when using a
>> variable as formatting string.
>
> I've never seen a case where it makes sense to use a variable as a
> formatting string[*]. Can you describe a case where it does make
> sense and it doesn't cause a potential security problem?

Not sure what you call a security problem, but user-selectable output
languages are a pretty common requirement.

Gerhard




== 7 of 12 ==
Date: Wed, Feb 26 2014 6:46 am
From: scott@slp53.sl.home (Scott Lurndal)


Gerhard Fiedler <gelists@gmail.com> writes:
>Scott Lurndal wrote:
>
>> Gerhard Fiedler <gelists@gmail.com> writes:
>>
>>> Try letting the compiler check the argument types when using a
>>> variable as formatting string.
>>
>> I've never seen a case where it makes sense to use a variable as a
>> formatting string[*]. Can you describe a case where it does make
>> sense and it doesn't cause a potential security problem?
>
>Not sure what you call a security problem, but user-selectable output
>languages are a pretty common requirement.

I've seen poorly written software where user-input is provided as the
format string. That's a security problem waiting to happen.

I81n is a legitimate use, in which case the compiler cannot verify
the correctness of the format string with respect to the arguments.




== 8 of 12 ==
Date: Wed, Feb 26 2014 11:51 am
From: Seungbeom Kim


On 2014-02-24 06:30, jacob navia wrote:
> Because there is no ADDITION being done when a and b are STRINGS but a
> concatenation of two strings, what is *completely different*. If a and
> b are strings we have
>
> a+b != b+a
>
> what goes against all the mathematical basis of addition as normal
> people use that word.
>
> That is why string "addition" is an ABUSE of overloading.

Mathematical operators do not define the abuse of C++ operator
overloading. If they did,
* '=' as assignment (instead of equality),
* '<<' as left-shift (instead of 'much less than'),
* '%' as remainder (instead of percent), or
* '|' as bitwise OR (instead of 'divides'), etc.
would all be an abuse as well.

> In the same vein, shifting left an object to print it just because the
> opeartor << looks like the head of a left arrow or suggests "put into"
> is NONSENSE and an abuse of the overloading concept.

'<<' is defined both as a left-shift operator and a stream insert
operator in the same document that defines C++. The fact that << is
used for one doesn't automatically make the other usage an abuse.

--
Seungbeom Kim




== 9 of 12 ==
Date: Wed, Feb 26 2014 2:30 pm
From: Jorgen Grahn


On Mon, 2014-02-24, Wouter van Ooijen wrote:
> jacob navia schreef op 24-Feb-14 3:34 PM:
>> Besides, if you want to support SEVERAL print functions for instance for
>> formatting a customer with name, age or name, SS number, or just
>> initials, etc you will need anyway several print functions in C++ also,
>> if I remember correctly isn't it?
>
> In true C++: if that is what you want it is cetainly possible, just like
> you can have print_xxx functions if you want to.
>
> I think I would prefer to reserve operator<<(person) for (debug)
> printing of ALL data in person, and have separate getters for the items
> that you might want to print, like
>
> std::cout
> << std::setw( 30 ) << person.name()
> << " lives at "
> << std::setw( 60 ) << person.adress();
>
> This keeps *what* you want to print separate from *how* you want to
> print it.

I think what jacob navia is after would be better done as a bunch of
classes which only know how to format a Customer, each in its unique
fashion:

std::cout << ForMailingLabel(some_customer);
std::cout << ForGreetingMessage(some_customer);
std::cout << ForTheNSA(some_customer);

(Sorry about the bad naming; I don't deal with customers so I don't
know what you want to print or why.)

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .




== 10 of 12 ==
Date: Wed, Feb 26 2014 2:35 pm
From: jacob navia


Le 26/02/2014 23:30, Jorgen Grahn a écrit :
> On Mon, 2014-02-24, Wouter van Ooijen wrote:
>> jacob navia schreef op 24-Feb-14 3:34 PM:
>>> Besides, if you want to support SEVERAL print functions for instance for
>>> formatting a customer with name, age or name, SS number, or just
>>> initials, etc you will need anyway several print functions in C++ also,
>>> if I remember correctly isn't it?
>>
>> In true C++: if that is what you want it is cetainly possible, just like
>> you can have print_xxx functions if you want to.
>>
>> I think I would prefer to reserve operator<<(person) for (debug)
>> printing of ALL data in person, and have separate getters for the items
>> that you might want to print, like
>>
>> std::cout
>> << std::setw( 30 ) << person.name()
>> << " lives at "
>> << std::setw( 60 ) << person.adress();
>>
>> This keeps *what* you want to print separate from *how* you want to
>> print it.
>
> I think what jacob navia is after would be better done as a bunch of
> classes which only know how to format a Customer, each in its unique
> fashion:
>
> std::cout << ForMailingLabel(some_customer);
> std::cout << ForGreetingMessage(some_customer);
> std::cout << ForTheNSA(some_customer);
>
> (Sorry about the bad naming; I don't deal with customers so I don't
> know what you want to print or why.)
>
> /Jorgen
>

Exactly, and I like specially the last one:

std::cout << ForTheNSA(some_customer);

!!!





== 11 of 12 ==
Date: Thurs, Feb 27 2014 12:01 am
From: Stuart


On 02/26/2014, Jorgen Grahn wrote:
>> I think what jacob navia is after would be better done as a bunch of
>> classes which only know how to format a Customer, each in its unique
>> fashion:
>>
>> std::cout << ForMailingLabel(some_customer);
>> std::cout << ForGreetingMessage(some_customer);
>> std::cout << ForTheNSA(some_customer);
[snip]

On 02/26/14, jacob navia:
> Exactly, and I like specially the last one:
>
> std::cout << ForTheNSA(some_customer);
>
> !!!

+1.

If the NSA was really that good, they should slip it into the C++
standard and make it a required method for each class ;-)

Regards,
Stuart




== 12 of 12 ==
Date: Thurs, Feb 27 2014 12:55 am
From: David Brown


On 27/02/14 09:01, Stuart wrote:
> On 02/26/2014, Jorgen Grahn wrote:
>>> I think what jacob navia is after would be better done as a bunch of
>>> classes which only know how to format a Customer, each in its unique
>>> fashion:
>>>
>>> std::cout << ForMailingLabel(some_customer);
>>> std::cout << ForGreetingMessage(some_customer);
>>> std::cout << ForTheNSA(some_customer);
> [snip]
>
> On 02/26/14, jacob navia:
>> Exactly, and I like specially the last one:
>>
>> std::cout << ForTheNSA(some_customer);
>>
>> !!!
>
> +1.
>
> If the NSA was really that good, they should slip it into the C++
> standard and make it a required method for each class ;-)
>

This explains the "hidden overheads" in C++ that C fans always complain
about...








==============================================================================
TOPIC: How to download Microsoft Visuail c++ software
http://groups.google.com/group/comp.lang.c++/t/1aa05d6584f1e293?hl=en
==============================================================================

== 1 of 8 ==
Date: Tues, Feb 25 2014 8:22 pm
From: 893756098a@gmail.com


Recently,our class had studied Microsoft Visuail c++.So I want to practice after school,but I can't install this.I would appreciate it if someone could do me a favour!




== 2 of 8 ==
Date: Tues, Feb 25 2014 10:42 pm
From: Robert Wessel


On Tue, 25 Feb 2014 20:22:02 -0800 (PST), 893756098a@gmail.com wrote:

> Recently,our class had studied Microsoft Visuail c++.So I want to practice after school,but I can't install this.I would appreciate it if someone could do me a favour!


You can download the Visual Studio Express products from:

http://www.visualstudio.com/products/visual-studio-express-vs

You probably want the "Express 2013 for Windows Desktop" version.

If you need a version that runs on version of Windows prior to 7,
there's a link to the VS2010 downloads on that page (you'd probably
want to "C++" version).




== 3 of 8 ==
Date: Wed, Feb 26 2014 2:00 am
From: Javier López


El 26/02/2014 5:22, 893756098a@gmail.com escribió:
> Recently,our class had studied Microsoft Visuail c++.
> So I want to practice after school,but I can't install this.I would
> appreciate it if someone could do me a favour!
>
You can download Windows SDK 7.1 instead (or in addition to) if you only
want the toolchain (compiler, linker, etc. but not the IDE) or if you
want to compile 64-bit executables.




== 4 of 8 ==
Date: Wed, Feb 26 2014 3:50 am
From: "Rick C. Hodgin"


On Tuesday, February 25, 2014 11:22:02 PM UTC-5, 89375...@gmail.com wrote:
> Recently,our class had studied Microsoft Visuail c++.So I want to practice after school,but I can't install this.I would appreciate it if someone could do me a favour!


If you would like an older version (lighter weight), you can download Visual Studio 2008 Express C++ here:

http://www.libsf.org/software/other/microsoft/visual-studio-2008-express-enu-x1397868.iso

Best regards,
Rick C. Hodgin




== 5 of 8 ==
Date: Wed, Feb 26 2014 8:31 am
From: Bo Persson


Javier López skrev 2014-02-26 11:00:
> El 26/02/2014 5:22, 893756098a@gmail.com escribió:
>> Recently,our class had studied Microsoft Visuail c++.
>> So I want to practice after school,but I can't install this.I would
>> appreciate it if someone could do me a favour!
>>
> You can download Windows SDK 7.1 instead (or in addition to) if you only
> want the toolchain (compiler, linker, etc. but not the IDE) or if you
> want to compile 64-bit executables.

Nowadays, even the Express edition contains the 64-bit compiler.


Bo Persson





== 6 of 8 ==
Date: Wed, Feb 26 2014 11:28 am
From: "Rick C. Hodgin"


On Wednesday, February 26, 2014 11:31:07 AM UTC-5, Bo Persson wrote:
> Javier López skrev 2014-02-26 11:00:
> > You can download Windows SDK 7.1 instead (or in addition to) if you only
> > want the toolchain (compiler, linker, etc. but not the IDE) or if you
> > want to compile 64-bit executables.
>
> Nowadays, even the Express edition contains the 64-bit compiler.


I have no experience with Visual Studio 2012 or later. Once I saw that you
needed to be logged in to a Microsoft account to do certain things, I said,
"Check, please!"

-----
The only real difference is you can't use the Express Edition for creating
commercial software after 30 days without registering it. But, you can
create and sell commercial software for up to 30 days, or if you register
it, forever thereafter.

Plugins do not work with the express edition either, so tools like Whole
Tomato's Visual Assist X won't work.

From: http://social.msdn.microsoft.com/Forums/en-US/0782e1b0-db87-4de3-b79d-ba56a481e750/visual-studio-2010-express-is-now-available?forum=Vsexpressinstall

According to Adrian Collier:

"Provided that you comply with all the License Terms for a
particular Express release, the 2010 Express SKUS can be
used to create commercial software. Before you register
the express SKU you are effectively running a trial version
of the Express product, which expires after 30 days. There
is no limit on creating commercial software during the trial
period. Once you register the product, the 'Evaluation' text
changes to show it is a licensed copy."

Best regards,
Rick C. Hodgin




== 7 of 8 ==
Date: Thurs, Feb 27 2014 1:29 am
From: 893756098a@gmail.com


在 2014年2月26日星期三UTC+8下午2时42分58秒,robert...@yahoo.com写道:
> On Tue, 25 Feb 2014 20:22:02 -0800 (PST), 893756098a@gmail.com wrote:
>
>
>
> > Recently,our class had studied Microsoft Visuail c++.So I want to practice after school,but I can't install this.I would appreciate it if someone could do me a favour!
>
>
>
>
>
> You can download the Visual Studio Express products from:
>
>
>
> http://www.visualstudio.com/products/visual-studio-express-vs
>
>
>
> You probably want the "Express 2013 for Windows Desktop" version.
>
>
>
> If you need a version that runs on version of Windows prior to 7,
>
> there's a link to the VS2010 downloads on that page (you'd probably
>
> want to "C++" version).




== 8 of 8 ==
Date: Thurs, Feb 27 2014 8:58 am
From: woodbrian77@gmail.com



Does anyone know if the last CTP for the C++ part
of VS has been incorporated yet into the version
of VS available for download? And if it hasn't
been yet, when it will be? Tia.





==============================================================================
TOPIC: OT: Problem building libc++
http://groups.google.com/group/comp.lang.c++/t/177ee9b847d7540f?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Feb 26 2014 2:45 am
From: Öö Tiib


On Tuesday, 25 February 2014 16:55:47 UTC+2, Scott Lurndal wrote:
> woodbrian77@gmail.com writes:
> >Previously all I had to do to switch from gcc to
> >clang was uncomment this line:
> >
> >#CXX=clang++
> >
> >So it was easy to switch between the two. Now it's
> >kind of troublesome.
>
> See, that's what I call obsessive :-)
>
> Pick a compiler and stick with it.

There are different problem domains. For some software it is
fine advice I guess. For what Brian does it it feels not that good
advice. Reason is that one of Brian's key requirements is
portability.

I have used different compilers (up to 3) as tools of additional
automatic diagnosing even where portability is not required. It
is cheap to set up compiling and running the unit-tests
automatically on several compilers in continuous integration
(if there already are named things anyway).

The differences tend to come up from dim regions of C++
language as rule. Such code (that fails or runs depending on
compiler) can be correct for language lawyer; still it is always
better idea to rewrite it. C++ compilers feel to be among
smartest tools in human disposal and if some of those do not
parse a piece of code then very high chances are that next
human engineer who reads it is stuck with it as well (and that
is expensive).





==============================================================================
TOPIC: EVOLUTIONISTS DESTROYED IN 5 SECONDS
http://groups.google.com/group/comp.lang.c++/t/e18502459ce73309?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Feb 26 2014 8:51 am
From: Thrinaxodon


=================
>BREAKING NEWS!!!
=================
>
THRINAXODON FOUND 300 FOSSILS FROM DEVONIAN STRATA FROM GREENLAND LAST
TUESDAY, ONE WAS A COMPLETE HUMAN PELVIS!
>
THRINAXODON ALSO FOUND 6 PRIMITIVE STONE TOOLS FROM THE SITE, AS WELL AS
CHARCOAL!
>
PETER NYIKOS WAS FORCED TO ACCEPT THAT HUMANS HAVE ORIGINS IN THE
DEVONIAN AND HUMAN EVOLUTION IS A SCAM.
>
THE SMITHSONIAN IS GOING NUTS OVER THIS FIND, I WILL HAVE TO PATENT IT
BEFORE ANYONE ELSE!
>
SEE YA FUCKERS!
============================
EVIDENCE THAT HUMANS LIVED IN THE DEVONIAN:

https://groups.google.com/group/sci.bio.paleontology/browse_thread/thread/6f501c469c7af24f#

https://groups.google.com/group/sci.bio.paleontology/browse_thread/thread/3aad75c16afb0b82#

====================================

http://thrinaxodon.wordpress.com/

===================================

THRINAXODON ONLY HAD THIS TO SAY:

"I..I...I...Can't believe it. This completely disproved Darwinian
orthodoxy."

===================================

THE BASTARDS AT THE SMITHSONIAN, AND THE LEAKEY FOUNDATION ARE ERODING
WITH FEAR.

===========================
THESE ASSHOLES ARE GOING TO DIE:
THOMAS AQUINAS;
ALDOUS HUXLEY;
BOB CASANVOVA;
SkyEyes;
DAVID IAIN GRIEG;
MARK ISAAK;
JOHN HARSHAM;
RICHARD NORMAN;
DR. DOOLITTLE;
CHARLES DARWIN;
MARK HORTON;
ERIK SIMPSON;
HYPATIAB7;
PAUL J. GANS;
JILLERY;
WIKI TRIK;
THRINAXODON;
PETER NYIKOS;
RON OKIMOTO;
JOHN S. WILKINS
===========================

THRINAXODON WAS SCOURING ANOTHER DEVONIAN FOSSIL BED, AND FOUND A
HUMAN SKULL, AND A HUMAN FEMUR. HE ANALYSED THE FINDS, AND SAW THAT
THEY WERE NOT NORMAL ROCKS. THESE WERE FOSSILIZED BONES. THEY EVEN HAD
TOOTH MARKS ON THEM. SO, THRINAXODON BROUGHT THEM TO THE LEAKEY
FOUNDATION, THEY UTTERLY DISMISSED IT, AND SAID, "We want to keep
people thinking that humans evolved 2 Ma." THRINAXODON BROUGHT HIS
SWORD, AND SAID, "SCIENCE CORRECTS ITSELF." RICHARD LEAKEY SAID, "That
is a myth, for people to believe in science." THRINAXODON PLANS TO
BRING DOOM TO SCIENCE, ITSELF.

============================

THRINAXODON IS NOW ON TWITTER
--
---Thrinaxodon





==============================================================================
TOPIC: calling placement new for elements of a deque
http://groups.google.com/group/comp.lang.c++/t/a896b7c648e29553?hl=en
==============================================================================

== 1 of 4 ==
Date: Wed, Feb 26 2014 9:50 pm
From: hbdevelop1@gmail.com


Hello
For optimisation reasons, I am re-using not used objects in my deque for new objects.
I am doing that this way :
void Score::Add(const char *str, Coordinates &sp)
{
for(deque<Text>::iterator it=scores.begin();it!=scores.end(); ++it)
{
if(it->notUsed==1)
{
it->Reset(str,sp);
return;
}
}

scores.push_back(Text(str,sp));
}

I thought it would be more convenient to call the placement new on the notUsed object instead of Reset.
How can I do this ?
How can I get the address of the not used object so I can use it in the new placement operator?


Thank you in advance




== 2 of 4 ==
Date: Thurs, Feb 27 2014 5:43 am
From: Victor Bazarov


On 2/27/2014 12:50 AM, hbdevelop1@gmail.com wrote:
> For optimisation reasons, I am re-using not used objects in my deque for new objects.
> I am doing that this way :
> void Score::Add(const char *str, Coordinates &sp)
> {
> for(deque<Text>::iterator it=scores.begin();it!=scores.end(); ++it)
> {
> if(it->notUsed==1)
> {
> it->Reset(str,sp);
> return;
> }
> }
>
> scores.push_back(Text(str,sp));
> }
>
> I thought it would be more convenient to call the placement new on the notUsed object instead of Reset.
> How can I do this ?
> How can I get the address of the not used object so I can use it in the new placement operator?

You can get a reference to the object through operator* of the iterator.
Then you can use the operator& to get the address of the object. Keep
in mind, however, that generally the constructor calls need to match the
destructor calls, so don't forget to destroy the object using a direct
call to the destructor before constructing a new one there. Something like

if (it->notUsed == 1)
{
Text *pUnused = &(*it);
pUnused->~Text(); // destroy
new (pUnused) Text(str, sp);
return;
}

Remember to include <memory> for placement new operator.

Not sure this is the best approach, though. Why do you think that using
Reset is inconvenient?

V
--
I do not respond to top-posted replies, please don't ask




== 3 of 4 ==
Date: Thurs, Feb 27 2014 9:53 am
From: red floyd


On 2/27/2014 5:43 AM, Victor Bazarov wrote:

>
> if (it->notUsed == 1)
> {
> Text *pUnused = &(*it);
> pUnused->~Text(); // destroy
> new (pUnused) Text(str, sp);
> return;
> }
>
> Remember to include <memory> for placement new operator.
>
> Not sure this is the best approach, though. Why do you think that using
> Reset is inconvenient?

The only reason I can see for using placement new instead of a reset is
that some const members may need updating for the new data. Otherwise
a reset should be fine.




== 4 of 4 ==
Date: Thurs, Feb 27 2014 2:39 pm
From: hbdevelop1@gmail.com



The reason why I don't want to use Reset is because it holds the same code as the constructor and is only used in this case.
So I just wondered if I could get rid of Reset and use the constructor, for both, when pushing for the first time and when resetting.
And now, red floyd has given another reason why I might want to use the placement new in future.

Thank you very much Victor and red for your help and constructive feed back

hbdevelop1

On Thursday, February 27, 2014 8:43:12 AM UTC-5, Victor Bazarov wrote:
> On 2/27/2014 12:50 AM, hbdev...@gmail.com wrote:
>
> > For optimisation reasons, I am re-using not used objects in my deque for new objects.
>
> > I am doing that this way :
>
> > void Score::Add(const char *str, Coordinates &sp)
>
> > {
>
> > for(deque<Text>::iterator it=scores.begin();it!=scores.end(); ++it)
>
> > {
>
> > if(it->notUsed==1)
>
> > {
>
> > it->Reset(str,sp);
>
> > return;
>
> > }
>
> > }
>
> >
>
> > scores.push_back(Text(str,sp));
>
> > }
>
> >
>
> > I thought it would be more convenient to call the placement new on the notUsed object instead of Reset.
>
> > How can I do this ?
>
> > How can I get the address of the not used object so I can use it in the new placement operator?
>
>
>
> You can get a reference to the object through operator* of the iterator.
>
> Then you can use the operator& to get the address of the object. Keep
>
> in mind, however, that generally the constructor calls need to match the
>
> destructor calls, so don't forget to destroy the object using a direct
>
> call to the destructor before constructing a new one there. Something like
>
>
>
> if (it->notUsed == 1)
>
> {
>
> Text *pUnused = &(*it);
>
> pUnused->~Text(); // destroy
>
> new (pUnused) Text(str, sp);
>
> return;
>
> }
>
>
>
> Remember to include <memory> for placement new operator.
>
>
>
> Not sure this is the best approach, though. Why do you think that using
>
> Reset is inconvenient?
>
>
>
> V
>
> --
>
> I do not respond to top-posted replies, please don't ask





==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en

To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en