Hi there,
I'm going to start a new project and I'll try to write a full diar
I'm going to start a new project and I'll try to write a full diar
After 20 years of software development, I want to share my experiences with the world instead of just a small group of my collegues.
USE AdventureWorks;SELECT s.nameFROM sys.schemas sWHERE s.principal_id = USER_ID('pinaladmin');
ALTER AUTHORIZATION ON SCHEMA::db_denydatareader TO dbo;ALTER AUTHORIZATION ON SCHEMA::db_denydatawriter TO dbo;
SELECT s.nameFROM sys.schemas sWHERE s.principal_id = USER_ID('YourUserID');
ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;
module Foo
def foo
puts 'heyyyyoooo!'
end
end
class Bar
include Foo
end
Bar.new.foo # heyyyyoooo!
Bar.foo # NoMethodError: undefined method ‘foo’ for Bar:Class
class Baz
extend Foo
end
Baz.foo # heyyyyoooo!
Baz.new.foo # NoMethodError: undefined method ‘foo’ for #<Baz:0x1e708>
As you can see, include makes the foo method available to an instance of a class and extend makes the foo method available to the class itself.<machineKey decryptionKey="A4B12CCDD50E95F8GB9GFH6JKAT4Y0U0I2OF2DF2AAFE5AB46189C,IsolateApps" validation="AES" validationKey="480CDF2AS9S9AS5CFDGF0GHFH9JJH4KHKAKLJ2L9F3SAS82A6C16911A29EF48903783F94529C21570AACB72766FB38CD4CE7B85B0ACE3149DC5FC1CCF1AA1CECE3579659996593B06,IsolateApps"/>
Or in aspx page
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Admin/Site1.Master" EnableViewStateMac="false" CodeBehind="MenuStructure.aspx.vb" Inherits="LogicTextile.MenuStructure" %>