COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Array of something

• Email
• Follow

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am defining a Tableau' array of Cell' elements. Tableau and Cell
are both classes, and some methods over Tableau' and Cell' are
defined.

Now, my Cell class comprises a State so that to each Cell
instanciation a State is associated, i.e. one can make

==
Cell myCell = new Cell();
myCell.state
==

Now, for the Tableau' array, if I need to access a Cell's state, do I need to write, for a Tableau'
element: myTableau.cell.state? It would mean that a cell' (of type
Cell) is defined for each Tableau' element, and that is not the
case. But using myTableau.state would mean that state' is a variable of
myTableau (of type Tableau'), which is not the case too, because
state is defined for each Cell element.
- --
- --

If you fake it, you can't make it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2M2x4ACgkQM0LLzLt8Mhz9FACfRcpaVQa3pjpEca+AL/hxpl97
3u0An3Q21V8/SuO3t9LLFPNs2uP3eMhz
=hxFD
-----END PGP SIGNATURE-----

 0

See related articles to this posting

Merciadri Luca wrote:
> I am defining a Tableau' array of Cell' elements. Tableau and Cell

Show us some code.  I don't know what you mean by "a Tableau' array of Cell'
elements".

> are both classes, and some methods over Tableau' and Cell' are
> defined.
>
> Now, my Cell class comprises a State so that to each Cell
> instanciation a State is associated, i.e. one can make
>
> ==
> Cell myCell = new Cell();
> myCell.state

What do you expect to happen as a result of that standalone expression?

> ==
>
> Now, for the Tableau' array, if I need to access a Cell's state, do I need to write, for a Tableau'
> element: myTableau.cell.state? It would mean that a cell' (of type
> Cell) is defined for each Tableau' element, and that is not the
> case. But using myTableau.state would mean that state' is a variable of
> myTableau (of type Tableau'), which is not the case too, because
> state is defined for each Cell element.

Remember that a reference variable can have a value of 'null', and member
variables always start at their "zero" value, which for references is 'null'.

Whatever you do to get a 'Cell', it's clearly 'Cell#state' that you want.

Show us class definitions.  You're not speaking Java so it's really, really
hard to figure out what you need help with.

You can have something like this:

package tableaux;
public class Tableau
{
/* p-p */ Cell [] cells;
...
}

and

package tableaux;
public class Cell
{
/* p-p */ State state;
...
}

Your code to access individual 'Cell' state would be similar to:

package tableaux;
import org.apache.log4j.Logger;
import static org.apache.log4j.Logger.getLogger;

public class Processor
{
/* p-p */ Tableau tableau;

// various setter methods that should give 'tableau' a value

public void process()
{
if ( tableau == null || tableau.cells == null )
{
return;
}
for ( Cell cell : tableau.cells )
{
if ( cell != null && cell.state != null )
{
doSomethingWith( cell.state );
}
}
}
}

I'm ignoring the convention and best practice to use accessor and mutator
variable accessibility; I deliberately chose package-private
('/* p-p */') access.

--
Lew
Honi soit qui mal y pense.

 0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lew <noone@lewscanon.com> writes:

>> I am defining a Tableau' array of Cell' elements. Tableau and Cell
>
> Show us some code.  I don't know what you mean by "a Tableau' array
> of Cell' elements".
>
>> are both classes, and some methods over Tableau' and Cell' are
>> defined.
>>
>> Now, my Cell class comprises a State so that to each Cell
>> instanciation a State is associated, i.e. one can make
>>
>> ==
>> Cell myCell = new Cell();
>> myCell.state
>
> What do you expect to happen as a result of that standalone expression?
>
>> ==
>>
>> Now, for the Tableau' array, if I need to access a Cell's state, do I need to write, for a Tableau'
>> element: myTableau.cell.state? It would mean that a cell' (of type
>> Cell) is defined for each Tableau' element, and that is not the
>> case. But using myTableau.state would mean that state' is a variable of
>> myTableau (of type Tableau'), which is not the case too, because
>> state is defined for each Cell element.
>
> Remember that a reference variable can have a value of 'null', and
> member variables always start at their "zero" value, which for
> references is 'null'.
>
> Whatever you do to get a 'Cell', it's clearly 'Cell#state' that you want.
>
> Show us class definitions.  You're not speaking Java so it's really,
> really hard to figure out what you need help with.
>
> You can have something like this:
>
>  package tableaux;
>  public class Tableau
>  {
>    /* p-p */ Cell [] cells;
>    ...
>  }
>
> and
>
>  package tableaux;
>  public class Cell
>  {
>    /* p-p */ State state;
>    ...
>  }
>
> Your code to access individual 'Cell' state would be similar to:
>
>  package tableaux;
>  import org.apache.log4j.Logger;
>  import static org.apache.log4j.Logger.getLogger;
>
>  public class Processor
>  {
>   /* p-p */ Tableau tableau;
>
>   // various setter methods that should give 'tableau' a value
>
>   public void process()
>   {
>     if ( tableau == null || tableau.cells == null )
>     {
>       return;
>     }
>     for ( Cell cell : tableau.cells )
>     {
>       if ( cell != null && cell.state != null )
>       {
>         doSomethingWith( cell.state );
>       }
>     }
>   }
>  }
>
> I'm ignoring the convention and best practice to use accessor and
> I did not ignore variable accessibility; I deliberately chose
> package-private
> ('/* p-p */') access.
Thanks for your help. I will try to be more explicit in this message.

Here is a more complete description.

* I've got a Cell class which should allow me to define a state State for
every Cell instanciation. That is, I define

==
public class Cell
{
public enum State
{
}
public State state;
}
==
(these are either DEAD or LIVING Cell' that will be instanciated).

* I want to compare the value of the state of a Cell with a State
constant,' i.e. do something like

==
if (tableau.setOfCells[i][j].state == State.LIVING)
{
....
}
==
but compiler complains: cannot find symbol State.'

* In the last chunk of code, tableau is a Tableau element where I've
got a class Tableau' defined like this:

==
public class Tableau
{
public Cell[][] setOfCells;

public Tableau(int n, int s)
{
setOfCells = new Cell[n][n];
}
}
==
and where tableau is created thanks to the call to the accessor:

==
Tableau tableau = new Tableau(n, s);
==

That is, my main goal is to create two instances of Tableau': tableau
and tableau2, which should contain each one a setOfCells' element,
which would be a n*n Cell array. This array would then be accessed
using habitual indices, and, an element of this Cell array being a
Cell, accessing a Cell would lead to the possibility of accessing its state.

- --
- --

If you want a thing done right, do it yourself.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2M+eUACgkQM0LLzLt8MhwFAACePCVCnYM3TcthxfgDFrZYAHBD
3MgAoK1bN3pMW97m3zv1a7/bO3X8fJlZ
=Nrko
-----END PGP SIGNATURE-----

 0

On Fri, 25 Mar 2011 19:12:47 +0100, Merciadri Luca
<Luca.Merciadri@student.ulg.ac.be> wrote, quoted or indirectly quoted
someone who said :

>Now, for the Tableau' array, if I need to access a Cell's state, do I need to write, for a Tableau'
>element: myTableau.cell.state? It would mean that a cell' (of type
>Cell) is defined for each Tableau' element, and that is not the
>case. But using myTableau.state would mean that state' is a variable of
>myTableau (of type Tableau'), which is not the case too, because
>state is defined for each Cell element.

You need a intro textbook to answer such questions.  It can be out of
date and hence free or very cheap.  See
http://mindprod.com/jgloss/gettingstarted.html

You normally would not create a class just to hold a single array.

You would say:

Cell[] cells = new Cell[ xxx ];

cells[ 0 ] = new Cell( yyy );

cells[ 0 ].someMethod();

or, more commonly, since you usually don't know in advance how many
Cells there will be:

List<Cell> cells = new ArrayList<Cell>( xxx );

cells.add ( new Cell ( yyy ) );

Cell aCell = cells.get( 0 );

aCell.someMethod();

--
http://mindprod.com
If you think it’s expensive to hire a professional to do the job, wait until you hire an amateur.


 0

Merciadri Luca wrote:
> Here is a more complete description.
>
> * I've got a Cell class which should allow me to define a state State for
>    every Cell instanciation. That is, I define
>
> ==
> public class Cell
> {
>   public enum State
>   {
>   }
> public State state;
> }
> ==
> (these are either DEAD or LIVING Cell' that will be instanciated).
>
> * I want to compare the value of the state of a Cell with a State
>    constant,' i.e. do something like
>
> ==
> if (tableau.setOfCells[i][j].state == State.LIVING)
> {
> ...
> }
> ==
> but compiler complains: cannot find symbol State.'

That's because 'State' is a nested class - it has to be accessed through its
outer class.  'State' is a static member of 'Cell', not a standalone class.

Try 'Cell.State.LIVING', or else elevate 'State' to a top-level class:

------------------------------------
package tableaux;
public enum State
{
}
------------------------------------
------------------------------------
package tableaux;
public class Cell
{
public State state;
}
------------------------------------

Remember that public fields of a type are an antipattern in Java.

> * In the last chunk of code, tableau is a Tableau element where I've
>    got a class Tableau' defined like this:
>
> ==
> public class Tableau
> {
>     public Cell[][] setOfCells;

Bad name for something that is not a 'Set'.

>     public Tableau(int n, int s)
>     {
>         setOfCells = new Cell[n][n];
>     }
> }
> ==

What does the constructor 's' argument contribute?

> and where tableau is created thanks to the call to the accessor:
>
> ==
> Tableau tableau = new Tableau(n, s);
> ==
>
> That is, my main goal is to create two instances of Tableau': tableau
> and tableau2, which should contain each one a setOfCells' element,
> which would be a n*n Cell array. This array would then be accessed
> using habitual indices, and, an element of this Cell array being a

"habitual"?

> Cell, accessing a Cell would lead to the possibility of accessing its state.

OK

But what you show is an n x n array of 'null' references, so you have nothing
whose state you can access.

public class Tableau
{
/* p-p */ Cell[][] cells;

public Tableau(int n, int s)
{
cells = new Cell[n][n];
for ( int ix = 0; ix < n; ++ix )
for ( int jx = 0; jx < n; ++ix )
{
cells [ix] [jx] = getValue( ix, jx );
}
}

public void doSomething()
{
for ( int ix = 0; ix < cells.length; ++ix )
for ( int jx = 0; ix < cells [0].length; ++ix )
{
final Cell cell = cells [ix] [jx];
if ( cell != null )
{
process( cell.state );
}
}
}
}

If you don't handle error conditions, preferably via prevention, your program
will crash horribly and embarrass you beyond belief.

--
Lew
Honi soit qui mal y pense.

 0

Roedy Green wrote:
> You normally would not create a class just to hold a single array.

Other than the trivial fact that no array exists outside a class (or at least
as a static member of an interface and that would be sick).

The key word is "just".  You might indeed create a class that contains a
single array, but it would have behaviors, too.

--
Lew
Honi soit qui mal y pense.

 0

On Fri, 25 Mar 2011 18:48:30 -0400, Lew <noone@lewscanon.com> wrote,
quoted or indirectly quoted someone who said :

>The key word is "just".  You might indeed create a class that contains a
>single array, but it would have behaviors, too.

If you did create a class containing just an array and a few methods,
you would almost never make the array itself public.  You would
manipulate it via getter and setter method of the class.

So in practice you almost always access an array from within the class
in which it is defined.

I remember once being given a test.  Many of the question were about
the details of the COBOL IDENTIFICATION division.  I thought to
myself, anyone who knew this stuff was probably a loon who wrote it
out from scratch each time.  KNOWING this was in indication of
incompetence.

In a way, knowing how to access arrays from outside the class, at
least in one's sleep, is contraindicative of competence.  It is not
something you should do regularly.  On the other hand, any old hand
could reason it out from first principles. It depends on whether the
array itself is static or instance.
--
http://mindprod.com
If you think it’s expensive to hire a professional to do the job, wait until you hire an amateur.


 0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lew <noone@lewscanon.com> writes:

>> Here is a more complete description.
>>
>> * I've got a Cell class which should allow me to define a state State for
>>    every Cell instanciation. That is, I define
>>
>> ==
>> public class Cell
>> {
>>   public enum State
>>   {
>>   }
>> public State state;
>> }
>> ==
>> (these are either DEAD or LIVING Cell' that will be instanciated).
>>
>> * I want to compare the value of the state of a Cell with a State
>>    constant,' i.e. do something like
>>
>> ==
>> if (tableau.setOfCells[i][j].state == State.LIVING)
>> {
>> ...
>> }
>> ==
>> but compiler complains: cannot find symbol State.'
>
> That's because 'State' is a nested class - it has to be accessed
> through its outer class.  'State' is a static member of 'Cell', not a
> standalone class.
Thanks. This is part of the way I solved the problem.

> Try 'Cell.State.LIVING', or else elevate 'State' to a top-level class:
>
> ------------------------------------
>  package tableaux;
>  public enum State
>  {
>  }
> ------------------------------------
> ------------------------------------
>  package tableaux;
>  public class Cell
>  {
>   public State state;
>  }
> ------------------------------------
>
> Remember that public fields of a type are an antipattern in Java.
>
>> * In the last chunk of code, tableau is a Tableau element where I've
>>    got a class Tableau' defined like this:
>>
>> ==
>> public class Tableau
>> {
>>     public Cell[][] setOfCells;
>
> Bad name for something that is not a 'Set'.
>
>>     public Tableau(int n, int s)
>>     {
>>         setOfCells = new Cell[n][n];
>>     }
>> }
>> ==
>
> What does the constructor 's' argument contribute?
It contributed for another affectation in the constructor body. I
would have better put // ... so that you would have realized that the
's' argument was necessary.
>
>> and where tableau is created thanks to the call to the accessor:
>>
>> ==
>> Tableau tableau = new Tableau(n, s);
>> ==
>>
>> That is, my main goal is to create two instances of Tableau': tableau
>> and tableau2, which should contain each one a setOfCells' element,
>> which would be a n*n Cell array. This array would then be accessed
>> using habitual indices, and, an element of this Cell array being a
>
> "habitual"?
Yes, say now tableau.setOfCells[x][y]. habitual' -> generic way.
>
>> Cell, accessing a Cell would lead to the possibility of accessing its state.
>
> OK
>
> But what you show is an n x n array of 'null' references, so you have
> nothing whose state you can access.
>
>  public class Tableau
>  {
>   /* p-p */ Cell[][] cells;
>
>   public Tableau(int n, int s)
>   {
>     cells = new Cell[n][n];
>     for ( int ix = 0; ix < n; ++ix )
>     for ( int jx = 0; jx < n; ++ix )
>     {
>       cells [ix] [jx] = getValue( ix, jx );
>     }
>   }
>
>   public void doSomething()
>   {
>     for ( int ix = 0; ix < cells.length; ++ix )
>     for ( int jx = 0; ix < cells [0].length; ++ix )
>     {
>       final Cell cell = cells [ix] [jx];
>       if ( cell != null )
>       {
>         process( cell.state );
>       }
>     }
>   }
>  }
>
> If you don't handle error conditions, preferably via prevention, your
> program will crash horribly and embarrass you beyond belief.
But why is that necessary? This might exactly be part of the solution
to my other thread, namely Enum list.'
- --
- --

Life is like a box of chocolate, you never know what you're gonna
get.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2OX1cACgkQM0LLzLt8MhxuVwCdHWnJfyQOdw12fPwydIA1uyLq
Qs4An2fA8HTljBqZU4U/LLVYekK9X7e9
=uGwM
-----END PGP SIGNATURE-----

 0

On Fri, 25 Mar 2011 19:12:47 +0100, Merciadri Luca
<Luca.Merciadri@student.ulg.ac.be> wrote, quoted or indirectly quoted
someone who said :

>I am defining a Tableau' array of Cell' elements. Tableau and Cell
>are both classes, and some methods over Tableau' and Cell' are
>defined.

I suggest you have a look at
http://mindprod.com/jgloss/newsgroups.html

For some hints on how to ask questions in a way that elicits useful
responses rather than a shower of virtual vegetables.  It is quite an
art.  If you study past exchanges, you will see it is one I have far
from mastered myself. You can't avoid it entirely, but you can reduce
the number of mass peltings.
--
http://mindprod.com
There are only two industries that refer to their customers as "users".
~ Edward Tufte


 0

8 Replies
368 Views

Similar Articles

11/30/2013 3:01:52 PM
page loaded in 59295 ms -0

Similar Artilces:

something with a groove
hey people come have a try at my group.It's cool and fun even tough i'm the only member it's problems-at-homegooglegroups.com.weird name but it's a fun group were u can talk about anything.love nekeisha kittty said the following on 10/11/2005 7:01 PM: > hey people come have a try at my group.It's cool and fun even tough i'm > the only member it's problems-at-homegooglegroups.com.weird name but > it's a fun group were u can talk about anything.love nekeisha And who do you talk to since you are the only member? And, when you answer, who answers? Is i

is something wrong in it?

Something changed
All, I have a several sparcs inside my filewall which sendmail only to eachother, or to one mailhost for relaying to the outside world. So, sending mail to someone@outside.com gos to the outside relay, mail1. But, mail to me@insidehost where insidehost is no localhost, but is in the same domain just sends it off to insidehost to be processed. This worked fine until the last week or so. Now, all of a sudden, mail to me@insidehost is being send to some other mail relayer, and never making it to insidehost. No changes have been made on the unix boxs recently. I am in a branch o

Something tricky
Sorry to be putting this message here, but the vim usage group has no response. Is there any quick to generate a file with sequential numbers 1-100 in vi . Or is there any quick way to do so other than vim, something in shell . like sed or awk On 10/10/2008 7:23 AM, parag_paul@hotmail.com wrote: > Sorry to be putting this message here, but the vim usage group has no > response. > Is there any quick to generate a file with sequential numbers 1-100 in > vi . > > Or is there any quick way to do so other than vim, > something in shell . like sed or awk seq 100 > file or, in vi: !!seq 100 Regards, Ed. In article <48EF49EF.3010104@lsupcaemnt.com>, Ed Morton <morton@lsupcaemnt.com> wrote: > On 10/10/2008 7:23 AM, parag_paul@hotmail.com wrote: > > Sorry to be putting this message here, but the vim usage group has no > > response. > > Is there any quick to generate a file with sequential numbers 1-100 in > > vi . > > > > Or is there any quick way to do so other than vim, > > something in shell . like sed or awk > > seq 100 > file > > or, in vi: > > !!seq 100 > >

Something Basic
; Output as in file after the script: 1> 2> 3> 4> name stores emplyoee ------------ In unix i can apply some command to get rid of these numbers but Is there any way to do this thro sql-server only? some parameter or something? Help will be greatly appreciated TIA Hi pankaj, Sounds like this is a provider specific thing, which provider are you using ? Jens Suessmeyer. (pankaj_wolfhunter@yahoo.co.in) writes: > When i log onto sql server using tsql i get the following line of > information: > > locale is > "/en_US.ISO8859-1/en_US.ISO8859-15/en_US.ISO8859-15/en_US.ISO8859- > 15/en_US.ISO8859-15/en_US.ISO8859-1" > locale charset is "ISO8859-1" > > Is there any way that i can omit this message appearing all the time? No idea. SQL Server does not produce this message. Sounds like something that comes with whatever you connect with. > Secondly, i have written a unix script that gets all the user defined > tables from sql server. > When i open the file after running the script, i get the table names > but along with that > i also get some numbers. like > > Query: SELECT name FROM sysobjects

triplot something
Dear matlab user all over the world, my name is mei, i have a problem related to the usage of triplot function, the question is: how can i display the node label and triangle label in my triangle mesh figure, just like in pdetool? what function should i used? here is my syntax: x=p(:,1) % list of X coordinate y=p(:,2) % list of y coordinate tri = delaunay(x,y); hold on, triplot(tri,x,y);, what should i add (to the syntax), to display the node label in my figure?? I really need your feedback.. thank you very much, regards, Mei "Meionly " <me

Something For Sandman
driveway. It sounded like a bomb went off. Should I have not stepped outside to see what the noise was? After all it could have been some psycho throwing bombs instead of a fallen tree branch. How long do you reccomend that everyone in the neighborhood cower under their beds after something like this? >> Given the choice of shooting some loon who was trying to murder me or >> letting some loon murder me I'm always goinjg to shoot the loon. > >He didn't need to make himself the target of a loon in the first place. Try as you might to make it otherwise it all comes back... > neighbor's tree and hit her driveway. It sounded like a bomb went off. > Should I have not stepped outside to see what the noise was? After all > it could have been some psycho throwing bombs instead of a fallen tree > branch. How long do you reccomend that everyone in the neighborhood > cower under their beds after something like this? That's obviously not the same circumstance as my remarks covered. > >>> Given the choice of shooting some loon who was trying to murder me or >>> letting some loon murder me I'm always goinjg to shoot

Plotting something behind something else
I am plotting something on an axes that already has some stuff drawn on it. Is there a way to make the new thing I�m plotting look as though it is behind the rest of the plots, or do I have to redraw everything from start? For instance, let�s say I have a filled circle on an axes. If I now try to draw a filled square that surrounds it, it will hide the circle, and I don�t want that to happen. Holly wrote: > I am plotting something on an axes that already has some stuff drawn > on it. > Is there a way to make the new thing I'm plotting look as though it > is behind the rest... and make it drawn first, just put element 1 at the end, like so: h = h([2:end, 1]); set(gca, 'child', h); - Randy Randy Poe wrote: > > > > Holly wrote: >> I am plotting something on an axes that already has some stuff > drawn >> on it. >> Is there a way to make the new thing I'm plotting look as though > it >> is behind the rest of the plots, or do I have to redraw > everything >> from start? >> For instance, let's say I have a filled circle on an axes. If I > now >> try to draw a filled square

Writing something left-justified and something right-justified
obviously something I'm missing. Why is it needed? -- Pete Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The Standard C++ Library Extensions: a Tutorial and Reference (www.petebecker.com/tr1book) Am Wed, 7 Jan 2009 07:59:13 -0500 schrieb Pete Becker: >> \par\noindent >> \mbox{left phrase}\hspace{\fill}\mbox{right phrase} >> \par >> > > Since both answers use \mbox, there's obviously something I'm missing. > Why is it needed? It isn't needed. -- Ulrike Fischer Robin Fairbairns <rf10@cl.cam.ac.uk>... obviously something I'm missing. > Why is it needed? > Mostly it isn't needed but I put it there to more visibly separate the elements. You may find it useful to prevent {right phrase} from breaking across the line if the \hfill is small. Ulrike Fischer <news2@nililand.de> writes: >Am Wed, 7 Jan 2009 07:59:13 -0500 schrieb Pete Becker: >>> \par\noindent >>> \mbox{left phrase}\hspace{\fill}\mbox{right phrase} >>> \par >> >> Since both answers use \mbox, there's obviously something I'm missing. >> Why is it needed

I have something bugs
Hello. I have something bugs, i am dummy in java.Source:import java.io.File;import java.io.FilenameFilter;public class Main { public static void main(String[] args) { File f = new File("C:\\Windows"); String[] strings = f.list( new FilenameFilter() { // throw exception public boolean accept(File arg0, String arg1) { if (new File(arg0.getAbsolutePath()).isDirectory()) return true; return false; } }); for (String value : strings) { System.out.println( value ); } }}simple scan directory. i must printing name of directory.but this code is printing all files and directories in C:\Windows\ <alex.korsak@gmail.com> wrote in message news:1183486354.559012.321420@n60g2000hse.googlegroups.com...> Hello. I have something bugs, i am dummy in java.>> Source:> import java.io.File;> import java.io.FilenameFilter;>> public class Main {> public static void main(String[] args) {> File f = new File("C:\\Windows");> String[] strings = f.list( new FilenameFilter() { // throw exception> public boolean accept(File arg0, String arg1) {> if (new File(arg0.getAbsolutePath()).isDirectory())> return true;>> return

Zero to One...! ( Something Fun ( ? ))
http://transamoebae.blogspot.com/2005/06/zero-to-one.html

Avoiding a mutable (or something worse)
I have types A and B, such that I can write (using /**/ to mark where parameters belong) A a(/**/); B b(/**/); a << b; The last line changes a, but not b, so I have A & operator<<(A & a, const B & b); Now I want something manipulator-like, so I can write perhaps a << M(/**/) << b; for M a class (and of course I want to be able to chain further). I'd be equally happy with a << m(/**/) << b for m a function. I don't want to have to write M m(/**/); a << m << b; Types A and B are fixed, they can't be changed...; a << b; > > The last line changes a, but not b, so I have > > A & operator<<(A & a, const B & b); > > Now I want something manipulator-like, so I can write perhaps > > a << M(/**/) << b; > > for M a class (and of course I want to be able to chain further). I'd > be equally happy with a << m(/**/) << b for m a function. .... > My best (least bad) solution introduces two new operator<< functions > > const M & operator<<(A & a, const M & m); > const M & operator<<

Opera wants to open something
I was running Opera and it closed on me. I opened it and got a window saying: "Update.app" is an application downloaded from the Internet. Are you sure you want to open it? Opera.app downloaded this file on May 22, 2011. I canceled out and looked for "Update.app" on spotlight without luck. I tried running Opera again with the same message. I restored Opera.app from Time machine I tried running Opera again with the same message. I looked at files modified today and don't see "Update.app". I finally used a different browser and downloaded and install

that someone disappears, temporarily or terminally for various reasons, but this shouldn't mean that necessarily the TIP would orphan, too. Each Seconder of a TIP should accept the possibility of becoming "adoptive parent" of the TIP. Don Porter <dgp@email.nist.gov> wrote: > #176, > Several weeks ago, I contacted the author, asking whether > this was ready for a vote. No reply. This is apparently > abandoned. Unless something is technically wrong with it, I'd assume it's ready. > #199, > This one essentially reached an impasse. TCT members

Something else the iPad is good for ...
it seems. Though we do need to keep things in perspective. I laughed heartily as the chairman of Intel was asked by a reporter about Apple selling one million iPads in the first six weeks they were on sale, and he responded something like: "Gawrsh, how special. And here manufacturers only manage to sell one million Intel-based PCs *every day*." -- Giftzwerg *** \\\\\\ \ , ,\ \ ] \ < ------- Mohammed \\\\\\\ \\\\\\\ May 20 is "Everybody Draw Mohammed Day"

Want to see something painful?
Compile and execute one of the various flavors of forkbomb.c on 10.4.1 and sit back and watch what happens. Activity Monitor also crashes with a nice "Thread 0 crashed" message. -- Randy Howard (2reply remove FOOBAR) "I don't really care about being right you know, I just care about success." --Steve Jobs In article <MPG.1cff0f82a0c5e9b698a821@news.verizon.net>, Randy Howard <randyhoward@FOOverizonBAR.net> wrote: > Compile and execute one of the various flavors of forkbomb.c on 10.4.1 > and sit back and watch what happens. > > Acti

Something works in Python but not in cgi.
Hi, I need to make work a programm on the Web. I make tests like Hello World and also with GET and it works good. The problem comes in the line gas =3D importPhase("gri30.cti") The computer don=B4t find the file "gri30.cti"(this file was not in workspace), then I put it in the same folder and the program crash. Knows someone where is the problem??? #!D:\Python25\python.exe print "Content-Type: text/html\n" import cgitb; cgitb.enable() import cgi from workplace import * gas =3D importPhase("gri30.cti") print "<HTML><HEAD><TITLE&g

Something Fun / Example of LaTeX
My wife got this chart from the net: www.digitalsignallabs.com/nchart.odt and I thought it was a prime candidate for LaTeX. So just for fun I typeset it: www.digitalsignallabs.com/nchart.pdf The source is www.digitalsignallabs.com/nchart.pdf --Randy (OK, so I'm crazy/wasting time/etc.) -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.e

Miss something or Bug?
Hi!, I'm Ariel G and I have a problem with matlab. I tried to find a root of a function but I have differents numbers. The funcion is: y = log(x) - exp(-x) The fzero('log(x)-exp(-x)',2) results: ans = 1.3098 I put an ezplot and everything goes ok. BUT, in other applets and in MAC OSX grapher the root of the function is near 1.593... What I'm missing ? Thank you!! On Jul 22, 5:16=A0pm, "Ariel Gimenez" <ariel_gustavo_gime...@yahoo.com.ar> wrote: > Hi!, > I'm Ariel G and I have a problem with matlab. I tried to find a root of a= func

Overriding (or something similar) Exceptions
Hi guys, We have a "legacy" Java application that has been developed by many developers - some handle exceptions nicely, others not so. What I would like to do is create a log of all the exceptions and messages that are being thrown internally without changing the code. I was thinking around the classloader - create my own Exception class which uses the standard one but before passing the call to the standard one, writes out to the log. So mine is loaded by the JVM but all I do is extend the standard one and override a method - is this "cyclic dependancy possible"? If