练习 配置WCF服务
http://blog.csdn.net/suntanyong88/article/details/8203572
图1
1,OrderTrack.Windows.KZT : 控制台应用 程序,用于调试 wcf服务端 接口问题,
2,OrderTrack.Windows.Service : windows服务,可以发布到服务端,
怎么创建 windows 服务 ,可以参考 链接地址 wcf服务注册windows服务
3,FluentAdo.SqlServer 数据源适合wcf服务的那种调用方式,跟常用的调用sqlhelp 有很大区别。
4,WcfWebApplication 展示 客户端调用,
5,其它的 类库 分别 是 接口,实现,实体。
1,展示下 控制台应用程序配置
web.config配置
- <?xml version="1.0" encoding="utf-8" ?>
- <configuration>
- <configSections>
- </configSections>
- <appSettings>
- <add key="Travel" value="Data Source=服务器名;Initial Catalog=xxx;User ID=帐号;Password=密码;Asynchronous Processing=True;MultipleActiveResultSets=True"/>
- <add key="OrderTrackRouter" value="Data Source=服务器名;Initial Catalog=数据库名;User ID=帐号;Password=密码"/>
- </appSettings>
- <connectionStrings>
- </connectionStrings>
- <system.serviceModel>
- <behaviors>
- <serviceBehaviors>
- <behavior name="Wcf.MyBehaviorConfiguration">
- <serviceMetadata httpGetEnabled="false" />
- <serviceDebug includeExceptionDetailInFaults="false" />
- <dataContractSerializer maxItemsInObjectGraph="2147483647" />
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <bindings>
- <!-- wcf协议 -->
- <netTcpBinding>
- <binding name="netTcpBinding_Mybinding"
- closeTimeout="00:10:00"
- openTimeout="00:10:00"
- receiveTimeout="00:10:00"
- sendTimeout="00:10:00"
- transactionFlow="false"
- transferMode="Buffered"
- transactionProtocol="OleTransactions"
- hostNameComparisonMode="StrongWildcard"
- listenBacklog="10"
- maxBufferPoolSize="2147483647 "
- maxBufferSize="2147483647 "
- maxConnections="10"
- maxReceivedMessageSize="2147483647 ">
- <readerQuotas maxDepth="64" maxStringContentLength="2147483647 " maxArrayLength="2147483647 " maxBytesPerRead="4096" maxNameTableCharCount="16384" />
- <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
- <security mode="None"></security>
- </binding>
- </netTcpBinding>
- </bindings>
- <services>
- <!--订单跟踪 -->
- <service name="OrderTrack.DAL.OrderTrackRouter_Service">
- <endpoint address="net.tcp://127.0.0.1:6438/OrderTrack.DAL.OrderTrackRouter_Service"
- contract="OrderTrack.Interface.OrderTrackRouter_IService"
- binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" />
- </service>
- <!-- RTX跟踪 -->
- <service name="OrderTrack.DAL.RTXhistoryDAL">
- <endpoint address="net.tcp://127.0.0.1:5789/OrderTrack.DAL.RTXhistoryDAL"
- contract="OrderTrack.Interface.IRTXhistoryDAL"
- binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" />
- </service>
- </services>
- <client>
- </system.serviceModel>
- </configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<appSettings>
<add key="Travel" value="Data Source=服务器名;Initial Catalog=xxx;User ID=帐号;Password=密码;Asynchronous Processing=True;MultipleActiveResultSets=True"/>
<add key="OrderTrackRouter" value="Data Source=服务器名;Initial Catalog=数据库名;User ID=帐号;Password=密码"/>
</appSettings>
<connectionStrings>
</connectionStrings>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Wcf.MyBehaviorConfiguration">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings> <!-- wcf协议 -->
<netTcpBinding>
<binding name="netTcpBinding_Mybinding"
closeTimeout="00:10:00"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="2147483647 "
maxBufferSize="2147483647 "
maxConnections="10"
maxReceivedMessageSize="2147483647 ">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647 " maxArrayLength="2147483647 " maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None"></security>
</binding>
</netTcpBinding>
</bindings> <services>
<!--订单跟踪 -->
<service name="OrderTrack.DAL.OrderTrackRouter_Service">
<endpoint address="net.tcp://127.0.0.1:6438/OrderTrack.DAL.OrderTrackRouter_Service"
contract="OrderTrack.Interface.OrderTrackRouter_IService" binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" />
</service> <!-- RTX跟踪 -->
<service name="OrderTrack.DAL.RTXhistoryDAL">
<endpoint address="net.tcp://127.0.0.1:5789/OrderTrack.DAL.RTXhistoryDAL"
contract="OrderTrack.Interface.IRTXhistoryDAL"
binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" />
</service>
</services> <client> </system.serviceModel>
</configuration>
注意事项: 1,wcf协议可以共用一个
2,tcp服务端口部署到服务器,端口号不能重复。重复之后,windows服务启动不了,会产生错误日志。出现服务启用不了,
修改 端口号,除了这个原因,还有别的原因也会导致服务启动不了。可以到事件查看器 查看对应错误,如:图2
右键点击错误日志属性查看错误
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ServiceModel;
- using OrderTrack.DAL;
- /*
- 创建人 谈勇 2012-11-7
- */
- namespace OrderTrack.Windows.Service.WCFService
- {
- internal class RtxStartService
- {
- /// <summary>
- /// 创建服务主机对象
- /// </summary>
- internal static ServiceHost serviceHost = null;
- /// <summary>
- /// 启动服务函数
- /// </summary>
- internal static void StartService()
- {
- if (serviceHost != null)
- {
- serviceHost.Close();
- }
- serviceHost = new ServiceHost(typeof(RTXhistoryDAL));
- serviceHost.Open();
- }
- /// <summary>
- /// 停止服务
- /// </summary>
- internal static void StopService()
- {
- if (serviceHost != null)
- {
- serviceHost.Close();
- serviceHost = null;
- }
- }
- }
- }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using OrderTrack.DAL; /*
创建人 谈勇 2012-11-7
*/
namespace OrderTrack.Windows.Service.WCFService
{
internal class RtxStartService
{
/// <summary>
/// 创建服务主机对象
/// </summary>
internal static ServiceHost serviceHost = null; /// <summary>
/// 启动服务函数
/// </summary>
internal static void StartService()
{
if (serviceHost != null)
{
serviceHost.Close();
}
serviceHost = new ServiceHost(typeof(RTXhistoryDAL));
serviceHost.Open();
} /// <summary>
/// 停止服务
/// </summary>
internal static void StopService()
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
}
}
}
}
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.Linq;
- using System.ServiceProcess;
- using System.Text;
- using OrderTrack.Windows.KZT.WCFService;
- namespace OrderTrack.Windows.KZT
- {
- partial class WindowsService : ServiceBase
- {
- /// <summary>
- /// 服务名称
- /// </summary>
- internal const string SERVICE_NAME = "WCFServiceHost";
- protected static void WCFServiceHost_Start()
- {
- //订单跟踪服务启动
- OrderTrackRouter_WCFService.StartService();
- //rtx 服务启动
- RtxStartService.StartService();
- }
- protected static void WCFServiceHost_Stop()
- {
- //调用服务停止函数
- // WhetherStartService.StopService();
- //rtx 服务关闭
- //RtxStartService.StopService();
- }
- public WindowsService()
- {
- //InitializeComponent();
- ServiceName = SERVICE_NAME;
- }
- protected override void OnStart(string[] args)
- {
- // TODO: 在此处添加代码以启动服务。
- WCFServiceHost_Start();
- }
- protected override void OnStop()
- {
- // TODO: 在此处添加代码以执行停止服务所需的关闭操作。
- WCFServiceHost_Stop();
- }
- private static void RunAsConsole()
- {
- ///添加控制台TITLE
- Console.Title = "我的地盘听我的";
- WCFServiceHost_Start();
- Console.ReadKey(); //不做控制台程序可以 修改成 Consolse.Read();
- }
- private static void RunAsService()
- {
- //Run(new WindowsService());
- ServiceBase[] ServicesToRun;
- ServicesToRun = new ServiceBase[]
- {
- new WindowsService()
- };
- ServiceBase.Run(ServicesToRun);
- }
- public static void Main()
- {
- if (Environment.UserInteractive)
- {
- RunAsConsole();
- }
- else
- {
- RunAsService();
- }
- }
- }
- }
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using OrderTrack.Windows.KZT.WCFService; namespace OrderTrack.Windows.KZT
{
partial class WindowsService : ServiceBase
{
/// <summary>
/// 服务名称
/// </summary>
internal const string SERVICE_NAME = "WCFServiceHost"; protected static void WCFServiceHost_Start()
{
//订单跟踪服务启动
OrderTrackRouter_WCFService.StartService();
//rtx 服务启动
RtxStartService.StartService();
} protected static void WCFServiceHost_Stop()
{
//调用服务停止函数
// WhetherStartService.StopService();
//rtx 服务关闭
//RtxStartService.StopService(); } public WindowsService()
{
//InitializeComponent(); ServiceName = SERVICE_NAME;
} protected override void OnStart(string[] args)
{
// TODO: 在此处添加代码以启动服务。
WCFServiceHost_Start();
} protected override void OnStop()
{
// TODO: 在此处添加代码以执行停止服务所需的关闭操作。
WCFServiceHost_Stop();
} private static void RunAsConsole()
{
///添加控制台TITLE
Console.Title = "我的地盘听我的";
WCFServiceHost_Start();
Console.ReadKey(); //不做控制台程序可以 修改成 Consolse.Read();
} private static void RunAsService()
{
//Run(new WindowsService()); ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new WindowsService()
};
ServiceBase.Run(ServicesToRun);
} public static void Main()
{
if (Environment.UserInteractive)
{
RunAsConsole();
}
else
{
RunAsService();
} }
}
}
图3, 服务配置
图4 ,wcf接口的实现
<!-- RTX跟踪 --> <service name="OrderTrack.DAL.RTXhistoryDAL"> <endpoint address="net.tcp://127.0.0.1:5789/OrderTrack.DAL.RTXhistoryDAL" contract="OrderTrack.Interface.IRTXhistoryDAL" binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" /> </service>
注意看图 4 和 协议的配置 是有关联的。
总结一下,wcf配置一定要细心,监听和协议有一点不一样,那个客户端 调用 服务器 接口 是 ping 不通的。
5. 展示客户端调用
要下载个 wcf插件
ACorns.WCF.DynamicClientProxy 文件 可以用一个专门的类型去封装 那个 wcf插件文件包
客户端引用 只要拿 那个 dll文件就行。
总结:编写wcf接口服务 调用 设计的越简单越好,这样别人拿到你的接口 ,引用几个 dll文件。就能实现你接口的方法 完成对应功能。
客户端的web配置
- <?xml version="1.0"?>
- <!--
- 有关如何配置 ASP.NET 应用程序的详细信息,请访问
- http://go.microsoft.com/fwlink/?LinkId=169433
- -->
- <configuration>
- <connectionStrings />
- <system.web>
- <compilation debug="true" targetFramework="4.0" />
- <authentication mode="Forms">
- <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
- </authentication>
- <membership>
- <providers>
- <clear/>
- <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
- enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
- maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
- applicationName="/" />
- </providers>
- </membership>
- <profile>
- <providers>
- <clear/>
- <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
- </providers>
- </profile>
- <roleManager enabled="false">
- <providers>
- <clear/>
- <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
- <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
- </providers>
- </roleManager>
- </system.web>
- <system.webServer>
- <modules runAllManagedModulesForAllRequests="true"/>
- </system.webServer>
- <!-- wcf 配置 begin-->
- <system.serviceModel>
- <bindings>
- <netTcpBinding>
- <binding name="netTcpBinding_Mybinding"
- closeTimeout="00:10:00"
- openTimeout="00:10:00"
- receiveTimeout="00:10:00"
- sendTimeout="00:10:00"
- transactionFlow="false"
- transferMode="Buffered"
- transactionProtocol="OleTransactions"
- hostNameComparisonMode="StrongWildcard"
- listenBacklog="10"
- maxBufferPoolSize="2147483647 "
- maxBufferSize="2147483647 "
- maxConnections="10"
- maxReceivedMessageSize="2147483647 ">
- <readerQuotas maxDepth="64" maxStringContentLength="2147483647 " maxArrayLength="2147483647 " maxBytesPerRead="4096" maxNameTableCharCount="16384" />
- <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
- <security mode="None"></security>
- </binding>
- </netTcpBinding>
- </bindings>
- <client>
- <!-- 订单跟踪 -->
- <endpoint address="net.tcp://127.0.0.1:6438/OrderTrack.DAL.OrderTrackRouter_Service" contract="OrderTrack.Interface.OrderTrackRouter_IService"
- binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" name="orderTrack"/>
- <!-- RTX跟踪 -->
- <endpoint address="net.tcp://127.0.0.1:5789/OrderTrack.DAL.RTXhistoryDAL" contract="OrderTrack.Interface.IRTXhistoryDAL"
- binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" name="rtxTrack"/>
- </client>
- </system.serviceModel>
- <!-- wcf 配置 end-->
- </configuration>
<?xml version="1.0"?> <!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
--> <configuration>
<connectionStrings /> <system.web>
<compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication> <membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership> <profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile> <roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager> </system.web> <system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer> <!-- wcf 配置 begin-->
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcpBinding_Mybinding"
closeTimeout="00:10:00"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard"
listenBacklog="10"
maxBufferPoolSize="2147483647 "
maxBufferSize="2147483647 "
maxConnections="10"
maxReceivedMessageSize="2147483647 ">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647 " maxArrayLength="2147483647 " maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None"></security>
</binding> </netTcpBinding>
</bindings> <client>
<!-- 订单跟踪 -->
<endpoint address="net.tcp://127.0.0.1:6438/OrderTrack.DAL.OrderTrackRouter_Service" contract="OrderTrack.Interface.OrderTrackRouter_IService"
binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" name="orderTrack"/>
<!-- RTX跟踪 -->
<endpoint address="net.tcp://127.0.0.1:5789/OrderTrack.DAL.RTXhistoryDAL" contract="OrderTrack.Interface.IRTXhistoryDAL"
binding="netTcpBinding" bindingConfiguration="netTcpBinding_Mybinding" name="rtxTrack"/>
</client>
</system.serviceModel> <!-- wcf 配置 end-->
</configuration>
客户端后台调用 展示 追加RTX记录方法
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using Uzai.OrderTrack.Interface;
- using ACorns.WCF.DynamicClientProxy;
- using OrderTrack.DataEntities;
- namespace WcfWebApplication
- {
- public partial class RTXTrackTest : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- RTXWcfNetTcp();
- }
- public void RTXWcfNetTcp()
- {
- IRTXhistoryDAL iwt = WCFClientProxy<IRTXhistoryDAL>.GetReusableFaultUnwrappingInstance("rtxTrack");
- RTXhistory model = new RTXhistory();
- model.orderType = TrackOrderEnum.MeteradJustable;
- model.objorderModel.ordercode = "N23151234";
- model.objorderModel.dateofDeparture = DateTime.Now;
- model.objorderModel.Person = 2;
- model.objorderModel.Child = 1;
- model.objorderModel.productId = 4788;
- model.objorderModel.productName = "菲律宾一日游";
- model.objorderModel.prodcutPrice = 4888.88m;
- model.objorderModel.OPAdminID = "581";
- model.objorderModel.OPAdmin = "tanyong";
- model.objorderModel.JDAdminID = "581";
- model.objorderModel.JDAdmin = "tanyong";
- string strResult = iwt.addRtxHostory(model);
- Response.Write(strResult);
- }
- }
- }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Uzai.OrderTrack.Interface;
using ACorns.WCF.DynamicClientProxy;
using OrderTrack.DataEntities; namespace WcfWebApplication
{
public partial class RTXTrackTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
RTXWcfNetTcp();
} public void RTXWcfNetTcp()
{
IRTXhistoryDAL iwt = WCFClientProxy<IRTXhistoryDAL>.GetReusableFaultUnwrappingInstance("rtxTrack"); RTXhistory model = new RTXhistory(); model.orderType = TrackOrderEnum.MeteradJustable; model.objorderModel.ordercode = "N23151234";
model.objorderModel.dateofDeparture = DateTime.Now; model.objorderModel.Person = 2;
model.objorderModel.Child = 1; model.objorderModel.productId = 4788;
model.objorderModel.productName = "菲律宾一日游";
model.objorderModel.prodcutPrice = 4888.88m;
model.objorderModel.OPAdminID = "581";
model.objorderModel.OPAdmin = "tanyong";
model.objorderModel.JDAdminID = "581";
model.objorderModel.JDAdmin = "tanyong"; string strResult = iwt.addRtxHostory(model); Response.Write(strResult); } }
}
//这个是rtxTrack是webConfig 协议的name
练习 配置WCF服务的更多相关文章
- IIS8 添加配置 WCF服务
今天在Windows8.1 操作系统部署了半天的WCF 一直老是在报错.在这里做个记录 防止下次忘记 在网上查了半天.终于知道原来IIS8不支持WCF服务SVC的请求.所以必须要给IIS8添加WCF服 ...
- IIS8.5 的环境下添加配置WCF服务!!!!!
添加步骤: 1.打开iis8.5,先部署wcf服务. 2.首先添加MIME类型 扩展名:“.svc” MIME类型:“application/octet-stream” 3.添加 处理程序映射 请求路 ...
- 在配置WCF服务的时候出现的错误总结
1.由于扩展配置问题而无法提供您请求的页面.如果该页面是脚本,请添加处理程序.如果应下载文件,请添加 MIME 映射. 我是通过安装图中的FramWork3.5.1搞定的. 网上的其他参考: http ...
- WCF系列教程之WCF服务配置工具
本文参考自http://www.cnblogs.com/wangweimutou/p/4367905.html Visual studio 针对服务配置提供了一个可视化的配置界面(Microsoft ...
- WCF服务二:创建一个简单的WCF服务程序
在本例中,我们将实现一个简单的计算服务,提供基本的加.减.乘.除运算,通过客户端和服务端运行在同一台机器上的不同进程实现. 一.新建WCF服务 1.新建一个空白解决方案,解决方案名称为"WC ...
- Wcf for wp8 创建wcf服务 连接wp8模拟器并显示来自wcf服务的接口信息 (一)
下载: vs2012 pro for wp8 iis express http://download.microsoft.com/download/B/2/8/B2801FEE-9A60-4AFA-8 ...
- WCF学习系列一_创建第一个WCF服务
原创作者:灰灰虫的家http://hi.baidu.com/grayworm WCF开发实战系列一:创建第一个WCF服务 在这个实战中我们将使用DataContract,ServiceContract ...
- WCF开发实战系列一:创建第一个WCF服务
WCF开发实战系列一:创建第一个WCF服务 (原创:灰灰虫的家http://hi.baidu.com/grayworm) 在这个实战中我们将使用DataContract,ServiceContract ...
- WCF开发实战系列一:创建第一个WCF服务 转
转 http://www.cnblogs.com/poissonnotes/archive/2010/08/28/1811064.html 在这个实战中我们将使用DataContract,Servic ...
随机推荐
- deepin云打印实现连接Windows打印机
问题的产生:今天给台式机安装deepin系统时,突发奇想能不能给其安装上打印机驱动,让其实现打印功能. 问题的解决方法: 1.在连接打印机的电脑上安装deepin云打印服务端软件,下载地址:https ...
- 一些常用的mysql语句实例-以后照写
create database blog; create table blog_user ( user_Name char(15) not null check(user_Name !=''), us ...
- 大臣的旅费|2013年蓝桥杯A组题解析第十题-fishers
标题:大臣的旅费 很久以前,T王国空前繁荣.为了更好地管理国家,王国修建了大量的快速路,用于连接首都和王国内的各大城市. 为节省经费,T国的大臣们经过思考,制定了一套优秀的修建方案,使得任何一个大城市 ...
- X-Pack for the Elastic Stack [6.2] » Securing the Elastic Stack »Setting Up User Authentication
https://www.elastic.co/guide/en/x-pack/current/setting-up-authentication.html Active Directory User ...
- C#DataTable 使用GroupBy方法的lamda 表达式和Linq语句写法
https://www.cnblogs.com/johnblogs/p/6006867.html DataTable ds = new DataTable(); //1.lamda 表达式写法(推荐) ...
- BZOJ 3673: 可持久化并查集(可持久化并查集+启发式合并)
http://www.lydsy.com/JudgeOnline/problem.php?id=3673 题意: 思路: 可持久化数组可以用可持久化线段树来实现,并查集的查询操作和原来的一般并查集操作 ...
- jQuery 知识点总结
jQuery 是一个“写的更少,但做的更多”的轻量级JavaScript 库.对于网页开发者来说,学会jQuery是必要的.因为它让你了解业界最通用的技术,为将来学习更高级的库打下基础,并且确实可以很 ...
- Linux命令之locate命令
1.locate locate 命令是文件搜索命令,它的搜索速度比 find 命令更快,原因在于它不搜索具体目录, 而是搜索一个数据库,这个数据库包含本地所有文件信息.Linux系统自动创建这个数据库 ...
- axios的学习与使用
最近的项目都是使用的vue框架,所以请求都使用了vue官方推荐的axios. 官方中文介绍 此处记录一下常用的写法 执行 GET 请求 // 为给定 ID 的 user 创建请求 axios.get( ...
- SpringMVC+fastjson项目配置
首先这个项目得是maven项目,不是maven项目的自己引包,我就不多说了. <!-- https://mvnrepository.com/artifact/org.springframewor ...