f



What type "T" or "auto" should I use for i?

What type "T" or "auto" should I use for i? - C++ 11 allowed

template<class number>
bool is_zero(const number& n)
{
   for (T i = 0 ; i < n.digits(); i++)
   {
     if (n[i] != 0)
       return false;
   }
   return true;
}

The objective is to have a correct and fast code.

Mathematically speaking, the value returned by digits() and the value
of i are both positives integers.

The value returned in digits() can be converted/stored inside a
computer
using some integral type available in the C++ language.

The type used to index operator [](type index) is also some C++
integral type.

I have control about the "number concept", but I don't want to add
"computer" details.
For instance, I could add to the type the maximum number of digits
allowed.

struct number {
static const some_integral_type max_digits = some_value;
}
but I don't want to add typedefs like size_t, bits and bytes.
I want to find out the best types based on math requirements,
using traits, decltype etc..


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Thiago
4/13/2012 6:49:15 PM
comp.lang.c++.moderated 10738 articles. 1 followers. allnor (8509) is leader. Post Follow

9 Replies
685 Views

Similar Articles

[PageSpeed] 59

On 2012-04-13 18:49:15 +0000, Thiago Adams said:

> What type "T" or "auto" should I use for i? - C++ 11 allowed
> 
> template<class number>
> bool is_zero(const number& n)
> {
>    for (T i = 0 ; i < n.digits(); i++)
>    {
>      if (n[i] != 0)
>        return false;
>    }
>    return true;
> }
> 
> The objective is to have a correct and fast code.
> 
> Mathematically speaking, the value returned by digits() and the value
> of i are both positives integers.
> 
> The value returned in digits() can be converted/stored inside a
> computer
> using some integral type available in the C++ language.
> 
> The type used to index operator [](type index) is also some C++
> integral type.
> 
> I have control about the "number concept", but I don't want to add
> "computer" details.
> For instance, I could add to the type the maximum number of digits
> allowed.
> 
> struct number {
> static const some_integral_type max_digits = some_value;
> }
> but I don't want to add typedefs like size_t, bits and bytes.
> I want to find out the best types based on math requirements,
> using traits, decltype etc..

The declaration of number::digits() includes a return type, so the
obvious type to use is the same type. You can get that with
decltype(n.digits()).

-- 
 Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)


      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Pete
4/13/2012 10:09:05 PM
On Apr 13, 11:49 am, Thiago Adams <thiago.ad...@gmail.com> wrote:
> What type "T" or "auto" should I use for i? - C++ 11 allowed
>
> template<class number>
> bool is_zero(const number& n)
> {
>    for (T i = 0 ; i < n.digits(); i++)
>    {
>      if (n[i] != 0)
>        return false;
>    }
>    return true;
>
> }
>
> The objective is to have a correct and fast code.

Disclaimer: I might not be interpreting your question correctly.

If the type of index is the same as the type of what digits() function
returns, then you can write:

for(decltype(n.digits()) i = 0, digits = n.digits(); i < digits; ++i)
   if(n[i]) return false;
return true;


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Gene
4/13/2012 10:09:19 PM
Am 13.04.2012 20:49, schrieb Thiago Adams:
> What type "T" or "auto" should I use for i? - C++ 11 allowed

I don't think that 'auto' is appropriate here, because it would simply
select the type of the initializer (which is int here). If I understood
your question correctly, you should use a deduction based on decltype:

> template<class number>
> bool is_zero(const number&  n)
> {
>     for (T i = 0 ; i<  n.digits(); i++)
>     {
>       if (n[i] != 0)
>         return false;
>     }
>     return true;
> }

To me a natural deduction would be something like

using T = decltype(n.digits());

justs before the loop. It reflects the fact, that T would always contain
a value that fits into what n.digits() returns. Any comparison like

if (n[i] != 0)

looks fine to me, even though one might consider to select the more
generic form

if (n[i])

> The objective is to have a correct and fast code.
>
> Mathematically speaking, the value returned by digits() and the value
> of i are both positives integers.

Would you think that e.g.

using T = decltype(n.digits());

would have possible disadvantages in this regard?

> The value returned in digits() can be converted/stored inside a
> computer
> using some integral type available in the C++ language.

This sounds as if you would consider return types of n.digits() that are
user-defined *and* that very badly choices in a loop. Am I understanding
you right?

> The type used to index operator [](type index) is also some C++
> integral type.
>
> I have control about the "number concept", but I don't want to add
> "computer" details.
> For instance, I could add to the type the maximum number of digits
> allowed.
>
> struct number {
> static const some_integral_type max_digits = some_value;
> }
> but I don't want to add typedefs like size_t, bits and bytes.
> I want to find out the best types based on math requirements,
> using traits, decltype etc..

If you think that in general decltype(n.digits()) is a good choice, but
for some types might be bad in this algorithm, you could define a trait
with a default value, e.g.

template<class number>
struct your_number_traits {
  using type = decltype(std::declval<const number&>.digits());
};

then write

template<class number>
bool is_zero(const number& n)
{
   using T = typename your_number_traits<number>::type;
   for (T i = 0 ; i < n.digits(); i++)
   {
     if (n[i] != 0)
       return false;
   }
   return true;
}

Now user-code does not need to do anything, unless the default is not
the best choice, so they could specialize the trait. The good news are
that for most situations, user-code needs not to care about the trait.

I did not really understand your corresponding discussion about the
return type of n[i]. If your question is: I want an optimal comparison
against some null concept, you could extend above trait with a second
default member, e.g.

template<class number>
struct your_number_traits {
  using type = decltype(std::declval<const number&>.digits());
  static bool is_zero(const number& n, const type& i)
  { return n[i] != 0; }
};

HTH & Greetings from Bremen,

Daniel Kr�gler


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
ISO
4/13/2012 10:11:06 PM
On Apr 13, 11:49 am, Thiago Adams <thiago.ad...@gmail.com> wrote:
> What type "T" or "auto" should I use for i? - C++ 11 allowed
>
> template<class number>
> bool is_zero(const number& n)
> {
>    for (T i = 0 ; i < n.digits(); i++)
>    {
>      if (n[i] != 0)
>        return false;
>    }
>    return true;
>
> }

> I have control about the "number concept", but I don't want to add
> "computer" details.


Rather than worrying about the type that 'i' should be above, I'd
suggest adding some way to your number concept to iterate over the
digits of the number, e.g. begin() / end() functions.  (If the digits
themselves are stored in some kind of STL container, this is trivial.)

If (and only if) your iteration functions really are named begin and
end, you could then use range-based for, where the loop counter
variable is implicit:

template<class number>
bool is_zero(const number& n)
{
   for (auto digit : n) {
      if (digit != 0)
         return false;
   }
   return true;
}

Alternatively, and this works even if your iterator accessors are
named something else, you can just farm this out to all_of, one of the
new STL algorithms in C++ 11 (like the above for loops, it will
'return false' early on the first non-zero digit).

#include <algorithm>

template<class number>
bool is_zero(const number& n)
{
   return std::all_of(n.begin(), n.end(),
      [](decltype(n[0]) digit) { return digit == 0; });
}

- Kevin B. McCarty


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Kevin
4/13/2012 10:16:46 PM
Sorry about the size of this topic, but
I think it's an interesting topic and I will
explain better.


The number abstraction is:

{d[n], ... d[1], d[0]} base

where

0 <= d[k] <= base - 1
0 <= k <= n

* number.digits() returns the number of digits = n + 1
* number[k] returns the digit k

This is all I need to build the
algorithms to sum, subtract, multiply and divide.

Algorithms will see this interface.

struct number {

   static const BaseType base = some_value; // > 1
   static const MaxDigitType max_digits = some_value; // > 0

   DigitsType digits() const;
   DigitType1  operator [](IndexType1 i) const;
   DigitType2& operator [](IndexType2 i);
};

Assuming IndexType1 == IndexType2 and
DigitType1 == DigitType2 then I have:

unknown types: (unknown but with constrains)

  MaxDigitType
  BaseType
  DigitType
  DigitsType
  IndexType

Immutable values associated with the number type:

  base
  max_digits

These types are convertible to some integral type because
I need to do arithmetic operations on it.

(
  I am using only integral types but have I considered a
  CheckedDigitType class to check the invariants of digit
  in debug. 0 <= d[k] <= base - 1
)

So: XXType is a type that ...

  * BaseType can store the base value.
  * DigitType can store values from 0 to base - 1
  * DigitsType can store values from 0 to max_digits
  * IndexType can store values from 0 to max_digits - 1

(can store means "at least")

What I want to do?

I want to leave the number implementers to choose the types,
and require only base and max_digits values.

Then the algorithms will select the internal types that produce
correct and fast results.

Back to is_zero algorithm, let's say I use the same type of digits.

template<class number>
bool is_zero(const number& n)
{
   using T = decltype(n.digits());
   for (T i = 0 ; i < n.digits(); i++)
   {
     if (n[i] != 0)
       return false;
   }
   return true;
}

If T is unsigned char, wouldn’t be better for speed
to use a int i?
Following the advice use int always you can, otherwise use long long.
I could have traits to be like advices about what type to use.
But, I think it's more interesting to have "auto-advice" "auto select"
types.

The others algorithms (sum etc) are more interesting.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Thiago
4/14/2012 6:34:05 PM
Am 14.04.2012 20:34, schrieb Thiago Adams:
[..]
> Back to is_zero algorithm, let's say I use the same type of digits.
>
> template<class number>
> bool is_zero(const number&  n)
> {
>     using T = decltype(n.digits());
>     for (T i = 0 ; i<  n.digits(); i++)
>     {
>       if (n[i] != 0)
>         return false;
>     }
>     return true;
> }
>
> If T is unsigned char, wouldn’t be better for speed
> to use a int i?
  >
  > Following the advice use int always you can, otherwise use long long.
  > I could have traits to be like advices about what type to use.
  > But, I think it's more interesting to have "auto-advice" "auto select"
  > types.
  >
  > The others algorithms (sum etc) are more interesting.

You can combine the best of both worlds when referring to

boost::integral_promotion<decltype(n.digits())>::type

instead.

HTH & Greetings from Bremen,

Daniel Krügler


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
windows
4/14/2012 9:36:28 PM
On Apr 14, 12:11 am, Daniel Kr�gler <daniel.krueg...@googlemail.com>
wrote:

> To me a natural deduction would be something like
>
> using T = decltype(n.digits());

Won't that cause problems if n.digits() returns a const int&?
You might want to add a std::decay in there.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Mathias
4/15/2012 7:44:28 PM
Am 15.04.2012 21:44, schrieb Mathias Gaunard:
> On Apr 14, 12:11 am, Daniel Kr�gler<daniel.krueg...@googlemail.com>
> wrote:
>
>> To me a natural deduction would be something like
>>
>> using T = decltype(n.digits());
>
> Won't that cause problems if n.digits() returns a const int&?
> You might want to add a std::decay in there.

Yes, you are completely right, std::decay should be applied to the
result of the decltype query.

Greetings from Bremen,

Daniel Kr�gler


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
ISO
4/16/2012 1:19:07 AM
On Apr 13, 7:16 pm, Kevin McCarty <kmcca...@gmail.com> wrote:
> On Apr 13, 11:49 am, Thiago Adams <thiago.ad...@gmail.com> wrote:
>
> > What type "T" or "auto" should I use for i? - C++ 11 allowed
>
> > template<class number>
> > bool is_zero(const number& n)
> > {
> >    for (T i = 0 ; i < n.digits(); i++)
> >    {
> >      if (n[i] != 0)
> >        return false;
> >    }
> >    return true;
>
> > }
> > I have control about the "number concept", but I don't want to add
> > "computer" details.
>
> Rather than worrying about the type that 'i' should be above, I'd
> suggest adding some way to your number concept to iterate over the
> digits of the number, e.g. begin() / end() functions.  (If the digits
> themselves are stored in some kind of STL container, this is trivial.)

I found difficult to use the iterator concept in this case
basically because the base value is statically associated
with the type number. So iterators also should have this base value.

For instance, to compare if two numbers a and b are equal I
need to check if a and b have the same base.
I can check this using static_assert.

So, a vector<int > v; v.begin() or int a[]; &a[0] ,for instance, would
not be automatically a number iterator. I would need some adapter and traits.
I also confess I didn't try so much in this way because in the literature
most of the algorithms are written using "sizes" and random access using
index.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
0
Thiago
4/16/2012 1:21:57 AM
Reply:

Similar Artilces:

""""""""""""""""""""""ADD ME""""""""""""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfo Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... We look forward to build a ve...

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

Urgent Requirement in """""""""""""NEW YORK""""""""""""""""
Hello Partners, Please find the requirement below. Please send the updated resume along with rate and contact no. REQ#1: Title : Java Developer ( Rating Project) Duration : 6 months Rate : open Location : NY strong java, WebLogic 9.2, Web Services, Oracle REQ#2: Title : Java Developer Duration : 4 months Rate : open Location : NY Strong java, SQL REQ#3: Title : VB.Net Consultant Location : NY Duration : 4 months Rate : open Primarily looking at someone who has Excel, VB.net a...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

"If then; if then;" and "If then; if;"
I have a raw data set which is a hierarchical file: H 321 s. main st P Mary E 21 F P william m 23 M P Susan K 3 F H 324 S. Main St I use the folowing code to read the data to creat one observation per detail(P) record including hearder record(H): data test; infile 'C:\Documents and Settings\retain.txt'; retain Address; input type $1. @; if type='H' then input @3 Address $12.; if type='P' then input @3 Name $10. @13 Age 3. @16 Gender $1.; run; but the output is not what I want: 1 321 s. main H 2 321 s. main P Mary E 21 F 3 321 s...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

Urgent Requirement for """""""""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting ...

Urgent need """""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting Database/ETL requirements (Optional) Data warehousing experience Threading and job concepts in 10g/11g Cost based Optimizer concepts in 10g/11g Must : Experience with XML files and partitioning concepts in Oracle, Collections, Material Views Note : No phone calls please. : send Resumes to karthik@bhaninfo.com Thanks & Regards Karthik BhanInfo karthik@bhaninfo.com ...

using "!!" in "c"
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \ !(v)->vcpu_info->evtchn_upcall_mask) whereas evtchn_upcall_pending is of type unsigned char (and also evtchn_upcall_mask is of type unsigned char). What does "!!" operator do in this case ? Any ideas? MR ! is not operator. so !! is read as not of not which implies true. On 18 Jan 2006 01:28:23 -0800, markryde@gmail.com wrote: >Hello, > I saw in some op...

[Q] How to escape "\a" "\b" "\c" "\f" "\n" "\r" "\t" "\v" in the string output?
Hi, there. Belows are some example strings which stand for M$ Windows directory path. How can I escape the special meanings like "\a", "\n", "\r" in these M$ Windows directory name strings? C:\amail\dir1\nbar C:\bmail\dir2\tbar C:\cmail\dir3\afoo C:\fmail\dir4\vfoo C:\nmail\dir5\fbar C:\rmail\dir6\abar C:\tmail\dir7\vfoo C:\vmail\dir8\cfoo Thanks in advance. In article <1161145522.072002.20370@m7g2000cwm.googlegroups.com>, "yh" <y.hosang@gmail.com> wrote: > Hi, there. > > Belows are some example strings which stand for M$ Wi...

["a", "b", "c", "d"] to "a, b, c, d"?
I want to process each element of an array, but the last element should be handled special. Here is an example: def p_ary(ary) str = "" ary.each do |elem| str << elem << ", " end str.chomp!(", ") str end so p_ary(["a", "f", "x", "test"]) produces "a, f, x, test". The code works, but isn't there an easier and more general way for this behaviour? martinus On Tue, 06 Apr 2004 04:23:22 -0700, Martin wrote: > I want to process each element of an array, but the last ele...

Does it need a ";" at the very after of "if" and "for"
write code like: int main(void) { int a=10; if(a<20) {} } Compiler ok on dev-cpp . don't we have to add a ";" after if statement? marsarden said: > write code like: > > int main(void) > { > int a=10; > if(a<20) > {} > } > > Compiler ok on dev-cpp . don't we have to add a ";" after if > statement? The syntax for 'if' is: if(expression) statement There is no semicolon after the ) but before the statement. The statement is either a normal statement (which can be empty), ending in a semicolon:- if(expr) ...

A problem about "[ ]" "( )" "="
I want to read several images saved in a director,and give them to I1,I2 ,I3....,using the following codes: filelist=dir(['c:\MATLAB701\work\...\*.jpg']); for i=1 :length(filelist) I=imread(fullfile('c:\MATLAB701\work\...',filelist(i).name)); end; but failed. Then I used I(i)=imread... ,still failed. How could I do? "John" <mailofww@126.com> wrote in message news:ef19e12.-1@webx.raydaftYaTP... >I want to read several images saved in a director,and give them to > I1,I2 ,I3....,using the following codes: > filelist=dir(['c:\MATLAB701\work\.....

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

When to use "." and when to use "!"
I'm still confused about this and I can't find anywhere that explains it properly. I have the MS book "Access 2003" in front of me and I'm reading Part 5 about VB and so on. It's telling me about how to refer to a specific database and has the example:- Dim dbMyDb As DAO.Database Set dbMyDb = DBEngine.Workspaces(0).Databases(0) but, but, but, but - what do those dots (periods, full stops, call them what you will) mean? (OK, it appears to be the same usage as C/C++/Java when referring to class/structure members, but I wish it would tell me that somewhere) ...

Urgent JAVA Requirement in """"""NEW YORK"""""""""
Hello Partners, How are you ? Please find the requirement below. Location : NY Duration : 8 mnths Rate :Open Job description: Java/J2EE Web Service Developer =B7 (4+ years of application development experience in Java/J2EE and Web service technologies. =B7 Experience with spring & Hibernate. =B7 Experience with J2EE Application Server (preferably Web logic). =B7 Preferable Aqua logic DSP Experience =B7 Preferable Sonic ESB Composite Service experience Experience w...

Gary Sokolich """"""
"""""""""" http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich , Newport Beach, California �V File B-29812 - It was alleged that Dr. Sokolich unlawfully offered or attempted to practice engineering in Texas (...) Dr. Sokolich chose to end the proceedings by signing a Consent Order that was accepted by ...

Question about "sprintf" "@" "do for"
Hello, this works: A1=3D1 A2=3D2 A3=3D3 i=3D1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari do for [i=3D1:3]{ vari=3Dsprintf("A%.f",i) print vari } But I want to have "print vari,"=3D",@vari" in the loop. But it dosen't=20 work. Why can't I use "print vari,"=3D",@vari" in the loop? Is there a=20 solution for? J=C3=B6rg Jörg ...

puts "\\".gsub("\\", "\\\\")
Hello, I have a mini-ruby quiz. Guess what this line of code writes to the console, then try it for yourself: puts "\\".gsub("\\", "\\\\") Why is that so? Martin From: martinus [mailto:martin.ankerl@gmail.com]=20 # Hello, I have a mini-ruby quiz. Guess what this line of code writes to # the console, then try it for yourself: # puts "\\".gsub("\\", "\\\\") puts "\\".gsub("\\", "\\\\") \ #=3D> nil # Why is that so? faq. escaping the escape in sub/gsub. search the archives. maybe you want somethin...

Should template type deduction try "T &" and "const T &" if "T" fails
GCC gives an error when compiling this: #include <stdio.h> class S { private: S(const S &s); public: S(void) { } }; void print(const S &i) { printf("made it\n"); } template <typename T> void call_print(T t) { print(t); } int main(void) { S s; print(s); call_print(s); return(0); } Seems like, when the instantiation of call_print fails when S is deduced for type parameter T, the compiler could then retry with "S &" for T and then "const S &" for T. Does the Standard prohibit/allow re...

Web resources about - What type "T" or "auto" should I use for i? - comp.lang.c++.moderated

Resources last updated: 2/23/2016 2:44:12 PM