- 博客(49)
- 收藏
- 关注
转载 Http Verbs:Get Post Patch Put Delete
HTTP Verbs: 談 POST, PUT 和 PATCH 的應用在初學REST的這幾年,我都認為這幾個 HTTP Verbs 就是對應 CRUD:POST = 新增GET = 讀取PUT = 更新DELETE = 刪除後來在設計 API only 的 Web service 時,常常搞不清楚到底要用 PUT 還是 POST,才發現我被 Rails 的鷹架範例誤導了
2018-02-03 15:57:45 442
原创 Azure VNet config document
https://msdn.microsoft.com/zh-cn/library/windows/apps/dn786406.aspxhttps://www.2cto.com/net/201512/455761.htmlhttp://ultradream.blog.51cto.com/9437529/1569182https://docs.microsoft.com/zh-cn
2017-09-21 16:30:17 356
原创 Deploy multiple list in one feature
Modify the list definitionuse unique Type ID like this:
2017-08-31 16:14:01 394
原创 Prepare to deploy SharePoint add-in
1、create app account:https://controlzet.wordpress.com/2013/12/20/sharepoin-2013-system-accounts-can-not-deploy-an-apps/2、add role of the database:http://www.c-sharpcorner.com/blogs/resolve-problem-i
2017-08-30 16:41:11 588
原创 How to use Azure Function in Microsoft Flow
Input:@equals(length(body('Get_Items_By_Title')?['value']),0)theninput:"@add(item()?['Replies'],1)"When you are using Azure Function,you needed quotes to make it work
2017-06-15 11:45:47 526
原创 SharePoint跨域访问
var context = new SP.ClientContext(addinweburl);var factory = new SP.ProxyWebRequestExecutorFactory(addinweburl);context.set_webRequestExecutorFactory(factory);var web = context.get_web();
2017-05-17 17:14:27 788
原创 AADSTS90093:Calling principal cannot consent due to lack of permissions
今天工作中遇到一个问题,当使用非管理员登入到Graph Explorer上,身份验证的时候会提示:Calling principal cannot consent due to lack of permissions我觉得这个可能是普通用户某些权限无法使用,例如Read and write all users' full profiles(需要全局管理员权限),因此会出现上面这个情
2017-03-15 15:37:45 1236
转载 Azure Active Directory Application Permission VS Delegate Permission
Use Reference:https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-permission-scopes个人理解:Application Permission是使用了应用程序的权限,所有的用户都使用应用程序的权限Delegate Permiss
2017-03-15 11:31:40 892
原创 Login in to China Azure
Azure Power Shell command:Login to Azure RM:Login-AzureRmAccount -EnvironmentName AzureChinaCloudLogin to Azure olService:Connect-MsolService -AzureEnvironment AzureChinaCloud
2017-02-21 16:27:48 1275
原创 Get Azure Active Directory GUID By Power shell
power shell command:(Invoke-WebRequest https://login.chinacloudapi.cn/shnywb.partner.onmschina.cn/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split('/')[3]
2017-02-21 15:58:50 437
原创 Office 365 Graph APIs platform overview
Office 365 Graph APIshttps://msdn.microsoft.com/office/office365/howto/platform-development-overview
2017-02-21 15:57:16 702
转载 Azure Token Lifetime
Setting the permissions and configuration above would allow our mobile app to authenticate users and manage the access of the web app. This access is managed by the token that Azure would give when a
2017-02-17 16:59:34 711
转载 微软框架集合
分布式缓存框架:Microsoft Velocity:微软自家分布式缓存服务框架。Memcahed:一套分布式的高速缓存系统,目前被许多网站使用以提升网站的访问速度。Redis:是一个高性能的KV数据库。 它的出现很大程度补偿了Memcached在某些方面的不足。EnyimMemcached:访问Memcached最优秀的.NET客户端,集成不错的分布式均衡算法。
2016-04-14 16:08:20 2101
原创 获取两个日期之间相差的周数
/// /// 获取两个日期之间相差的周数 /// /// /// /// private int GetWeekInBTime(DateTime dt1, DateTime dt2) { TimeSpan ts = dt1 - dt2;
2015-08-20 11:55:39 1153
原创 sharepoint2010迁移到2013后,帐号更新
在Sharepoint的Power Shell里输入$WebAppName = "http://"$wa = get-SPWebApplication $WebAppName$wa.MigrateUsers($true)
2015-08-14 16:51:09 463
原创 UserInfoFromAD
internal static class ActiveDirectorySchema{ // Fields internal static readonly string CommonName = "cn"; internal static readonly string Department = "department"; internal static re
2015-08-11 14:17:51 387
转载 异步调用
首先来看一个简单的例子:小明在烧水,等水烧开以后,将开水灌入热水瓶,然后开始整理家务小文在烧水,在烧水的过程中整理家务,等水烧开以后,放下手中的家务活,将开水灌入热水瓶,然后继续整理家务这也是日常生活中很常见的情形,小文的办事效率明显要高于小明。从C#程序执行的角度考虑,小明使用的同步处理方式,而小文则使用的异步处理方式。同步处理方式下,事务是按顺序一件一件处理的;而异步方式则是,
2015-07-31 06:27:35 501
原创 什么是委托
委托和类、结构、接口、枚举都可以看成是类型类是对现实生活中的对象的抽象实现(比如人,都具有相同特性——眼睛,鼻子,耳朵),而委托是对函数的抽象实现(比如两个函数,输入参数类型和数量相同,返回值也相同,同时完成相同的功能)举例:delegate int GetCalculatedValueDelegate(int x, int y); static int AddCalcul
2015-07-31 05:49:30 750
原创 String是引用类型,和其他引用类型区别在哪里?
String虽然是引用类型,但和其他引用类型的区别在于,原先的string的值一旦创建后,就不会改变使用+/-操作,原先的字符串还是在内存中,+/-完的字符串会写入新分配的内存中,而不会改变原有的堆上的数据
2015-07-31 04:49:20 1695
原创 AppDomain随记
一个进程可以包含多个线程一个AppDomain可以创建多个线程System.Threading.Thread是个soft thread,并不能被操作系统识别,操作系统只能识别hard thread一个soft thread只属于一个AppDomain,穿越AppDomain的是hard thread当hard thread访问到某个AppDomain时,这个AppDomain就会创
2015-07-31 00:51:02 390
原创 抽象类和接口
接口和抽象类该如何用?接口(用于表明功能)微软所有的接口都是以able结尾,意思是“我能做...”但接口都是需要具体实现的,如何实现接口不做定义这个时候我们就需要类或者抽象类去实现它抽象类(用于表明关系)抽象类是为了定义一些公共的方法。例如:BUS、Taxi,都是车(Car),都有轮盘(宏观),都需要汽油(宏观)因此,我们可以在抽象类中去定义公共的方法去描述子类所拥
2014-12-08 21:18:25 456
转载 SharePoint PowerShell: Get Web ID (GUID) with PowerShell
Use this small script to get the ID or GUID of a site(web) in your SharePoint environment. Don't forget to change the webURL to your site URL! Script: # Starting the script Add
2014-08-24 01:39:57 783
原创 清理日志文件和压缩数据库
http://hi.baidu.com/my100du/blog/item/606c9a54c62392073b2935ad.html
2011-08-24 13:23:32 454
原创 Session
Session中可以存储类:Session["PrivilegeInfo"] = DataFactory.GetPrivilegeLoader().GetPrivilegeInfo(userid);//GetPrivilegeInfo()返回的是一个类 然后可以
2011-08-16 18:31:42 364
原创 接口
让类去继承接口,然后实现接口中定义的一些方法或者属性 public interface IPrivilegeLoader { PrivilegeInfo GetPrivilegeInfo(string userid); st
2011-08-16 18:28:05 327
原创 ext工具栏
Ext.QuickTips.init(); var tb = new Ext.Toolbar(); //初始化工具栏(ext自带方法) tb.id="mainToolBar"; //工具栏id
2011-08-16 17:32:24 603
原创 使用extjs,来实现一个页面调用另一个页面中的方法,并且能获得方法的返回值
var conn = Ext.lib.Ajax.getConnectionObject().conn;conn.open("POST", url, false);conn.send("发送到服务器端的信息");if(conn.status==200)
2011-08-16 15:11:26 6757
原创 css
.right{width:20px;}.right .up {width:250px; height:100%; }说明:classname=right下的所有的classname=up的应用此样式,以此类推.right .up .title{cursor:point
2011-08-15 15:43:24 369
原创 两个变量互换的方法
<br />1、利用临时变量<br />2、利用加法<br />a=a+b;<br /><br />b=a-b;<br /><br />a=a-b;<br />3、利用位操作<br />a=a^b;<br /><br />b=b^a;<br /><br />a=a^b;<br /> <br /><br />比如 a =1 ; b=2;<br />在二进制里<br />a = 01<br />b = 10<br />(我写简单点,前面应该还有几个零)<br /><br />规则是,1 ^ 1 = 1 ; 0
2010-07-08 14:02:00 526
原创 Clipboard中存储richtextbox选中的RTF
存储: Clipboard.Clear(); try { Clipboard.SetData(DataFormats.Rtf, rtb_send.SelectedRtf); } catch (Exception ex)
2010-01-31 16:49:00 422
原创 DataColumn中的Caption和ColumnName的区别
ColumnName指的是列名称,当此值改变的时候同时会修改caption的值caption指的是显示给用户看的列名称,此值改变的时候不会牵扯其他值的改变
2010-01-18 16:10:00 2569
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人