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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
; CouchDB Configuration Settings | |
; Custom settings should be made in this file. They will override settings | |
; in default.ini, but unlike changes made to default.ini, this file won't be | |
; overwritten on server upgrade. | |
[couchdb] | |
;max_document_size = 4294967296 ; bytes | |
uuid = af38fcb0343b2d99833462542e2f2e3e |
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
////Angular 1.x using Controller and $scope......... | |
var myApp = angular | |
.module("myModule", []) | |
.controller("productController", function($scope) { | |
var prods = { name: "Prod1", quantity: 1 }; | |
$scope.products = prods; | |
}); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Security; | |
using System.Web.SessionState; | |
namespace eSuperVisionService | |
{ | |
public class Global : System.Web.HttpApplication |
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
getUserDetails: function (event, context, commonService, dbService, userModel, callback) { | |
let idRetrieved = event.queryStringParameters.id ? event.queryStringParameters.id : ''; | |
dbService.connectDb(commonService.DB_CONFIG.CONNECTIONSTRING, {}).then(() => { | |
dbService.query(userModel, { | |
'userId': idRetrieved | |
}, {}).then(userDataArray => { | |
let userData = userDataArray[0]; | |
return new Promise((resolve, reject) => { | |
if (!userData) { | |
reject('User data is missing'); |
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
case commonServices.API_PATHS.BUY_GETUSERDETAILS: | |
buymangementUserDetailsServivce.getUserDetails(event,context,commonServices,dbService,userModel(dbService),handlerCallback); | |
break; |
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
module.exports = function (dbService) { | |
var model = null; | |
var modelName = '_listing_seller'; | |
try { | |
model = dbService.getModel(modelName); | |
} catch (error) { | |
var attachmentSchema = dbService.createEntityDef({ | |
enabled: { | |
type: Boolean | |
}, |
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
import { Component, ViewChild, AfterViewInit } from '@angular/core'; | |
import { ListingContainerComponent } from './listing-container/listing-container.component'; | |
@Component({ | |
moduleId: module.id, | |
templateUrl: 'user-listings.component.html' | |
}) | |
export class UserListingsComponent implements AfterViewInit { | |
@ViewChild(ListingContainerComponent) listingContainerComponent: ListingContainerComponent; |
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
import { Component, OnInit, SimpleChanges } from '@angular/core'; | |
import { ListingService } from '../../../services/listing.service'; | |
import { ListingDAO } from '../../../../seller/domain/listingDao'; | |
@Component({ | |
moduleId: module.id, | |
selector: 'listing-container', | |
templateUrl: 'listing-container.component.html' | |
}) |
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
(function () { | |
angular.module('myapp', ['ngRoute']) | |
.config(["$httpProvider", function ($httpProvider) { | |
$httpProvider.defaults.useXDomain = true; | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}]) | |
//define controller and inject $http service as dependency. | |
.controller('axajCtrl', ['$http', '$scope', function ($http, $scope) { | |
var url = "http://deals.ownaroof.com/api/webservices/locations_list.json?callback=JSON_CALLBACK"; |
OlderNewer