Senter for Marxistiske og Matematiske Studium, Enschede (SMMSE)

16 juli 2008

 

Ein quine til

Som til skilnad frå dei to fyrste er uavhengig av teiknsett.

public class Q2 {
static char[] c = {'p','u','b','l','i','c','a','s','Q','2',
'{','t','h','r','[',']','=','}',';','n',
'v','o','d','m','(','S','g',')','0',',',
'3','8','f','j','<','.','e','+','"','\'',
'\\','|','?',':','y','!','-','1','%','6',
'5','>','k'};

static int[] i = {1,2,3,4,5,6,-1,6,4,7,8,8,-1,9,10,
-1,11,0,-4,8,12,7,12,5,6,-1,6,13,7,14,
15,16,-1,6,-1,17,-1,11,18,19,0,0,-4,8,12,
7,12,5,6,-1,5,20,12,15,16,-1,5,-1,17,-2,
11,18,19,0,0,-4,1,2,3,4,5,6,-1,8,12,
7,12,5,6,-1,21,22,5,23,-1,24,7,5,20,25,
26,12,14,5,20,27,15,16,-1,7,14,27,8,28,-1,
11,0,-8,1,25,29,30,31,32,28,19,0,-8,33,22,
14,-1,25,5,20,12,-1,34,17,29,19,34,35,6,36,
4,37,20,27,12,13,19,34,38,38,28,-1,11,0,-12,
26,12,14,5,20,27,-1,12,-1,17,-1,39,40,39,-1,
38,-1,25,6,15,34,16,17,17,40,41,40,40,-1,42,
42,-1,6,15,34,16,17,17,40,41,41,40,-1,43,-1,
39,41,41,39,-1,44,-1,39,39,28,-1,38,-1,6,15,
34,16,-1,38,-1,39,40,39,19,0,-12,26,45,8,12,
37,24,36,22,2,12,36,1,14,5,20,12,25,12,28,
19,0,-12,5,33,-1,25,34,46,17,6,36,4,37,20,
27,12,13,47,48,28,-1,26,45,8,12,37,24,36,22,
2,12,36,1,14,5,20,12,25,39,30,39,28,19,0,
-12,5,33,-1,25,25,34,38,48,28,49,48,29,17,17,
29,28,-1,26,45,8,12,37,24,36,22,2,12,36,1,
14,5,20,12,25,39,41,20,-23,39,28,19,0,-8,18,
0,-8,1,25,31,32,30,50,48,28,19,0,-8,33,22,
14,-1,25,5,20,12,-1,34,17,29,19,34,35,5,36,
4,37,20,27,12,13,19,34,38,38,28,-1,11,0,-12,
26,45,8,12,37,24,36,22,2,12,36,1,14,5,20,
12,25,5,15,34,16,28,19,0,-12,5,33,-1,25,34,
46,17,5,36,4,37,20,27,12,13,47,48,28,-1,26,
45,8,12,37,24,36,22,2,12,36,1,14,5,20,12,
25,39,30,39,28,19,0,-12,5,33,-1,25,25,34,38,
48,28,49,48,51,17,17,29,28,-1,26,45,8,12,37,
24,36,22,2,12,36,1,14,5,20,12,25,39,41,20,
-23,39,28,19,0,-8,18,0,-8,1,25,50,48,30,5,
36,4,37,20,27,12,13,28,19,0,-4,18,0,0,-4,
1,14,5,21,7,12,37,-1,8,12,7,12,5,6,-1,
21,22,5,23,-1,1,25,5,20,12,-1,20,30,5,20,
12,-1,24,28,-1,11,0,-8,33,22,14,-1,25,5,20,
12,-1,34,17,20,19,34,35,24,19,34,38,38,28,-1,
11,0,-12,5,33,-1,25,5,15,34,16,52,29,28,-1,
26,45,8,12,37,24,36,22,2,12,36,1,14,5,20,
12,25,6,15,5,15,34,16,47,48,16,28,19,0,-12,
37,4,8,37,-1,5,33,-1,25,5,15,34,16,17,17,
29,28,-1,26,45,8,12,37,24,36,22,2,12,36,1,
14,5,20,12,25,39,41,20,39,28,19,0,-12,37,4,
8,37,-1,33,22,14,-1,25,5,20,12,-1,53,17,29,
19,53,52,5,15,34,16,19,53,47,47,28,-1,26,45,
8,12,37,24,36,22,2,12,36,1,14,5,20,12,25,
39,-1,39,28,19,0,-8,18,0,-4,18,0,18};

public static void main(String[] args) {
p(0,38);
for (int j=0;j<c.length;j++) {
String t = "'" + (c[j]=='\'' || c[j]=='\\' ? "\\" : "") + c[j] + "'";
System.out.print(t);
if (j!=c.length-1) System.out.print(",");
if ((j+1)%10==0) System.out.print("\n ");
}
p(38,61);
for (int j=0;j<i.length;j++) {
System.out.print(i[j]);
if (j!=i.length-1) System.out.print(",");
if ((j+1)%15==0) System.out.print("\n ");
}
p(61,i.length);
}

private static void p(int n,int m) {
for (int j=n;j<m;j++) {
if (i[j]>0) System.out.print(c[i[j]-1]);
else if (i[j]==0) System.out.print("\n");
else for (int k=0;k>i[j];k--) System.out.print(" ");
}
}
}

Kommentarar:
Les hele bloggen, ganske bra
 
I am commenting to make you be aware of

what a

extraordinary [url=http://www.cheap-toms-outlet.com]toms outlet[/url] discovery my cousin's child

obtained reading your

webblog. She realized many things,[url=http://www.cheap-toms-outlet.com]toms outlet[/url]

toms outlet ,not to mention what it's

like to possess an incredible coaching spirit to have the others easily fully grasp chosen

hard to do issues. You actually surpassed visitors' desires.

Many thanks for producing the informative, trusted, edifying as well as [url=http://www.cheap-toms-outlet.com]toms shoes outlet[/url]

cheap toms fun toms shoes outlet tips on the topic to Sandra.


 
Legg inn en kommentar



<< Framside

Tidlegare tekstar

To quines
Brev frå Schickard til Kepler
Rapport: Hjelper valkamp?
Prosjektskildring: Hjelper valkamp?
Operativsystemrevolusjonen
Perspektiv på fri/open programvare
Om ... misforståingar knytt til datateknologi II
Om misoppfatninga at fri/open programvare er kommu...
Til glede for nye brukarar
Jevons sitt logikkpiano IV – simulatoren

Arkiv

november 2005   desember 2005   februar 2006   april 2006   november 2006   desember 2006   januar 2007   februar 2007   mars 2007   august 2007   desember 2007   januar 2008   juli 2008  

This page is powered by Blogger. Isn't yours?