Gindows 免费的国产操作系统 从名字到使用体验都一如既往的熟悉
作者: zhongdaiqi
-
SignalR中文教程
本教程翻译来源:http://www.asp.net/signalr 亲也可以直接阅读英文版原文。本翻译不一字一字翻,直按本人理解翻译。如觉得很奇怪的地方,可以直接参考原文。
1.SignalR介绍
什么是SignalR?
ASP.NET SignalR是用于帮助ASP.NET开发者简化实时Web交互。实时Web交互意味着服务器端主动推送内容至处于链接状态的客户端,而不用让服务器等客户端请求数据。
SignalR可用于添加各种需要实时交互的场景,最常见的就是聊天室。
SignalR自动管理客户端连接,允许服务端向所有客户端推送信息,如聊天室。也可以向特定的客户端发送信息。客户端与服务商之间的链接是持久化的,不像每次都开启一个新链接的传统HTTP连接方式。
SignalR可以通过服务总线、SQL SERVER数据库或Redis扩容至数千客户端。
SignalR是开源的,可以通过Github获取。
SignalR 与WebSocket
SignalR支持WebSocket,当遇到不支持的环境时,会使用老的传输方式。采用SignalR可以发挥WebSocket的功效,而不用担心老客户不支持WebSocket。
未完待续… …
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr
-
Knockout: radio switch
<html> <head> <script src="../lib/require/require.js" data-main="ko1_radio1_main"></script> </head> <body > <input id="Radio1" name="rdoCunKuanType" data-bind="checked:CunKuanType" value="H" checked type="radio" />活期存款 <input id="Radio2" name="rdoCunKuanType" data-bind="checked:CunKuanType" value="D" type="radio">定期存款 <br />定期几年:<input type="text" />年 <font data-bind="visible:ShowStar" color="red">*</font> </body> </html>
require.config({ paths: { "knockout": "../lib/knockout/knockout-2.3.0", "jquery": "../lib/jquery/jquery-1.9.1.min" } }); require(['jquery', 'knockout'], function ($, ko) { //数据绑定 $(document).ready(function () { var viewModel = { CunKuanType: ko.observable("H") }; viewModel.ShowStar = ko.dependentObservable(function () { if (viewModel.CunKuanType() == "H") { return false; } else { return true; } }, viewModel); ko.applyBindings(viewModel); }); });.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }转自:http://www.cnblogs.com/liuzhendong/p/3520030.html
(真巧)
-
纯PowerShell脚本发布报表到Sharepoint 2013
由于项目需要特意研究了一下肿么使用PowerShell发布报表至Sharepoint 2013,网上能找到一些相关的资料,使用Powershell发布数据源跟共享数据集都是没有问题的,但是在发布报表这个环节上总是有坑,而且数据源、共享数据集的引用更新也不正确。
网上流行的版本主要在MSDN论坛及几个MVP的博客上,总的来说,这块的资料相对比较少,网上出现的几个版本看起来差不多。这些脚本的硬伤是,直接修改了原始报表文件,而且脚本只能保证第一次执行是正确的,第二次执行报表就彻底作废了。就目前看到的Sharepoint 2013版本来看,就是这么傻的MVP.一开始还是很崇拜找到的MVP的博文,因为文章排版相当专业,不明觉厉。
经过几天的折腾,对Powershell脚本发布报表到Sharepoint 2013的总结如下:
1.数据源需要使用ReportService2006.asmx来完成 可参考:
使用Powershell脚本发布报表至Sharepoint
2.发布共享数据集 报表 无需使用ReportService2006.asmx,这是个人查阅这几天的资料的最大感受。由于报表版本的不同,可能需要在06,10中做选择。虽然有参考指示我们可以使用ReportService2010.asmx来完成操作。但是调用起来错误总是莫名奇妙的,报的中文错误网上找不到前人的文章。换个法子即可完成共享数据集、报表的发布,不用关心asmx的版本啦。用记事本打开rds、rdl,可以看到数据源引用节点、共享数据集引用节点:
数据源节点:
<DataSourceReference>feowofoew</DataSourceReference>
共享数据集节点:
<SharedDataSetReference>ewefwfewfew</SharedDataSetReference>
我们要做的就是,把这两个节点更新一下,这就是简单的字符串替换工作啦。是不是问题由云端飘到地下了。
3.报表文件需要确保是utf-编码,这个在set-content追加上相应的参数即可。
4.直接操作原报表文件的做法真的是神坑,不注意查看这个细节的话,发布N次都是错误,浪费时间。正确的做法是,脚本执行时创建一个临时文件夹,把待操作的报表Copy进来,操作完之后,del掉。这样子原始报表不会受到破坏,脚本可以执行N次。
为了让后来的亲节省宝贵的上班时间干有意思的事情,正在将脚本完善放到Github上.欢迎亲,拍砖,一起完善。
https://github.com/Lancker/DeploySharepointReportPowershellScript
偶的MOSS QQ群:347766618
参考资料:
http://sharepoint.stackexchange.com/questions/47652/programmatically-set-data-source-link-for-ssrs-report-files
You could consider using the SOAP APIs to set the data sources on your reports. The SetItemDataSources API can be used to do this:
http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.setitemdatasources.aspx
Here is an example of this being done in a PowerShell script. In your case, the URL to point to would be something like http://<SPSite>/_vti_bin/ReportServer/ReportService2010.asmx:
http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powersh
From <http://social.technet.microsoft.com/Forums/en-US/f15d7c5b-56c1-486a-981f-361c97bd4926/connecting-ssrs-reports-to-shared-datasources-in-sharepoint-2010?forum=sqlreportingservices>
http://social.msdn.microsoft.com/Forums/zh-TW/43f60401-6588-4823-8004-733b8ebb93a8/how-to-accessing-reportingservice2006-asmx-web-services-using-forms-based-authentication-in?forum=sharepointdevelopmentprevious
C#版
Powershell脚本
http://social.msdn.microsoft.com/Forums/zh-TW/b8535214-0f80-4ff6-81c2-dad5bb656b64/ssrs-sharepoint-foundation-2010-integration-deployment-query?forum=sqlreportingservices
poit中Powershell部署报表中的神坑
-
Deploy report in sharepoint 2013
Manually :
After u uploaded rdl,rsd,u should do some ext updating operation .
1. U should update dataset’ datasource to new Sharepoint format like: http:// -[spsite]/[datasource name]. Just choose the datasource u created.
2. u should update rdl’dataset ref to new Sharepoint format like : http:// [spsite]/[datesetname].Just choose the dataset u uploaded.