Discussion:
java code
(too old to reply)
jay'el antonio
2014-02-21 00:03:51 UTC
Permalink
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
Stefan Ram
2014-02-21 02:47:48 UTC
Permalink
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
public final class Main
{ public static void main( final java.lang.String[] args )
{ java.lang.System.out.printf
( "11%n221%n3321%n44321%n554321%n6654321%n77654321%n887654321" ); }}
Stefan Ram
2014-02-21 12:57:52 UTC
Permalink
Post by Stefan Ram
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
public final class Main
{ public static void main( final java.lang.String[] args )
{ java.lang.System.out.printf
( "11%n221%n3321%n44321%n554321%n6654321%n77654321%n887654321" ); }}
My new version corrects a mistake (a final »%n« was missing),
and takes into account the possible objection that the program
was intended to be written with two nested loops:

public final class Main
{ public static void main( final java.lang.String[] args )
{ while( args == null )while( args == null ); java.lang.System.out.printf
( "11%n221%n3321%n44321%n554321%n6654321%n77654321%n887654321%n" ); }}
Stuart
2014-02-21 13:29:56 UTC
Permalink
Post by Stefan Ram
My new version corrects a mistake (a final »%n« was missing),
and takes into account the possible objection that the program
public final class Main
{ public static void main( final java.lang.String[] args )
{ while( args == null )while( args == null ); java.lang.System.out.printf
( "11%n221%n3321%n44321%n554321%n6654321%n77654321%n887654321%n" ); }}
I was going to ask you whether you have some kind of archive for FAHQ,
but this proves that these gems are hand-crafted on the fly. Nice job, too.

It is a pity that Java offers not so many code obfuscation techniques as
C++ does. I usually enjoy your C++ postings more (especially
a1a63f20-d25a-4e46-93be-***@googlegroups.com, that was hilarious).

Regards,
Stuart
Joshua Cranmer 🐧
2014-02-22 07:10:03 UTC
Permalink
Post by Stuart
It is a pity that Java offers not so many code obfuscation techniques as
C++ does. I usually enjoy your C++ postings more (especially
I disagree, here is some wonderful code obfuscation. Were I more
involved, I would have tried to find a better obfuscation than roman
numerals for the main string, but, with any luck, the OP is reading this
in a client with variable-width font and the text runs together as a
whole lot of I's.
public class Test {
public static void main(String... args) {
char[] K = new char[256];
int K = 0, Κ = 0;
char[] К = ("ⅠⅠⅠⅠⅠⅠⅠⅠⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅢⅢⅢⅢⅢⅢⅢⅡⅥⅠⅠⅢⅢⅢⅢⅢⅢⅢⅢⅢⅢⅡⅡⅡⅢⅤⅣⅠ" +
"ⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡ" +
"ⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥ" +
"ⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢ" +

"ⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡ").toCharArray();

int Ⲕ = К.length;
while (Κ < К.length) {
switch (К[Κ]) {
case 'Ⅰ': K++; break;
case 'Ⅱ': K--; break;
case 'Ⅲ': K[K]++; break;
case 'Ⅳ': K[K]--; break;
case 'Ⅴ': Ⲕ = Κ; if (K[K] == 0) Κ = K(К, Κ); break;
case 'Ⅵ': Κ = Ⲕ - 1; break;
case 'Ⅶ': System.out.print(K[K]); break;
}
Κ++;
}
}

private static int K(char[] К, int Κ) {
int K = 0;
for (++Κ; Κ < К.length; Κ++) {
if (К[Κ] == 'Ⅴ') K++;
else if (К[Κ] == 'Ⅵ' && K-- == 0) return Κ;
}
return Κ;
}
}
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Jan Burse
2014-02-22 11:36:42 UTC
Permalink
Snip
Looks like PL0 with romans to me. +1
Stuart
2014-02-22 12:57:33 UTC
Permalink
Post by Joshua Cranmer 🐧
Post by Stuart
It is a pity that Java offers not so many code obfuscation
techniques as C++ does.
I disagree, here is some wonderful code obfuscation. Were I more
involved, I would have tried to find a better obfuscation than roman
numerals for the main string, but, with any luck, the OP is reading this
in a client with variable-width font and the text runs together as a
whole lot of I's.
public class Test {
public static void main(String... args) {
char[] K = new char[256];
int K = 0, Κ = 0;
char[] К = ("ⅠⅠⅠⅠⅠⅠⅠⅠⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅢⅢⅢⅢⅢⅢⅢⅡⅥⅠⅠⅢⅢⅢⅢⅢⅢⅢⅢⅢⅢⅡⅡⅡⅢⅤⅣⅠ" +
"ⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡ" +
"ⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥ" +
"ⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢ" +
"ⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡⅢⅢⅢⅢⅢⅢⅢⅢⅤⅣⅠⅢⅠⅢⅡⅡⅥⅠⅠⅦⅡⅤⅠⅦⅣⅡⅣⅥⅠⅠⅦⅡⅡⅡ").toCharArray();
int Ⲕ = К.length;
while (Κ < К.length) {
switch (К[Κ]) {
case 'Ⅰ': K++; break;
case 'Ⅱ': K--; break;
case 'Ⅲ': K[K]++; break;
case 'Ⅳ': K[K]--; break;
case 'Ⅴ': Ⲕ = Κ; if (K[K] == 0) Κ = K(К, Κ); break;
case 'Ⅵ': Κ = Ⲕ - 1; break;
case 'Ⅶ': System.out.print(K[K]); break;
}
Κ++;
}
}
private static int K(char[] К, int Κ) {
int K = 0;
for (++Κ; Κ < К.length; Κ++) {
if (К[Κ] == 'Ⅴ') K++;
else if (К[Κ] == 'Ⅵ' && K-- == 0) return Κ;
}
return Κ;
}
}
Wow, that's awful.

At first, this code wouldn't run because for some reasons Thunderbird
treated the K in the lines
char[] K = new char[256];
and the first K in this line
int K = 0, Κ = 0;
both as 0x4B, thus making the code erroneous. Or maybe it was one of the
newsservers that made the substitution.

I never knew that Java allowed Unicode letters in the source code, so I
even learned something new today.

Thanks for sharing,
Stuart

@Stefan Ram: Sorry, Joshua clearly blew you out of the water...
Joshua Cranmer 🐧
2014-02-22 18:05:14 UTC
Permalink
Post by Stuart
At first, this code wouldn't run because for some reasons Thunderbird
treated the K in the lines
char[] K = new char[256];
and the first K in this line
int K = 0, Κ = 0;
both as 0x4B, thus making the code erroneous. Or maybe it was one of the
newsservers that made the substitution.
char[] K = new char[256];
int K = 0, Κ = 0;
So the actual newsgroup text was transported without normalization.
Running some tests, it appears that U+212A KELVIN SYMBOL gets normalized
to the ASCII K under NFC (I thought it was NFKC), which means that
either pasting from the clipboard to your IDE or your actual Java
compiler is doing some NFC normalization. I suppose you could
distinguish the two by seeing if the ASCII K can refer to a variable
called \u212a (Unicode escapes are legal outside of strings in Java).
Post by Stuart
I never knew that Java allowed Unicode letters in the source code, so I
even learned something new today.
And now you learn a little about Unicode normalization. :-)
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Stefan Ram
2014-02-22 18:30:42 UTC
Permalink
Post by Joshua Cranmer 🐧
either pasting from the clipboard to your IDE or your actual Java
compiler is doing some NFC normalization. I suppose you could
To prevent the dreaded clipboard normalization, I will from now on post
my source code in a way that will evade any clipboard normalization.

\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u004d\u0061\u0069\u006e
\u007b\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u006a\u0061\u0076\u0061\u002e\u006c\u0061\u006e\u0067\u002e\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020\u0061\u0072\u0067\u0073\u0020\u0029
\u0020\u0020\u007b\u0020\u0077\u0068\u0069\u006c\u0065\u0028\u0020\u0061\u0072\u0067\u0073\u0020\u003d\u003d\u0020\u006e\u0075\u006c\u006c\u0020\u0029\u0077\u0068\u0069\u006c\u0065\u0028\u0020\u0061\u0072\u0067\u0073\u0020\u003d\u003d\u0020\u006e\u0075\u006c\u006c\u0020\u0029\u003b\u0020\u006a\u0061\u0076\u0061\u002e\u006c\u0061\u006e\u0067\u002e\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u0066
\u0020\u0020\u0020\u0020\u0028\u0020\u0022\u0031\u0031\u0025\u006e\u0032\u0032\u0031\u0025\u006e\u0033\u0033\u0032\u0031\u0025\u006e\u0034\u0034\u0033\u0032\u0031\u0025\u006e\u0035\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0036\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0037\u0037\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0038\u0038\u0037\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0022\u0020\u0029\u003b\u0020\u007d\u007d
Stuart
2014-02-22 19:02:57 UTC
Permalink
Post by Stefan Ram
To prevent the dreaded clipboard normalization, I will from now on post
my source code in a way that will evade any clipboard normalization.
\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u004d\u0061\u0069\u006e
\u007b\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028\u0020\u0066\u0069\u006e\u0061\u006c\u0020\u006a\u0061\u0076\u0061\u002e\u006c\u0061\u006e\u0067\u002e\u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020\u0061\u0072\u0067\u0073\u0020\u0029
\u0020\u0020\u007b\u0020\u0077\u0068\u0069\u006c\u0065\u0028\u0020\u0061\u0072\u0067\u0073\u0020\u003d\u003d\u0020\u006e\u0075\u006c\u006c\u0020\u0029\u0077\u0068\u0069\u006c\u0065\u0028\u0020\u0061\u0072\u0067\u0073\u0020\u003d\u003d\u0020\u006e\u0075\u006c\u006c\u0020\u0029\u003b\u0020\u006a\u0061\u0076\u0061\u002e\u006c\u0061\u006e\u0067\u002e\u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u0066
\u0020\u0020\u0020\u0020\u0028\u0020\u0022\u0031\u0031\u0025\u006e\u0032\u0032\u0031\u0025\u006e\u0033\u0033\u0032\u0031\u0025\u006e\u0034\u0034\u0033\u0032\u0031\u0025\u006e\u0035\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0036\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0037\u0037\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0038\u0038\u0037\u0036\u0035\u0034\u0033\u0032\u0031\u0025\u006e\u0022\u0020\u0029\u003b\u0020\u007d\u007d
Great, now you made me laugh so hard that one of my children woke up.

I'm afraid that Joshua is still in the lead, though.

Regards,
Stuart
Kevin McMurtrie
2014-02-23 08:52:19 UTC
Permalink
Post by Stuart
Post by Stefan Ram
My new version corrects a mistake (a final »%n« was missing),
and takes into account the possible objection that the program
public final class Main
{ public static void main( final java.lang.String[] args )
{ while( args == null )while( args == null ); java.lang.System.out.printf
( "11%n221%n3321%n44321%n554321%n6654321%n77654321%n887654321%n" ); }}
I was going to ask you whether you have some kind of archive for FAHQ,
but this proves that these gems are hand-crafted on the fly. Nice job, too.
It is a pity that Java offers not so many code obfuscation techniques as
C++ does. I usually enjoy your C++ postings more (especially
Regards,
Stuart
Obfuscation? (Not sure that the output is very useful. It has been
de-tuned for posting. Sorry.)



import java.io.ByteArrayInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
public class SEA
{
public static void main(
String args[])
throws Exception
{
final String code=""
+"AEQyFMdCUqCRS2Fa4xksfA8USAJqxT"
+"oY4yCCMJznOU5yjEcQzDPWISiJIATk"
+"EY5jHEMJBHMYxDntW9sZehYQypQ5ih"
+"EMYykIQBSntbGYEIIIxDGIYRiGIZ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"
+"ohecPWUoiEKEQQAGQpCF6OQoKgkRAm"
+"F0AymUwwQrAQhjNRoQEECgogiCAIRB"
+"R0qSUURlSFGPpRTaXpgjNJYmBIFQQQ"
+"CDtCHMnqiRk9EkQKUpQ0QKWwNYkARh"
+"6RxWALlnQ9Aot+h6HoWguVewoImBTM"
+"Ac/Q6K85GkWhBSn2FNmwADoUBIIGBS"
+"kNQyqD0fQPsYqRGHcIVMG2CkoKFejk"
+"0GkLHEYgA6KEBADjivvgzYrjyYd+h9"
+"+ukdRnOwxzj6EfQgDd7iDAc5CdkY6O"
+"wiSzTEGSRUlEAjTBoEXQlRhoBABhYA"
+"jBjOwGM4kDBYEy4CEArBhAkCFpUpSU"
+"mVruumV1Ng+TAYoBVqSN6aIQrpTDMA"
+"oFnQg6+vqMdUBI1ihhAAowMGsbCCAE"
+"AFoAMgFpWCgjAApCAIAE6DmOpZDMS0"
+"ykHMY7FKOdK12WYAClWFCAjURTDgEA"
+"BEIIxCEFQEAQAYgCCASBAwEaNQsFYR"
+"GSKH0EygANhAgCBC5r6KUjlelHQmb0"
+"JzDAEZkBiRrTCGAAQlQcqFXUUAwAUU"
+"AjaAAHVrAFAwunBxiRuDNB2MuNE1RA"
+"1IxrFNKMjEo0TAY5CsG9akKQzryecO"
+"SQywJaZQztU5qXKUk6BA0YyTNOlwwB"
+"ABAVFQo4xyaHQuiH34A=";
System.out
.println(xS(d64(code)));
}
private final static char[] b64=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
.toCharArray();
private final static byte[] ib64=new byte[256];
private static final char[] stb=
"import jav.ByeAInuS;\nOEFxclLs\tbgd([])hw{f=MT*2,}***@1CPHG"
.toCharArray();
private static final int EOF=-1;
private static final int BREAK=-2;
static
{
for(int i=0;i<ib64.length;++i)
ib64[i]=-1;
for(int i=0;i<b64.length;++i)
ib64[b64[i]]=(byte)i;
}
private static String xS(
byte[] data)
throws IOException
{
final char mtf[][]=nMTF();
final StringBuilder buf=new StringBuilder(
data.length*2);
final Bis dec=new Bis(
new ByteArrayInputStream(
data));
ex(dec,mtf,buf);
return buf.toString();
}
private static byte[] d64(
CharSequence str)
{
return d64(str,0,str
.length());
}
private static byte[] d64(
CharSequence in,
int off,int len)
{
final int outLen=3
*(len/4)
-((in.charAt(off+len
-1)=='=')?((in
.charAt(off+len-2)=='=')?2
:1)
:0);
final byte outBuf[]=new byte[outLen];
int opos=0;
while(opos<outLen)
{
u34(in,off,outBuf,opos);
off+=4;
opos+=3;
}
return outBuf;
}
static void u34(
final CharSequence in,
int inOff,
final byte out[],
int outOff)
{
final byte b1=ib64[in
.charAt(inOff++)];
final byte b2=ib64[in
.charAt(inOff++)];
if((b1==-1)||(b2==-1))
throw new IllegalArgumentException();
out[outOff++]=(byte)((b1<<2)|(b2>>>4));
final char c3=in
.charAt(inOff++);
if(c3=='=')
return;
final byte b3=ib64[c3];
if(b3==-1)
throw new IllegalArgumentException();
out[outOff++]=(byte)((b2<<4)|(b3>>>2));
final char c4=in
.charAt(inOff++);
if(c4=='=')
return;
final byte b4=ib64[c4];
if(b4==-1)
throw new IllegalArgumentException();
out[outOff++]=(byte)((b3<<6)|b4);
}
private static char[][] nMTF()
{
return new char[][]{
stb.clone(),
stb.clone(),
stb.clone(),
stb.clone(),
stb.clone(),
stb.clone(),
stb.clone()};
}
private static char mtfD(
int pos,char table[])
{
final char c=table[pos];
for(int i=pos;i>0;--i)
table[i]=table[i-1];
table[0]=c;
return c;
}
private static void insF(
char c,char table[])
{
for(int i=57;i>0;--i)
table[i]=table[i-1];
table[0]=c;
}
private static int dc(
char table[],Bis in)
throws IOException
{
final int pos=in
.readInt(5);
if(pos<0)
return EOF;
if(pos<=27)
return mtfD(pos,table);
if(pos==29)
{
final int high=in
.readInt(5);
if(high<0)
throw new EOFException();
if(high==30)
return BREAK;
if(high==31)
return EOF;
return mtfD(28+high,
table);
}else if(pos==30)
{
final int ascii=in
.readInt(7);
if(ascii<0)
throw new EOFException();
insF((char)ascii,table);
return ascii;
}
final int utf=in
.readInt(16);
if(utf<0)
throw new EOFException();
insF((char)utf,table);
return utf;
}
private static int ex(
Bis in,char mtf[][],
StringBuilder buf)
throws IOException
{
int hash=0;
int b;
while((b=dc(
mtf[(hash&0x7fffffff)
%mtf.length],in))>=0)
{
buf.append((char)b);
hash=(hash<<8)+b;
}
return b;
}
private static class Bis
{
protected final InputStream in;
protected int bits=0;
protected int acc=0;
Bis(InputStream in)
{
this.in=in;
}
int readInt(int len)
throws IOException
{
if(acc==-1)
return -1;
int b=0;
while(len>0)
{
if(bits<=0)
{
acc=in.read();
if(acc==-1)
return -1;
bits=8;
}
final int shift=bits
-len;
if(shift>0)
{
final int mask=~(~0<<len);
b|=(acc>>>shift)
&mask;
bits-=len;
len=0;
}else if(shift<0)
{
final int mask=~(~0<<bits);
b|=(acc&mask)<<-shift;
len-=bits;
bits=0;
}else
{
final int mask=~(~0<<len);
b|=acc&mask;
bits=0;
len=0;
}
}
return b;
}
}
}
Roedy Green
2014-02-21 16:55:07 UTC
Permalink
On Thu, 20 Feb 2014 16:03:51 -0800 (PST), "jay'el antonio"
Post by jay'el antonio
please someone help me..what is the code of this output program using java
see http://mindprod.com/jgloss/homework.html
--
Roedy Green Canadian Mind Products http://mindprod.com
The future has already happened, it just isn’t evenly distributed.
~ William Gibson (born: 1948-03-17 age: 65)
lipska the kat
2014-02-23 09:25:22 UTC
Permalink
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
Well. Now that everyone has had the obligatory attempt at being a
smartarse and, hopefully, you have had time to figure this out for
yourself, try this. There are some possible 'optimizations' depending on
you view regarding 'unnecessary' variables and hard-coded magic numbers.
I'm sure some of the smartarses will offer their invaluable advice in
this area.

public class AntiSmartArseClass {

public static void main(String[] args) {
int increment = 11;
int iterations = 8;

int outerindex = 1;
int innerindex= 0;

while(outerindex <= iterations){
System.out.printf("%d", outerindex * increment);
innerindex = (outerindex * increment) % 10;
while(innerindex > 1){
System.out.printf("%d", --innerindex);
}
outerindex++;
System.out.println();
}
}
}
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Lew
2014-02-24 04:47:54 UTC
Permalink
Post by lipska the kat
Well. Now that everyone has had the obligatory attempt at being a
smartarse and, hopefully, you have had time to figure this out for
yourself, try this. There are some possible 'optimizations' depending on
you view regarding 'unnecessary' variables and hard-coded magic numbers.
I'm sure some of the smartarses will offer their invaluable advice in
this area.
Absolutely.
Post by lipska the kat
public class AntiSmartArseClass {
It is pointless to put 'Class' into a class name, as we already now that it's a class from
the (you guessed it) 'class' keyword.

More to the point, thinking in terms of classes is a less powerful mode than
thinking in terms of types. Names should be semantic, and not reflective of
implementation.
Post by lipska the kat
public static void main(String[] args) {
int increment = 11;
This would be better as a constant.
Post by lipska the kat
int iterations = 8;
int outerindex = 1;
int innerindex= 0;
Looks like you're reinventing the 'for' loop here.
Post by lipska the kat
while(outerindex <= iterations){
Yep.
Post by lipska the kat
System.out.printf("%d", outerindex * increment);
innerindex = (outerindex * increment) % 10;
And the nested 'for' loop.
Post by lipska the kat
while(innerindex > 1){
Which proves that you are all macho and everything, sure, but
the problem is that these variables have too wide a scope. Use
of the 'for' loop brings you proper scoping for free.
Post by lipska the kat
System.out.printf("%d", --innerindex);
}
outerindex++;
You really should follow the Java Naming Conventions, which call for camel
case on these variables.
Post by lipska the kat
System.out.println();
}
}
}
You're welcome.
--
Lew
lipska the kat
2014-02-24 09:06:11 UTC
Permalink
<snip>
Post by Lew
Post by lipska the kat
public class AntiSmartArseClass {
It is pointless to put 'Class' into a class name, as we already now that it's a class from
the (you guessed it) 'class' keyword.
... and here we have the smartarse master, master of smartarses, arse
master smart and smarter than an arse with a smart part.
Post by Lew
More to the point, thinking in terms of classes is a less powerful mode than
thinking in terms of types.
ROFLOL. What complete and utter tosh. Really, your capacity for talking
bollocks is alive and well I see. You have been a bit quiet recently,
did the meds stop working?
Post by Lew
Names should be semantic, and not reflective of
implementation.
Waffle waffle waffle.
Post by Lew
Post by lipska the kat
public static void main(String[] args) {
int increment = 11;
This would be better as a constant.
Well firstly, you buffoon, although const *is* a reserved word in Java
it is not currently used, do you mean final? We have been down this road
soooooo many time before in here haven't we?
Post by Lew
Post by lipska the kat
int iterations = 8;
int outerindex = 1;
int innerindex= 0;
Looks like you're reinventing the 'for' loop here.
Yawn
Post by Lew
Post by lipska the kat
while(outerindex <= iterations){
Yep.
You are an idiot. I was paraphrasing the 'code' (if you can call it
that) posted by another smartarse master.
Post by Lew
Post by lipska the kat
System.out.printf("%d", outerindex * increment);
innerindex = (outerindex * increment) % 10;
And the nested 'for' loop.
Idiot
Post by Lew
Post by lipska the kat
while(innerindex > 1){
Which proves that you are all macho and everything, sure, but
the problem is that these variables have too wide a scope. Use
of the 'for' loop brings you proper scoping for free.
What on earth are you waffling about now? "all macho and everything"
Have you ever seen a head doctor? I'd bet there are quite a few Ph D's
floating about in that confused and befuddled cranial mass you presume
to call a brain.
Post by Lew
Post by lipska the kat
System.out.printf("%d", --innerindex);
}
outerindex++;
You really should follow the Java Naming Conventions, which call for camel
case on these variables.
Post by lipska the kat
System.out.println();
}
}
}
You're welcome.
Well this *has* been ... a waste of time (as usual).
Instead of being a *complete and utter* smartarse, why not post a
reworked version ... I alluded to the fact that the code could do with a
bit of a refactor, or did you miss that? Too busy being a smartarse I
suppose.

Idiot
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Arne Vajhøj
2014-02-25 00:23:42 UTC
Permalink
Post by lipska the kat
Post by Lew
Post by lipska the kat
public static void main(String[] args) {
int increment = 11;
This would be better as a constant.
Well firstly, you buffoon, although const *is* a reserved word in Java
it is not currently used, do you mean final? We have been down this road
soooooo many time before in here haven't we?
He did not say const - he said constant.

Which per JLS and normal Java terminology means static final.

Arne
lipska the kat
2014-02-25 09:22:28 UTC
Permalink
Post by Arne Vajhøj
Post by lipska the kat
Post by Lew
Post by lipska the kat
public static void main(String[] args) {
int increment = 11;
This would be better as a constant.
Well firstly, you buffoon, although const *is* a reserved word in Java
it is not currently used, do you mean final? We have been down this road
soooooo many time before in here haven't we?
He did not say const - he said constant.
Which per JLS and normal Java terminology means static final.
The variable concerned has block scope within main.
You cannot apply the static modifier here.

static final int increment = 11;

my compiler says no with

Illegal modifier for parameter increment only final is permitted

So, you *could say*

final int increment

however this is not a constant because it's (potential) value is not
known at the time of declaration, at this point it is a 'variable'

later you can say (for example)

increment = Integer.parseInt(args[1]);

Now it's a final int but not a constant according to you via apparently
the JLS and 'normal Java terminology'

You could increase the visibility of increment to class scope, then you
*can* say

static final int increment = 11;

but you can also say

static final int increment;

increment is not a constant, it's an uninitialized static final int,
there's a difference.

You can then say

increment = 11;

However this would make the scope of increment wider which is another
Bloch no no.

Obviously I can't prove the following in Java as the reserved word const
is unused so I'll use C

in C (gcc -std=c99)

const int x;

x is a constant

If you don't initialize at declaration time it has value 0 and cannot be
changed, it is in effect read only. If you try and do this later

x = 10; compiler says no.

Of course you can do this

const int x = 10;

but only at the time of declaration.

So then Arne, how exactly would you make the variable increment constant
within main using your own criteria of a 'constant' in Java being static
final.

As always I'll be delighted to be shown how wrong I am.
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Lew
2014-02-25 23:08:49 UTC
Permalink
Post by lipska the kat
Post by Arne Vajhøj
He did not say const - he said constant.
Which per JLS and normal Java terminology means static final.
Nope. It does not.

It means a primitive or String literal, an expression involving constants, or a 'final' variable initialized with a constant expression. It need not be 'static'.
Post by lipska the kat
The variable concerned has block scope within main.
You cannot apply the static modifier here.
Lipska, you should study Java before blathering. You make no sense.

If you don't even know what a "constant" is in Java, you need to study more.
Post by lipska the kat
static final int increment = 11;
my compiler says no with
Illegal modifier for parameter increment only final is permitted
So don't say 'static', duh.

C'mon, learn Java already!
Post by lipska the kat
So, you *could say*
final int increment
however this is not a constant because it's (potential) value is not
known at the time of declaration, at this point it is a 'variable'
Right. So?
Post by lipska the kat
later you can say (for example)
increment = Integer.parseInt(args[1]);
Now it's a final int but not a constant according to you via apparently
the JLS and 'normal Java terminology'
Disingenuous. Work from the *actual* definition of "constant" in Java, please.
Post by lipska the kat
You could increase the visibility of increment to class scope, then you
*can* say
static final int increment = 11;
And that would be a "constant variable" in Java.
Post by lipska the kat
but you can also say
static final int increment;
increment is not a constant, it's an uninitialized static final int,
there's a difference.
Yes. That's in the JLS.
Post by lipska the kat
You can then say
increment = 11;
However this would make the scope of increment wider which is another
Bloch no no.
This has nothing to do with what I said, which was "use a constant".
Post by lipska the kat
Obviously I can't prove the following in Java as the reserved word const
is unused so I'll use C
Irrelevant. Ignored.
Post by lipska the kat
So then Arne, how exactly would you make the variable increment constant
within main using your own criteria of a 'constant' in Java being static
final.
Actually, he'd use the Java definition, not the mistaken one.
Post by lipska the kat
As always I'll be delighted to be shown how wrong I am.
Yeah, right.

You're wrong because you aren't talking about Java constants.

I said to use a constant. Let's address that advice, hm?
--
Lew
lipska the kat
2014-02-26 08:47:15 UTC
Permalink
Post by Lew
Post by Arne Vajhøj
He did not say const - he said constant.
Which per JLS and normal Java terminology means static final.
Nope. It does not.
<snip>
Post by Lew
I said to use a constant. Let's address that advice, hm
Still waiting ...
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Leif Roar Moldskred
2014-02-25 09:56:33 UTC
Permalink
Post by lipska the kat
... and here we have the smartarse master, master of smartarses, arse
master smart and smarter than an arse with a smart part.
Lew can be a pedant, but I don't think I've ever seen him be a
smartarse.
--
Leif Roar Moldskred
Daniel Pitts
2014-02-25 22:54:25 UTC
Permalink
Post by lipska the kat
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
Well. Now that everyone has had the obligatory attempt at being a
smartarse and, hopefully, you have had time to figure this out for
yourself, try this. There are some possible 'optimizations' depending on
you view regarding 'unnecessary' variables and hard-coded magic numbers.
I'm sure some of the smartarses will offer their invaluable advice in
this area.
public class AntiSmartArseClass {
public static void main(String[] args) {
int increment = 11;
int iterations = 8;
int outerindex = 1;
int innerindex= 0;
while(outerindex <= iterations){
System.out.printf("%d", outerindex * increment);
innerindex = (outerindex * increment) % 10;
while(innerindex > 1){
System.out.printf("%d", --innerindex);
}
outerindex++;
System.out.println();
}
}
}
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.

public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}


Now that we've given the OP the answer to his homework, I hope he finds
a job working with you rather than with me.
lipska the kat
2014-02-26 09:07:27 UTC
Permalink
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter.
Yes of course. Anyone who doesn't think like you is a troll. Obviously.
Post by Daniel Pitts
You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Now that we've given the OP the answer to his homework, I hope he finds
a job working with you rather than with me.
I'm prepared to give anyone the benefit of the doubt ... once. Unlike
you apparently. Fortunately I no longer have to work with people who are
so far up themselves they can see the sky. I can pick and choose my
projects and my colleagues, I doubt you'd make it past the reception desk.
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Simon Lewis
2014-02-26 11:40:02 UTC
Permalink
Post by lipska the kat
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter.
Yes of course. Anyone who doesn't think like you is a troll. Obviously.
Post by Daniel Pitts
You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Now that we've given the OP the answer to his homework, I hope he finds
a job working with you rather than with me.
I'm prepared to give anyone the benefit of the doubt ... once. Unlike you
apparently. Fortunately I no longer have to work with people who are so far up
themselves they can see the sky. I can pick and choose my projects and my
colleagues, I doubt you'd make it past the reception desk.
Well said.
lipska the kat
2014-02-26 14:54:20 UTC
Permalink
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Well now let's analyze your 'solution' shall we.

Agreed the 'specification' is a little lacking but as we are unable to
go back to the client at this time we need to make some assumptions.

Assumption 1. It's 'homework'

OK, now what do you imagine the learning objectives are?

Well it certainly looks 'loopy' so

Assumption 2. It's intended to get the student to learn about loop
control variables, possibly to control nested loops.

The output is numeric so

Assumption 3. It's intended to exercise some understanding of
manipulation of numeric variables ...

Well that's about it for the assumptions, now how does your solution
meet the objectives?

... ah yes, String concatenation in a for loop

1/10 for effort
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Simon Lewis
2014-02-26 15:10:30 UTC
Permalink
Post by lipska the kat
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Well now let's analyze your 'solution' shall we.
Agreed the 'specification' is a little lacking but as we are unable to go back
to the client at this time we need to make some assumptions.
Assumption 1. It's 'homework'
OK, now what do you imagine the learning objectives are?
Well it certainly looks 'loopy' so
Assumption 2. It's intended to get the student to learn about loop control
variables, possibly to control nested loops.
The output is numeric so
Assumption 3. It's intended to exercise some understanding of manipulation of
numeric variables ...
Well that's about it for the assumptions, now how does your solution meet the
objectives?
... ah yes, String concatenation in a for loop
1/10 for effort
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
lipska the kat
2014-02-26 15:45:48 UTC
Permalink
Post by Simon Lewis
Post by lipska the kat
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Well now let's analyze your 'solution' shall we.
Agreed the 'specification' is a little lacking but as we are unable to go back
to the client at this time we need to make some assumptions.
Assumption 1. It's 'homework'
OK, now what do you imagine the learning objectives are?
Well it certainly looks 'loopy' so
Assumption 2. It's intended to get the student to learn about loop control
variables, possibly to control nested loops.
The output is numeric so
Assumption 3. It's intended to exercise some understanding of manipulation of
numeric variables ...
Well that's about it for the assumptions, now how does your solution meet the
objectives?
... ah yes, String concatenation in a for loop
1/10 for effort
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
A question I have often asked myself ... I've yet to find the definitive
answer.

I don't know how long you've been involved in software development but
this attitude of smug self satisfied pomposity pervades the software
industry like a nasty smell.

This group is particularly well endowed with smart arses. It's
interesting to note that certain individuals who post here and in other
groups only exhibit the worst of their arrogance in c.l.j.p. They would
be given short shrift if they tried any of their nonsense in other
groups. They are basically bullies and we know that the only way to deal
with a bully is to stand up to them as they are also mostly cowards.

Ho hum, it all adds to the rich tapestry of life I suppose

I gave up on IRC a long time ago, if you want to discuss Java stuff go
ahead, ignore the twats, there are helpful people here it's just that
they sometimes get drowned out by the noise.
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Robert Klemme
2014-02-27 13:01:06 UTC
Permalink
Post by lipska the kat
Post by Simon Lewis
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
A question I have often asked myself ... I've yet to find the definitive
answer.
If you find your answer please let me know.
Post by lipska the kat
I don't know how long you've been involved in software development but
this attitude of smug self satisfied pomposity pervades the software
industry like a nasty smell.
I cannot confirm that for the part of the software industry I am living
in. But I am at least as subjective as you are.

Cheers

robert
Simon Lewis
2014-02-27 13:48:38 UTC
Permalink
Post by Simon Lewis
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
A question I have often asked myself ... I've yet to find the definitive answer.
I don't know how long you've been involved in software development but this
attitude of smug self satisfied pomposity pervades the software industry like a
nasty smell.
Especially in the "newer" areas I find : a lot of new bucks with little
experience and a too large cowboy hat. Java, CSS, HTML type groups are
far and away the worst.
This group is particularly well endowed with smart arses. It's interesting to
note that certain individuals who post here and in other groups only exhibit the
worst of their arrogance in c.l.j.p. They would be given short shrift if they
tried any of their nonsense in other groups. They are basically bullies and we
know that the only way to deal with a bully is to stand up to them as they are
also mostly cowards.
Correct. I couldn't agree more. Frankly, if someone finds IRC to get a
help with his homework then good luck to them :maybe they couldnt afford
the text book. And a patiently explained answer here could help them a
lot. What next "fuck off Im not helping you because you're earning money
from your job and should work it out for yourself"?
Ho hum, it all adds to the rich tapestry of life I suppose
I gave up on IRC a long time ago, if you want to discuss Java stuff go ahead,
ignore the twats, there are helpful people here it's just that they sometimes
get drowned out by the noise.
True. I like IRC : the problem is that the minority of bullies and
clueless sheriffs invariably have OP status and ban you for disagreeing
with them.
Leif Roar Moldskred
2014-02-27 15:49:15 UTC
Permalink
Post by Simon Lewis
Correct. I couldn't agree more. Frankly, if someone finds IRC to get a
help with his homework then good luck to them
It's perfectly all right to ask for _help_ with one's homework here --
just explain the assignment, mention that it's homework, say what you've
tried and explain what you're having a problem with. It will usually be
better to ask your professor or teaching assistants instead though, as
they'll know what has been covered in the class so far and what techniques
and considerations are outside the scope of the class and will only
serve to confuse the student if mentioned.

Asking strangers on the Internet to _do_ your homework for you on the other
hand, is another matter. For several reasons -- not least that doing so
_will not help the person asking in the long run_ -- that is much less
likely to garner a positive response.
--
Leif Roar Moldskred
Joerg Meier
2014-02-27 18:24:43 UTC
Permalink
Post by Simon Lewis
Correct. I couldn't agree more. Frankly, if someone finds IRC to get a
help with his homework then good luck to them :maybe they couldnt afford
the text book. And a patiently explained answer here could help them a
lot. What next "fuck off Im not helping you because you're earning money
from your job and should work it out for yourself"?
One problem I see in programming communities is a ridiculous attitude in
'help seekers'. Nobody would ever join a woodworking group and ask if
someone could make a bird house and mail it to them, for free, and then
complain when it's not the right colour. Yet when it comes to programming,
it seems like the vast majority of newbies expect to get exactly that.

Another aspect is that as programmers, we have come to learn that precision
good, vagueness bad. Hence questions like the OP are immediately and
emotionally seen as "the enemy".

Liebe Gruesse,
Joerg
--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Daniel Pitts
2014-02-26 20:53:52 UTC
Permalink
Post by Simon Lewis
Post by lipska the kat
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Well now let's analyze your 'solution' shall we.
Agreed the 'specification' is a little lacking but as we are unable to go back
to the client at this time we need to make some assumptions.
Assumption 1. It's 'homework'
OK, now what do you imagine the learning objectives are?
Well it certainly looks 'loopy' so
Assumption 2. It's intended to get the student to learn about loop control
variables, possibly to control nested loops.
The output is numeric so
Assumption 3. It's intended to exercise some understanding of manipulation of
numeric variables ...
Well that's about it for the assumptions, now how does your solution meet the
objectives?
... ah yes, String concatenation in a for loop
1/10 for effort
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
What, are you lipska's alter ego?
Lew
2014-03-01 00:10:18 UTC
Permalink
Post by Simon Lewis
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
You and Lipska (not his real name) are in the best position to answer that question.

By the way, it's spelled "innate". And "narrow-mindedness" has a hyphen. As should
"self-inflated".

Now go back to your belittlement of others already in progress.
--
Lew
lipska the kat
2014-03-01 08:36:27 UTC
Permalink
Post by Lew
Post by Simon Lewis
Nicely done. Why is that Java groups and IRC channels in particular are
so full of self inflated pompous idiots who seem to be there only to
belittle others and demonstrate their inate stupidity and narrow
mindedness?
You and Lipska (not his real name)
"not his real name" ... oh very funny Bloch, your insight is rightly
legendary.
Post by Lew
are in the best position to answer that question.
By the way, it's spelled "innate". And "narrow-mindedness" has a hyphen. As should
"self-inflated".
Now go back to your belittlement of others already in progress.
This from the master of belittlement. Now I know you are a Troll, as in
the true meaning of the word.
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-01 09:51:21 UTC
Permalink
Post by lipska the kat
Post by Lew
You and Lipska (not his real name)
"not his real name" ... oh very funny Bloch, your insight is rightly
legendary.
Funny? Actually Lew has let his normally high standards slip a bit with
this one as he probably has no actual proof that "Lipska" is not your real
name. For mine, I am willing to entertain the possibility that although you
were born with a more mundane name, maybe at your official Newsgroup Pest of
the Year Award 2013 ceremony you used official means to change your name to
something to give you a more legendary vibe.
Post by lipska the kat
This from the master of belittlement. Now I know you are a Troll, as in
the true meaning of the word.
OK, given that "the true meaning of the word" is in fact "Any of a race of
supernatural beings, sometimes conceived as giants and sometimes as dwarfs,
inhabiting caves or subterranean dwellings" I think Lew will appreciate that
recognition.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-01 10:31:25 UTC
Permalink
Post by Qu0ll
Post by lipska the kat
Post by Lew
You and Lipska (not his real name)
"not his real name" ... oh very funny Bloch, your insight is rightly
legendary.
Funny? Actually Lew has let his normally high standards slip a bit with
this one as he probably has no actual proof that "Lipska" is not your
real name. For mine, I am willing to entertain the possibility that
although you were born with a more mundane name, maybe at your official
Newsgroup Pest of the Year Award 2013 ceremony you used official means
to change your name to something to give you a more legendary vibe.
Newsgroup Pest of the Year Award 2013 ... excellent, I can't say I know
that one but it sounds like fun. You are obviously cognizant of this
particular smug fest.

Were you a past winner?

Fed up that your continued efforts to excel in this arena have gone
unnoticed?

Never mind, there's always this year :-)
Post by Qu0ll
Post by lipska the kat
This from the master of belittlement. Now I know you are a Troll, as
in the true meaning of the word.
OK, given that "the true meaning of the word" is in fact "Any of a race
of supernatural beings, sometimes conceived as giants and sometimes as
dwarfs, inhabiting caves or subterranean dwellings" I think Lew will
appreciate that recognition.
Yes ... Internet Troll

http://en.wikipedia.org/wiki/Troll_%28Internet%29

Apologies, I forgot that I was addressing pedants

BTW 'Qu0ll' ... now that *would* look good engraved on the IPOTY trophy
wouldn't it?
Post by Qu0ll
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
[Replace the "SixFour" with numbers to email me]
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-01 10:44:21 UTC
Permalink
Post by lipska the kat
Newsgroup Pest of the Year Award 2013 ... excellent, I can't say I know
that one but it sounds like fun. You are obviously cognizant of this
particular smug fest.
Were you a past winner?
Nope, tried hard but just not good enough at it. Not when I have Internet
Trolls (for clarity) like you to win year after year.
Post by lipska the kat
Fed up that your continued efforts to excel in this arena have gone
unnoticed?
Do you responses perhaps disprove your notion of "unnoticed"?
Post by lipska the kat
Never mind, there's always this year :-)
True, but based on your achievements so far, I doubt anyone could catch up
with you again this year...
Post by lipska the kat
Apologies, I forgot that I was addressing pedants
Really? You forgot so quickly? Wasn't that one of the things you have been
complaining about for eons?
Post by lipska the kat
BTW 'Qu0ll' ... now that *would* look good engraved on the IPOTY trophy
wouldn't it?
True again. It would look good engraved anywhere. BTW, I actually *was* a
past winner of the Incredible Person of the Year in 2006.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-01 10:49:03 UTC
Permalink
<snip>
Post by Qu0ll
True again. It would look good engraved anywhere. BTW, I actually
*was* a past winner of the Incredible Person of the Year in 2006.
Fantastic ... in what reality?

My brother is an excellent carpenter, would you like him to come around
and widen the doors for you so you can get your massive head through
them? It must be tough living in one room.
Post by Qu0ll
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
[Replace the "SixFour" with numbers to email me]
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-01 10:58:11 UTC
Permalink
Post by lipska the kat
Fantastic ... in what reality?
Interesting and also revealing question. The fact that you are promoting
the existence of multiple realities strengthens my suspicion that you are
often living in an alternate one.
Post by lipska the kat
My brother is an excellent carpenter, would you like him to come around
and widen the doors for you so you can get your massive head through them?
It must be tough living in one room.
No, but thanks for the offer. Given that the brain accounts for over 95% of
the volume of the head/cranium, I'll take that as a compliment.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-01 12:00:57 UTC
Permalink
Post by Qu0ll
Post by lipska the kat
Fantastic ... in what reality?
Interesting and also revealing question. The fact that you are
promoting the existence of multiple realities strengthens my suspicion
that you are often living in an alternate one.
What? you don't think there are multiple realities?
The reality that exists in what you would like me to believe is your
mind is obviously different to the actual reality that most of the rest
of us experience day to day.
Post by Qu0ll
Post by lipska the kat
My brother is an excellent carpenter, would you like him to come
around and widen the doors for you so you can get your massive head
through them? It must be tough living in one room.
No, but thanks for the offer. Given that the brain accounts for over
95% of the volume of the head/cranium, I'll take that as a compliment.
It's just too easy

http://www.rense.com/general63/brain.htm
Post by Qu0ll
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
[Replace the "SixFour" with numbers to email me]
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-02 00:36:59 UTC
Permalink
The reality that exists in what you would like me to believe is your mind
is obviously different to the actual reality that most of the rest of us
experience day to day.
Correct. But that doesn't prove the existence of multiple realities.
It's just too easy
http://www.rense.com/general63/brain.htm
Interesting but not sure about its relevance to the debate. Nevertheless,
if your suggestion is that my other natural assets could compensate if my
brain were ever to become obsolete then thanks again.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
Daniel Pitts
2014-02-26 20:59:45 UTC
Permalink
Post by lipska the kat
Post by Daniel Pitts
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
<snip>
Post by Daniel Pitts
You are a Troll, sans Hunter. You also made that far more complicated
than it needs to be.
public class BetterThanATroll {
public static void main(String[] args) {
String s = "";
for (int i = 1; i <= 8; ++i) {
s = i + s;
System.out.println(i + s);
}
}
}
Well now let's analyze your 'solution' shall we.
Agreed the 'specification' is a little lacking but as we are unable to
go back to the client at this time we need to make some assumptions.
Assumption 1. It's 'homework'
OK, now what do you imagine the learning objectives are?
Well it certainly looks 'loopy' so
Assumption 2. It's intended to get the student to learn about loop
control variables, possibly to control nested loops.
Hmm, perhaps it is, but that is an assumption. Notice the "Ass" and "U"
in that word?
Post by lipska the kat
The output is numeric so
Assumption 3. It's intended to exercise some understanding of
manipulation of numeric variables ...
So you're going to throw in modules arithmetic, number theory, multiple
variables, and avoid for-loops.
Post by lipska the kat
Well that's about it for the assumptions, now how does your solution
meet the objectives?
... ah yes, String concatenation in a for loop
1/10 for effort
Ultimate learning objective: Do things the simplest possible way.

Hint: Don't get bogged down on what it "looks like", but what it
actually is.
David Lamb
2014-03-01 01:42:10 UTC
Permalink
Post by lipska the kat
Well. Now that everyone has had the obligatory attempt at being a
smartarse and, hopefully, you have had time to figure this out for
yourself, try this.
Even if you dislike the smartass answers, you shouldn't be answering
people's homework questions for them.
lipska the kat
2014-03-01 08:58:09 UTC
Permalink
Post by David Lamb
Post by lipska the kat
Well. Now that everyone has had the obligatory attempt at being a
smartarse and, hopefully, you have had time to figure this out for
yourself, try this.
Even if you dislike the smartass answers, you shouldn't be answering
people's homework questions for them.
Why?
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-01 10:00:31 UTC
Permalink
Post by David Lamb
Even if you dislike the smartass answers, you shouldn't be answering
people's homework questions for them.
Why?
Yep, gotta agree with you on this one Kitty. Why *shouldn't* we do their
homework for them?

Clearly they are incapable of doing it for themselves. And if they fail,
they may never get a job. And if people like this never got jobs, who would
you have on your team to make you look good? And anyway, if we don't do it
for them then I am sure they can find a solution from some other group,
someone else or copy off their mates.

Why put the poor dears through all that stress? And when they are presented
with the solution I am absolutely sure that they will go over it with a
fine-toothed comb and learn every aspect of software development embodied in
the code.

Clearly helping such people is a "win win". I get to show how smart I am
and they become the world's best programmer as a result. W00t!

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-01 10:45:21 UTC
Permalink
Post by Qu0ll
Post by David Lamb
Even if you dislike the smartass answers, you shouldn't be answering
people's homework questions for them.
Why?
Yep, gotta agree with you on this one Kitty. Why *shouldn't* we do their
homework for them?
Hello again, still cranking up the irritant factor eh, OK, IPOTY 2014 is
only 8 months away.

Actually, it can be a real turning point for some, who are obviously
not as clever as you, to see a solution to a problem that they don't
have a clue about how to solve.

Just the experience of actually getting something to compile and produce
the expected output can inspire someone to actually get their head
around how this works.

How do I know ... I've seen it many times before, help someone over that
first hurdle and they are away.

Did you read the bit where I said I'd give anyone the benefit of the
doubt ... once.

Clearly you have never had to ask for help as you are so incredibly
clever and can learn an entire language simply by glancing at a Hello
World example. Unfortunately many others are not so fortunate and need a
bit of a push to get them going.

Is that OK?

<snip>
Post by Qu0ll
Clearly helping such people is a "win win". I get to show how smart I
am and they become the world's best programmer as a result. W00t!
Oh gosh, I've been found out, what other reason could there possibly be?
Qu0ll says so so it must be right.
Post by Qu0ll
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
[Replace the "SixFour" with numbers to email me]
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-01 11:04:22 UTC
Permalink
Clearly you have never had to ask for help as you are so incredibly clever
and can learn an entire language simply by glancing at a Hello World
example.
Not true. The "Hello" example is usually sufficient.
Unfortunately many others are not so fortunate and need a bit of a push to
get them going.
Push? You classify spoon-feeding an answer as a "push". Or are you
actually in the habit of physically "pushing" anyone who is "not so
fortunate"?
Is that OK?
Yes, I have not problems accepting that there are others not so fortunate.
Oh gosh, I've been found out, what other reason could there possibly be?
Umm... none actually.
Qu0ll says so so it must be right.
At least you exhibit a willingness and fair ability to learn.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-01 12:13:22 UTC
Permalink
Post by Qu0ll
Post by lipska the kat
Clearly you have never had to ask for help as you are so incredibly
clever and can learn an entire language simply by glancing at a Hello
World example.
Not true. The "Hello" example is usually sufficient.
What is not true? you're making even less sense than normal.
1. You have never had to ask for help.
2. You are incredibly clever
3. You can learn an entire language etc etc
Post by Qu0ll
Post by lipska the kat
Unfortunately many others are not so fortunate and need a bit of a
push to get them going.
Push? You classify spoon-feeding an answer as a "push". Or are you
actually in the habit of physically "pushing" anyone who is "not so
fortunate"?
I thought that might be a bit too subtle for you.
Post by Qu0ll
Post by lipska the kat
Is that OK?
Yes, I have not problems accepting that there are others not so fortunate.
I know, it's hard when you are so far above everyone else in ability to
drag yourself down to their level but keep trying, you'll get there in
the end.
Post by Qu0ll
Post by lipska the kat
Oh gosh, I've been found out, what other reason could there possibly be?
Umm... none actually.
How about altruism ... oh, hold on, that implies selflessness, no,
sorry, my mistake. You have already admitted that you confuse altruism
with egoism so I can't expect you to make that leap, it's still early
days and you still have a great deal to learn.
Post by Qu0ll
Post by lipska the kat
Qu0ll says so so it must be right.
At least you exhibit a willingness and fair ability to learn.
Are you American?
Post by Qu0ll
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
[Replace the "SixFour" with numbers to email me]
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-02 00:05:10 UTC
Permalink
Post by lipska the kat
Post by Qu0ll
Post by lipska the kat
Clearly you have never had to ask for help as you are so incredibly
clever and can learn an entire language simply by glancing at a Hello
World example.
Not true. The "Hello" example is usually sufficient.
What is not true? you're making even less sense than normal.
1. You have never had to ask for help.
2. You are incredibly clever
3. You can learn an entire language etc etc
Gosh, I didn't realise it was going to be so difficult to explain things to
you Puss.

You do understand Boolean Algebra don't you? When you evaluate a Boolean
expression, the fact that it may evaluate to "false" (as in my statement
"Not true" which implies "false") there may be a number of reasons why. So,
I was indicating that your Boolean expression evaluated to "false". I even
gave the reason.

Which part is not making sense as you put it?
Post by lipska the kat
I thought that might be a bit too subtle for you.
Oh, so it's a "subtle" push then? Still grounds for dismissal in most places
where I have worked ;-)
Post by lipska the kat
I know, it's hard when you are so far above everyone else in ability to
drag yourself down to their level but keep trying, you'll get there in the
end.
Well, like you, they usually try to drag *me* down.
Post by lipska the kat
How about altruism ... oh, hold on, that implies selflessness, no, sorry,
my mistake. You have already admitted that you confuse altruism with
egoism so I can't expect you to make that leap, it's still early days and
you still have a great deal to learn.
Wow, please quote my exact words where I "already admitted that you confuse
altruism with egoism" because I am not seeing it.
Post by lipska the kat
Are you American?
No, I am a rare, carnivorous native Australian marsupial. Not sure why
that's important BTW.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-02 08:57:35 UTC
Permalink
<snip>
Post by Qu0ll
Post by lipska the kat
How about altruism ... oh, hold on, that implies selflessness, no,
sorry, my mistake. You have already admitted that you confuse altruism
with egoism so I can't expect you to make that leap, it's still early
days and you still have a great deal to learn.
Wow, please quote my exact words where I "already admitted that you
confuse altruism with egoism" because I am not seeing it.
You're hard work aren't you? Oh well, in for a penny etc

You said

"Clearly helping such people is a "win win". I get to show how smart I
am and they become the world's best programmer as a result."

I said

"Oh gosh, I've been found out, what other reason could there possibly be?"

Do you understand irony?

-----------------------------------------------------------------------
Irony: the expression of one's meaning by using language that normally
signifies the opposite, typically for humorous or emphatic effect.
-----------------------------------------------------------------------

Obviously not, as you then said

"Umm... none actually"

Do you see it yet? no, OK, step by step then

The "I get to show how smart I am" bit implies egoism on my part
but it could also be seen as altruism

-----------------------------------------------------------------------
Altruism: feelings and behavior that show a desire to help other people
and a lack of selfishness.
-----------------------------------------------------------------------

I consider my response to the OP to be altruistic, you consider it
egoism ergo you are confusing altruism with egoism.

Does that make sense now?
Post by Qu0ll
Post by lipska the kat
Are you American?
No, I am a rare, carnivorous native Australian marsupial.
Oh you're *Australian* that explains the negativity, convicts often
blame the rest of the world for their predicament.
Post by Qu0ll
Not sure why
that's important BTW.
See above re irony
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Qu0ll
2014-03-02 11:02:22 UTC
Permalink
Post by lipska the kat
You're hard work aren't you? Oh well, in for a penny etc
<snip>
Post by lipska the kat
Does that make sense now?
No. In fact your argument is about as bulletproof as someone proving their
job of removing elephants from the train tunnels of London is effective
because not one elephant has been spotted there for over a century. But I
am sure everyone appreciates how much effort you have put into formulating
that flimsy argument and how much effort you regularly put into discrediting
Lew or me or anyone else whose intelligence, knowledge or skills intimidate
you.
Post by lipska the kat
Post by Qu0ll
Post by lipska the kat
Are you American?
No, I am a rare, carnivorous native Australian marsupial.
Oh you're *Australian* that explains the negativity, convicts often blame
the rest of the world for their predicament.
Right, so you are not only a troll but also a racist. You first refer to
Americans and now make racist remarks about Australians. What's next in
your xenophobic kit bag, some reference to Jews and or Godwin's Law?

On the basis of you exposing yourself as a bottom feeder, I will no longer
reply to any of your posts in this thread or any other unless you limit your
commentary to issues relating to Java or at the very least refrain from any
such totally unacceptable comments as those made by you in this post.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
lipska the kat
2014-03-02 11:57:00 UTC
Permalink
Post by lipska the kat
Post by lipska the kat
You're hard work aren't you? Oh well, in for a penny etc
<snip>
Post by lipska the kat
Does that make sense now?
No. In fact your argument is about as bulletproof as someone proving
their job of removing elephants from the train tunnels of London is
effective because not one elephant has been spotted there for over a
century. But I am sure everyone appreciates how much effort you have
put into formulating that flimsy argument and how much effort you
regularly put into discrediting Lew or me or anyone else whose
intelligence, knowledge or skills intimidate you.
Oh dear, you're getting upset now ... touched a nerve have we.
Post by lipska the kat
Post by lipska the kat
Post by Qu0ll
Post by lipska the kat
Are you American?
No, I am a rare, carnivorous native Australian marsupial.
Oh you're *Australian* that explains the negativity, convicts often
blame the rest of the world for their predicament.
Right, so you are not only a troll but also a racist.
Ah racism, the last resort of the desperate.
If you had ever experienced true racism you wouldn't class such a
harmless comment as such ... ever called an Englishman a "Pommie"?
If so you are a racist, but only by your own slightly skewed view of the
world.
Post by lipska the kat
You first refer
to Americans
Americans anecdotally don't get irony. The irony of that totally escapes
you I see.
Post by lipska the kat
and now make racist remarks about Australians. What's next
in your xenophobic kit bag, some reference to Jews and or Godwin's Law?
I'll ignore that, it's below even you, I'll put it down to your
frustration at being consistently and profoundly wrong about so many things.
Post by lipska the kat
On the basis of you exposing yourself as a bottom feeder, I will no
longer reply to any of your posts in this thread or any other unless you
limit your commentary to issues relating to Java or at the very least
refrain from any such totally unacceptable comments as those made by you
in this post.
I agree, any value there might have been in this exchange has now been
negated by your descent into insult and name calling, e.g troll, racist,
bottom feeder etc.

Disappointing but sadly predictable
--
Lipska the Kat©: Troll hunter, sandbox destroyer,
treacherous feline and farscape dreamer of Aeryn Sun
GNU/Linux user #560883 - http://www.linuxcounter.net
Leif Roar Moldskred
2014-03-02 12:57:27 UTC
Permalink
Post by Qu0ll
On the basis of you exposing yourself as a bottom feeder, I will no longer
reply to any of your posts in this thread or any other unless you limit your
commentary to issues relating to Java or at the very least refrain from any
such totally unacceptable comments as those made by you in this post.
Much obliged. There's little enough Java discussion in the group as is. We
wouldn't want to replace it with incessant trolling and counter-trolling.
So, thank you.
--
Leif Roar Moldskred
David Lamb
2014-03-02 20:21:37 UTC
Permalink
Post by David Lamb
Even if you dislike the smartass answers, you shouldn't be answering
people's homework questions for them.
Why?
For one thing, he or she probably attends an institution with an
Academic Integrity code that forbids them asking people to solve their
homework problems, so you're likely helping someone who is being
deliberately dishonest from the beginning.

I suspect he or she has access to instructors, teaching assistants, and
tutors who can spend one-on-one time leading him or her to the right
insights into solving the problem without actually giving away the whole
answer. Someone *might* be able to do such a thing online, and IIRC
someone upthread tried to do so, but face-to-face is usually faster and
more effective because it's easier to clue in to what's confusing the
student.

As to your comment upthread that people can gain insight from seeing a
solution, that may well happen *occasionally* but in my experience
that's much rarer than a student simply copying the answer and being
totally unable to cope with similar questions in the future, which is
the opposite of your intent.

rossum
2014-02-26 22:06:22 UTC
Permalink
On Thu, 20 Feb 2014 16:03:51 -0800 (PST), "jay'el antonio"
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
There are an extremely large number of possible programs. It is not
difficult, with a little thought, to find one of those many programs
for yourself.

Here are some things to think about:

1) Each line after the first is one character longer than the previous
line. What is the extra character that is added at the right hand end
of the previous line to extend it? Can you write a method that takes
a string and adds the required additional character to it?

2) Now look at the first part of each string (after the first line),
before the additional character. How is it derived from the previous
line? Can you write a method that takes a string and transforms it so
it looks like the first part of the next line?

3) Now think about how to combine the two methods from 1) and 2) into
a program to produce your desired output, given a starting string and
how many lines you want to produce.

4) Code you program.

5) Test your program. You will almost certainly find errors. Fix the
errors and retest. Repeat until your program is working correctly.

6) If you want me to write your program for you, my rates are $300 per
hour.

rossum
Qu0ll
2014-02-27 03:01:21 UTC
Permalink
Post by rossum
6) If you want me to write your program for you, my rates are $300 per
hour.
I hope that's your discounted rate for helping students. I personally don't
get out of bed for less than $10,000 per day ;-)

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
***@gmail.com
[Replace the "SixFour" with numbers to email me]
Volker Borchert
2014-03-01 19:52:50 UTC
Permalink
Post by jay'el antonio
please someone help me..what is the code of this output program using java
11
221
3321
44321
554321
6654321
77654321
887654321
please do your homework yourself
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <***@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <***@despammed.com>
Continue reading on narkive:
Loading...