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
| const dbconnection = 'mongodb://username:[email protected]:35333/your-database-name'; |
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
| <app-chat></app-chat> |
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
| 'use strict'; | |
| const db | |
| const dbconnection = 'mongodb://username:[email protected]:35333/your-database-name'; | |
| const express = require('express') | |
| const app = express() | |
| const bodyParser = require('body-parser') | |
| const http = require('http').Server(app); | |
| const io = require('socket.io')(http); | |
| const MongoClient = require('mongodb').MongoClient |
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
| import { Injectable } from '@angular/core'; | |
| import { Subject } from 'rxjs/Subject'; | |
| import { Observable } from 'rxjs/Observable'; | |
| import * as io from 'socket.io-client'; | |
| @Injectable() | |
| export class ChatService { | |
| private url = 'http://localhost:5000'; | |
| private socket; |
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
| import { Component, OnInit, OnDestroy } from '@angular/core'; | |
| import { ChatService } from '../chat.service'; | |
| @Component({ | |
| selector: 'app-chat', | |
| template: ` | |
| <p> | |
| REPTILEHAUS NG2 CHAT DEMO | |
| </p> |
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 | |
| $dsn = "mysql:host=localhost;dbname=storedprocedures;charset=utf8;"; //change to your hosts IP and database name | |
| $user = 'root'; //database username | |
| $pass = ''; //database password | |
| //PDO Error Exceptions added to to the connection string below | |
| $options = array(PDO::ATTR_ERRMODE =--> PDO::ERRMODE_EXCEPTION); | |
| try { |
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 | |
| // Change to your hosts IP, username, password and database name | |
| define('HOST','localhost'); | |
| define('USER','root'); | |
| define('PASS',''); | |
| define('DB','storedprocedures'); | |
| $dbh = @new mysqli(HOST, USER, PASS, DB); |
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
| DELIMITER $$ | |
| CREATE DEFINER=`root`@`localhost` PROCEDURE `getMemeber_sproc`( | |
| IN `usersession` INT(11), | |
| OUT `output_name` VARCHAR(25) | |
| ) | |
| BEGIN | |
| SELECT name INTO output_name FROM members WHERE id = usersession; | |
| END$$ |
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
| ' Connection String required to connect to MS Access database | |
| ' PLEASE CHANGE data source= to the path where your ACCESS DATABASE file is on your C:\ drive | |
| connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files (x86)\Smartlaunch\Server\Data\DB\Smartlaunch.mdb;" | |
| 'Create todays date for use in the Access query | |
| dim dt | |
| dt = Date() | |
| sql = "SELECT SUM(Transactions) AS Sales FROM FinancialTransactions WHERE Date > #"&dt&"# " |
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
| // Assign each of our input pins to an integer variable | |
| int LED_one = 13; | |
| void setup() { | |
| Serial.begin( 9600 ); | |
| pinMode( LED_one, OUTPUT ); | |
| } | |
| void loop() { |