Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
function fdmproblem(n) | |
m = n | |
A = zeros(n*m, n*m) | |
dof = reshape(1:n*m, n, m) | |
for i=2:n, j=1:m | |
A[dof[i,j], dof[i-1,j]] -= 1.0 | |
A[dof[i,j], dof[i,j]] += 1.0 | |
end | |
for i=1:n, j=2:m | |
A[dof[i,j], dof[i,j-1]] -= 1.0 |
This file contains hidden or 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 os | |
import random | |
import string | |
ALPHABET = string.ascii_lowercase + string.digits | |
def encrypt(password, text): | |
message = "".join([c.lower() if c.isalnum() else "" for c in text]) | |
plaintext = [ALPHABET.find(c.lower()) for c in message] | |
keystream = [ALPHABET.find(c.lower()) for c in password] | |
n = len(plaintext) |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
typedef struct student { | |
int uid; // unique identifier | |
float gpa; // grade point average | |
char *firstname; | |
char *lastname; | |
} student_t; |
OlderNewer