Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a way to download SkyServer dataset and queries
- Loading branch information
Felix Halim
committed
May 8, 2013
1 parent
0ca4580
commit 909e6b9
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <stdio.h> | ||
|
||
#define MAXN (1 << 25) | ||
|
||
int arr[MAXN]; | ||
|
||
int main(int argc, char *argv[]){ | ||
FILE *in = fopen(argv[1],"rb"); | ||
if (!in){ fprintf(stderr,"Error opening file %s\n",argv[1]); return 1; } | ||
while (true) { | ||
int N = fread(arr, sizeof(int), MAXN, in); | ||
for (int i = 0; i < N; i++) printf("%d\n", arr[i]); | ||
if (N < MAXN) break; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <stdio.h> | ||
|
||
int nth; | ||
double ascension; | ||
|
||
int main(int argc, char *argv[]){ | ||
while (scanf("%d %lf", &nth, &ascension) != EOF) { | ||
printf("%.0lf\n", ascension * 1e6); | ||
} | ||
} |