ShareSDK for Unity

news2024/12/24 21:35:12

本文档使用Unity2019进行演示

下载unitypackage

从Mob的github地址下载ShareSDK.unitypackage:Git地址,如下图所示

)![image.png]//download.sdk.mob.com/2022/06/22/15/165588252810937.61.png)

下载完成后得到一个.unitypackage结尾的文件,如下图:

 

导入unitypackage

双击导入到unity项目中并勾选,如下图:

 

Demo.cs是demo的示例页面,可通用
Android (只需要勾选SSDKU3D.jar)
demokey.keystore:demo的打包签名文件
SSDKU3D.jar:java桥接层文件
iOS (全部勾选)
MOBTool:自动打包工具
ShareSDK:SDK必要的文件

 

按图选好之后,点击import导入

挂载ShareSDK.cs脚本文件

在unity界面左侧选择要使用的场景(例如Main Camera),点击Add Component 按钮添加ShareSDK.cs(ShareSDK核心文件),或者直接拖进去。如果要测试效果,也可以添加Demo.cs(ShareSDK示例UI),如下图所示:

 

挂接后会发现提供了当前支持的平台和及其配置信息,需要注意的是当前的编译环境是Android还是iOS,其字段名称是不同的哦!

修改编译环境

Platform设置,在unity中选择菜单栏-File-Build Settings,会打开Build Settings操作框,根据自己所编译的环境选择,如果是iOS的请选择iOS环境,如果是Android请选择Android环境,然后点击Switch Platform切换环境,如下图:

 

Android端集成编译配置

资源修改

1.把demokey.keystoreSSDKU3D.jar文件移动到上层目录下,也就从ShareSDK文件夹移动到Android文件夹;

2.删掉ShareSDK文件夹;

3.删掉Android目录下的baseProjectTemplate.gradlelauncherTemplate.gradle等文件;

 

最终Android目录下文件内容为下图:

 

修改Unity设置

生成Gradle文件

保持Build Settings操作框中左侧Platform列表Android项的选中状态,点击Player Settings,会打开Project Settings操作框,如下图:

左侧切换到Player标签,然后在右侧选择Publishing Settings卡片,勾选Custom Launcher Gradle TemplateCustom Base Gradle Template选项,如下图:

 

该操作会在"工程\Assets\Plugins\Android目录下"生成baseProjectTemplate.gradle、launcherTemplate.gradle文件。

修改gradle文件

修改baseProjectTemplate.gradle文件

打开baseProjectTemplate.gradle文件后有两处需要操作:

1.在classpath 'com.android.tools.build:gradle'后添加mob的classpath

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-java"><span style="color:#cc7832">classpath</span> "<span style="color:#cc7832">com</span><span style="color:#e8bf6a">.mob</span><span style="color:#e8bf6a">.sdk</span>:MobSDK:2018.0319.1724"</code></span></span>

2.添加mob自己的maven仓库

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-java"><span style="color:#ffc66d">maven</span> {    <span style="color:#6a8759">url</span> <span style="color:#6a8759">"https://mvn.mob.com/android/"</span>}</code></span></span>

最终baseProjectTemplate.gradle文件的参考结果为:

 

修改launcherTemplate.gradle文件

打开launcherTemplate.gradle,在文件的最下方加入以下代码:

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code><span style="color:#6a8759">apply</span> plugin: <span style="color:#6a8759">'com.mob.sdk'</span>

MobSDK {
    <span style="color:#6a8759">appKey</span> <span style="color:#6a8759">"moba0b0c0d0"</span>
    appSecret <span style="color:#6a8759">"5713f0d88511f9f4cf100cade0610a34"</span>
        spEdition <span style="color:#6a8759">"fp"</span>
    ShareSDK {
        <span style="color:#ffc66d">devInfo</span> {
            <span style="color:#ffc66d">Wechat</span> {
                <span style="color:#6a8759">appId</span> <span style="color:#6a8759">"wx4868b35061f87885"</span>
                appSecret <span style="color:#6a8759">"64020361b8ec4c99936c0e3999a9f249"</span>
                withShareTicket <span style="color:#6897bb">true</span>
                bypassApproval <span style="color:#6897bb">false</span>
                enable <span style="color:#6897bb">true</span>
            }
        }
    }
}</code></span></span>

这里的配置和Android原生配置无异,可参考Mob官方链接

配置签名文件

1.菜单打开Build Settings,左侧Platform列表选Android,点击Player Settings,在打开的Project Settings操作框中,左侧选择Player标签,右侧选择Publishing Settings卡片;

2.勾选Project Keystore下的Custom Key store;

3.点击Project Keystore下的Select选择一个keystore文件;

4.填写Project Keystore下的Password;

5.如Project Keystore下的Password填写正确,则Project Key下的Alias下拉框亮起,选择自己的别名;

6.填写Project Key下的Password;

iOS端编译配置

默认所有平台都已经初始化,客户需要做的操作:

修改初始化我们SDK的AppKey和AppSecret

配置您自己的ShareSDK的AppKey和AppSecret (获取可以点击查看注册流程

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#"><span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#ffc66d">ShareSDK</span> : <span style="color:#ffc66d">MonoBehaviour</span> 
    {
        <span style="color:#cc7832">private</span> <span style="color:#cc7832">int</span> reqID;
        <span style="color:#bbb529">#elif UNITY_IPHONE</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> appKey = <span style="color:#6a8759">"3276d3e413040"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> appSecret = <span style="color:#6a8759">"4280a3a6df667cfce37528dec03fd9c3"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> mobNetLater = <span style="color:#6a8759">"2"</span>;
        <span style="color:#cc7832">public</span> List<<span style="color:#cc7832">string</span>> customAssociatedDomains = <span style="color:#cc7832">new</span> List<<span style="color:#cc7832">string</span>>();
        <span style="color:#bbb529">#endif</span>

    <span style="color:#6a8759">''</span><span style="color:#6a8759">'  '</span><span style="color:#6a8759">''</span>
    }</code></span></span>

修改第三方社交平台初始化信息配置

可以找到ShareSDKDevInfo.cs文件,进行修改。配置所需的平台信息

选择所需要的平台,不想要的可以直接注释或删掉

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#"><span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#6897bb">DevInfoSet</span>

    {
        <span style="color:#cc7832">public</span> SinaWeiboDevInfo sinaweibo;
        <span style="color:#cc7832">public</span> WeChat wechat;
        <span style="color:#cc7832">public</span> QQ qq;
        <span style="color:#cc7832">public</span> QZone qzone;
    }</code></span></span>

配置对应平台的信息(直接修改字符串值即可),例如微信平台修改

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#"><span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#ffc66d">WeChat</span> : <span style="color:#ffc66d">DevInfo</span> 
    {
        <span style="color:#bbb529">#if UNITY_ANDROID</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> SortId = <span style="color:#6a8759">"5"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChat;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppId = <span style="color:#6a8759">"wx4868b35061f87885"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppSecret = <span style="color:#6a8759">"64020361b8ec4c99936c0e3999a9f249"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> UserName = <span style="color:#6a8759">"gh_afb25ac019c9@app"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> Path = <span style="color:#6a8759">"/page/API/pages/share/share"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">bool</span> BypassApproval = <span style="color:#6897bb">false</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">bool</span> WithShareTicket = <span style="color:#6897bb">true</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> MiniprogramType = <span style="color:#6a8759">"0"</span>;
        <span style="color:#bbb529">#elif UNITY_IPHONE</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChat;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_id = <span style="color:#6a8759">"wx617c77c82218ea2c"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_secret = <span style="color:#6a8759">"c7253e5289986cf4c4c74d1ccc185fb1"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_universalLink = <span style="color:#6a8759">"https://70imc.share2dlink.com/"</span>;
     <span style="color:#bbb529">#endif</span>
    }

    [<span style="color:#bbb529">Serializable</span>]
    <span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#ffc66d">WeChatMoments</span> : <span style="color:#ffc66d">DevInfo</span> 
    {
        <span style="color:#bbb529">#if UNITY_ANDROID</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> SortId = <span style="color:#6a8759">"6"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChatMoments;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppId = <span style="color:#6a8759">"wx4868b35061f87885"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppSecret = <span style="color:#6a8759">"64020361b8ec4c99936c0e3999a9f249"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">bool</span> BypassApproval = <span style="color:#6897bb">true</span>;
        <span style="color:#bbb529">#elif UNITY_IPHONE</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChatMoments;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_id = <span style="color:#6a8759">"wx617c77c82218ea2c"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_secret = <span style="color:#6a8759">"c7253e5289986cf4c4c74d1ccc185fb1"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_universalLink = <span style="color:#6a8759">"https://70imc.share2dlink.com/"</span>;
    <span style="color:#bbb529">#endif</span>
    }

    [<span style="color:#bbb529">Serializable</span>]
    <span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#ffc66d">WeChatFavorites</span> : <span style="color:#ffc66d">DevInfo</span> 
    {
    <span style="color:#bbb529">#if UNITY_ANDROID</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> SortId = <span style="color:#6a8759">"7"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChatFavorites;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppId = <span style="color:#6a8759">"wx4868b35061f87885"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> AppSecret = <span style="color:#6a8759">"64020361b8ec4c99936c0e3999a9f249"</span>;
    <span style="color:#bbb529">#elif UNITY_IPHONE</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WeChatFavorites;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_id = <span style="color:#6a8759">"wx617c77c82218ea2c"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_secret = <span style="color:#6a8759">"c7253e5289986cf4c4c74d1ccc185fb1"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_universalLink = <span style="color:#6a8759">"https://70imc.share2dlink.com/"</span>;
    <span style="color:#bbb529">#endif</span>
    }
    <span style="color:#cc7832">public</span> <span style="color:#cc7832">class</span> <span style="color:#ffc66d">WechatSeries</span> : <span style="color:#ffc66d">DevInfo</span> 
    {
        <span style="color:#bbb529">#if UNITY_ANDROID</span>
        <span style="color:grey">//for android,please set the configuraion in class "Wechat" ,class "WechatMoments" or class "WechatFavorite"</span>
        <span style="color:grey">//对于安卓端,请在类Wechat,WechatMoments或WechatFavorite中配置相关信息↑</span>
        <span style="color:#bbb529">#elif UNITY_IPHONE</span>
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">const</span> <span style="color:#cc7832">int</span> type = (<span style="color:#cc7832">int</span>) PlatformType.WechatPlatform;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_id = <span style="color:#6a8759">"wx617c77c82218ea2c"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_secret = <span style="color:#6a8759">"c7253e5289986cf4c4c74d1ccc185fb1"</span>;
        <span style="color:#cc7832">public</span> <span style="color:#cc7832">string</span> app_universalLink = <span style="color:#6a8759">"https://70imc.share2dlink.com/"</span>;
        <span style="color:#bbb529">#endif</span>
    }</code></span></span>

确定文件里修改了AppKey等信息之后,要去挂载脚本那边同步看下AppKey是否修改,可以点击Reset,刷新,同步下修改后的信息,也可以自己直接在挂载脚本里面改,最后要确定脚本文件里和挂载脚本里都已经改为了自己的信息

 

 

接口调用

回传用户隐私授权结果(submitPolicyGrantResult)

调用示例

传入的第一个参数为Boolean类型的,true 代表同意授权、false代表不同意授权

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code>mobsdk.submitPolicyGrantResult(true);</code></span></span>

注意:该接口必须接入,否则可能造成无法使用MobTech各SDK提供的相关服务。

分享(ShowPlatformList)

首先引入命名空间:

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#">using cn.sharesdk.unity3d<span style="color:grey">;</span>
public ShareSDK ssdk<span style="color:grey">;</span></code></span></span>

构造分享信息

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#">ShareContent content = new ShareContent();
    content.SetText(<span style="color:#6a8759">"this is a test string."</span>);
    content.SetImageUrl(<span style="color:#6a8759">"https://f1.webshare.mob.com/code/demo/img/1.jpg"</span>);
    content.SetTitle(<span style="color:#6a8759">"test title"</span>);
    content.SetTitleUrl(<span style="color:#6a8759">"http://www.mob.com"</span>);
    content.SetSite(<span style="color:#6a8759">"Mob-ShareSDK"</span>);
    content.SetSiteUrl(<span style="color:#6a8759">"http://www.mob.com"</span>);
    content.SetUrl(<span style="color:#6a8759">"http://www.mob.com"</span>);
    content.SetComment(<span style="color:#6a8759">"test description"</span>);
    content.SetMusicUrl(<span style="color:#6a8759">"http://mp3.mwap8.com/destdir/Music/2009/20090601/ZuiXuanMinZuFeng20090601119.mp3"</span>);
    content.SetShareType(ContentType.Webpage);</code></span></span>

常用的几个传参数方法说明(不常用的方法请看Assets/Plugins/ShareSDK/ShareContent.cs脚本):

Text :分享的文字

Title: 分享的标题

TitleUrl :标题的网络链接(QQ和QQ空间使用 )

SetImageUrl :iOS平台,本地以及网络图片都使用此方法

image:android平台分享本地图片与网络图片都用此方法

Url: 分享的链接(微信,微博,易信,Facebook等平台)

ShareType:分享类型(微信,易信)

FilePath:分享文件路径 (微信,易信)

MusicUrl :分享的音乐链接(微信,QQ,易信)

设置分享回调

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c">ssdk.shareHandler = ShareResultHandler;
    //以下为回调的定义:
    void ShareResultHandler (int reqID, ResponseState <span style="color:#cc7832">state</span>, PlatformType type, Hashtable result)
    {
        if (<span style="color:#cc7832">state</span> == ResponseState.Success)
        {
            print (<span style="color:#6a8759">"share result :"</span>);
            print (MiniJSON.jsonEncode(result));
        }
            else if (<span style="color:#cc7832">state</span> == ResponseState.Fail)
        {
            print (<span style="color:#6a8759">"fail! throwable stack = "</span> + result[<span style="color:#6a8759">"stack"</span>] + <span style="color:#6a8759">"; error msg = "</span> + result[<span style="color:#6a8759">"msg"</span>]);
        }
        else if (<span style="color:#cc7832">state</span> == ResponseState.Cancel) 
        {
                print (<span style="color:#6a8759">"cancel !"</span>);
        }
    }</code></span></span>

进行分享

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#"><span style="color:grey">//通过分享菜单分享</span>
ssdk<span style="color:#e8bf6a">.ShowPlatformList</span> (null, <span style="color:#6a8759">content</span>, <span style="color:#6897bb">100</span>, <span style="color:#6897bb">100</span>);
<span style="color:grey">//直接通过编辑界面分享</span>
ssdk<span style="color:#e8bf6a">.ShowShareContentEditor</span> (PlatformType<span style="color:#e8bf6a">.SinaWeibo</span>, <span style="color:#6a8759">content</span>);
<span style="color:grey">//直接分享</span>
ssdk<span style="color:#e8bf6a">.ShareContent</span> (PlatformType<span style="color:#e8bf6a">.SinaWeibo</span>, <span style="color:#6a8759">content</span>);</code></span></span>

授权(Authorize)

(每次都会跳转到第三方平台进行授权)

设置授权回调

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c">ssdk.authHandler = AuthResultHandler;
//以下为回调的定义:
void AuthResultHandler(int reqID, ResponseState <span style="color:#cc7832">state</span>, PlatformType type, Hashtable result)
{
    if (<span style="color:#cc7832">state</span> == ResponseState.Success)
    {
        print (<span style="color:#6a8759">"authorize success !"</span>);
    }
    else if (<span style="color:#cc7832">state</span> == ResponseState.Fail)
    {
        print (<span style="color:#6a8759">"fail! throwable stack = "</span> + result[<span style="color:#6a8759">"stack"</span>] + <span style="color:#6a8759">"; error msg = "</span> + result[<span style="color:#6a8759">"msg"</span>]);
    }
    else if (<span style="color:#cc7832">state</span> == ResponseState.Cancel) 
    {
        print (<span style="color:#6a8759">"cancel !"</span>);
    }
}</code></span></span>

进行授权

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code><span style="color:#cc7832">ssdk</span><span style="color:#e8bf6a">.Authorize</span>(<span style="color:#cc7832">PlatformType</span><span style="color:#e8bf6a">.SinaWeibo</span>);</code></span></span>

获取用户信息(GetUserInfo)

(只会在第一次跳转到第三方平台进行授权)

指定获取用户信息的回调

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#">sdk.showUserHandler = GetUserInfoResultHandler;
//以下为回调的定义:
void GetUserInfoResultHandler (int reqID, ResponseState <span style="color:#cc7832">state</span>, PlatformType type, Hashtable result)
{
    if (<span style="color:#cc7832">state</span> == ResponseState.Success)
    {
        print (<span style="color:#6a8759">"get user info result :"</span>);
        print (MiniJSON.jsonEncode(result));
    }
    else if (<span style="color:#cc7832">state</span> == ResponseState.Fail)
    {
        print (<span style="color:#6a8759">"fail! throwable stack = "</span> + result[<span style="color:#6a8759">"stack"</span>] + <span style="color:#6a8759">"; error msg = "</span> + result[<span style="color:#6a8759">"msg"</span>]);
    }
    else if (<span style="color:#cc7832">state</span> == ResponseState.Cancel) 
    {
        print (<span style="color:#6a8759">"cancel !"</span>);
    }
}</code></span></span>

获取用户信息

<span style="background-color:#42475a"><span style="color:#a9b7c6"><code class="language-c#"><span style="color:#cc7832">ssdk</span><span style="color:#e8bf6a">.GetUserInfo</span>(<span style="color:#cc7832">PlatformType</span><span style="color:#e8bf6a">.SinaWeibo</span>);</code></span></span>

注意:auth和getuser接口都可以实现授权登录功能,可以任意调用一个

打包使用

进行上述所有修改后,已经可以执行打包操作。

如集成过程中遇到问题,可详询MobTech技术支持,点击立即QQ咨询

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

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

相关文章

2022年12月全国DAMA-CDGA/CDGP数据治理认证招生简章

20DAMA认证为数据管理专业人士提供职业目标晋升规划&#xff0c;彰显了职业发展里程碑及发展阶梯定义&#xff0c;帮助数据管理从业人士获得企业数字化转型战略下的必备职业能力&#xff0c;促进开展工作实践应用及实际问题解决&#xff0c;形成企业所需的新数字经济下的核心职…

R语言stan进行基于贝叶斯推断的回归模型

可以从许多统计软件包中运行Stan。到目前为止&#xff0c;我一直在从R运行Stan。 我们围绕stan进行一些咨询&#xff0c;帮助客户解决独特的业务问题。 简单线性回归 第一步是为Stan模型编写文件。这包含一个文件linreg.stan&#xff1a; 视频&#xff1a;线性回归中的贝叶斯…

新闻舆情管理平台开发,监控舆情发展趋势

打造企业良好声誉可能需要几年、十几年甚至更久&#xff0c;而毁掉它只需要短短几分钟。尤其是互联网时代下&#xff0c;人们接收信息的速度越来越快&#xff0c;在新闻发出去的几分钟内就能迅速占据热搜榜。而且网络上每天都会产生上亿条信息&#xff0c;单纯的依靠人工进行监…

openEuler 通过 手工方式 安装 ceph 步骤 Cephadm无法应用到openEuler 提醒不支持

ceph集群在openEuler手工安装过程Cephadm安装步骤前置要求1.openEuler版本2. Python 33. Systemd4. Time synchronization (such as chrony or NTP)5. LVM2 for provisioning storage devices安装1. 创建用户ceph2. 安装 ceph3. 生成配置项3.1 机器及组件规划列表3.2 ceph.conf…

Python第三方库之nibabel

1.nibabel简介 NiBabel提供对一些常见医学和神经影像文件格式的读/写访问&#xff0c;包括ANALYZE&#xff08;plain&#xff0c;SPM99&#xff0c;SPM2及更高版本&#xff09;&#xff0c;GIFTI&#xff0c;NIfTI1&#xff0c;NIfTI2&#xff0c;CIFTI-2&#xff0c;MINC1&am…

[附源码]SSM计算机毕业设计疫情防控期间人员档案追寻系统JAVA

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

RocketMQ系列——搭建Namesrv源码调试环境整理

目录 RocketMQ系列-搭建Namesrv源码调试环境 Namesrv源码调试环境搭建 导入项目到IDEA 创建所需目录 环境配置 启动Namesrv 总结 RocketMQ系列-搭建Namesrv源码调试环境 在学习任何一个技术框架的时候&#xff0c;我们通常都是先了解是什么&#xff0c;有什么作用、解决…

Java流程控制语句

流程控制语句 在一个程序执行的过程中&#xff0c;各条语句的执行顺序对程序的结果是有直接影响的。所以&#xff0c;我们必须清楚每条语句的执行流程。而且&#xff0c;很多时候要通过控制语句的执行顺序来实现我们想要的功能。 流程控制语句分类 顺序结构、分支结构&#…

【毕业设计】深度学习社交安全距离检测系统 - python opencv

文章目录0 前言1 课题背景2 实现效果3 相关技术3.1 YOLOV43.2 基于 DeepSort 算法的行人跟踪4 最后0 前言 &#x1f525; Hi&#xff0c;大家好&#xff0c;这里是丹成学长的毕设系列文章&#xff01; &#x1f525; 对毕设有任何疑问都可以问学长哦! 这两年开始&#xff0c…

鲜花商城|基于Springboot实现鲜花商城系统

作者主页&#xff1a;编程千纸鹤 作者简介&#xff1a;Java、前端、Pythone开发多年&#xff0c;做过高程&#xff0c;项目经理&#xff0c;架构师 主要内容&#xff1a;Java项目开发、毕业设计开发、面试技术整理、最新技术分享 收藏点赞不迷路 关注作者有好处 文末获得源码 …

xgboost 为什么拟合残差能获得更好的效果(思考)

以时序预测为例&#xff1a; 现在要 预测2022年之后的值&#xff0c;可以预测下降幅度&#xff08;和预测残差的步骤一样&#xff09;。 假设有一个隐藏的规律&#xff1a;对于21年的高峰&#xff0c;22年的下降幅度会更大&#xff08;如time3是&#xff0c;下降幅度会比其他的…

Spring依赖注入源码解析(下)

文章目录前言本章目标resolveDependency—解决依赖查找1、doResolveDependency2、Autowreid寻找依赖流程图依赖注入完整流程图前言 在上一篇文章Spring依赖注入源码解析&#xff08;上&#xff09;中&#xff0c;主要介绍了寻找注入点、以及注入源码分析 本章目标 这一篇主要…

市面上最适合跑步用的耳机有哪些、分享五款最优秀的跑步耳机

随着人们日益对健康的重视&#xff0c;”全民健身“正在全国&#xff0c;乃至全世界蔓延开来&#xff0c;其中跑步锻炼凭借着门槛低&#xff0c;益处多成为了大部分人的健身的首选。而随着跑步大军的壮大&#xff0c;国内蓝牙耳机市场也是一片火热。其中蓝牙无线运动耳机凭借着…

【python小项目】用python写一个小工具——番茄钟

用python写一个小工具——番茄钟 最近听到朋友说在用番茄钟&#xff0c;有点兴趣也想下载一个来用用&#xff0c;后面仔细一想这玩意做起来也不难&#xff0c;索性自己顺手写一个算了&#xff0c;在这里也分享给大家了 一、功能简述 番茄钟即番茄工作法&#xff0c;番茄工作法…

产品经理必备的能力有哪些?

从一名普通的产品经理到一名优秀的产品经理要经历什么&#xff1f;哪些又是产品经理必备的能力&#xff1f;产品经理对能力的需求也不尽相同&#xff0c;在不同的团队合作模式下&#xff0c;还必须懂得各种能力。 一、业务分析能力 数据分析能力该是什么样的呢 1、有数据意识…

indexDB 本地数据库

indexDB 本地数据库 IndexedDB是一种使用浏览器存储大量数据的方法&#xff0c;它创造的数据可以被查询&#xff0c;并且可以离线使用。 优点&#xff1a;空间大小&#xff0c;大于250M&#xff1b;支持二进制&#xff1a;IndexedDB不但可以存储对象&#xff0c;字符串等&#…

利用MS11_003 IE漏洞攻击win7主机

利用MS11_003 IE漏洞攻击win7主机 微软2011年2月9日发布12个安全补丁,其中3个最高级别为严重等级,9个为重要等级,共计修复了影响 Windows、Office、IE 和 IIS 的22个漏洞。 MS11-003、MS11-006 和 MS11-007 为严重等级,需要优先部署。其中,MS11-003 的最高利用指数为1它修…

基于web的课程管理系统设计与实现(java+SqlServer)

目 录 摘 要 I Abstract II 1 绪论 1 1.1 课题背景 1 1.2 本课题研究的意义 2 1.3 主要研究内容 3 2 开发环境与相关技术 4 2.1 JSP技术 4 2.1.1 JAVA简介 4 2.1.2 JSP简介 4 2.1.3 SSH2框架介绍 5 2.2 Myeclipse介绍 6 2.3 SQL2008 数据库 7 2.4 Browser/Server&#xff08;B…

GD32实现串口空闲(IDLE)中断 + DMA机制接收数据

前言 串口功能在单片机开发中&#xff0c;是比较常用的外设&#xff0c;熟练使用串口功能也是驱动开发必备的技能之一。 DMA是一种CPU辅助手段&#xff0c;可以在CPU不参与的情况下&#xff0c;是做一些辅助CPU的事情&#xff0c;如通常的数据搬运。 在没有DMA之前&#xff0c;…

hadoop3.x学习(一)--安装与环境配置

一、hadoop的组成 hadoop1.x&#xff1a;Commons、HDFS&#xff08;数据存储&#xff09;、MapReduce&#xff08;资源调度计算&#xff09;hadoop2.x:Commons、HDFS&#xff08;数据存储&#xff09;、MapReduce&#xff08;计算&#xff09;、Yarn(资源调度) 1.1 HDFS 分布式…