飞信SDK内容【转载】

使用飞信SDK开发短信收发程序
2008-10-13 13:57
利用飞信的协议可以在线收发消息,或是向手机发送消息。由此,可以自己来完成一个IM工具。
本文即是对飞信SDK的使用方法,及如何开发作一个说明。

一、引用FetionSDK
飞信是采用C#开发的,所有的程序集均是.NET,因此我们也需要使用Delphi.NET/Chrome来进行相关的开发。在Chrome中,新建一个工程,并引入FetionSDK.dll,当然您也可以使用Delphi2007 for .NET,开发出来结果一样。
其实我曾尝试过把FetionSDK.dll变成一个COM+程序,但是不巧的是这个dll没有strong name,无法转换。
引用完SDK后,在主窗体的uses下添加NullStudio.Fetion_SDK。

二、准备工作
准备工作很简单,在public区分符下,建立一个名为sdk的FetionSDK对象。然后为它创建一个实例。

三、用户登录
使用以下代码来填入用户名和密码:
sdk.AccountManager.FillUserIdAndPassword(UserID,Password,true);
三个参数分别是用户手机号,密码,是否自动登录,当选定了自动登录为True时,可以使用
       sdk.AccountManager.LoginOrLogout();
来自动的判断是登录或是注销,否则的话,就要使用
sdk.AccountManager.Login(); 来登录。

四、状态改变
用户登录或注销,或是改变自己当前的状态时,会触发状态改变的事件。如下:
procedure sdk_SDK_UserSatusChange(sender: Object; e:UserSatusChangedEventArgs);
其中参数e中来自命名空间Imps.Client.Core。
然后我们绑定这个事件:
sdk.SDK_UserSatusChange += new FetionSDK.SDK_UserSatusChangedEventHandler(sdk_SDK_UserSatusChange);
这样SDK就能接收到状态改变的事件了。另外,还能针对各个状态,执行不同的指令,如下:
case e.NewStatus of
Imps.Client.UserAccountStatus.Disconnected: ;
Imps.Client.UserAccountStatus.Initialized: ;
Imps.Client.UserAccountStatus.Loginning: ;
Imps.Client.UserAccountStatus.Logon:
Imps.Client.UserAccountStatus.Logoff: ;
Imps.Client.UserAccountStatus.Logouting: ;
Imps.Client.UserAccountStatus.None: ;
Imps.Client.UserAccountStatus.OfflineLogon: ;
Imps.Client.UserAccountStatus.StandBy: ;
Imps.Client.UserAccountStatus.WaitReconnect: ;
else
end;

五、获取好友列表
var
lst : List<Contact>;
i: Integer;
begin
lstFriendLst.Items.Clear();
lst := sdk.ContactControl.getAllContactList();
for i := 0 to lst.Count - 1 do
begin
lstFriendLst.Items.Add(
string.Format("{0} [Fetion: {1} Mobile: {2}]",
lst[i].DisplayName, lst[i].Uri.Id,
IfThen(lst[i].PersonalInfo.MobileNo = string.Empty, "Not Published", lst[i].PersonalInfo.MobileNo)));
end;

六、发送消息
调用SDK的发送消息指令,传入的参数分别是对方手机号码和短信的内容。
sdk.ContactControl.SendIM.SendIM(edtPhoneNo.Text, edtSendMsg.Text);

七、接收消息
接收到消息时,会解发SDK的收到消息事件,如下:
procedure sdk_SDK_ReceiveMessage(sender: Object; e:SDK_ReceiveMessageEventArgs);
实现此方法后,绑定这个事件。
sdk.SDK_ReceiveMessage += new FetionSDK.SDK_ReceiveMessageEventHandler(sdk_SDK_ReceiveMessage);

八、发送手机短信
与发送消息一样,只不过使用的是另一个方法。
sdk.ContactControl.SendSMS.SendSMS(sdk.ContactControl.getMyself.Uri.Id,edtSendMsg.Text);
在这里需要注意SendIM与SendSMS的区别。
getMyself是SDK中的一个方法,用来获取当前用户的信息。

九、出错事件
当SDK因为某种原因出错后,会触发出错事件,如下:
procedure sdk_SDK_Error(sender: Object; e: SDK_ErrorEventArgs);
实现后绑定:
sdk.SDK_Error += new FetionSDK.SDK_ErrorEventHandler(sdk_SDK_Error);

十、编译,执行程序
现在可以编译并执行程序了。

十一、程序源码

namespace FetionDemo;

interface

uses
System.Windows.Forms,
System.Drawing,
Imps.Client.Core,
NullStudio.Fetion_SDK,
NullStudio.Fetion_SDK.Event,
System.Collections.Generic;

type
/// <summary>
/// Summary description for MainForm.
/// </summary>
MainForm = class(System.Windows.Forms.Form)
{$REGION Windows Form Designer generated fields}
private
    btnSendSelf: System.Windows.Forms.Button;
    edtPhoneNo: System.Windows.Forms.TextBox;
    btnSend: System.Windows.Forms.Button;
    edtSendMsg: System.Windows.Forms.TextBox;
    sbMain: System.Windows.Forms.StatusStrip;
    lblPassword: System.Windows.Forms.Label;
    lblAccount: System.Windows.Forms.Label;
    edtMsg: System.Windows.Forms.TextBox;
    lblPhoneNo: System.Windows.Forms.Label;
    gbMsg: System.Windows.Forms.GroupBox;
    lstFriendLst: System.Windows.Forms.ListBox;
    gbFriendLst: System.Windows.Forms.GroupBox;
    edtPassword: System.Windows.Forms.TextBox;
    edtUserID: System.Windows.Forms.TextBox;
    lblError: System.Windows.Forms.ToolStripStatusLabel;
    btnLogoff: System.Windows.Forms.Button;
    btnLogin: System.Windows.Forms.Button;
    lblStatus: System.Windows.Forms.ToolStripStatusLabel;
    gbLogin: System.Windows.Forms.GroupBox;
    components: System.ComponentModel.Container := nil;
    method InitializeComponent;
{$ENDREGION}
private
      method btnSendSelf_Click(sender: System.Object; e: System.EventArgs);
      method btnSend_Click(sender: System.Object; e: System.EventArgs);
      method btnLogoff_Click(sender: System.Object; e: System.EventArgs);
      method btnLogin_Click(sender: System.Object; e: System.EventArgs);
      method MainForm_Load(sender: System.Object; e: System.EventArgs);
protected
    method Dispose(aDisposing: boolean); override;
    function IfThen(ABool: Boolean; AStr1, AStr2: String): String;
public
    sdk : FetionSDK;
    bLogon: Boolean;
    procedure sdk_SDK_UserSatusChange(sender: Object; e:UserSatusChangedEventArgs);
    procedure sdk_SDK_Error(sender: Object; e: SDK_ErrorEventArgs);
    procedure sdk_SDK_ReceiveMessage(sender: Object; e:SDK_ReceiveMessageEventArgs);
    constructor;
end;

implementation

{$REGION Construction and Disposition}
constructor MainForm;
begin
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
end;

method MainForm.Dispose(aDisposing: boolean);
begin
if aDisposing then begin
    if assigned(components) then
      components.Dispose();

    //
    // TODO: Add custom disposition code here
    //
end;
inherited Dispose(aDisposing);
end;
{$ENDREGION}

{$REGION Windows Form Designer generated code}
method MainForm.InitializeComponent;
begin
var resources: System.ComponentModel.ComponentResourceManager := new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
self.sbMain := new System.Windows.Forms.StatusStrip();
self.lblStatus := new System.Windows.Forms.ToolStripStatusLabel();
self.lblError := new System.Windows.Forms.ToolStripStatusLabel();
self.gbMsg := new System.Windows.Forms.GroupBox();
self.lblPhoneNo := new System.Windows.Forms.Label();
self.edtSendMsg := new System.Windows.Forms.TextBox();
self.btnSend := new System.Windows.Forms.Button();
self.edtPhoneNo := new System.Windows.Forms.TextBox();
self.edtMsg := new System.Windows.Forms.TextBox();
self.btnLogin := new System.Windows.Forms.Button();
self.edtUserID := new System.Windows.Forms.TextBox();
self.edtPassword := new System.Windows.Forms.TextBox();
self.lblAccount := new System.Windows.Forms.Label();
self.lblPassword := new System.Windows.Forms.Label();
self.gbLogin := new System.Windows.Forms.GroupBox();
self.btnLogoff := new System.Windows.Forms.Button();
self.gbFriendLst := new System.Windows.Forms.GroupBox();
self.lstFriendLst := new System.Windows.Forms.ListBox();
self.btnSendSelf := new System.Windows.Forms.Button();
self.sbMain.SuspendLayout();
self.gbMsg.SuspendLayout();
self.gbLogin.SuspendLayout();
self.gbFriendLst.SuspendLayout();
self.SuspendLayout();
//
// sbMain
//
self.sbMain.Items.AddRange(array of System.Windows.Forms.ToolStripItem([self.lblStatus,
      self.lblError]));
self.sbMain.Location := new System.Drawing.Point(0, 466);
self.sbMain.Name := 'sbMain';
self.sbMain.Size := new System.Drawing.Size(358, 22);
self.sbMain.TabIndex := 9;
self.sbMain.Text := 'statusStrip1';
//
// lblStatus
//
self.lblStatus.Name := 'lblStatus';
self.lblStatus.Size := new System.Drawing.Size(41, 17);
self.lblStatus.Text := 'Logoff';
//
// lblError
//
self.lblError.Name := 'lblError';
self.lblError.Size := new System.Drawing.Size(53, 17);
self.lblError.Text := 'No Error';
//
// gbMsg
//
self.gbMsg.Controls.Add(self.lblPhoneNo);
self.gbMsg.Controls.Add(self.edtSendMsg);
self.gbMsg.Controls.Add(self.btnSend);
self.gbMsg.Controls.Add(self.edtPhoneNo);
self.gbMsg.Controls.Add(self.edtMsg);
self.gbMsg.Location := new System.Drawing.Point(12, 198);
self.gbMsg.Name := 'gbMsg';
self.gbMsg.Size := new System.Drawing.Size(337, 231);
self.gbMsg.TabIndex := 8;
self.gbMsg.TabStop := false;
self.gbMsg.Text := 'Message';
//
// lblPhoneNo
//
self.lblPhoneNo.AutoSize := true;
self.lblPhoneNo.Location := new System.Drawing.Point(11, 174);
self.lblPhoneNo.Name := 'lblPhoneNo';
self.lblPhoneNo.Size := new System.Drawing.Size(53, 12);
self.lblPhoneNo.TabIndex := 6;
self.lblPhoneNo.Text := 'Phone No';
//
// edtSendMsg
//
self.edtSendMsg.Location := new System.Drawing.Point(7, 198);
self.edtSendMsg.Name := 'edtSendMsg';
self.edtSendMsg.Size := new System.Drawing.Size(249, 21);
self.edtSendMsg.TabIndex := 5;
//
// btnSend
//
self.btnSend.Location := new System.Drawing.Point(262, 196);
self.btnSend.Name := 'btnSend';
self.btnSend.Size := new System.Drawing.Size(69, 23);
self.btnSend.TabIndex := 4;
self.btnSend.Text := 'Send';
self.btnSend.UseVisualStyleBackColor := true;
self.btnSend.Click += new System.EventHandler(@self.btnSend_Click);
//
// edtPhoneNo
//
self.edtPhoneNo.Location := new System.Drawing.Point(68, 171);
self.edtPhoneNo.Name := 'edtPhoneNo';
self.edtPhoneNo.Size := new System.Drawing.Size(145, 21);
self.edtPhoneNo.TabIndex := 3;
//
// edtMsg
//
self.edtMsg.Location := new System.Drawing.Point(5, 20);
self.edtMsg.Multiline := true;
self.edtMsg.Name := 'edtMsg';
self.edtMsg.ReadOnly := true;
self.edtMsg.ScrollBars := System.Windows.Forms.ScrollBars.Vertical;
self.edtMsg.Size := new System.Drawing.Size(326, 145);
self.edtMsg.TabIndex := 1;
//
// btnLogin
//
self.btnLogin.Location := new System.Drawing.Point(274, 12);
self.btnLogin.Name := 'btnLogin';
self.btnLogin.Size := new System.Drawing.Size(75, 23);
self.btnLogin.TabIndex := 6;
self.btnLogin.Text := 'Login';
self.btnLogin.UseVisualStyleBackColor := true;
self.btnLogin.Click += new System.EventHandler(@self.btnLogin_Click);
//
// edtUserID
//
self.edtUserID.Location := new System.Drawing.Point(69, 17);
self.edtUserID.Name := 'edtUserID';
self.edtUserID.Size := new System.Drawing.Size(180, 21);
self.edtUserID.TabIndex := 3;
//
// edtPassword
//
self.edtPassword.Location := new System.Drawing.Point(69, 44);
self.edtPassword.Name := 'edtPassword';
self.edtPassword.PasswordChar := '*';
self.edtPassword.Size := new System.Drawing.Size(180, 21);
self.edtPassword.TabIndex := 4;
//
// lblAccount
//
self.lblAccount.AutoSize := true;
self.lblAccount.Location := new System.Drawing.Point(6, 20);
self.lblAccount.Name := 'lblAccount';
self.lblAccount.Size := new System.Drawing.Size(47, 12);
self.lblAccount.TabIndex := 1;
self.lblAccount.Text := 'Accoumt';
//
// lblPassword
//
self.lblPassword.AutoSize := true;
self.lblPassword.Location := new System.Drawing.Point(6, 47);
self.lblPassword.Name := 'lblPassword';
self.lblPassword.Size := new System.Drawing.Size(53, 12);
self.lblPassword.TabIndex := 2;
self.lblPassword.Text := 'Password';
//
// gbLogin
//
self.gbLogin.Controls.Add(self.edtPassword);
self.gbLogin.Controls.Add(self.edtUserID);
self.gbLogin.Controls.Add(self.lblAccount);
self.gbLogin.Controls.Add(self.lblPassword);
self.gbLogin.Location := new System.Drawing.Point(11, 6);
self.gbLogin.Name := 'gbLogin';
self.gbLogin.Size := new System.Drawing.Size(255, 80);
self.gbLogin.TabIndex := 7;
self.gbLogin.TabStop := false;
self.gbLogin.Text := 'Login';
//
// btnLogoff
//
self.btnLogoff.Location := new System.Drawing.Point(274, 41);
self.btnLogoff.Name := 'btnLogoff';
self.btnLogoff.Size := new System.Drawing.Size(75, 23);
self.btnLogoff.TabIndex := 10;
self.btnLogoff.Text := 'Logoff';
self.btnLogoff.UseVisualStyleBackColor := true;
self.btnLogoff.Click += new System.EventHandler(@self.btnLogoff_Click);
//
// gbFriendLst
//
self.gbFriendLst.Controls.Add(self.lstFriendLst);
self.gbFriendLst.Location := new System.Drawing.Point(11, 92);
self.gbFriendLst.Name := 'gbFriendLst';
self.gbFriendLst.Size := new System.Drawing.Size(338, 100);
self.gbFriendLst.TabIndex := 11;
self.gbFriendLst.TabStop := false;
self.gbFriendLst.Text := 'Friend List';
//
// lstFriendLst
//
self.lstFriendLst.FormattingEnabled := true;
self.lstFriendLst.ItemHeight := 12;
self.lstFriendLst.Location := new System.Drawing.Point(8, 18);
self.lstFriendLst.Name := 'lstFriendLst';
self.lstFriendLst.Size := new System.Drawing.Size(324, 76);
self.lstFriendLst.TabIndex := 0;
//
// btnSendSelf
//
self.btnSendSelf.Location := new System.Drawing.Point(243, 435);
self.btnSendSelf.Name := 'btnSendSelf';
self.btnSendSelf.Size := new System.Drawing.Size(106, 23);
self.btnSendSelf.TabIndex := 12;
self.btnSendSelf.Text := 'Send To Self';
self.btnSendSelf.UseVisualStyleBackColor := true;
self.btnSendSelf.Click += new System.EventHandler(@self.btnSendSelf_Click);
//
// MainForm
//
self.ClientSize := new System.Drawing.Size(358, 488);
self.Controls.Add(self.btnSendSelf);
self.Controls.Add(self.gbFriendLst);
self.Controls.Add(self.btnLogoff);
self.Controls.Add(self.sbMain);
self.Controls.Add(self.gbMsg);
self.Controls.Add(self.btnLogin);
self.Controls.Add(self.gbLogin);
self.Icon := (resources.GetObject('$this.Icon') as System.Drawing.Icon);
self.Name := 'MainForm';
self.Text := 'Fetion';
self.Load += new System.EventHandler(@self.MainForm_Load);
self.sbMain.ResumeLayout(false);
self.sbMain.PerformLayout();
self.gbMsg.ResumeLayout(false);
self.gbMsg.PerformLayout();
self.gbLogin.ResumeLayout(false);
self.gbLogin.PerformLayout();
self.gbFriendLst.ResumeLayout(false);
self.ResumeLayout(false);
self.PerformLayout();
end;
{$ENDREGION}

method MainForm.MainForm_Load(sender: System.Object; e: System.EventArgs);
begin
sdk := new FetionSDK;
bLogon := false;
sdk.SDK_UserSatusChange += new FetionSDK.SDK_UserSatusChangedEventHandler(sdk_SDK_UserSatusChange);
sdk.SDK_ReceiveMessage += new FetionSDK.SDK_ReceiveMessageEventHandler(sdk_SDK_ReceiveMessage);
sdk.SDK_Error += new FetionSDK.SDK_ErrorEventHandler(sdk_SDK_Error);
end;


procedure MainForm.sdk_SDK_UserSatusChange(sender: Object; e:UserSatusChangedEventArgs);
var
    currStat: string;
    i: Integer;
    lst : List<Contact>;
begin
    currStat := e.NewStatus.ToString();
    lblStatus.Text := currStat;
   

    case e.NewStatus of
        Imps.Client.UserAccountStatus.Logon:
        begin
            bLogon := true;
            lstFriendLst.Items.Clear();
            lst := sdk.ContactControl.getAllContactList();
            for i := 0 to lst.Count - 1 do
            begin
                lstFriendLst.Items.Add(
                    string.Format("{0} [Fetion: {1} Mobile: {2}]",
                    lst[i].DisplayName, lst[i].Uri.Id,
                    IfThen(lst[i].PersonalInfo.MobileNo = string.Empty, "Not Published", lst[i].PersonalInfo.MobileNo)));
            end;
        end;
    else
        begin
            bLogon := false;
            lstFriendLst.Items.Clear();
        end;
    {
        Imps.Client.UserAccountStatus.Disconnected: ;
        Imps.Client.UserAccountStatus.Initialized: ;
        Imps.Client.UserAccountStatus.Loginning: ;
       
        Imps.Client.UserAccountStatus.Logoff: ;
        Imps.Client.UserAccountStatus.Logouting: ;
        Imps.Client.UserAccountStatus.None: ;
        Imps.Client.UserAccountStatus.OfflineLogon: ;
        Imps.Client.UserAccountStatus.StandBy: ;
        Imps.Client.UserAccountStatus.WaitReconnect: ;
    }
    end;
   
end;

method MainForm.btnLogin_Click(sender: System.Object; e: System.EventArgs);
begin
    if not bLogon then
    begin
        sdk.AccountManager.FillUserIdAndPassword(edtUserID.Text,edtPassword.Text,false);
        sdk.AccountManager.LoginOrLogout();
    end;
end;

procedure MainForm.sdk_SDK_Error(sender: Object; e: SDK_ErrorEventArgs);
begin
    lblError.Text := e.Message.Message;
end;

method MainForm.btnLogoff_Click(sender: System.Object; e: System.EventArgs);
begin
    if bLogon then
       sdk.AccountManager.LoginOrLogout();
end;

function MainForm.IfThen(ABool: Boolean; AStr1, AStr2: String): String;
begin
    if ABool then
        result := AStr1
    else
        result := AStr2;
end;

method MainForm.btnSend_Click(sender: System.Object; e: System.EventArgs);
begin
    sdk.ContactControl.SendIM.SendIM(edtPhoneNo.Text, edtSendMsg.Text);
    edtMsg.Text := edtMsg.Text + 'Self: ' + edtSendMsg.Text + '\r\n';   
end;

procedure MainForm.sdk_SDK_ReceiveMessage(sender: Object; e:SDK_ReceiveMessageEventArgs);
begin
    edtMsg.Text := edtMsg.Text + e.Contact.DisplayName + ': '+e.Message;
end;

method MainForm.btnSendSelf_Click(sender: System.Object; e: System.EventArgs);
begin
    sdk.ContactControl.SendSMS.SendSMS(sdk.ContactControl.getMyself.Uri.Id,edtSendMsg.Text);
end;

end.

转载于:https://www.cnblogs.com/ddlzq/archive/2009/10/24/1589271.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/381204.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

linux中将光标与操作系统,linux操作系统基本命令介绍(2)

whoami 查看当前用户su - 用户名 切换用户的同时再切换用户空间创建工作组(注意&#xff1a;需要切换到root用户)groupadd 组名删除工作组groupdel 组名修改用户所在组usermod -g 用户名 组名添加用户账号useradd 用户名-d 指定用户登录系统时的主目录&#xff0c;如果不使用该…

vm磁盘映射 不能启动_Oracle的启动与关闭-数据库(4)

Oracle数据的库的启动与关闭&#xff0c;为了节约资源消耗&#xff0c;把我们用到的服务开启&#xff0c;这样对于项目开发也有好处。1 Oracle 启动Oracle 是通过系统的服务来启动的。图1. 找到计算机管理图2. 找到服务&#xff0c;点击图3. Oracle相关启动项图4. 如何关闭和启…

ASP.NET Session详解

原文 http://www.zxbc.cn/html/20090711/72153.html 当用户在 Web 应用程序中导航 ASP.NET 页时&#xff0c;ASP.NET 会话状态使您能够存储和检索用户的值。HTTP 是一种无状态协议。这意味着 Web 服务器会将针对页面的每个 HTTP 请求作为独立的请求进行处理。服务器不会保留以前…

python datetime.date 和数据库date_Python成为专业人士笔记-date 对象、time 对象及datetime用法深度剖析...

“专业人士笔记”系列目录&#xff1a;创帆云&#xff1a;Python成为专业人士笔记--强烈建议收藏&#xff01;每日持续更新&#xff01;​zhuanlan.zhihu.com将字符串解析为对应时区的datetime对象Python 3.2在将字符串解析为datetime对象时支持%z格式&#xff1a;import datet…

linux充当防火墙,Linux下主机充当防火墙的巧妙应用之iptables!.doc

Linux下主机充当防火墙的巧妙应用之iptables!Linux下主机充当防火墙的巧妙应用之iptables!实验综合拓扑图:注意事项&#xff1a;防火墙由Red Hat Linux 5.4 版本的机器充当&#xff0c;eth0 使用Host-only (vmware 1)&#xff0c;eth1 使用Bridge(本地连接),eth2(vmware 2)前期…

学习总结——实现生成excel表格(方法二)

本方法主要是利用了反射&#xff0c;具体代码如下&#xff1a;Codepublic static int ExportTohtmlExcel__dksq_view(string strsql) { //贷款申请信息获得 BLLibrary.BView_jbxx_dksq viewdal new BView_jbxx_dksq(); IList<View…

linux svn cleanup 用法,SVN命令之清理命令(clean up)的功能及使用技巧

SVN的清理命令&#xff0c;我们经常会使用。这个命令的原理&#xff0c;我们还是有必要深究一下的。当SVN改变你的工作拷贝(或是.svn中的任何信息)&#xff0c;它会尽可能的小心。在进行任何修改操作时&#xff0c;SVN都会把日志记录到日志文件中&#xff0c;然后执行log文件中…

python string转int_我用Python搞资源 [ 02 ]

这不是教程&#xff0c;所以没有基础的你看不懂也很正常&#xff0c;去后面点个赞就好。一. 目标链接上一个推送处理了一个不带密码的蓝奏云分享链接&#xff0c;这回处理一下带密码的分享链接。https://lanzoux.com/b015ybdmh 密码:9n8z为了能有一个合适的链接来练手&…

c语言数字字体的格式,c语言—— 格式控制符—— 数据类型——相对应的字节数...

这是转义scanf("%lf", &r);枚举类型&#xff1a;https://www.cnblogs.com/bhlsheji/p/5204541.htmlANSI C标准基本类型的字长与范围基本类型 字长 范围char(字符型) 1字节 -128~127int(整型) 2字节 -32768~32767float(单精度浮点型) 4字节 约精确到6位数double(双…

电子设计大赛作品_第十四届电子设计大赛圆满结束!

为了激发学生的创造性&#xff0c;加强学生动手能力的培养和工程实践的训练&#xff0c;提高学生针对实际问题进行电子设计制作的综合能力&#xff0c;我院于2020年11月6号下午12点50分举行“安阳工学院第十四届电子设计大赛决赛”。1本次比赛由12组热爱电子设计的同学组成。由…

向左滚动,每次滚动的长度可以设置,然后暂停后继续滚动

支持FF等所有浏览器 向左滚动&#xff0c;每次滚动的长度可以设置&#xff0c;然后暂停后继续滚动 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML>&l…

c语言编写的每个函数都可以进行独立的编译,2017年辽宁师范大学计算机与信息技术学院836C语言程序设计考研冲刺密押题...

一、选择题1&#xff0e; 以下叙述中错误的是( )。A.C 语言编写的函数源程序&#xff0c;其文件名后缀可以是.C B.C 语言编写的函数都可以作为一个独立的源程序文件 C.C 语言编写的每个函数都可以进行独立的编译并执行 D. —个C 语言程序只能有一个主函数 【答案】C【解析】C 源…

python selenium post请求_工作随笔——selenium支持post请求,支持自定义header

2018-01-10&#xff1a;fix post 请求数据遗漏部分内容背景&#xff1a;最近在写一个小程序&#xff0c;发现博主所在的地区访问该网站时有防ddos功能验证导致程序不能正常工作。经过试验发现可以用国外代理ip解决这个问题&#xff0c;但是程序走代理访问延迟高且不稳定。思路&…

10-30 团队的自动化

这两天周小蓉这个QTP高手&#xff0c;也开始琢磨自动化了&#xff0c;写出了一个脚本&#xff0c;可以对照界面的值与数据库值得一致性&#xff0c;非常棒&#xff01; 我想&#xff0c;这就跟学习一样&#xff0c;有了环境人更想去学习&#xff0c;所以我们组现在的好气氛&…

thinkserver rd650管理口地址_路由器WAN口和LAN口有什么区别【区别介绍】

现在一般家庭上网采用ADSL电话线上网的较多&#xff0c;而且家里一般都有好几台电脑&#xff0c;那么如何使几台电脑同时上网呢?这就要用到宽带路由器了&#xff0c;一般情况下宽带路由器上面有好几个网线插口&#xff0c;这些网线插口上有的标有WAN&#xff0c;有的网口标有L…

c语言mcisendstring函数,mciSendString用法

使用MCI API&#xff0c;源文件中需要包含头文件 Mmsystem.h&#xff0c;在Project->Settings->Link->Object/libray module中加入库 Winmm.lib。 VS2008在源文件加上#include "mmsystem.h" #pragma comment(lib,"winmm.lib")&#xff11;、MCI简…

整合

如何进行资源的整合,,,,, 如何进行网络资源的整合,,,, 如何将很多的积分进行整合,,,,,貌似第三季赢在中国的那个老外做了一个整合很多网站积分的项目,,,,,, 健康信息如何实现整合,,,,,貌似这也是第三季赢在中国里面一个人的项目,,,,, 好好反思下,如何整合,,,,,,,,将自己的学习资…

Tech·Ed 2009

今年是我第一次以讲师身份参加TechEd&#xff0c;碰巧TechEd所在的周末我们要搬家到百度大厦&#xff0c;所以我星期四早上搞掂打包工作后就赶到了会场。凭着《讲师指南》进入会场后&#xff0c;我直奔讲师休息室领取证件和衣服&#xff0c;然后再跑到MVP站台领取印章&#xff…

c语言1e3和1e3,自考“高级语言程序设计”习题答案详解(33)

6.1 单项选择题1.函数调用语句“f((el&#xff0c;e2)&#xff0c;(e3&#xff0c;e4&#xff0c;e5))&#xff1b;”中参数的个数是( )①1 ②2③4 ④5「解」上述函数调用中&#xff0c;(e1&#xff0c;e2)和(e3&#xff0c;e4&#xff0c;e5)是两个带括号的表达式&#xff0c;…

python实现实时监控_基于 Python 的交换机实时监控系统的设计与实现

从高校校园网运维工作实际出发&#xff0c;论文提出了一种基于 Python 语言SNMP协议的网络交换机监测系统设计思路与实现方法。整个系统系统采用B/S模式&#xff0c;基于轻量级的web开发框架web.py实现。后端采用Python编程语言实现对交换机各项数据的获取&#xff0c;实时数据…