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 "8clocks.jsim" | |
.include "nominal.jsim" | |
.include "stdcell.jsim" | |
// for alufn connect | |
.subckt knex a b | |
.connect a b | |
.ends | |
// Subcircuit for final lab |
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
// run this in the k-map solver site in http://www.32x8.com/circuits6 to choose radio buttons | |
index = 3; | |
tags = document.getElementsByTagName('input'); | |
radio = {}; | |
// find radio tags | |
for (i in tags) { | |
if (tags[i].type == 'radio' && tags[i].name.substring(0, 2) == 'in') { |
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 "8clocks.jsim" | |
.include "nominal.jsim" | |
.include "stdcell.jsim" | |
// for alufn connect | |
.subckt knex a b | |
.connect a b | |
.ends | |
// Xlab opcode[5:0] z pcsel[1:0] ra2sel bsel wdsel[1:0] alufn[5:0] wr werf FINALLAB |
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 <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
#include <vector> | |
#include <map> | |
#include <cstdlib> | |
#include <ctime> | |
#include <algorithm> |
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 <iostream> | |
#include <cstdio> | |
using namespace std; | |
int sumsquare(int n) { | |
return n * (n + 1) / 2 * (2 * n + 1) / 3; | |
} | |
int range(int n) { | |
return n * (n + 1) / 2; |
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 <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
using namespace std; | |
const int N = 100005; | |
int n, q; long long k; | |
char s[N]; int pos[N], sa[N], tmp[N], lcp[N], gap; |
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
.hover-float { | |
margin-top: 10px !important; | |
margin-bottom: 0px !important; | |
} | |
.hover-float:hover { | |
margin-top: 0px !important; | |
margin-bottom: 10px !important; | |
} |
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
<?php | |
define('__ROOT__', $_SERVER['DOCUMENT_ROOT']); | |
define('__MAIN__', $_SERVER['SCRIPT_FILENAME']); | |
/** | |
* Checks if needle is string is a prefix of the other string. | |
* @param string &$haystack | |
* @param string $needle | |
* @return string | |
*/ | |
function starts_with($haystack, $needle) { |
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
#!/bin/bash | |
HOST='ftp.domain.com' | |
USER='[email protected]' | |
SOURCE='/path/to/folder/with/ending/slash/' | |
TARGET='/path/to/dest/' | |
lftp -f " | |
set ftp:ssl-force false | |
set ssl:verify-certificate no | |
open $HOST |
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
#!/bin/bash | |
#Runs sass pre-compiler in directory | |
# Absolute path to this script, e.g. /var/www/pure-celadon/css/sass.sh | |
SCRIPT=$(readlink -f "$0") | |
# Absolute path this script is in, thus /var/www/pure-celadon/css | |
SCRIPTPATH=$(dirname "$SCRIPT") | |
# The absolute root path, e.g. /var/www/pure-celadon |
OlderNewer