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
package ce1002.a4.s101201046; | |
import java.util.Scanner; | |
public class A4 { | |
public static void main(String[] args) { | |
Car[] cars; | |
int i; | |
int num; |
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
package ce1002.a5.s101201046; | |
public class A5 { | |
public static void main(String[] args) { | |
Hero[] heros; | |
int i; | |
heros = new Hero[3]; | |
heros[0] = new Wizard(); //set Wizard |
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
package ce1002.a6.s101201046; | |
public class A6 { | |
public static void main(String[] args) { | |
Hero[] heros; | |
MyPanel[] panels = new MyPanel[3]; | |
MyFrame frame = new MyFrame(); | |
heros = new Hero[3]; |
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
package ce1002.a10.s101201046; | |
public class A10 { | |
public static void main(String[] args) { | |
try { | |
MyFrame frame = new MyFrame(); //create a frame | |
} catch(Exception ex) { | |
ex.printStackTrace(); | |
} |
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
package ce1002.a12.s101201046; | |
import java.awt.event.*; | |
import java.awt.*; | |
import javax.swing.*; | |
public class A12 extends KeyAdapter { | |
static JFrame jf; | |
static { //initial JFrame |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAXN 32780 | |
typedef struct _Node *Node; | |
#define BLACK 1 | |
#define RED 0 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <math.h> | |
typedef struct __yfunc{ | |
double p[9]; | |
double q[9]; | |
size_t len; |
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
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <arpa/inet.h> | |
#include <stdlib.h> | |
namespace { | |
struct cat { | |
int ret; |
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
exp PROC, | |
x:REAL4 | |
movzx eax, 256 | |
push eax | |
fld x | |
fild dword ptr[esp] | |
fdiv | |
fld1 | |
fadd |
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
# AMD Athlon(tm) II X2 270 Processor | |
# Arch Linux x86_64 | |
# gcc (GCC) 6.2.1 20160830 | |
# Crystal 0.19.4 (2016-10-07) | |
======== random2 2097152 ============= | |
with intro sort 6.82 (± 7.91%) fastest | |
with another intro sort 6.22 (± 7.18%) 1.10× slower | |
with std::sort in cpp 6.74 (± 7.34%) 1.01× slower | |
with qsort in c 3.59 (± 5.62%) 1.90× slower | |
======== seq 2097152 ============= |
OlderNewer