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
| AngularACL | |
| Criar as classes: | |
| UserObj, onde é obrigatório ter a as propriedades: | |
| - isLogged: true|false | |
| - roles: array | |
| - name: string | |
| Security, onde irá ter métodos para checagem de permissão, recebendo o usuário (instância de UserObj) | |
| e o nome da rota, onde irá checar se a rota existe, e se existir, checa se o usuário possui alguma das | |
| roles que a rota necessita. |
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
| angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
| .run(function(DB) { | |
| DB.init(); | |
| }); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel.DataAnnotations.Schema; | |
| using System.Data.Entity; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using System.Text; | |
| namespace EFExtensions |
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
| public class CustomerController : Controller | |
| { | |
| public ViewResult Index() | |
| { | |
| return View(); | |
| } | |
| public ViewResult Edit() | |
| { | |
| var existingCustomer = new Customer(); |
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
| /* | |
| * jQuery.ajaxQueue - A queue for ajax requests | |
| * | |
| * (c) 2011 Corey Frang | |
| * Dual licensed under the MIT and GPL licenses. | |
| * | |
| * Requires jQuery 1.5+ | |
| */ | |
| (function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).done(e.resolve).fail(e.reject).then(b,b)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery) |
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('./index') | |
| , TempSchema = new mongoose.Schema({ | |
| salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
| }); | |
| var Temp = mongoose.model('Temp', TempSchema); | |
| console.log(Temp.schema.path('salutation').enumValues); | |
| var temp = new Temp(); | |
| console.log(temp.schema.path('salutation').enumValues); |
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
| -- Removes all objects (in the correct order) added to | |
| -- SQL Server by the stock ASP.NET membership provider | |
| drop table aspnet_PersonalizationAllUsers | |
| drop table aspnet_PersonalizationPerUser | |
| drop table aspnet_Profile | |
| drop table aspnet_SchemaVersions | |
| drop table aspnet_UsersInRoles | |
| drop table aspnet_WebEvent_Events | |
| drop table aspnet_Paths | |
| drop table aspnet_Membership |
NewerOlder