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.ArrayList; | |
import javax.swing.JFrame; | |
public class MazeFrame | |
{ | |
public static void main(String[] args) throws InterruptedException | |
{ | |
int width = 15; | |
int height = 10; | |
JFrame frame = new 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
library IEEE; | |
use IEEE.STD_LOGIC_1164.ALL; | |
use IEEE.STD_LOGIC_ARITH.ALL; | |
use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
entity Latch4bit is | |
Port ( D : in STD_LOGIC_VECTOR(3 downto 0); | |
E : in STD_LOGIC; | |
Q : out STD_LOGIC_VECTOR(3 downto 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
library IEEE; | |
use IEEE.STD_LOGIC_1164.ALL; | |
use IEEE.STD_LOGIC_ARITH.ALL; | |
use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
entity Mux4to1 is | |
Port ( S : in STD_LOGIC; | |
A : in STD_LOGIC_VECTOR(3 downto 0); | |
B : in STD_LOGIC_VECTOR(3 downto 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
library IEEE; | |
use IEEE.STD_LOGIC_1164.ALL; | |
use IEEE.STD_LOGIC_ARITH.ALL; | |
use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
entity Counter2bit is | |
Port ( Up, CLR : in STD_LOGIC; | |
Q : out STD_LOGIC_VECTOR(1 downto 0)); | |
end Counter2bit; |
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
/** | |
* It is okay to use ArrayList class but you are not allowed to use any other | |
* predefined class supplied by Java. | |
*/ | |
import java.util.ArrayList; | |
public class CompressDecompress | |
{ | |
/** | |
* Get a string representing a Huffman tree where its root node is root |
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.Random; | |
public class ShowPath | |
{ | |
public static void main(String[] args) | |
{ | |
int point = 0; | |
BinaryNodeInterface<Character> root = generateTree(); | |
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
/* | |
project-1.c | |
As you develop and test this file: | |
use this command to compile: (you can name the executable whatever you like) | |
gcc -W -Wall -Wextra -O2 project-1.c -o project-1.exe | |
use this command to execute: (you will of course test on both input files) |
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> | |
// YOU FILL IN THE CODE BODY FOR THIS FUNCTION BELOW MAIN | |
char * mygetline( char **buffer, FILE * instream ); // JUST A PROTOTYPE. FUNCTION BODY IS BELOW MAIN | |
// MAIN IS GIVEN AS-IS DO NOT MODIFY | |
int main( int argc, char *argv[] ) |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Audio; | |
using Microsoft.Xna.Framework.Content; | |
using Microsoft.Xna.Framework.Graphics; | |
using Microsoft.Xna.Framework.Input; |
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
'use strict' | |
function* fibGen(limit) { | |
let prevVal = 0, currVal = 1; | |
let nextVal = 0; | |
while (!limit || currVal <= limit) { | |
yield currVal; | |
nextVal = currVal + prevVal; | |
prevVal = currVal; | |
currVal = nextVal; |
OlderNewer