View myFriends.js
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
const query = [ | |
{ | |
$lookup: { | |
from: 'friends', | |
localField: '_id', | |
foreignField: 'userId', | |
as: 'friends', | |
}, | |
}, | |
{ |
View cloudSettings
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
{"lastUpload":"2020-09-16T07:58:25.777Z","extensionVersion":"v3.4.3"} |
View ultrasonic-wemo-water-level.ino
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 <ESP8266WiFi.h> | |
#include <ESP8266mDNS.h> | |
#include <WiFiUdp.h> | |
#include <ArduinoOTA.h> | |
#include <FirebaseArduino.h> | |
#define FIREBASE_HOST "example.firebaseio.com" // optional | |
#define FIREBASE_AUTH "token_or_secret" // optional | |
#define WIFI_SSID "Wifi_Name" | |
#define WIFI_PASSWORD "Wifi_Password" |
View angularcode-task-manager-app-updateTask.php
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
<?php | |
require_once '../includes/db.php'; // The mysql database connection script | |
if(isset($_GET['taskID'])){ | |
$status = $_GET['status']; | |
$taskID = $_GET['taskID']; | |
$query="update tasks set status='$status' where id='$taskID'"; | |
$result = $mysqli->query($query) or die($mysqli->error.__LINE__); | |
$result = $mysqli->affected_rows; |
View angularcode-task-manager-app-deleteTask.php
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
<?php | |
require_once '../includes/db.php'; // The mysql database connection script | |
if(isset($_GET['taskID'])){ | |
$taskID = $_GET['taskID']; | |
$query="delete from tasks where id='$taskID'"; | |
$result = $mysqli->query($query) or die($mysqli->error.__LINE__); | |
$result = $mysqli->affected_rows; |
View angularcode-task-manager-app-getTask.php
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
<?php | |
require_once '../includes/db.php'; // The mysql database connection script | |
$status = '%'; | |
if(isset($_GET['status'])){ | |
$status = $_GET['status']; | |
} | |
$query="select ID, TASK, STATUS from tasks where status like '$status' order by status,id desc"; | |
$result = $mysqli->query($query) or die($mysqli->error.__LINE__); | |
$arr = array(); |
View angularcode-task-manager-app-addTask.php
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
<?php | |
require_once '../includes/db.php'; // The mysql database connection script | |
if(isset($_GET['task'])){ | |
$task = $_GET['task']; | |
$status = "0"; | |
$created = time(); | |
$query="INSERT INTO tasks(task,status,created_at) VALUES ('$task', '$status', '$created')"; | |
$result = $mysqli->query($query) or die($mysqli->error.__LINE__); |
View angularcode-task-manager-app-app.js
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
//Define an angular module for our app | |
var app = angular.module('myApp', []); | |
app.controller('tasksController', function($scope, $http) { | |
getTask(); // Load all available tasks | |
function getTask(){ | |
$http.post("ajax/getTask.php").success(function(data){ | |
$scope.tasks = data; | |
}); | |
}; |
View angularcode-task-manager-app-taskman.css
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
body{ | |
font-family: 'Open Sans', sans-serif; | |
} | |
a { | |
color: #E1704B; | |
transition: color 0.5s ease; | |
} | |
a:hover{ | |
cursor:pointer; | |
} |
View angularcode-task-manager-app-db.php
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
<?php | |
$DB_HOST = '127.0.0.1'; | |
$DB_USER = 'root'; | |
$DB_PASS = ''; | |
$DB_NAME = 'angularcode_task'; | |
$mysqli = new mysqli($DB_HOST, $DB_USER, $DB_PASS, $DB_NAME); | |
?> |
NewerOlder