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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <unistd.h> // getopt(), access(), read(), close() | |
#include <arpa/inet.h> | |
#include <time.h> // time() | |
#define MAX_IP 64 | |
#define MAX_PATH 1024 |
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 <stdio.h> | |
#include <time.h> | |
#include <string.h> | |
char * timestamp(); | |
#define print_log(f_, ...) printf("%s ", timestamp()), printf((f_), ##__VA_ARGS__), printf("\n") | |
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
module is_fibonacci( | |
input CLK, | |
input RESET, | |
input [31:0] N, | |
output reg O, | |
output reg DONE | |
); | |
reg [31:0] a; | |
reg [31:0] b; |
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
package com.company; | |
public class Main { | |
public static void main(String[] args) { | |
int A = 30, B = 66; | |
System.out.println("Before swap\nA: " + A + " B: " + B); | |
A = A + B; | |
B = A - B; | |
A = A - B; | |
System.out.println("After swap\nA: " + A + " B: " + B); |
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
module sqd_structural( | |
input CLK, | |
input X, | |
input RESET, | |
output Z_OUT | |
); | |
wire Q0,Q0N,Q1,Q1N,Q2,Q2N; //State Bits | |
wire A1,A2,A3,A4,A5; //Gate output wires | |
wire D0,D1,D2; //D Flip-Flop inputs |