A curated list of awesome tech companies that offer programs for CS/EE/CE-students.
| #include "tree.h" | |
| Node* Tree_get_largest(Node* root) { | |
| Node* c = root; | |
| while (c->right) | |
| c = c->right; | |
| return c; | |
| } |
| #include "list.h" | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| List *List_create() { | |
| List *list = (List *)malloc(sizeof(List)); | |
| list->counter = 0; | |
| list->head = NULL; | |
| return list; | |
| } |
| # Greatest Common Divisor | |
| # Written in MIPS Assembly by T.B.N. Booij | |
| # February 23rd, 2018 | |
| # Definitions | |
| # $a0 = a, $a1 = b | |
| # Under the assumption that a >= b | |
| .data | |
| tab: .asciiz "\t" |
| class Reader: | |
| def __init__(self, path): | |
| self.contents = open(path, 'r').read().split("\n") | |
| def readList(self, line_index): | |
| return list(map(int, self.contents[line_index].split(" "))) | |
| def readInt(self, line_index): | |
| return int(self.contents[line_index]) |
| function [ differences ] = drdiff(model_in, model_out, measured_in, measured_out) | |
| %DRDIFF Discrete relative difference | |
| %drdiff(model_in, model_out, measured_in, measured_out) | |
| %Requirements: | |
| %* model_in and model_out are two vectors of the same length | |
| %* measured_in and measured_out are two vectors of the same length | |
| % | |
| %Returns: | |
| %A vector with the relative difference for each measurement point. |
| from flask import Flask, request, jsonify | |
| import re | |
| import requests | |
| from bs4 import BeautifulSoup | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def main(): | |
| arg = request.args.get('url') | |
| match = re.search("https://tabs.ultimate-guitar.com/(.*)crd_(.*).htm", arg) |
| // _ _ _ _ | |
| // | | | (_) | | | |
| // | | | |_ _ __ ___| | ___ ___ ___ | |
| // | |/\| | | '__/ _ \ |/ _ \/ __/ __| | |
| // \ /\ / | | | __/ | __/\__ \__ \ | |
| // \/ \/|_|_| \___|_|\___||___/___/ | |
| // | |
| // Demo of the reading functions | |
| // ============================= | |
| // Setup: Plug an Arduino into your computer and upload this sketch. |
This is the library for the wireless communication.
The communication protocol consists of multiple steps.
-
Ping mode Robot 1 continuously broadcasts a certain character ('>'). Robot 2 will respond with '<' if it reads the ping command. This establishes a "sender-receiver"-relation between the two robots. All outgoing communication (so the messages) from the receiver and all incoming communication to the sender are blocked until further notice.
-
Sending and receiving Robot 1 will send the first message from the send-queue multiple times. This queue consists of
Messagestructs, which are defined below. At sending, thesentflag is set totrue. When robot 2 calls the read function in the main loop, it will detect the message that has been sent. All message bodies are written in the following syntax:#-!. When the message is found and seperated, the robot will send back an affirmation of the message by sending a message of th
| // Input syntax: [["quadcopter", "quadrotor", "quadrotor helicopter"], ["motion", "dynamics"], ["control", "feedback"]] | |
| // Output value: "(quadcopter OR quadrotor OR quadrotor helicopter) AND (motion OR dynamics) AND (control OR feedback)" | |
| function getQuery(input_vals) { | |
| var a = []; | |
| var return_val = ""; | |
| for (var i = 0; i < input_vals.length; i++) { | |
| var temp_or = "("; |