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
import requests | |
file = open('a.txt', 'r') | |
lines = file.readline() | |
count = 1 | |
while lines: | |
url = "https://{}".format(lines.strip()) | |
try: | |
req = requests.get(url) |
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
class Node { | |
int value; | |
Node next; | |
Node(int value) { | |
this.value = value; | |
next = null; | |
} | |
} |
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 <glut.h> | |
#include <math.h> | |
#include <cmath> | |
int width = 600, height = 600; | |
int xOg = 200, yOg = 200; | |
int xa, ya, xb, yb; | |
void putPixel(int x, int y) { | |
glColor3f(1.0f, 1.0f, 1.0f); |
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
void bresenhamLine(int x0, int y0, int x1, int y1) { | |
int dx = abs(x1 - x0); | |
int dy = abs(y1 - y0); | |
int x, y; | |
if (dx >= dy) { | |
int d = 2 * dy - dx; | |
int ds = 2 * dy; | |
int dt = 2 * (dy - dx); |
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
void ddaLine(float xa, float ya, float xb, float yb) { | |
int dx = xb - xa, dy = yb - ya; | |
int k, steps; | |
float xinc, yinc, x = xa, y = ya; | |
if (abs(dx) > abs(dy)) { | |
steps = abs(dx); | |
} | |
else { | |
steps = abs(dy); |
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
class Node { | |
int value; | |
Node next; | |
Node(int value) { | |
this.value = value; | |
next = null; | |
} | |
} |
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
class Node { | |
String data; | |
Node next; | |
Node(String data) { | |
this.data = data; | |
next = null; | |
} | |
} |
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
import java.util.Scanner; | |
public class Queue { | |
public int size; | |
public int front = 0; | |
public int rear = -1; | |
public String[] queue; | |
Queue(int size) { | |
this.size = size; |
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
import java.util.Scanner; | |
class Node { | |
Node next; | |
int value; | |
Node (int value) { | |
this.value = value; | |
} | |
} |
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
public class Stack { | |
private int[] stack; | |
private int arrayLength; | |
private int current = -1; | |
public Stack(int arrayLength) { | |
this.arrayLength = arrayLength; | |
stack = new int[arrayLength]; | |
} | |
OlderNewer