Saturday, February 6, 2010

comp.lang.c - 10 new messages in 6 topics - digest

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

comp.lang.c@googlegroups.com

Today's topics:

* Issue with printing a string - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/26e268149fdbfe14?hl=en
* free c text book advice.. - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/adf51d19d9b07faf?hl=en
* Warning to newbies - 4 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/9597fd702985dff4?hl=en
* MultiCharts 5.5 crack download - www.top-tradesoft.com - 1 messages, 1
author
http://groups.google.com/group/comp.lang.c/t/2d40199f91b64f17?hl=en
* allocating m bytes dynamically - 2 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/3ce8c1090a941d64?hl=en
* Motivation of software professionals - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/21a3fdec4dd53e6a?hl=en

==============================================================================
TOPIC: Issue with printing a string
http://groups.google.com/group/comp.lang.c/t/26e268149fdbfe14?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 5 2010 7:43 pm
From: Keith Thompson


Michael Foukarakis <electricdelta@gmail.com> writes:
> On Feb 4, 10:13 pm, "Default User" <defaultuse...@yahoo.com> wrote:
>> Michael Foukarakis wrote:
>> > On Feb 4, 2:54 pm, Richard Heathfield <r...@see.sig.invalid> wrote:
>> > > Michael Foukarakis wrote:
>> > > > On Feb 4, 12:08 pm, Richard Heathfield <r...@see.sig.invalid>
>> > > > wrote:
>> > > >> Michael Foukarakis wrote:
>> > > > Indeed. Discussions also need arguments;
>>
>> > > <sigh> Not so's you'd notice.
>>
>> > Worth putting effort into, nonetheless. Trolls get tired, grow up, or
>> > die, eventually.
>>
>> They get tired much faster if you ignore them.
>
> And miss all the fun? :'(

Yes, *please*, do us all a favor and miss the fun.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

==============================================================================
TOPIC: free c text book advice..
http://groups.google.com/group/comp.lang.c/t/adf51d19d9b07faf?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 5 2010 8:12 pm
From: Seebs


On 2010-02-06, Mark Hobley <markhobley@hotpop.donottypethisbit.com> wrote:
> jacob navia <jacob@nospam.org> wrote:
>> Nobody is *forcing* you to use C99.

> Well, in theory no .. but open source is a problem, because people keep
> using code that only works on a specific compiler (although admittedly that
> problem is more to do with GCC than C99.)

As one of the people who has recently written code that really does sorta
require C99 to compile:

In this particular case, it's a pragmatic observation; this code is so
intrinsically anti-portable (it intercepts ordinary library calls and
system calls) that I don't much care. But more generally, everything I've
seen any reason to try to use in the last few years has had the core
C99 parts I care about. That something is theoretically not fully compliant
with the IEEE floating point rules makes no difference to me; everything
I've had cause to use recently has compound literals, designated initializers,
mixed statements and code, declarations in the for loop, C++ comments,
and the officially-blessed struct hack.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

==============================================================================
TOPIC: Warning to newbies
http://groups.google.com/group/comp.lang.c/t/9597fd702985dff4?hl=en
==============================================================================

== 1 of 4 ==
Date: Fri, Feb 5 2010 8:15 pm
From: spinoza1111


On Feb 6, 12:50 am, Nick Keighley <nick_keighley_nos...@hotmail.com>
wrote:
> On 5 Feb, 08:04,spinoza1111<spinoza1...@yahoo.com> wrote:
>
> > On Feb 5, 1:59 am, Seebs <usenet-nos...@seebs.net> wrote:
> > > On 2010-02-04, Nick Keighley <nick_keighley_nos...@hotmail.com> wrote:
> > > > On 3 Feb, 16:27,spinoza1111<spinoza1...@yahoo.com> wrote:
> > > >> Can't you just let Moore's Law handle "efficiency"?
> > > > interesting question.
>
> > > It is.
>
> > > FWIW:  You can't.
>
> > > First off, Moore's Law doesn't expand as fast as some particularly
> > > expensive operations do.  Secondly, even if it does expand with the right
> > > big-O relation, it may not expand fast enough to do much good.
>
> <snip>
>
> > [...] your comment is nonsense, and I don't think you
> > understand computational complexity, for if "it" expands with "the
> > right big O relation", then it follows that this is fast
> > enough...
>
> what's the "right" big O notation?
>
> > although in fact, we shouldn't rely on Moore's Law to justify
> > the use of mathematically slow algorithms, and that was not implied by
> > the original post. We weren't discussing buying faster computers so as
> > to code bubble sort, we were discussing running effective algorithms
> > faster.
>
> not all problems have a known "good" (polynomial) algorithm. Think NP
> complete (travelling salesman etc.). I gave you a bunch of examples in

Traveling salesman has a "good" algorithm. It's called simulated
annealling.

> an earlier post of areas where Moore's Law won't bail them out.  In
> general waiting for N Moore's law doubling just isn't good enough.
> There's a reason cell phones didn't exist in 1975.

I worked at Motorola in 1979. Years later, a Siemens engineer told me
that the reason Motorola didn't have a marketable cellphone in 1975
was that under Nixon, the FCC was to embroiled in politics as a
consequence of Vietnam and Watergate that it would not release
frequencies needed to implement cellphones.

>
> <snip>
>
> > > a whole lot of devices have issues like "battery life" to think about,
> > > such that reducing CPU usage is still a very valuable endeavor.
>
> good point
>
> <snip>
>
> > > > we might be sad if [garbage collection] happens at an inappropriate moment!
>
> > > Any World of Warcraft player can tell you how much that can matter!
>
> > Computer games and TV ("Baldrick") debase grownup discussions IMO.
>
> games are a commercially important application. If you don't call that
> grownup we'll have to agree to differ.

I don't. I don't call it grown-up when grown men ruin their health and
lives meeting deadlines at Electronic Arts to release another version
of John Madden football. I don't call it grown-up when the US Army
uses a video game to recruit kids.
>
> Even if you don't like games you can think of them as simple (not so
> simple sometimes) physical simulations. Anything written about the
> games problem probably applies to many problems in the physics
> community as well. Those graphical accelerators get used for all sorts
> of odd stuff.
>
> <snip>

== 2 of 4 ==
Date: Fri, Feb 5 2010 10:34 pm
From: spinoza1111


On Feb 5, 5:30 pm, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-02-05, Richard Heathfield <r...@see.sig.invalid> wrote:
>
> >spinoza1111wrote:
> >> News flash. If you killfile a person, you need to refrain from
> >> discussing that person.
> > I know of no Usenet convention to that effect.
>
> Me neither.
>
> And I've been doing this since before the Great Renaming.
>
> > I'd add an ObC, only I can't think of one.
>
> I'll contribute one.
>
> I recently wanted to write something which would derive a string value,
> then substitute it into another string.  Actually, into several other strings.
>
> The problem is that it might be substituted several times, so I couldn't
> just do something like:
>
>         char *replace = "replace_here:%s";
>
> and use sprintf.
>
> (In this particular case, the values are "environment variables", but that's
> a detail of no particular relevance to C.)
>
> My solution, which is a bit hacky, but I sorta liked:
>
> struct { char *name, *template; } new_environs[] = {
>   { "PERL5LIB", "%s/lib64/perl5/5.10.0/i686-linux:%s/lib64/perl5/5.10.0:%s/lib64/perl5/site _perl/5.10.0/i686-linux:%s/lib64/perl5/site_perl/5.10.0:%s/lib64/perl5/vend or_perl/5.10.0/i686-linux:%s/lib64/perl5/vendor_perl/5.10.0:%s/lib64/perl5/ vendor_perl:." },
>   { "LD_LIBRARY_PATH", "%s/lib64:%s/lib:%s/lib64" },
>   { 0, 0 }
>
> };
>
> Then, down below:
>
>         for (i = 0; new_environs[i].name; ++i) {
>           char *new_environ;
>           char *t;
>           char *u;    
>           size_t len = strlen(new_environs[i].template) + 5;
>           for (s = new_environs[i].template; t = strchr(s, '%'); s = t + 1) {
>             len += strlen(parent_path);
>           }
>           new_environ = malloc(len);
>           u = new_environ;
>           *u = '\0';
>           for (s = new_environs[i].template; t = strchr(s, '%'); s = t + 2) {
>             u += snprintf(u, (len - (u - new_environ)), "%.*s%s",
>                           t - s, s, parent_path);
>           }
>           snprintf(u, (len - (u - new_environ)), "%s", s);
>           setenv(new_environs[i].name, new_environ, 1);
>           free(new_environ);
>         }
>
> The "setenv" function is a Unixism, which, given a name and a value, makes
> that name/value pair available to future execution.
>
> The calculations are very careless; my goal was not to calculate exactly
> the right length, but rather, to calculate a length which could be easily
> shown to be definitively long enough.
>
> I am, however, pretty happy with this part:
>
>           for (s = new_environs[i].template; t = strchr(s, '%'); s = t + 2) {
>             u += snprintf(u, (len - (u - new_environ)), "%.*s%s",
>                           t - s, s, parent_path);
>           }
>
> Note that I don't check, in this version, whether it's "%s" or some other
> character after a %.  This was one of those "we need something within half
> an hour that will work for this circumstance, we can clean it up tomorrow"
> jobs.
>
> -s
> p.s.:  Side note for Unix users:  Yes, it's okay to free the argument to
> setenv after passing it in, unlike putenv().
> --
> Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

== 3 of 4 ==
Date: Fri, Feb 5 2010 11:05 pm
From: Squeamizh


On Feb 4, 10:25 am, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-02-04, blmblm  myrealbox.com <blm...@myrealbox.com> wrote:
>
> > (Quoted to preserve context.  I'm rather impressed that Seebs doesn't
> > respond to this sort of thing.  I'm not sure I'd be able to resist
> > the temptation to defend -- something.)
>
> A couple of points:
>
> 1.  I'm not all *that* strongly autistic, but enough that I don't really
> care whether people are "attacking" me or not.
> 2.  I have Nilges plonked.
> 3.  Even when I didn't have him plonked, I'd realized after about two tries
> at communicating with him that he was hilarious.  I went out of my way to
> wave the autism thing at him to get him to spend weeks trying to insult me
> with it, and the decision to mention the lack of a CS degree was made with
> full awareness that he'd obsess on it for months.
> 4.  If behavior is sufficiently predictable, and sufficiently stupid, it is
> not meaningfully an attack.
>
> Basically, if your mom's a drill sergeant, and another kid finds out that
> your mom has combat boots, the ensuing cries of "Your mommy wears combat
> boots!" are not a particularly emotionally significant thing.  :)

You're an idiot with regard to the social side of things. You're
pretty good on c-related stuff, perhaps a genius. Anyway, stop posting
about social shit.

== 4 of 4 ==
Date: Fri, Feb 5 2010 11:15 pm
From: Richard Heathfield


Squeamizh wrote (in reply to Seebs):
<snip>
> You're an idiot with regard to the social side of things.

I can think of plenty of worse idiots on the social side of things, and
quite a few of them subscribe to this newsgroup.

> You're pretty good on c-related stuff, perhaps a genius.

I have to agree with you there, although he is by no means infallible.

> Anyway, stop posting about social shit.

I refer you to your own opening sentence.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within

==============================================================================
TOPIC: MultiCharts 5.5 crack download - www.top-tradesoft.com
http://groups.google.com/group/comp.lang.c/t/2d40199f91b64f17?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 5 2010 9:20 pm
From: Larry Connelly


~our web address is http://www.top-tradesoft.com/


Time Series Forecast System Test crack download
Trend Analysis Index System by Adam White crack download
TSF Optimised Trading System crack download
Ultimate Signal Generator I & II (2 formuly) crack download
Volume Oscillator System w/Optm crack download
Volatility Bands As A Long Term Strategy by Ahmet Tezel (2 Systems)
crack download
Volatility Index System by J. Welles Wilder Jr. crack download
01_R2/Regress Slope/MFI/TSF - (Vol Rqd) crack download
02_R2/Regress Slope/CMO - All Signal Formulas crack download
03_R2/Regress Slope/Qstick - (OHLC Rqd) crack download
04_R2/Regress Slope/CCI/TSF crack download
2010_Three Moving Average System by Jim Greening crack download
2010_Momentum Time & S/C crack download
2/20-Day EMA Breakout System by David Landry crack download
25x25 Bond Trading System by Charles LeBeau and Terence Tan crack
download
Exspert Advisors: crack download
ADX with Stochastic Signals crack download
Bollinger Band's & 13 Day Moving Average by Piotr Wasowski crack
download
Bull Fear and Bear Fear Expert by Walter Downs crack download
Combining Statistical & Pattern Analysis, Shark - 32 crack download
DeMark's Sequential(tm) Trading System crack download
Double Stochastics Expert crack download
Dunnigan Trend crack download
Dynamic Moving Vertical Lines crack download
Fibonacci Ratios and Momentum by Thom Hartle crack download
Fractal Up and Fractal Down Expert by Manoj P. Abraham crack download
GANN Swing Expert crack download
Hilbert Squelch Indicator Expert by John Ehlers crack download
Key Reversals Expert by Massimiliano Scorpio crack download
Market Facilitation Index Expert by Thom Hartle crack download
Mutated,Variables ... by Walter T. Downs, Ph.D. crack download
Smoothed Stochastic Expert crack download
Swing Trading Expert crack download
%Bands I crack download
%Bands II crack download
Indicators: crack download
Absolute Breadth Index by Norman G. Fosback crack download
Accumulation / Distribution (2 formulas) crack download
Adaptive RSI by Perry Kaufman crack download
Adaptive Trends and Oscillators by John Ehlers (2 formulas) crack
download
Adjustable Trading Bands crack download
Advance / Decline Divergence Oscillator crack download
Advance / Decline Line - Adaptative -> %A - %D crack download
Advance / Decline Line - Adaptative -> [%A/%U] - [%D/%U] crack
download
Advance / Decline Line - New by Daniel E. Downing crack download
Advance / Decline Line with Negative Volume crack download
ADX / ADXR Custom (Without Rounding) (2 formulas) crack download
ADX - Above crack download
ADX RAW crack download
Alligator Indicators by Bill William's (3 formulas) crack download
Almost Zero Lag Moving Average crack download
Alpha and Beta (2 formulas) crack download
AMA Binary Wave crack download
Anchored Momentum (4 formulas) crack download
Anchored Moving Average by Rakesh Sahgal crack download
Another LRS-ROC Indicator crack download
Anti Trigger by L. B. Raschke crack download
Arms Ease of Movement crack download
ARMS Index (TRIN) crack download
ARMS (Open) Index crack download
Aroon Indicators by Tushar Chande crack download
Aroon Oscillator crack download
ATR Bands by Gordon Gustafson crack download
ATR Custom Indicator (3 formulas) crack download
ATR Exit 1 crack download
ATR Exit 2 crack download
ATR Modified crack download
ATR Ratio crack download
ATR Ratio to Close crack download
ATR Trailing Stop Loss I crack download
Automatic Metastock Trendline Formula crack download
Automatic Support and Resistance by MelWidner crack download
Average Dollar Price Volatility Indicator crack download
Average Volume crack download
Average of Multiple Moving Averages crack download
Average - Modified Method by Perry J. Kaufman crack download
Balance Of Power (BOP) by Igor Livshin crack download
Base Channel crack download
BellRinger's StochRSI 14 by John A. Yurko crack download
Beta crack download
Better Bollinger Bands by Dennis McNicholl crack download
BinaryWave All Composite Wave (5 formulas) crack download
BODY Momentum by Perry Kaufman crack download
Bollinger Band Histogram by Steve Karnish crack download
Bollinger Band Hook Up and Hook Down byJim Barone crack download
Bollinger Band / Flexible Parameter by Andreas Grau crack download
Bollinger Band Width by Alberto Torchio (2 formulas) crack download
Bollinger Band by John Bollinger (3 formulas) crack download
Bollinger Bands Oscillator I crack download
Bollinger Bands Oscillator II by Alberto Torchio crack download
Bollinger Bands Oscillator III crack download
Bollinger Bands Oscillator - CCT crack download
BPDL Trend Filter Oscillator by Stephen Zodkov (2 formulas) crack
download
Brad CCI crack download
Breadth Advance Decline Indicator crack download
Breadth Thrust by Martin Zweig crack download
Breakout Range2 by Mark Vakkur crack download
Buff Averages by Buff Dormeier crack download
Buy and Hold Indicator crack download
Calibrated Summation Index crack download
CandlCode & ICS by Viktor Likhovidov (2 formulas) crack download
CandleCode II & Candle Strength Index by Viktor Likhovidov (2
formulas) crack download
Chaikin Money Flow Indicator by Marc Chaikin crack download
Chaikin Oscillator crack download
Chaikin Volume Accumulation crack download
Chande's Momentum Oscillator crack download
Chande's Momentum Oscillator Composite Average crack download
Chande's Momentum Oscillator Volatility crack download
Chande's QStick crack download
Chande's R2 Indicator (2 formulas) crack download
Chande's Target Price crack download
Chande's Trendscore crack download
Chande's Vidya 21,5 Indicator crack download
Chande's Vidya - Other Version crack download
Chande's Vidya using the P variable I crack download
Chande's Vidya using the P variable II crack download
Chande's Vidya with Volatility Bands crack download
Chandelier Exit Variation crack download
Changing Ways Accumulation / Distribution crack download
Chaos Fractal (simple version +1=Up, -1=Dn) crack download
Choppiness Index crack download
Close From 3 Days Ago crack download
Close Relation To High Low crack download
Close Within a % Band of the MA crack download
CMO Filtered crack download
Coding Candlesticks (II) by Viktor Likhovidov crack download
Coding Example crack download
Comparative Relative Strength crack download
Confidence % crack download
Congestion Index & Consolidation Breakout (2 formulas) crack download
Coppock Curve by Edwin Sedgwick Coppock crack download
Coppock Curve - CCT crack download
Coppock Curve - LT Momentum crack download
Coppock Indicator crack download
Corr Vol / Close crack download
Countback Line crack download
Cumulative Volume (Variation) Indicator crack download
Custom A / D Oscillator crack download
Cycle Formula crack download
Cycle Indicator by Bill Irwin crack download
Cyclical System by Jeffrey Owen Katz crack download
DAHL Oscillator crack download
DAHL Variations (4 formulas) crack download
Daily Close vs. High and Low Close crack download
Dave's NewSystem (DNS) by David R. Evans crack download
DeMark's Indicator and REI Indicator (2 formulas) crack download
DeMark's Projected Range crack download
DeMark's Range Expansion Index crack download
Dennis Tilley's Support Line crack download
Detrended Price Oscillator crack download
DevStop by Cynthia Kase (2 formulas) crack download
Diffusion Index by Donald L. Cassidy crack download
Directional Movement Index crack download
Directional Trend Index crack download
Disparity Index by Steve Nison crack download
Displace Indicator Forward crack download
Divergence Between Close and an Indicator (MACD & RSI) (2 formulas)
crack download
Donchain Channels crack download
Double Key by Mike Arnoldi crack download
Double Tops and Double Bottoms by Thomas Bulkowski crack download
Downtrend Signal crack download
DS_EMA_X_MP by Rakesh Sahgal crack download
DualOscillator (+1 buy, -1 sell) crack download
Dunnigan Trend crack download
Durmmond's PLdot crack download
Dynamic Momentum Oscillator (Dynamo) by E. Marshall (2 formulas) crack
download
Dynamic Moving Vertical Lines crack download
Dynamic Multiple Time Frames (6 formulas) crack download
Dynamic Zone Williams%R Indicator crack download
Dynamic Zones by Zamansky & Stendahl crack download
Ease of Movement by Bill Williams crack download
ECO - Ergodic Candlestick Oscillator crack download
Efficiency Ratio by Perry Kaufman crack download
Ehlers Filters by John Ehlers (2 formulas) crack download
Elder's Force Index + Bull & Bear Power crack download
Elder's SIROC crack download
Elliott Oscillator crack download
Elliott Wave Identification crack download
End Point Moving Average by Patrick E. Lafferty crack download
End Points of a Linear Regression Line crack download
Entry Price by Jon DeBry crack download
Envelope - Koperta crack download
Excel Confidence % crack download
eVWMA by Christian Fries crack download
FibAccordion - CCT crack download
FibboGatto by Jerry Gatto (2 formulas) crack download
FibCMO Indicator by Steve Karnish crack download
Fib Levels by Rakesh Sahgal (2 formulas) crack download
Fibonacci Trader - Dynamic Multiple Time Frame (5 formulas) crack
download
Final Plot crack download
Fidelity Select Chemical Fund crack download
Fractal Efficiency % crack download
Front Weighted 36 Day Moving Average crack download
GANN (5 formulas) crack download
GANN - HiVisual & LoVisual (3 formulas) crack download
GANN - Swing Hi Low Activator crack download
GAP Days crack download
GAP Identification crack download
GAP Study - Microsoft by Jon DeBry (3 formulas) crack download
GAP Trading crack download
Gopalakrishnan Range Index (GAPO) crack download
GRII by Eddie Kwong (4 formulas) crack download
Haeslers ATR by Martin Haesler crack download
Haurlan Index by P. N. Haurlan crack download
HHRWI by Pierre Orphelin crack download
High - Low crack download
High-Low Range on RT Charts crack download
High Low Wave' Daily crack download
Hilbert Squelch Indicator by John Ehlers crack download
Historical Volatility Daily (3 formulas) crack download
Ichimoku Charts by Ken Muranaka crack download
IFT - Intelligent Futures Trading by Chick Goslin crack download
Inertia by Donald Dorsey (2 formulas) crack download
Instantaneous Trendline & Sinewave Indicator by John Ehlers (2
Formulas) crack download
Insync Index by Norm North crack download
Investor Preference Index by Cyril V. Smith Jr. crack download
J2L by Jean-Louis Lepreux crack download
Jack Landis Formula's (7 formulas) crack download
JKL by Jaroslaw Kilon (3 formulas) crack download
John Kosar by Adam Hefner crack download
Kaleidoscope - CCT crack download
Kaufman's Adaptive Moving Average I (2 formulas) crack download
Kaufman's Adaptive Moving Average II crack download
Kaufman's Effectivity crack download
Kaufman's Effectivity Mode crack download
Kaufman's Moving Average crack download
Keltner Bands - ATR crack download
Keltner Channel's by Chester W. Keltner crack download
Kendall Indicator by Eric Kendall crack download
Ken Roberts' Formula's (4 formulas) crack download
KST Formula's by Martin Pring (8 formulas) crack download
Kurtosis Indicator crack download
Largest Negative Change in Close crack download
Last Trough of MMA Convergence crack download
LateStart 3 EMA crack download
Linear Regression crack download
Linear Regression (14) crack download
Linear Regression Channel crack download
Linear Regression Line Motion #1 crack download
Linear Regression Line Motion #2 crack download
Linear Regression Line Motion #3 crack download
Linear Regression Slope crack download
LinRegOscillator - CCT crack download
Lone Ranger crack download
Long Binary Wave crack download
Long Binary Wave II crack download
LSS Oscillator and Pivot Point (4 formulas) crack download
MACD Additions crack download
MACD - Custom crack download
MACD - DEMA Smoothed crack download
MACD - Future / Dr. Trieber crack download
MACD - Histogram + Weekly Hist. for Daily Data by A. Elder (2
formulas) crack download
MACD - General Purpose MACD Indicator (2 formulas) crack download
MACD - Modified - Time Series Forecast crack download
MACD - Tops and Bottoms by Robert Jackson (2 formulas) crack download
MACD - Histogram - CCT crack download
MACDN crack download
MACD of Relative Strength (2 formulas) crack download
MACD of ROC by PSG crack download
MACD - TEMA Smoothed crack download
MACD w / SAR crack download
Market Facilitation Index by Gary Hoover crack download
Market Pressure - Ultimate crack download
Market Thrust Oscillator by Tushar Chande (3 formulas) crack download
MARZAK by Marcin Zak crack download
Mass Index by Donald Dorsey crack download
Matter of Ticks crack download
McClellan Oscillator by Sherman and Marian McClellan crack download
McClellan Summation Index by Sherman and Marian McClellan crack
download
McGinley Dynamic crack download
Median Price crack download
Miesal Indicator crack download
Mesa Adaptive Moving Averages (MAMA & FAMA) by John Ehlers (2
formulas) crack download
Modified Moving Average I by Joe Sharp (4 formulas) crack download
Modified Moving Average II by Joe Sharp crack download
Modified VIX Indicator by S. Jack Karczewski crack download
Momentum Index crack download
Momentum Trend Change Indicator crack download
Money Flow Index crack download
Money Flow - One Day by Marcel Knechtle crack download
Morris Double Momentum Oscillator crack download
Morris RSI w / Volume crack download
Moving Average Group's by Daryl Guppy crack download
Moving Average - Normalized by Brian Bell (4 formulas) crack download
Moving Average - Only One Day of a the Week crack download
Moving Average - Oscillator - CCT crack download
Moving Average - Ribbon crack download
Moving Average - Tillson Twicing crack download
Moving Average - Variable crack download
Moving Averages with Resistance and Support by Dennis Tilley (2
formulas) crack download
Moving Linear Regression Line crack download
Multiple Time Frame by Robert Krausz (6 formulas) crack download
Multi - Vote OBV crack download
NBARS by Marcin Zak crack download
Natenberg's Volatility by Sheldon Natenberg (2 formulas) crack
download
Negative Volume Indicator crack download
Nonlinear Ehlers Filters by John Ehlers (2 Formulas) crack download
Normalizing Indicators by Brian Bell (4 Formulas) crack download
O.B.V.Good Exampleof if() Function crack download
Offset RSI & MACD (2 formulas) crack download
On Balance True Range by Thomas A. Bierovic (5 formulas) crack
download
Onno's Binary Wave Indicator crack download
Oscillating OBV crack download
Overbuy /Oversell crack download
Overreaction Index crack download
OWMA crack download
Peak Oscillator by Cynthia Kase crack download
Percent Above / Below Moving Average crack download
Persistence of Money Flow crack download
Pivot Price Indictor crack download
Plotting Forward Days crack download
Point of Balance Oscillator and Moving Averages by Walter Downs (2
formulas) crack download
Polarized Fractal Efficiency by Hans Hannula crack download
Positive Volume Indicator crack download
Price Action INdicator (PAIN) by Michael B. Geraty crack download
Price Oscillator Wave crack download

~our web address is http://www.top-tradesoft.com/

==============================================================================
TOPIC: allocating m bytes dynamically
http://groups.google.com/group/comp.lang.c/t/3ce8c1090a941d64?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Feb 5 2010 9:47 pm
From: santosh


2005 wrote:
> On Feb 4, 12:02 am, santosh <santosh....@gmail.com> wrote:
> > 2005 wrote:
> > > 1) If I want to allocate m bytes dynamically would the following do?
> > > 2) What is the purpose of the for loop here - assign initial value?
> >
> > > int main(void)
> > > {
> > >         int m = 100;
> > >         int *ptr = (int *) malloc(m);
> >
> > Note that in C you don't have to cast the return value of malloc/
> > calloc/realloc, since conversion to and from a void pointer is
> > implicit.
>
> Thanks Santosh - but why at
> http://en.wikipedia.org/wiki/Malloc
>
> they are doing it and kind of making a standard ?

One good reason to cast the return of malloc() would be when your code
is likely to be compiled with a C++ compiler. In C++, implicit
conversion to and from void is disallowed, so a cast is needed.

> Another question I have is that should
> ptr[i] = i; this be ptr[i] = 0; instead?

It depends on what you want to do. Your original loop assigned the
value of i to successive elements starting at ptr, but also modified
ptr, which was later passed to free(), so I changed it to analogous
code that didn't modify ptr, so that your free() invocation would not
be UB.


== 2 of 2 ==
Date: Fri, Feb 5 2010 10:08 pm
From: santosh


2005 wrote:
[...]

> Thanks, Santosh, Richard & Ben,
>
> The issue was missing "i++" - I had actually replaced the "m" with
> MAX;

Just a minor point. Your malloc() call in the revised code looks like:

int *ptr = malloc(MAX * sizeof (int));

You might consider instead:

int *ptr = malloc(MAX * sizeof *ptr);

This form ensures that sizeof yields the correct size even if the type
of ptr happens to be changed.

> BTW: what is the deal about size_t num_ints = MAX; // MAX is already
> defined to be 10 - the code runs w/o that line too.

No idea. If the code runs without that line, then why did you include
it?

As an aside, a name like 'num_ints' is more descriptive of purpose
than 'MAX.'

> Also what is this "size_t"?

The parameter to malloc() is defined to be of type size_t. This is
because this is the only type in C that is guaranteed to be able to
represent the size of the largest possible object. It's specifically
meant for holding sizes of objects. sizeof also yields a value to type
size_t. It's an unsigned integral type and is usually a typedef for
unsigned long.

So use size_t if the object is specifically for storing the size of
other objects. OTOH, it's a bit inconvenient in some types of looping
constructs and you need to be careful when mixing it with signed
values in expressions.

> Also why do you say "malloc() and friends" ?

Just a short way of alluding to the other allocation functions:
calloc() and realloc().

> You can click the link to see/run the code: http://codepad.org/8Z8Q3pdo

Note that you've not included the stdio.h header in your code at the
above link, though you use the print() function declared in that
header. You should always include the relevant standard header when
using any function it declares. Not doing so in asking for subtle
problems.

==============================================================================
TOPIC: Motivation of software professionals
http://groups.google.com/group/comp.lang.c/t/21a3fdec4dd53e6a?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 5 2010 11:39 pm
From: Roedy Green


On Fri, 5 Feb 2010 04:23:41 -0800 (PST), Richard Cornford
<Richard@litotes.demon.co.uk> wrote, quoted or indirectly quoted
someone who said :

>
>Strange question; the most efficient motivator of professionals is
>money, and money is very popular.

That may be a motivator for taking a job, but I suspect is fairly far
down the list for leaving a job.

Leaving motivations might include:

personality conflict
boredom
too much pressure

Personally, the opportunity to do something I had never done before
was always the top priority. Employers usually want people who have
extensive specific experience.

In hiring, my main interest was loyalty. Employees don't get really
useful until after the first year. I don't expect them to hit the
ground running. I anticipate investing considerable effort in training
them. I looked for reasons why they would likely want to stay.
--
Roedy Green Canadian Mind Products
http://mindprod.com

You can't have great software without a great team, and most software teams behave like dysfunctional families.
~ Jim McCarthy


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

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:

Post a Comment