This video explains default admin settings, with respect to privacy & security, for a Zoom account holder.
Please watch the full video here:
Please watch the full video here:
Check how much technoledge do you have?? Enjoy The world of "Technoledge". This blog is all about Technology. Latest Tech-news, Tips & Tricks, Fun Stuffs for Internet, Computer, Site etc. If you have something more technoledge, please share it with others by posting here. If any one want to post an article on this site or he want authors rights please contact me at vihangshah.it@gmail.com.
var myApp = angular
.module("myModule", [])
.controller("productController", function($scope) {
var prods = { name: "Prod1", quantity: 1 };
$scope.products = prods;
});
import { Component } from 'angular2/core';
@Component({
selector: 'prodsdata',
template: `
<h3>{{prods.name}}</h3> `
})
export class ProductComponent {
prods = { name: 'Prod1', quantity: 1 };
}
@Component annotation (that’s also new in Angular 2). The @Component annotation adds the metadata to the class.ng-app attribute and other via code.<script>
angular.element(document).ready(function() {
angular.bootstrap(document, ['myApp']);
});
</script>
ng-app. The only way to bootstrap angular is via code. import { bootstrap } from 'angular2/platform/browser';
import { ProductComponent } from './product.component';
bootstrap(ProductComponent);
bootstrap function is used and it takes starting component which is also parent component of your angular application.ng-repeat is replaced with *ngFor.<ul>
<li ng-repeat="technology in technologies">
{{technology.name}}
</li>
</ul>
<div ng-if="technologies.length">
<h3>You have {{technologies.length}} technologies.</h3>
</div>
<ul>
<li *ngFor="#technology of technologies">
{{technology.name}}
</li>
</ul>
<div *ngIf="technologies.length">
<h3>You have {{technologies.length}} technologies.</h3>
</div>
in is replaced with of and camelCase syntax is used.ng-class is now ngClass and ng-model is now ngModel.ng-href, ng-src, ng-show and ng-hide. Angular 2 uses href, src and hiddenproperties to get the same output. And same goes with event based directives like ng-click and ng-blur.<button ng-click="doSomething()">
<button (click)="doSomething()">
ng-bind is used for one way data binding, but with Angular 2 it is replaced with [property], where property is valid HTML DOM element property.<input ng-bind="technology.name"></input>
<input [value]="technology.name"></input> <div [style.color]="color">Some text...</div>
ng-model is used for two way data binding, but with Angular 2 it is replaced with [(ngModel)].<input ng-model="technology.name"></input>
<input [(ngModel)]="technology.name"></input>
import { Injectable } from 'angular2/core';
@Injectable()
export class TechnologyService {
getTechnologies() {
return [
new technology(1, 'Angular'),
new technology(2, 'jQuery',
new technology(3, 'Node'),
new technology(4, 'Knockout')
];
}
}
provider.import { Component } from 'angular2/core';
import { TechnologyService } from './character.service';
@Component({
selector: 'my-app',
template: '<technology-list></technology-list>',
providers: [TechnologyService]
})
export class AppComponent {}
var myApp = angular
.module("myModule", [])
.controller("productController", function($scope, $http) {
var prods = { name: "Prod1", quantity: 1 };
$scope.products = prods;
});
import { Injectable } from 'angular2/core';
@Injectable()
export class TechnologyService {
constructor(private _http: Http) { }
getTechnologies() {
return [
new technology(1, 'Angular'),
new technology(2, 'jQuery',
new technology(3, 'Node'),
new technology(4, 'Knockout')
];
}
}
@Injectable() is added to service class. It is similar to Angluar 1.x$inject used for DI.$routeProvider.when() to configuring routing. Where in Angular 2, @RouteConfig{(...}) is used. ng-view present in Angular 1.x is replaced with <router-outlet>var app = angular
.module("MyModule", ["ngRoute"])
.config(function ($routeProvider) {
$routeProvider
.when("/home", { templateUrl: "home.html", controller: "homeController" })
.when("/technology", { templateUrl: "technology.html", controller: "technologyController" })
})
.controller("homeController", function ($scope) {
$scope.message = "Home Page";
})
.controller("technologyController", function ($scope) {
$scope.technologies = ["ASP.NET", "jQuery", "AngularJS", "JavaScript"];
})
import { Component } from 'angular2/core';
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from 'angular2/router';
import { TechnologyComponent } from './technology/technology.component';
import { TechnologyService } from './Technology/Technology.service';
@Component({
selector: 'my-app',
templateUrl: 'app/app.component.html',
directives: [ROUTER_DIRECTIVES],
providers: [
ROUTER_PROVIDERS,
TechnologyService
]
})
@RouteConfig([
{ path: '/home', name: 'Home', component: HomeComponent, useAsDefault: true },
{ path: '/technology', name: 'Technology', component: TechnologyComponent },
])
export class AppComponent { }
[ROUTER_DIRECTIVES] as directive and other is to add ROUTER_DIRECTIVES in providers list. And in HTML page,<ul> <li><a [routerLink]="['Home']" href="">Home</a></li> <li><a [routerLink]="['Technology']" href="">Technology</a></li> </ul>
ng-href is also replaced by [routerLink] @Html.DropDownList("MyType",
Html.GetEnumSelectList(typeof(MyType)) ,
"Select My Type",
new { @class = "form-control" })
@Html.DropDownList("MyType",
EnumHelper.GetSelectList(typeof(MyType)) ,
"Select My Type",
new { @class = "form-control" })
namespace MyApp.Common
{
public static class MyExtensions{
public static SelectList ToSelectList(this TEnum enumObj)
where TEnum : struct, IComparable, IFormattable, IConvertible
{
var values = from TEnum e in Enum.GetValues(typeof(TEnum))
select new { Id = e, Name = e.ToString() };
return new SelectList(values, "Id", "Name", enumObj);
}
}
}
ViewData["taskStatus"] = task.Status.ToSelectList();
using MyApp.Common
Alternatively:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Web.Mvc; using System.Web.Mvc.Html; ////// Class ENUM Helper /// public static class EnumHelper { ////// The single empty item /// private static readonly SelectListItem[] SingleEmptyItem = new[] { new SelectListItem { Text = string.Empty, Value = string.Empty } }; ////// Gets the ENUM description. /// ///The type of the ENUM. /// The value. ///ENUM Description public static string GetEnumDescription(TEnum value) { FieldInfo fi = value.GetType().GetField(value.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); if ((attributes != null) && (attributes.Length > 0)) { return attributes[0].Description; } else { return value.ToString(); } } /// /// ENUMS the drop down list for. /// ///The type of the model. ///The type of the ENUM. /// The HTML helper. /// The expression. ///MVC Html String public static MvcHtmlString EnumDropDownListFor(this HtmlHelper htmlHelper, Expression > expression) { return EnumDropDownListFor(htmlHelper, expression, null); } /// /// ENUMS the drop down list for. /// ///The type of the model. ///The type of the ENUM. /// The HTML helper. /// The expression. /// The HTML attributes. ///MVC Html String public static MvcHtmlString EnumDropDownListFor(this HtmlHelper htmlHelper, Expression > expression, object htmlAttributes) { ModelMetadata metadata = ModelMetadata.FromLambdaExpression(expression, htmlHelper.ViewData); Type enumType = GetNonNullableModelType(metadata); IEnumerable values = Enum.GetValues(enumType).Cast (); IEnumerable items = from value in values select new SelectListItem { Text = GetEnumDescription(value), Value = value.ToString(), Selected = value.Equals(metadata.Model) }; // If the enum is nullable, add an 'empty' item to the collection if (metadata.IsNullableValueType) { items = SingleEmptyItem.Concat(items); } return htmlHelper.DropDownListFor(expression, items, htmlAttributes); } /// /// Gets the type of the non null-able model. /// /// The model metadata. ///real Model Type private static Type GetNonNullableModelType(ModelMetadata modelMetadata) { Type realModelType = modelMetadata.ModelType; Type underlyingType = Nullable.GetUnderlyingType(realModelType); if (underlyingType != null) { realModelType = underlyingType; } return realModelType; } }
@Html.EnumDropDownListFor(model => model.EnumProperty, "Select Enum", new { @class = "form-control", type = "text"})
SELECT Column1FROM Table1WHERE Column1 = 'casesearch'SELECT Column1FROM Table1WHERE Column1 COLLATE Latin1_General_CS_AS = 'casesearch'ALTER TABLE Table1ALTER COLUMN Column1 VARCHAR(20)COLLATE Latin1_General_CS_ASEXEC sp_help DatabaseName<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>pclass</Title>
<Shortcut>pclass</Shortcut>
<Description>Code snippet for public class</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Class name</ToolTip>
<Default>MyClass</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[public class $name$
{
$selected$$end$
}]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>propmatchname</Title>
<Shortcut>propmatchname</Shortcut>
<Description>Code snippet for property and backing field with matching name</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>int</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name</ToolTip>
<Default>MyProperty</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[private $type$ m_$property$;
public $type$ $property$
{
get { return m_$property$;}
set { m_$property$ = value;}
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
SET NOCOUNT OFF
GO
declare @Text_To_Search nvarchar(max)
declare @TableName nvarchar(max)
declare @ColName nvarchar(max)
declare @CMD nvarchar(max)
declare @DBname nvarchar(max)
declare @Single_DB_Only bit
set @Text_To_Search = 'SOMETHING' -- Enter the Text here which you want to search
set @Single_DB_Only = 1 -- If @Single_DB_Only = 0 then the search will be in only one database
if @Single_DB_Only = 1
set @DBname = 'MY_DATABASE' -- Enter Database Name in which you want to search
/* ********************** Validation ********************** */
IF @Single_DB_Only = 1 AND NOT EXISTS(SELECT name FROM [master].[sys].[databases] WHERE name = @DBname)
BEGIN
PRINT 'Please enter valid database name'
RAISERROR('Please enter valid database name', 20, -1) WITH LOG
END
/*-- ********************** Validation ********************** */
if exists(select * from [master].[dbo].sysobjects where xtype = 'U' and [Name] = 'MY_INFO_ALL_TABLES')
drop table [master].[dbo].MY_INFO_ALL_TABLES
create table [master].[dbo].MY_INFO_ALL_TABLES (TableName nvarchar(max), ColName nvarchar(max))
if exists(select * from [master].[dbo].sysobjects where xtype = 'U' and Name = 'MY_INFO')
drop table [master].[dbo].MY_INFO
create table [master].[dbo].MY_INFO (DBName nvarchar(max), TableName nvarchar(max), ColName nvarchar(max), FieldValue nvarchar(max))
if @Single_DB_Only = 0
Begin
declare CUR_DB cursor for select name from [master].[sys].[databases] where name not in('master','tempdb', 'model','msdb','tempdb') and state = '0'
open CUR_DB
fetch next from CUR_DB into @DBname
while @@FETCH_STATUS = 0
Begin
print @DBNAME
set @CMD = 'insert into [master].[dbo].MY_INFO_ALL_TABLES (TableName, ColName) select T1.Name as TableName , T0.Name as ColName from [{3}].sys.syscolumns T0 inner join [{3}].sys.sysobjects T1 on T0.id = T1.id where T1.xtype = ''U'' and T0.Name not like ''MY_TABLES%'' '
set @CMD = replace(@CMD,'{3}',@DBname)
-- print @CMD
exec (@CMD)
declare CUR cursor for select TableName , ColName from [master].[dbo].MY_INFO_ALL_TABLES
open CUR
fetch next from CUR into @TableName, @ColName
while @@FETCH_STATUS = 0
Begin
set @CMD = 'insert into [master].[dbo].MY_INFO (DBName,TableName,ColName,FieldValue) select ''{3}'',''{1}'',''{0}'', cast({0} as nvarchar) from [{3}].dbo.{1} where {0} like ''%{2}%'' '
set @CMD = replace(@CMD,'{0}',@ColName)
set @CMD = replace(@CMD,'{1}',@TableName)
set @CMD = replace(@CMD,'{2}',@Text_To_Search)
set @CMD = replace(@CMD,'{3}',@DBname)
-- print @CMD
exec (@CMD)
fetch next from CUR into @TableName, @ColName
End
close CUR
deallocate CUR
fetch next from CUR_DB into @DBname
End
close CUR_DB
deallocate CUR_DB
End
Else
Begin
print @DBNAME
set @CMD = 'insert into [master].[dbo].MY_INFO_ALL_TABLES (TableName, ColName) select T1.Name as TableName , T0.Name as ColName from [{3}].sys.syscolumns T0 inner join [{3}].sys.sysobjects T1 on T0.id = T1.id where T1.xtype = ''U'' and T0.Name not like ''MY_TABLES%'' '
set @CMD = replace(@CMD,'{3}',@DBname)
-- print @CMD
exec (@CMD)
declare CUR cursor for select TableName , ColName from [master].[dbo].MY_INFO_ALL_TABLES
open CUR
fetch next from CUR into @TableName, @ColName
while @@FETCH_STATUS = 0
Begin
set @CMD = 'insert into [master].[dbo].MY_INFO (DBName,TableName,ColName,FieldValue) select ''{3}'',''{1}'',''{0}'', cast({0} as nvarchar) from [{3}].dbo.{1} where {0} like ''%{2}%'' '
set @CMD = replace(@CMD,'{0}',@ColName)
set @CMD = replace(@CMD,'{1}',@TableName)
set @CMD = replace(@CMD,'{2}',@Text_To_Search)
set @CMD = replace(@CMD,'{3}',@DBname)
-- print @CMD
exec (@CMD)
fetch next from CUR into @TableName, @ColName
End
close CUR
deallocate CUR
fetch next from CUR_DB into @DBname
End
select * from [master].[dbo].MY_INFO
GO
CREATE TABLE [Category]( [CatId] [int] IDENTITY(1,1) NOT NULL, [PCatId] [int] NULL, [CatName] [varchar](50) NULL, CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED ( [CatId] ASC )) GO
Insert into [Category] ([PCatId],[CatName]) values (0,'Cat1'); Insert into [Category] ([PCatId],[CatName]) values (0,'Cat2'); Insert into [Category] ([PCatId],[CatName]) values (1,'Cat3'); Insert into [Category] ([PCatId],[CatName]) values (1,'Cat4'); Insert into [Category] ([PCatId],[CatName]) values (2,'Cat5'); Insert into [Category] ([PCatId],[CatName]) values (2,'Cat6'); Insert into [Category] ([PCatId],[CatName]) values (0,'Cat7'); Insert into [Category] ([PCatId],[CatName]) values (7,'Cat8'); Insert into [Category] ([PCatId],[CatName]) values (7,'Cat9'); Insert into [Category] ([PCatId],[CatName]) values (7,'Cat10'); Insert into [Category] ([PCatId],[CatName]) values (8,'Cat11'); Insert into [Category] ([PCatId],[CatName]) values (8,'Cat12'); Insert into [Category] ([PCatId],[CatName]) values (8,'Cat13'); GO
declare @catId int = 8;
-- select * from Category;
WITH hierarchy AS (
SELECT c1.CatId,
c1.CatName,
c1.PCatId,
CAST(NULL AS VARCHAR(50)) AS parentname
FROM Category c1
WHERE c1.PCatId = 0
UNION ALL
SELECT c2.CatId,
c2.CatName,
c2.PCatId,
y.CatName
FROM Category c2
JOIN hierarchy y ON y.CatId = c2.PCatId)
SELECT s.CatId,
s.CatName,
s.PCatId,
s.parentname
FROM hierarchy s
where s.PCatId = @catId OR s.CatId = @catId
order by s.PCatId
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| <script type="syntaxhighlighter" class="brush: csharp"><![CDATA[// Commentpublic class Testing {public Testing() {}public void Method() {/* Another Commenton multiple lines */int x = 9;}}]]></script> |
1
2
3
4
5
6
7
8
9
10
11
| // Commentpublic class Testing { public Testing() { } public void Method() { /* Another Comment on multiple lines */ int x = 9; }} |
1
2
3
4
5
6
7
8
9
10
11
12
| <pre class="brush: csharp">// Commentpublic class Testing {public Testing() {}public void Method() {/* Another Commenton multiple lines */int x = 9;}}</pre> |
1
2
3
4
5
6
7
8
9
10
11
| // Commentpublic class Testing { public Testing() { } public void Method() { /* Another Comment on multiple lines */ int x = 9; }} |
1
| static Dictionary<int, List<Delegate>> _delegate = new Dictionary<int, List<Delegate>>(); |