- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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 React, { useState, useEffect, useContext, useRef } from "react"; | |
import { UserContext } from "../../../Contexts/UserContext"; | |
import { FaTrash } from "react-icons/fa"; | |
import "./UpdateUserInfoModal.css"; | |
import { FaUserCircle } from "react-icons/fa"; | |
import useOutsideClick from "../../../CustomHooks/useOutsideClick"; | |
import Axios from "axios"; |
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 sdk from 'matrix-js-sdk'; | |
const matrixClient = sdk.createClient({ | |
baseUrl: process.env.MATRIX_BASE_URL, // https://programination.modular.im | |
}); | |
async register(req, res) { | |
let sessionId = null; | |
const auth = { type: 'm.login.dummy' }; | |
const name = 'matloob-new'; | |
const password = 'testing'; |
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
var mongoose = require('mongoose'); | |
var dbURL = "mongodb://localhost:27017/test"; | |
mongoose.connect(dbURL); | |
var Schema = mongoose.Schema; | |
ProductSchema = new Schema({ | |
birthdate: { type: Date, default: Date.now }, | |
purchase_date: { type: Date, default: Date.now }, |
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
/** | |
* Created with JetBrains WebStorm. | |
* User: Matloob | |
* Date: 9/12/13 | |
* Time: 12:06 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; |
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
describe('Testing createBlogPost', function(){ | |
it('Should Create Blog Post and return code=2', function(done){ | |
request.post({url:baseURL + "/api/createBlogPost", json:true,body:JSON.stringify({blogPostName:blogPostName, blogPostTitle:blogPostTitle, blogPostContent:blogPostContent})}, | |
function(error,resp,body){ | |
body.code.should.equal(2); // is already there, will return 1 | |
done(); | |
} |