APNS设置

2023-11-17

APNS设置


openssl x509 -in aps_development.cer -inform der -out MobileCAPCert.pem


openssl pkcs12 -nocerts -out MobileCAPKey.pem -in PushChatKey.p12


cat MobileCAPCert.pem MobileCAPKey.pem > MobileCAPCK.pem


openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MobileCAPCert.pem -key MobileCAPKey.pem




转:APNS设置


Step 1: Create cert request file。(当你在apple web site "provisioning portal"里生成"Development Certificate" 和 "Push SSL Certificate"时就会用到它)

1. Access "keychain access" by selecting "Application > Utilities > keychain access"

2. select menu "keychain access > certificate assistant > request certificate from a certificate authority"

3. set "User Email Address" as the same email address that you used to sign up for the iOS Developer Program, and set "Common Name" as "MobileCAP", leave "CA Email address" empty, and tick "Save to disk" option, click Continue button

4. set “Save the file” as “MobileCAP.certSigningRequest”.

当完成step 1后,就会在Keychain Access的“Keys” section里生成了name为"MobileCAP"的public key and private key pair

Step 2: export "MobileCAP" private key to a ".p12" file(该文件会在后面生成apns provider的.p12 or .pem file时用到)

1. right click "MobileCAP“ private key and select "Export MobileCAP..."

2. Save the private key as “MobileCAPKey.p12” file, click Save button

3. 这时会让你输入2次用于加密该.p12 file的密码,例如用"123456",接着会要求你输入一次your mac account password


Step 3: Generate a "development certificate" file and download it (会生成一个cert file,该cert会被import to keychain access里,若你要在真机上调试app,这步是必须的,另外该development certificate会在后面创建provisioning profile时用到)

注意:"development certificate"是与developer account对应的,即一个developer account只能生成一个"development certificate"。如果你之前已经创建过该cert, then just download it

1. 在apple web site "provisioning portal > Certificates" page, click "request certificate" button

2. 然后选定step 1生成的cert request file "MobileCAP.certSigningRequest"

3. follow the wizard, 就会生成一个cert file "ios_development.cer" file, and then click the "download" link to download it


Step 4: 创建Registered device (这是把你要进行调试app的device添加到apple web site "provisioning portal > Devices" page,若你要在真机上调试app,这步是必须的,另外在后面创建provisioning profile时要把该device包含进去,否则无法在该device上调试)

1. 在apple web site "provisioning portal > Devices" page, click "Add Device" button

2. 输入device name (任意名字)and device id (把你的device连接到电脑后,在iTunes可以查到device id)


Step 5: Create App ID (若你要在真机上调试app,这步是必须的,另外它会在后面创建provisioning profile时用到,每个provisioning profile只对应一个app ID)

关于App ID和你创建的project的product name, company identifier的关系参看 http://blog.csdn.net/totogogo/article/details/7377870

App ID是开发和预配置系统的重要组件。这个唯一的ID允许应用程序与Apple Push Notification服务以及与外部硬件附件通信。App ID也可以用于在一组应用程序内共享密钥链数据,比如密码。另外它还用于configuration data between your applications using iCloud

任何单个应用程序ID都是由包种子(bundle seed)ID和包标识符(bundle identifier)组成的。包种子ID是由10个字符组成的唯一字符串。这个ID也可用于在利用单个应用程序ID构建的多个应用程序之间共享密钥链访问,还可以把这个ID合并到你可能希望用其扩展iPhone应用程序的多种硬件附件中。

包标识符可以是唯一的应用程序名称,或如果你想使用通配符包ID,则它也可以是星号(*)。当你想为多个应用程序使用单个应用程序ID时,这会很有用。例如,在开发原型时,我使用了名为“test”的应用程序ID,它为其包ID使用了一个星号。在我的iPod和iPhone上安装的所有开发构建软件上都使用这一个ID。要注意的一件事情是:只有使用显式的应用程序ID,才能使用Apple Push Notifications。


1.  在apple web site "provisioning portal > App IDs" page, click "new app ID" button

2. 输入"Description" (任意取),“Bundle Identifier (App ID Suffix)” 为 "edu.cityu.MobileCAP", "Bundle Seed ID (App ID Prefix)"的值是固定用上了Team ID

3. click Submit button


Step 6: Enable APNS in the App ID created by step 5, generate apns cert file and download it (若你的app要带push notification功能,这步是必须的。)

注意:若你生成provisioning profile时没有enable apns,而当你之后enable apns时,就要delete旧的provisioning profile,然后生成一个新的。否则当你运行带apns feature的app时不会弹出notification allow or deny 提醒窗口,但也不见有任何错误信息,总之就是用不到push notification!


1.  在apple web site "provisioning portal > App IDs" page, click "configure" link of the App ID created by step 5

2.  tick "Enable for Apple Push Notification service" option, and then click "configure" button of "Development Push SSL Certificate"

3. 在弹出的"Apple Push Notification service SSL Certificate Assistant"窗口里,选定step 1创建的cert request file,follow the wizard,就会生成一个apns cert file named "aps_development.cer"

4. download the cert file

5. 这时你会在apple web site "provisioning portal > App IDs" page看到,你的这个App ID 在"push notification"这个column里是“Enabled for Development”


Step 7: create Provisioning Profile, download the file and add it to your device (若你要在真机上调试app,这步是必须的,Provision Profile实际上才是真正真机上需要添加的东东,没有它,无法真机调试。Provision Profile里集成包含了step 3创建的development cert, step 4创建的device和step 5创建的app ID的信息)

 

1.  在apple web site "provisioning portal > Provisioning" page, click "new Profile"  button

2. 输入"Profile Name" (任意取)

3. 选择该profile要包含的certificates (可以包含多个)

4. 选择该profile要包含的App ID (只能选择一个)

5. 选择能够用来真机调试的devices (最好全选)

6. click submit button

7. download the provisioning profile file (extension is ".mobileprovision")



Step 8: import "ios_development.cer" file created by step 3 and "aps_development.cer" file created by step 6 to “keychain access"

1. double click "ios_development.cer" file to import it to “keychain access"

2. double click "aps_development.cer" file to import it to “keychain access"

3.然后在keychain access里的"Login > My Certificates"里会看到这2个cert:"iPhone Developer: Tomson Xu" cert and "Apple Development IOS Push Services" cert


Step 9: add provisioning profile file download in step 7 to your device

1. 把iphone/ipod连接上电脑

2. drag the provision profile file (extension is ".mobileprovision") to "Xcode" in the desktop dock 

3. 这时会打开xocde里的"organizer" window。如果没有打开,就在select Xcode menu "window > organizer"

4. 在左边的panel里select "Library > Provisioning Profiles",你会看到你step 7创建的provision profile in the list。另外在你的device的"Provision Profiles”里也会看到它。

5. 如果你在apple site更新了你的provisioning profile,在"organizer" window的"Library > Provisioning Profiles"和Device "Provisioning Profiles"删除旧的,然后在"Library > Provisioning Profiles"里click "Refresh" button


这个时候你就可以在真机上调试了,即使是真机上测试push notification也是可以的(当然,我是说iphone side for push notification is ready)!


下面的步骤是讲解如何在你的app里添加一些代码来实现最简单的push notification功能,以及如何设置server side (即apns provider),用于push message。


Step 10 在你的app里添加一些代码来实现最简单的功能


1. 创建一个"single view application" project,为省事,你设置的"Company Identifier" + "Production“必须和step 5创建的App ID的"bundle identifier"一致。

2. 在AppDelegate.m file的"didFinishLaunchingWithOptions" method里,添加下列代码 (用于为app register push notification feature):

[cpp] view plaincopy

  1. // Let the device know we want to receive push notifications  
  2. [[UIApplication sharedApplication] registerForRemoteNotificationTypes:  
  3.  (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];  

3. 在AppDelegate.m file里添加下列2个methods (用来handle register remote notification with device token和register error的events)

 

[cpp] view plaincopy

  1. - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken  
  2. {  
  3.     NSLog(@"My token is: %@", deviceToken);  
  4. }  
  5.   
  6. - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error  
  7. {  
  8.     NSLog(@"Failed to get token, error: %@", error);  
  9. }  

4. 运行该app in real device (simulator doesn't support push notification)。这时你会在device上看到一个popup window (该窗口只会出现一次,重装app不会再出现),提示你该app会send push notification给你,如果同意则clickOK,不同意则click "Now allow”。如果选择了OK,那么在"Setting > Notifications“里会有你的app在list里。而且这时你的Xcode output console会显示你的device token。


 

Step 11: step 2生成的“MobileCAPKey.p12” file和step 6生成的"aps_development.cer" file是用于APNS provider side的源文件,APNS Provider side进行push message时要用到的"cert + key" file就是通过这2个file来生成。该Step就是用来生成for APNS provider side (php version)要用到这个"cert + key" pem file.


step 11.1 open Terminal, go to Desktop (假设这2个file都在desktop里)

step 11.2 执行下列命令来生成和apns cer file对应的pem file "MobileCAPCert.pem"

[plain] view plaincopy

  1. openssl x509 -in aps_development.cer -inform der -out MobileCAPCert.pem  

step 11.3 执行下列命令来生成和private key .p12 file对应的pem file "MobileCAPKey.pem" (注意:执行过程会要求你输入"MobileCAP.p12"创建时设置的密码,以及设置"MobileCAPKey.pem”的密码)

[plain] view plaincopy

  1. openssl pkcs12 -nocerts -out MobileCAPKey.pem -in MobileCAPKey.p12  

Step 11.4 执行下列命令把step 11.2生成的cert pem file和step 11.3生成的key pem file合成为一个pem file  "MobileCAPCK.pem"

[plain] view plaincopy

  1. cat MobileCAPCert.pem MobileCAPKey.pem > MobileCAPCK.pem  


 

Step 12: step 2生成的“MobileCAPKey.p12” file和step 6生成的"aps_development.cer" file是用于APNS provider side的源文件,该step是简单测试这2个file是否有效


step 12.1 open Terminal, go to Desktop (假设这2个file都在desktop里)


Step 12.2 执行下列命令来测试是否能够connect apple提供的不经加密(即不需使用任何证书!)的APNS server 

[plain] view plaincopy

  1. telnet gateway.sandbox.push.apple.com 2195  

如果你看到下列输出,则表示你的电脑可以connect APNS. 如果出现error,那么check你的firewall是否允许outgoing connections on port 2195。

[plain] view plaincopy

  1. Trying 17.172.233.65...  
  2. Connected to gateway.sandbox.push-apple.com.akadns.net.  
  3. Escape character is '^]'.  


Press Ctrl+C to close the connection.


Step 12.3  执行下列命令来测试是否能够connect apple提供的经加密(需使用step 11.2 and 11.3生成的2个pem file!)的APNS "sandbox“ server for development.

[plain] view plaincopy

  1. openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MobileCAPCert.pem -key MobileCAPKey.pem  


执行过程中会要你输入MobileCAPKey.pem生成时设置的密码。如果connect server成功,就会等待你输入字串,你可以输入任意字串,然后回车,就会disconnect server。如果连接不成功,则openssl会显示错误信息。

注 意:实际上有2个APNS servers: the “sandbox” server (用于testing) the live server(用于production mode)。我们这里测试的是sandbox server。live apns server的操作类似。


Step 13 创建provider server side (php version)

1. Download SimplePush PHP code to your mac machine and then unzip it.

2. 去掉SimplePush folder里的pk.pem (它没用),把step 11.4生成的"MobileCAPCK.pem" copy toSimplePush folder

3. 修改simplepush.php file下面几行:

// Put your device token here (without spaces):

//device token来自Step 10的第4点,在output console获取,注意:要去掉前后的尖括号,和中间的所有空格$deviceToken = '43fcc3cff12965bc45bf842bf9166fa60e8240c575d0aeb0bf395fb7ff86b465';// Put your private key's passphrase here:

//该值是step 11.3生成MobileCAPKey.pem时设置的密码$passphrase = '123456';// Put your alert message here:$message = 'My first push notification!';//.....stream_context_set_option($ctx, 'ssl', 'local_cert', 'MobileCAPCK.pem');


4. 在terminal window里,go to the simplepush folder,然后执行下列命令,你的iPhone应该会收到一条push message。

[plain] view plaincopy

  1. php simplepush.php  

注意:如果你的app在iphone里是正在运行,而且app是在front end时,当它收到push message时是不会出现在iPhone顶部的notification area的!


Step 14 创建provider server side (c# version)

step 11生成了用于php的APNS cert (extension is pem),而如果用c#作为apns provider,则要使用.p12 format cert,它的生成方式比step 11简单很多:

step14.1. open "keychain access",然后找到"login > My Certificates > Apple Development IOS Push Services: xxxx" cert (该cert是在step 8导入到keychain access的)

    你会看到该cert下包含了Step 1生成的private key 



step14.2. right click this cert, and select "Export xxx......" to save as .p12 format (e.g.MobileCAPCK_For_CSharp.p12),过程中会要你输入保护该cert的密码


step14.3. 下载apns-shary, 解压后,double click "JdSoft.Apple.Apns.sln" to open the project。然后我们只需要"JdSoft.Apple.Apns.Notifications"和"JdSoft.Apple.Apns.Notifications.Test",其他的都可以删掉。Right click "JdSoft.Apple.Apns.Notifications.Test", select "Set as Startup Project"


step14.4 把step14.2生成的MobileCAPCK_For_CSharp.p12 file复制到“JdSoft.Apple.Apns.Notifications.Test\bin\Debug”目录下

step14.5 打开"JdSoft.Apple.Apns.Notifications.Test"下的"Program.cs",修改下面几行

[csharp] view plaincopy

  1. //Put your device token in here  
  2. string testDeviceToken = "fe58fc8f527c363d1b775dca133e04bff24dc5032d08836992395cc56bfa62ef";  
  3.   
  4. //Put your PKCS12 .p12 or .pfx filename here.  
  5. // Assumes it is in the same directory as your app  
  6. string p12File = "apn_developer_identity.p12";  
  7.   
  8. //This is the password that you protected your p12File   
  9. //  If you did not use a password, set it as null or an empty string  
  10. string p12FilePassword = "yourpassword";  

step 14.6Rebuild the whole project, and then Run!

Step 14.7 把APNS-SHARP移植到web project里

1. In visual studio, create a new "web site"

2. right click the web site root node, select "Add reference...", select "browse" tab, and then choose "Newtonsoft.Json.Compact.dll" in APNS-SHARP libray "reference" folder

2. right click the web site root node, select "Add ASP.NET Folder > App_Code". 

3. right click "App_Code" node, select "new folder", folder name任取。然后把APNS-SHARP libray "JdSoft.Apple.Apns.Notifications"目录里的所有.cs文件copy到该新建目录下。

4. 把step14.2生成的MobileCAPCK_For_CSharp.p12 file复制到web site root node下。

5. 然后把APNS-SHARP libray "JdSoft.Apple.Apns.Notifications.Test"目录里的Program.cs里代码适当改下,然后复制到Default.aspx.cs里(记得要import JdSoft.Apple.Apns.Notifications),就做成一个最简单的asp.net push notification web site.




参考文档:

iphone在真机测试

官方文档 https://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/00-About_the_iOS_Application_Development_Workflow/introduction.html#//apple_ref/doc/uid/TP40007959-CH1-SW1

http://www.cocoachina.com/bbs/read.php?tid=68636


http://blog.csdn.net/dotphoenix/article/details/5271727

http://fstoke.me/blog/?p=1805

http://hi.baidu.com/zhaodingfeng/blog/item/381b7e54025cab42564e00fa.html


在真机测试其实最终是体现在xcode > window > organizer里,打开organizer窗口后,最顶有个"Documentation",查看organization的帮助文档

 

 

 

 

推送通知提供者是一个程序,用于负责和苹果APNs服务器进行SSL通讯,它是实际上的通知发送者。如果你想想用户设备上的应用程序发送消息,实际上是由推送通知提供者进行的。实际上,整个APNs服务由3层应用程序构成:

推送通知提供者、Apple APNs服务器、iOS客户端。

苹 果APNs服务器位于两者中间,起到一个中间人的角色。提供者向客户端发送消息,必须由APNs服务器来转发。开发人员除了需要实现客户端外,还需要实现 提供者的代码。我们前面创建的SSL证书aps_developer_identity.cer,需要在提供者程序中使用,因为与APNs服务器通讯需要 一个合法的SSL数字证书。

如果仅仅是测试,我们可以使用一个其他人已经实现的提供者:

PushMeBaby,下载地址

下载后解压缩,实际上得到的是一个Xcode工程。打开PushMeBaby工程,将aps_developer_identity.cer文件导入到Resources文件夹。

打开ApplicationDelegate.m文件,在init方法找到“self.deviceToken =”一行,将刚才复制的Devicetoken粘贴到这里:

self.deviceToken = @"804d95ab708a0aad 33a08c1f 00341ae2 3774bcb0 02362e33 9a853575 8f36dc90";

把“self.payload =”一行中的You got a new message!替换成我们自己的提示信息“收到一条推送通知。”。

把“self.certificate =”一行中的apns替换成我们自己的SSL文件aps_developer_identity。




本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

APNS设置 的相关文章

  • 8.16 IO作业

    拷贝 int main int argc const char argv if argc 3 printf input file error n printf wsage a out srcfile dstfile n FILE fp if
  • Windows 64编程中寄存器的使用

    下面是摘自 MSDN 的文章 在 Win64 下的 registers 用途 Register Status Use RAX Volatile Return value register RCX Volatile First integer
  • tf.app.run出现错误AttributeError: module '__main__' has no attribute 'main'

    我在运行tf app run的时候出现AttributeError module main has no attribute main 的错误 网上没有查到有用的资料 但是看到默认传递的是main 函数 可能是这个出现了错误 因此我把mai
  • vba帮助手册chm_Excel 2010 VBA 离线帮助 简体中文版 本地帮助分享

    众所周知 Excel VBA帮助是我们写代码的好帮手 无论是初学者 还是VBA老鸟 很多问题都可以直接在VBA帮助里找到答案 但是坑爹的微软 在office2013以后 不再提供本地帮助 更重要的是 离线帮助非常不好用啊 但是高版本又有很多
  • 关于GTC

    目录 一 会议内容 二 AI技术 三 AI应用 四 AI前景 GTC GPU Technology Conference 是由英伟达 NVIDIA 主办的一场全球性的技术大会 旨在探讨人工智能 深度学习 自动驾驶等领域的最新技术 为参会者提
  • Shell自动补全传参简单demo

    准备两个文件 File1 env bash buildsh prompt COMPREPLY local cur COMP WORDS COMP CWORD local cmd COMP WORDS COMP CWORD 1 local o
  • 机器学习模型评价指标(准确率、精度、召回率)

    模型评价指标 准确率 精度 召回率 机器学习中我们常常使用准确率 精度 召回率三大指标评价一个模型训练的好坏 那么这三大参数分别代表什么意义 在介绍评价指标前 需要先明确几个计算指标 真正例 True Positive TP 模型将测试样本
  • Python报错:ImportError: cannot import name XXX

    Python报错 ImportError cannot import name XXX 起因 在使用sklearn部分包库时出现该问题 尝试多种方法无果 解释及解决方法 语句中涉及的包库和已安装的包库出现了版本不一致的问题 比如你导入的包库
  • python利用百度/高德地图获取地理位置并转换

    提示 作者原创 转载请注明 文章目录 一 地理编码与逆编码 二 高德地图地理编码 三 百度地图地理编码 四 坐标转换和空间化 一 地理编码与逆编码 地理编码与逆编码表示的是地名地址与地理坐标 经纬度 互相转换的过程 其中 将地址信息映射为地
  • tensorflow遇到的坑

    tensorflow遇到的坑 tf norm norm pow 2 tf pow tf norm from centralized axis 1 2 2 norm sqrt sum square tensor norm pow 2 tf r
  • 龙湖股价快速收复失地,近4日累计上涨27.8%

    11月7日早盘 龙湖集团股价快速冲高 截至10点 报13 1港元 对应涨幅为2 5 全面收付上周一深调失地 从近期表现来看 龙湖集团股价已连续反弹多日 截至上周五收盘 4个交易日内累计上涨27 8 在过去一周内 多家地产公司的波动令市场情绪
  • 手写数字的识别分类+技术总结

    1 学习转载一篇关于机器学习手写数字的识别 Python 3 利用机器学习模型 进行手写体数字检测 Python 3 生成手写体数字数据集 2 技术总结 机器学习代码实现的初级阶段 既要自己上手项目 也要多看其他前辈的博文 特别是一些附加有
  • 测试工程师要进阶,就得明白这3点...

    在大型互联网公司带测试团队多年 也做过多年的测试工程师招聘工作 对测试工程师的能力也见过高高低低各种 今天 分享下这些年带领测试团队提高的一点思路和方法 还在成长期的测试工程师可以用来指导自己的学习 用这套框架给自己制定一套目标和学习框架
  • Word、WPS中表格的第一行和第二行中间间距,如何去掉,使得跟其他行间距相同

    Word WPS中表格的第一行和第二行中间间距 如何去掉 使得跟其他行间距相同 Word或wps表格已经设计好了很多表格样式供大家使用 如图1 图1 当不想第一行和第二行的间距相同时 取消首行填充即可 如果不间距未变 再将首行删除必行
  • 嵌入式Linux开发笔记之手动设置交叉编译工具链

    快速索引 开发平台 拷贝交叉编译工具链到Linux主机 1 通过 MobaXterm 远程登录 Linux主机 安装交叉编译工具链 1 创建 imx6ull toolchain目录存放交叉编译工具链 2 解压交叉编译工具 3 设置工具链永久
  • 博弈论

    文章目录 博弈论 什么是博弈论 博弈的前提 博弈的要素 博弈的分类 非合作博弈 有限两人博弈囚徒困境 合作博弈 无限多人博弈囚徒困境 常见的博弈定律 零和博弈 重复博弈 智猪博弈 斗鸡博弈 猎鹿博弈 蜈蚣博弈 酒吧博弈 枪手博弈 警匪博弈
  • react使用阿里云对象存储,ali-oss, antd upload to ali-oss

    最近写阿里云图片上传 碰到一些小问题 在此总结一下 项目环境 create react app antd node6 1 0 看了阿里云oss对象存储sdk 直接采用node 的安装方式 在使用的时候碰到了问题 yield client p
  • Partial Evaluation

    Scrapping your Inefficient Engine Using Partial Evaluation to Improve Domain Specific Language Implementation AnyDSL A P
  • C++程序基础(15):C++while循环例题

    C while循环例题 前言 例题 1 1 含k个3的数 做法分析 完整代码演示 前言 通过上节的介绍 大家对while循环语句想必也有了一定的了解 那么在本篇中我们将来看一道较为复杂的例题 帮助大家巩固和进一步理解while循环语句 例题

随机推荐

  • 四大含金量高的算法证书考试

    证书考试推荐 一 PAT 计算机程序设计能力测试 二 CCF CSP认证 三 团体程序设计天梯赛 四 蓝桥杯大赛 一 PAT 计算机程序设计能力测试 官网 PAT 计算机程序设计能力测试 PAT为浙江大学出的一款程序设计的测试网站 分为乙级
  • 在VS里面怎么用scanf函数

    大家请看这个页面 认为scanf函数不安全 考虑使用scanf s替换 但是这个scanf s函数是VS这个IDE提供的 不是C语言标准库中的函数 这就意味着你在你代码中使用了scanf函数 你的代码在VS编译器上是不能通过编译的 如果不用
  • 【Linux学习笔记】管理Linux操作系统:简单的关闭防火墙

    临时关闭防火墙 命令查看防火墙状态 root rst firewall cmd state running 防火墙处于开启状态 停止防火墙 root rst systemctl stop firewalld service root rst
  • 使用Java播放MP3或Wav音频

    JavaSound是一个小巧的低层应用程序接口 API 它支持数字音频和乐器数字接口 MIDI 数据的记录和回放 在JDK 1 3 0之前 JavaSound是一个标准的Java扩展API 但从Java 2的1 3 0版开始 JavaSou
  • Git Bash 中使用 Python 命令

    Git Bash 中使用 Python 命令 在 Windows 系统中 安装 Git 后可以在任何位置右键点击使用 Git Bash 在 Git Bash 中可以使用 Linux 中的命令 在 Git Bash 中可以使用 python
  • 基于GroundingDINO构建目标检测数据集自动标注工具-支持COCO和VOC格式

    0 介绍 GroundingDINO是最新发布的zero shot目标检测器 在多个数据集上取得了很好的结果 在该方法的基础上 本人修复该方法自动标注的bug 并增加VOC格式 1 安装GroundingDINO 根据github提供的源码
  • 【云原生之Docker实战】在Docker环境部署Answer问答平台

    云原生之Docker实战 在Docker环境部署Answer问答平台 一 Answer介绍 二 检查本地Docker环境 1 检查本地Docker版本 2 检查Docker状态 3 检查docker compose版本 三 下载Answer
  • Binder的工作机制浅析

    在Android开发中 Binder主要用于Service中 包括AIDL和Messenger 其中Messenger的底层实现就是AIDL 所以我们这里通过AIDL来分析一下Binder的工作机制 一 在Android Studio中建立
  • AI绘画指南 如何设置与使用 stable diffusion webui (SD webui)

    分享最近对AI绘画的理解和实践经验 希望帮助那些对AI绘画有兴趣但不知如何入门的人 分享的内容主要包括对stable diffusion webui界面的介绍 解释参数的含义和如何进行调整 此外 还会介绍如何在txt2img中设置特征点 以
  • 打开方式无法添加程序的解决办法

    打开方式无法添加程序的解决办法 右键选择打开方式 发现想要的程序没有在列表里面 点击浏览 选择想要的这个程序 点击打开 回到了选择列表 发现没有把想要的程序加进去 该如何处理 方案一 想要使用的exe程序在某个中文命名的文件夹中 这样是添加
  • python基础:inspect模块各函数的用法

    目录 前言 一 inspect模块总览 1 获取成员与判断 2 获取源代码 3 类与函数 4 调用栈 二 inspect模块方法的使用 1 getmembers 2 getcomments getdocs 3 signature 获取方法和
  • 通过一条简单的SQL 来理解MYSQL的解析SQL的过程

    因为打赏账号 所以作者署名必须是 carol11 实际作者还是 Austin Liu 有的时候理解平时习而为常的一件事情 到时有很多的意外的发现 今天就从一条MYSQL的查询语句入手 看看我们还能挖掘点什么 首先一个SQL 语句 会经历二个
  • Python基础教程:第一门编程语言 第6章习题3 写一个猜数字小游戏,要能提示大了还是小了,并且有轮数限制。

    import random number random choice range 101 随机抽出0 100中一个数 guess 102 n 10 while guess number if n 0 限制次数 print 游戏失败 brea
  • 课程作业1-简单课程设计作业——个人通讯录数据库系统(java,MySQL)

    总结介绍 本次个人通讯录数据库系统主要目的是为了做出一个功能齐全 简单易用的信息管理系统提高保存联系人效率 由于能力有限 界面做的有点不好看 还有在登录的编程只做到将登录名和密码设为固定的字符值 修改只能从代码处进行修改 未做到可注册多个用
  • 02-----关于Qt下报error: undefined reference to `__imp_WSAGetLastError‘(Windows环境)

    1 关于Qt下报error undefined reference to imp WSAGetLastError Windows环境 错误已经很明确了 就是我们在Windows下使用网络相关的接口时 必须初始化网络库 即socket库的编译
  • JDBC常用连接URL

    1 Oracle8 8i 9i数据库 thin模式 Class forName oracle jdbc driver OracleDriver newInstance String url jdbc oracle thin localhos
  • SpringBoot整合hibernate

    添加springboot依赖 先使用idea创建maven项目 创建过程可以参考下面的博客 http blog csdn net supervictim article details 53490046 创建完maven项目之后添加spri
  • 用例编号怎么规定_怎么看检测报告

    一 怎么看检测报告 1 无论是使用什么系统来检测论文 在检测完成之后都会出现有查看报告 下载报告的相关项目或者按钮 直接点击查看报告项就可以查看报告 点击下载报告项就会将检测报告用PDF的形式保存到本地 2 以知网的检测报告为例 在检测报告
  • (小白教程)anaconda安装配置及可能遇到的问题解决

    相信来搜索的都懂anaconda 的绝美优势 这里便不再赘述了 啥也不说 开干 第一步 下载并安装软件 https www anaconda com 选择适合你的版本 我这里是window10 以管理员身份运行 选择All Users 继续
  • APNS设置

    APNS设置 openssl x509 in aps development cer inform der out MobileCAPCert pem openssl pkcs12 nocerts out MobileCAPKey pem