Lean unit tests with minimal setup
- Fake DOM (Everything works without a real browser)
- Uses ngMocks to inject and mock Angular.js dependencies
- I'm assuming you are already using browserify (but everything works fine without it)
#include <vector> | |
#include <algorithm> | |
#include "Point2D.h" | |
using namespace std; | |
Point2D FindMedianPoint(vector<Point2D> points) | |
{ | |
#pragma region Calculating Horizontal Cost | |
//=========================================================================================== | |
//O(NLogN) Sort - sort horizontal x-coor increasing |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main() | |
{ | |
int n = 15; | |
for (int i = 1; i <= n; i++) | |
{ |
#pragma once | |
#include <string> | |
#include <vector> | |
#include <math.h> | |
using namespace std; | |
class Decoder | |
{ | |
public: | |
char K = 0; |
Truyền tin dạng DEC: | |
... | |
Truyền tin dạng Binary: | |
... |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<link rel="stylesheet" href="css/normalize.css"/> | |
<link rel="stylesheet" href="css/bootstrap.min.css"/> | |
</head> | |
<body> | |
<div class="container-fluid"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test</title> | |
<link rel="stylesheet" href="css/normalize.css"/> | |
<link rel="stylesheet" href="css/bootstrap.min.css"/> | |
</head> | |
<body style="background-color: gray;"> | |
<div style="width: 960px; margin: 8px auto; background-color: white"> |
Project Structure | |
- index.js //Your NodeJs code | |
- /public // What in here is your tradition Angular App (like the one on Angular Tutorial) | |
- /css | |
- /js | |
- app.js // Your Angular code | |
- index.html | |
================= Server Side ============================= | |
//Node index.js |
Lean unit tests with minimal setup
var app = angular.module('app', ['ui.router']); | |
app.config(['$stateProvider', | |
function ($stateProvider) { | |
// UI-Router | |
// Application states | |
var applicationStates = [ | |
// Pre-authenticated | |
{ |
ufw allow OpenSSH | |
ufw allow http | |
ufw allow https | |
ufw enable | |
ufw status |