Sunday, November 30, 2008

comp.lang.c++ - 4 new messages in 4 topics - digest

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

comp.lang.c++@googlegroups.com

Today's topics:

* ===Welcome to comp.lang.c++! Read this first. - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/d1056f435c150129?hl=en
* dealing with large csv files - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/67015284d3d3652f?hl=en
* www.cicigogo.cn Nike AirMax,nike shox,Air Jordan,air force one,dunk,UGG,
Adidas - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b2e93d58cfac142c?hl=en
* Who gets higher salary a Java Programmer or a C++ Programmer? - 1 messages,
1 author
http://groups.google.com/group/comp.lang.c++/t/4017272356b778c8?hl=en

==============================================================================
TOPIC: ===Welcome to comp.lang.c++! Read this first.
http://groups.google.com/group/comp.lang.c++/t/d1056f435c150129?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Nov 29 2008 9:29 pm
From: Shiva


Welcome to comp.lang.c++! Read this first.

This post is intended to give the new reader an introduction to reading
and posting in this newsgroup. We respectfully request that you read
all the way through this post, as it helps make for a more pleasant
and useful group for everyone.

First of all, please keep in mind that comp.lang.c++ is a group for discussion
of general issues of the C++ programming language, as defined by the ANSI/ISO
language standard. If you have a problem that is specific to a particular system
or compiler, you are much more likely to get complete and accurate answers in a
group that specializes in your platform. A listing of some newsgroups is given
at the end of this post.

The FAQ (Frequently Asked Question) list has a wealth of information for
both the new and veteran C++ programmer. No matter what your experience
level, you are encouraged to read the entire list, if only to familiarize
yourself with what answers are available to minimize redundant replies.
The comp.lang.c++ FAQ is available at http://www.parashift.com/c++-faq-lite/

If the FAQ list does not help, then many regular readers of this group
are happy to assist with problems of standard C++. We have only a few
requests that we ask be adhered to, for the benefit of all:

* Please put a short summary in the subject line. Descriptions such as
"HELP!!!!!!" are not helpful, and many regular posters ignore such
requests. A good example is, "Problem with Virtual Functions."

* State the question or the problem clearly and concisely. Describe what
you are trying to do, and the problem you are running into. Include all
relevant error messages.

* Include the smallest, complete and compilable program that exhibits your
problem. As a rule, posters in comp.lang.c++ will not do homework, but will
give helpful hints if you have shown some willingness to try a solution.

* comp.lang.c++ is forum for discussion, and as such some regular posters do
not give E-mail replies. Very often follow-ups to postings have corrections,
so plan on taking part in the discussion if you post a question. If you
do receive e-mail replies, it is considered polite to post a summary.

* Don't post in HTML format. Many readers of this newsgroup don't use
newsreaders which can handle HTML postings.

* If you have to include source code in your post, include the
source in the message body. Don't use attachments. A lot
of contributors to this newsgroup won't even notice the existence
of attachments or won't open them. You try to get any help
you can get, don't you?

Some netiquette topics which frequently crop up on comp.lang.c++ are
also answered in the FAQ.

* Should I post job advertisements and/or resumes on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.10

* What if I really need a job; should I post my resume on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.11

* What should I do to someone who posts something off-topic?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.12

A note on comp.lang.c++ etiquette: Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally; the best way to fit in
with comp.lang.c++ is to express gratitude for the correction, move on,
and be more careful next time.

This is a very busy group, so these requests are designed to make it as
pleasant and efficient an experience as possible. We hope it proves
a valuable commodity to you.

A list of some Newsgroups :
Languages and Programming
-------------------------
comp.lang.c The C Programming Language
comp.lang.asm.x86 x86 assembly language programming
comp.programming Non-language specific programming
comp.graphics.algorithms Issues of computer graphics

Operating Systems
-----------------
comp.os.msdos.programmer DOS, BIOS, Memory Models, interrupts,
screen handling, hardware
comp.os.ms-windows.programmer.win32 MS/Windows: Mice, DLLs, hardware
comp.os.os2.programmer.misc OS/2 Programming
comp.sys.mac.programmer.misc Macintosh Programming
comp.unix.programmer General Unix: processes, pipes, POSIX,
curses, sockets
comp.unix.[vendor] Various Unix vendors

Microsoft VC++
-------------
microsoft.public.vc.language VC++ issues
microsoft.public.vc.mfc MFC Issues
microsoft.public.dotnet.languages.vc C++/CLR Issues
microsoft.public.dotnet.framework .Net Framework


Borland C++ Builder
-------------------
borland.public.cppbuilder.language Borland C++ Builder
borland.public.cpp.language
borland.public.cppbuilder

-Shiva
http://www.slack.net/~shiva/welcome.txt


Sun Nov 30 00:30:00 EST 2008


==============================================================================
TOPIC: dealing with large csv files
http://groups.google.com/group/comp.lang.c++/t/67015284d3d3652f?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Nov 29 2008 10:32 pm
From: LR


brzak wrote:
> hi
>
> I was hoping for a few pointers on how to best go about
> processing large csv files.

I don't think that you've given enough information about your particular
problem, but I'll give it a try.

>
> The files:
> a typical file has 100K-500K records
> approx 150 chars per line (10 'fields')
> so file sizes of 15MB-75MB.
>
> The processing:
> summarise numerical fields based on conditions applied to other
> fields
>
> the resulting summary is a table;
> the column headers of which are the list of unique values of one
> field
> the row headers are decided upon by conditions on other fields
> (this may include lookups, exclusions, reclassifications)

Do you mean a hierarchical file, or some other structure?


>
> Taking into account the size of the files, and number of operations
> requierd on each record...
>
> What if any of thse considerations do I need to take into account:
>
> -is the file read in line by line / or in one go?

I'd probably try to do it line by line first and get the processing
right, and then if you need to, switch to all in one go.


> +if in one go, there would be issues with available memory?

There will be issues no matter how you write your code, but the question
is do you have enough memory to store the entire text or not? Plus the
space required for the variables you're going to manipulate?


> +if it's line by line, is tehre a significant difference in time
> taken to process? (i.e from my limited personal experience with
> VBA, reading/writing a cell at a time in a spreasheet is far
> slower than reading/writing in 'batches')

Very system dependent. And "batch" size dependent. You'll have to try it
and see.


> +or would it be an idea to read a limited number in one go?
> e.g. deal with 20,000 at a time in memory

Depends on what your data is like and what you have to do with it.

> i suppose this question demonstrates a lack of experience with C++
> but hey, that's why i'm posting in the learner's forum :)
>
> -however much of the file is read, is it worth writing a bespoke
> solution
> or look for a parser/class that's been written for csv files?

Reading in csv files isn't difficult. You do mean comma seperated
values? What have you tried so far?


> +perhaps there is a module that i can import?

Have you looked at std::getline? You can use that not only to read a
line at a time, but once you have a line in a std::string to easily get
values that are separated by commas using a std::istringstream. Unless
you have quoted fields with commas in them. In which case you might be
more interested in something that can deal with regular expressions.
You might want to look at www.boost.org, or perhaps if your compiler has
support for it, the tr1. I did a quick google(tm) and found this, but I
don't know how good it is: http://www.johndcook.com/cpp_regex.html

But I think that std::getline should be something to take a look at first.

> +since the csv files are *supposed* to be of a standard format,

What standard are they following? And do you suspect they don't follow a
standard?

> would
> there be much to gain iin writing something specific to this - this
> would be done with the aim of reducing processing time

Have you tried this already and found that your processing time is too long?

>
> -data types... should i read the value fields as floating point
> numbers (range approx. +/- 500000.00)

Probably that or double. I think double would be better. But as you
point out...

> +will using floating point data types save memory?

Yes, well probably, but I suspect it will take more time to use float.
System dependent. But I don't know. Best to benchmark if you're
concerned. Also, I don't recall, but I think that sizeof(float) can be
equal to sizeof(double), although I can't think of a system where it is.

I think that most problems have a space time trade off. You may have to
decide which one is more important to you.


> As anyone reading would be able to tell, I'm still quite new to this
> language, and am missing some of the basics which I've had a bit of
> trouble locating solutions to.
>
> Any advice would be much appreciated!

Sounds like you might need a good book. You might want to check out the
reviews at www.accu.org.

LR

==============================================================================
TOPIC: www.cicigogo.cn Nike AirMax,nike shox,Air Jordan,air force one,dunk,UGG,
Adidas
http://groups.google.com/group/comp.lang.c++/t/b2e93d58cfac142c?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Nov 29 2008 10:41 pm
From: cicitrade


Nike Air Jordan 15 XV Force 1 Jordan Fusion AJF 15 AJF15 AJ15F
www.cicigogo.cn Jordan 15 fusion
Nike Air Jordan 16 XVI Force 1 Jordan Fusion AJF 16 AJF16 AJ16F
www.cicigogo.cn Jordan 16 fusion
Nike Air Jordan 17 XVII Force 1 Jordan Fusion AJF 17 AJF17 AJ17F
www.cicigogo.cn Jordan 17 fusion
Nike Air Jordan 18 XVIII Force 1 Jordan Fusion AJF18 AJF18 AJ18F
www.cicigogo.cn Jordan 18 fusion
Nike Air Jordan 19 XIX Force 1 Jordan Fusion AJF 19 AJF19 AJ19F
www.cicigogo.cn Jordan 19 fusion
Nike Air Jordan 20 XX Force 1 Jordan Fusion AJF 20 AJF20 AJ20F
www.cicigogo.cn Jordan 20 fusion
Nike Air Jordan 21 XXI PE Force 1 Jordan Fusion AJF 21 AJF21 AJ21F
www.cicigogo.cn Jordan 21 fusion
Nike Air Jordan XXII 22 Force 1 Jordan Fusion AJF 22 AJF22 AJ22F
www.cicigogo.cn Jordan 22 fusion
Nike Air Jordan XXIII 23 Force 1 Jordan Fusion AJF 23 AJF23 AJ23F
www.cicigogo.cn Jordan 23 fusion
Jordan 4-11 Fusion www.cicigogo.cn
Jordan 7-8 Fusion www.cicigogo.cn
Jordan 10-12 Fusion www.cicigogo.cn
Jordan 11-13 Fusion www.cicigogo.cn
Jordan 9-23 Fusion www.cicigogo.cn
Jordan 13-23 Fusion www.cicigogo.cn
Jordan 1 jordan 4 jordan 5 jordan 5 fusion jordan 5 jordan 3 fusion
jordan 3 Jordan 23 jordan 11 jordan 12

jordan 7 jordan 8 jordan 6 jordan 6 rings
jordan 13 jordan 14 jordan 15 jordan 2 Jordan 7.5 Jordan 9.5 Jordan
12.5 Jordan 3.5 Jordan 4.5 Jordan


15.5 Jordan 19.5 Jordan 21.5 Jordan 21 Jordan 22
AIR Jordan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23
shoes on www.cicigogo.cn
AIR Jordan 1 www.cicigogo.cn
AIR Jordan 2 www.cicigogo.cn
AIR Jordan 3 www.cicigogo.cn
AIR Jordan 4 www.cicigogo.cn
AIR Jordan 5 www.cicigogo.cn
AIR Jordan 6 Rings www.cicigogo.cn
AIR Jordan 6 www.cicigogo.cn
AIR Jordan 7 www.cicigogo.cn
AIR Jordan 8 www.cicigogo.cn
AIR Jordan 9 www.cicigogo.cn
AIR Jordan 10 www.cicigogo.cn
AIR Jordan 11 www.cicigogo.cn
AIR Jordan 12 www.cicigogo.cn
AIR Jordan 13 www.cicigogo.cn
AIR Jordan 14 www.cicigogo.cn
AIR Jordan 15 www.cicigogo.cn
AIR Jordan 16 www.cicigogo.cn
AIR Jordan 17 www.cicigogo.cn
AIR Jordan 18 www.cicigogo.cn
AIR Jordan 19 www.cicigogo.cn
AIR Jordan 20 www.cicigogo.cn
AIR Jordan 21 www.cicigogo.cn
AIR Jordan 22 www.cicigogo.cn
AIR Jordan 23 www.cicigogo.cn
AIR Jordan 3.5 www.cicigogo.cn
AIR AIR Jordan 4.5 www.cicigogo.cn
AIR Jordan 7.5 www.cicigogo.cn
AIR Jordan 9.5 www.cicigogo.cn
AIR Jordan 12.5 www.cicigogo.cn
AIR Jordan 15.5 www.cicigogo.cn
AIR Jordan 19.5 www.cicigogo.cn
AIR Jordan 21.5 www.cicigogo.cn
AIR Jordan Large Size Jordan www.cicigogo.cn
AIR Jordan Size 14 Jordan www.cicigogo.cn
AIR Jordan Size 15 shoes www.cicigogo.cn
AIR Jordan DMP www.cicigogo.cn
air jordan
Air max 87 www.cicigogo.cn
Air max 89 www.cicigogo.cn
Air max 90 www.cicigogo.cn
Air max 91 www.cicigogo.cn
Air max 95 www.cicigogo.cn
Air max 97 www.cicigogo.cn
Air max 2003 www.cicigogo.cn
Air max 2006 www.cicigogo.cn
Air max tn www.cicigogo.cn
Air max ltd www.cicigogo.cn
Air max stab www.cicigogo.cn
www.cicigogo.cn
air jordan
Shox R3 www.cicigogo.cn
Shox R4 www.cicigogo.cn
Shox R5 www.cicigogo.cn
Shox R6 www.cicigogo.cn
Shox OZ www.cicigogo.cn
Shox NZ www.cicigogo.cn
Shox Zoom www.cicigogo.cn
Shox TL3 www.cicigogo.cn
Shox Monester www.cicigogo.cn
Nike shox www.cicigogo.cn
air jordan
Nike air force one, air force 1, air force one low cut, air force one
high cut, air force one release date
Air force one, air foce one 25TH, af 1, af 1 25TH, Nike air force one
new releases, limited version
Air Force One www.cicigogo.cn
Air Force one 25TH www.cicigogo.cn
AF 1 www.cicigogo.cn
AF 1 25TH www.cicigogo.cn
www.cicigogo.cn
air jordan
Dunk sb nike sb dunk nike dunk sb dunk sb high dunk sb low dunk sb
woman
Nike sb dunk Nike Dunk High SB nike dunk low premuim sb Nike SB Dunk
High Shimizu
Nike SB Dunk Pro Nike SB Dunk Dunk SB www.cicigogo.cn
Nike Dunk shoes www.cicigogo.cn
Dunk shoes for woman www.cicigogo.cn
Dunk low cut www.cicigogo.cn
Dunk high cut www.cicigogo.cn
Timberland Boots - Timberland Shoes - Timberland Footwear
UGG? boots for women, men and kids
UGG Classic Short, Classic Short Boots, Classic Sheepskin Boots

==============================================================================
TOPIC: Who gets higher salary a Java Programmer or a C++ Programmer?
http://groups.google.com/group/comp.lang.c++/t/4017272356b778c8?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Nov 30 2008 12:02 am
From: Tim Smith


In article <6pdnoaF7hqv1U3@mid.individual.net>,
blmblm@myrealbox.com <blmblm@myrealbox.com> wrote:
> In article <49305b9b$0$90271$14726298@news.sunsite.dk>,
> Arne Vajhøj <arne@vajhoej.dk> wrote:
> Oh, I don't know that you can really go by that -- some schools
> apparently offer a degree called "Bachelor of Science in Business
> Administration". (But maybe I shouldn't be too snide -- perhaps
> what's taught in business courses *is* a science in some way.
> "Just sayin", maybe.)

"Science" can mean a systematically organized body of knowledge on a
particular subject. Some schools, such as Caltech and MIT, only offer
the B.S. to undergraduates. So, if you went to Caltech and majored in
English literature (which you can, in fact, do), you would end up with a
Bachelor of Science in English Literature. And some schools only offer
the B.A. degree to undergraduates, so if you went to one of those, and
majored in physics, you'd end up with a Bachelor of Arts in physics.

You can see this use of "science" in the United States Constitution.
One of the powers given to Congress is:

To promote the progress of science and useful arts, by securing for
limited times to authors and inventors the exclusive right to their
respective writings and discoveries

That's what authorizes both copyrights and patents in the United States.
Note that it matches up "science" with "writings" of "authors", and
"useful arts" with "discoveries" of "inventors".

--
--Tim Smith


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

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

No comments: