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....
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...
"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 chance I created a small program as follows:
===========
s : string := "CAT";
procedure modify ( s1 : out string ) is
begin
s1(2) := 'U';
end modify;
...
put ( modify(s) );
===========
now I get as a result "CUT", and i dont understand why i get this result.
Doesnt the "out" specify that its initial value isnt passed in via the
parameter? But it seems to be passed in the above. In fact the "out" is
acting like an "in out". I am a little confused. Could someone shed some
light on this?
Many thanks!
zork
"zork" <zork@nospam.com> wrote in message news:4104d5de@dnews.tpgi.com.au...
> 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&q...
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
...
"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 ...
How do I make "Defined" disks "Available" disks in AIX 5.3 ?I've been swapping disk around in my RS/6000 and now have:
# lsdev -c disk
hdisk0 Available 30-58-00-3,0 16 Bit SCSI Disk Drive
hdisk1 Available 30-58-00-8,0 16 Bit SCSI Disk Drive
hdisk2 Available 30-58-00-9,0 Other SCSI Disk Drive
hdisk3 Available 30-58-00-10,0 16 Bit SCSI Disk Drive
hdisk4 Defined 30-58-00-13,0 Other SCSI Disk Drive
hdisk5 Defined 30-58-00-13,0 16 Bit SCSI Disk Drive
How do I turn those "Defined" disks into "Available" disks, so that I
can do something with?
I've found it a bit of a pain trying to install disks via smit, in
particular since it wants the "CONNECTION address" of which there are
more than 1000 to chose from. How on earth is one supposed to know
what that is?
Dave
In comp.unix.aix, David Kirkby <david.kirkby@onetel.net> wrote:
>I've been swapping disk around in my RS/6000 and now have:
>
># lsdev -c disk
>hdisk0 Available 30-58-00-3,0 16 Bit SCSI Disk Drive
>hdisk1 Available 30-58-00-8,0 16 Bit SCSI Disk Drive
>hdisk2 Available 30-58-00-9,0 Other SCSI Disk Drive
>hdisk3 Available 30-58-00-10,0 16 Bit SCSI Disk Drive
>hdisk4 Defined 30-58-00-13,0 Other SCSI Disk Drive
>hdisk5 Defined 30-58-00-13,0 16 Bit SCSI Disk Drive
>
>How do I turn those "Defined" disks into "Available" disks, so that I
>can do something with?
>
>I've found it a bit of a pain trying to install disks via smit, in
>particular since it wants...
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 working in UNIX environment.
Good working knowledge of Oracle RDBMS and PL/SQL)
Note : Please send your updated resume along with contact no to
Karthik@bhaninfo.com.
Thanks & Regards
Karthik
BhanInfo
karthik@bhaninfo.com
# 1572, 7 th Floor Suites,
1 Blue Hill Plaza
Pearl River,NY-10965
www.bhaninfo.com
...
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...
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 ...
my own perl "dos->unix"/"unix->dos"i made a dos to unix, unix to dos program catered for my own purposes.
it's seems to work fine. small program, 26 lines
anyone see any potential problems with it? do you have a better way to
do it?
my next step is to slip in some code to automatically "detect" whether
its a unix or dos file.
#!/usr/bin/perl -w
use strict;
#setting based on filename argument.
# if sym link is dos-unix or if sym link is unix-dos
my ($from, $to);
my $option=substr($0,rindex($0,'/')+1,length($0)-1); # $0 gives full
path. this code gives just filename
if ($option eq "dos-unix"){
...
There's "Unix", and then there's "UNIX(r)"From TOW[1]:
The Open Group, an industry standards consortium, now owns the UNIX
trademark and allows its use for certified operating systems
compliant with its standard, the Single UNIX Specification. Other
operating systems that emulate Unix to some extent may be called
Unix-like, although the Open Group disapproves of this term.[4] The
term Unix is also often used informally to denote any operating
system that closely resembles the trademarked system. The most common
version of Unix (bearing certification) is Apple's OS X, while Linux
is the most popular non-certified workalike.
So, to summarize:
"Unix" is a class of operating systems that is "UNIX-like", which
includes Linux.
"UNIX(r)" is a trademark of the Open group, who -- somewhat snootily --
have an issue with the term "UNIX-like". (They can take a flying fsck.)
"Cult of Unix" spells "Unix" as "Unix", because otherwise, what would it
have to do with Linux?
This PSA brought to you by the letter "U" and the number "2".
-v
Unix minions, unite!
On 2/9/14, 1:15 PM, in article ld8nlg$bu7$1@dont-email.me, "vallor"
<vallor@cultnix.org> wrote:
> From TOW[1]:
>
> The Open Group, an industry standards consortium, now owns the UNIX
> trademark and allows its use for certified operating systems
> compliant with its standard, the Single UN...
WHERE did Joseph Smith get the terms "Mormon" and "Moroni" and "Cumorah" from???Nick thinks he is a historian, and has his own kooky Victor von
Frankenstein interpretation of how The Mormons holy "book of mormon"
came into being. He is the only one in the world who thinks that
Joseph smith actually had gold plates that were smuggled to the
americas where he then translated them giving a coded history of
Europe. Mormons including their founding prophet think Joe's
supposed
gold plates, which he said an angel gave to him, detailed a history
of
american indians. No one other than mormons believe that nonsense,
but nick has a theory that only he can be stupid...
Can I get "My Document", "Desktop" and "Favourite" folder dynamically?In difference language of Windows, they have difference name, can I get
them dynamically from java? Any API can do this?
carfield@gmail.com wrote:
> In difference language of Windows, they have difference name, can I get
> them dynamically from java? Any API can do this?
>
I just now it from "My Documents". This is the System Property "user.home".
Because i am using Linux with the "windowmaker" Desktop, I have no Idea,
what the other two ("Desktop", and "Favourite") could mean. Probably
theese two are MsWindows specific ??
Phil...
"A" is not equal "A"?I was trying to convert String Array to String A through cycle and than compare the result with String B but eventhough results were the same it returned false.
I'am working in BlueJ 3.1.0
Code is:
public boolean Method ()
{
String[] Example = {"a","b","c"};
String A = "";
String B = "abc"
for (int i = 0; i<3 ; i++)
{
A = A + Example[i];
}
if (A == B)
{
return true;
}
}
never got true...
I appreciate any suggestions how to solve this
Den 08.04.2014 10:06, skrev 245dav@gmail.com:...
"==" is NOT TRUE "==", WHY?[CODE START]
x=5;
y=8;
if (x + y + 1E-15 == 13)
a = 3
else
a = 8
end
[CODE END]
When x + y + 1E-15, the code above returns a = 8.
When x + y + 1E-16, the code above returns a = 3.
Why? Kindly advise. Thanks.
"onemilimeter Chen" <onemm@example.com> wrote in message
<g7adrj$5tr$1@fred.mathworks.com>...
> [CODE START]
> x=5;
> y=8;
> if (x + y + 1E-15 == 13)
> a = 3
> else
> a = 8
> end
> [CODE END]
>
> When x + y + 1E-15, the code above returns a = 8.
> When x + y + 1E-16, the code above returns a = 3.
>
> Why? ...
how to change "/" to "\"iam new to shell scripting and i have plz can anyone help in changing
the pattrern "/" to "\" using the sed command.
olympie@gmail.com wrote:
> iam new to shell scripting and i have plz can anyone help in changing
> the pattrern "/" to "\" using the sed command.
sed 's/\//\\/g' will replace all '/' with '\'
srp
--
http://saju.net.in
Saju Pillai <saju.pillai@gmail.com> wrote:
>> iam new to shell scripting and i have plz can anyone help in changing
>> the pattrern "/" to "\" using ...
Re: "out" and "in out""no reliable initial value" means, you cannot rely on the value, but it may have a value. This depends on the parameter passing mechanism, which is _not_ related to the parameter mode (contrary to what many people think).
So the parameter mode is there (nearly) solely for the information of the reader. The parameter passing mechanism for all kinds of parameters is defined in the RM. There are parameters passed by copy (in and out), by reference; for some it is explicitly left undefined.
In your case, the passing mechanism is by reference, so you get what you get. But don't rely on this, rely only on the mode, i.e. the parameter st is undefined upon entering the procedure modify, so when you only write component 2, upon return, only component 2 has been written. Under slight variations, the result of your code might be <garbage character>U<garbage character>.
Another thing: Don't rely upon s1'First = 1. Component 2 might not exist. You could call modify like so:
X: String (25..30);
modify (X);
Now s1(2) inevitably will raise Constraint_Error.
____________________________________________________
Aufnehmen, abschicken, nah sein - So einfach ist
WEB.DE Video-Mail: http://freemail.web.de/?mc=021200
"Christoph Karl Walter Grein" <AdaMagica@web.de> wrote:
>
> In your case, the passing mechanism is by reference, so you get what you
get. But don't rely on this, rely only on the mode, i.e. the parameter st is
undefined...
only get data from "today" until "yesterday"Hi,
I will get only the code from the date "today" (should be displayed)
until "yesterday" (shouldn't be displayed)
This is the source code (all in ONE line):
Quote:
......muchHTMLcodeBefore...TR><TD ALIGN="RIGHT" class=bcText>
01/27/04</TD><TD ALIGN="RIGHT" class=bcText> 1154.25</TD><TD
ALIGN="RIGHT" class=bcText> 1154.75</TD><TD ALIGN="RIGHT"
class=bcText> 1151.00</TD><TD ALIGN="RIGHT" class=bcText>
1151.50</TD><TD ALIGN="RIGHT" class=bcTextRed>
-2.75</TD></TR></TABLE><TABLE WIDTH="100%" BORDER=0 CELLPADDING=2
CELLSPACING=1><TR><TD WIDTH="16.6666666666667%" ALIGN="RIGHT"
class=bcText>01/26/04</TD...and so on (all in one line)
I can regexp the html code with:
[regsub -all {<[^>]*>} $line {} line]
But how can I get only the data from the actual date (here 01/27/04)
to yesterday (here 01/26/04).
Thanks!
Not sure what you ask, but
regexp {.*?(01/26/04.*?)01/27/04} $line dummy stuff
might give you what you're looking for in $staff
hth
Ronnie
jagg wrote:
> Hi,
>
> I will get only the code from the date "today" (should be displayed)
> until "yesterday" (shouldn't be displayed)
>
> This is the source code (all in ONE line):
> Quote:
> .....muchHTMLcodeBefore...TR><TD ALIGN=&...
why have both "." and "->" ?I used to remember why c++ needed both ?
Could somebody help me here ?
For example
class A{
f();
};
A* aa;
You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators.
Raj
"raj" <rajkumar@hotmail.com> schreef in bericht
news:d7fee6d0.0406230748.694b966b@posting.google.com...
> I used to remember why c++ needed both ?
> Could somebody help me here ?
>
> For example
>
> class A{
> f();
> };
>
> A* aa;
>
> You could do either "aa->f()" or "(*aa).f()". So why does C++ need both
operators.
>
> Raj
There is a difference I believe that xxxx->yyyy is used if xxxx is a pointer
to an object/class and xxxx.yyyyy if xxxx is the object/classs
> class A{
> f();
> };
>
> A* aa;
>
> You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators.
IMHO it's simply convenience.
Bye, Marco
raj wrote:
>
> You could do either "aa->f()" or "(*aa).f()". So why does C++ need both
> operators.
The second form involves more typing and requires more effort to read.
--
Russell Hanneken
eunaarxra@cbobk.pbz
Use ROT13 to decode my email address.
In message <WOhCc.15115$Wr.8451@newsread1.news.pas.earthlink.net>,
Russell Hanneken <me@privacy.net> writes
>raj wrote:
>>
>> You could do either "aa->f()" or "(*aa...
how can i get "mosy" and "postmosy"I'm attempting to compile a very old software package. The makefile
requires "mosy" and "postmosy", which appear to be SNMP utilities.
But I can't find them on Internet, how can i get these tools?
Can you help me ? Thanks a lot!
mosy and postmosy should be utilities of the SNMP Emanate SDK framework.
Giampiero.
wsfd311@gmail.com ha scritto:
> I'm attempting to compile a very old software package. The makefile
> requires "mosy" and "postmosy", which appear to be SNMP utilities.
> But I can't find them on Internet, ...
what does the "+" and the "-" mean?I recently read what the "+" and the "-" signs mean for compact discs. Of
course, a friend has just
asked me and I now forget. I've searched all over the place with no results.
Anyone know?
TIA!
.. --------------------------------------
Mike Richter, were you born with
"Scam Artist" emblazoned on your face?
--------------------------------------
roscoe james wrote:
>
> I recently read what the "+" and the "-" signs mean for compact discs. Of
> course, a friend h...
"dconj, variable subsititution""how to get numerical value"instead of "dconj"functiondear sir ..if i am doing diff and variable value substitution like...
for example
>> syms x
>> e=sin(x)
>> p=diff(e,x,1)
p =cos(x)
>> subs(p,x,0)
ans = 1
i am doing simple trigonometric function answer is coming...but if
>>s1=4.15;
>>s2=1.05;
syms x ;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
a12=(-i)* ( (s1+s2)/( sqrt(((s1+s2)^2+x^2)) ) )*sin(sqrt( s1^2+( (s1*x)/(s1+s2) )^2 ))
a21=(a12)
t1=sqrt( s1^2+( (s1*x)/(s1+s2) )^2 )
t2=sqrt( s2^2+( (s2*x)/(s1+s2) )^2 )
u= (x/(sqrt( ((s1+s2)^2+x^2) )))
b12=(-i)* ( (s1+s2)/( ...
Is there any """Anti Stringizing operator #"""Hi everybody:D
I've a string that contains the name of a class.
Some members told that I can use """Stringizing Operator (#)""", but
the problem is here, that I have the string, & I want something vice-
versa.
As we know with """Stringizing Operator (#)""", we can get the stirng
name of a class or ... str <--- #ClassA
But I want to instantiate a class that I have just it's name as a
string.
ClassA * clsA = new ??? <--- Str ???
How can I do it?
I don't want to use """HardCoding"&qu...