91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 237KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-13
  • 語言: C#
  • 標簽:

資源簡介

C#(VS2017)阿里云云市場發(fā)票內(nèi)容識別demo。需要自行購買(或申請)APP CODE。目前的優(yōu)惠是:可免費500次。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.IO;
using?System.Linq;
using?System.Net;
using?System.Net.Security;
using?System.Security.Cryptography.X509Certificates;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;

namespace?WindowsFormsApp1
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?const?String?host?=?“https://ocrapi-invoice.taobao.com“;
????????private?const?String?path?=?“/ocrservice/invoice“;
????????private?const?String?method?=?“POST“;
????????private?const?String?appcode?=?“eb15f9d262474f998880361a1dbea***“;

????????public?string?ImageTobase64(string?FileName)
????????{
????????????String?img_file?=?FileName;
????????????FileStream?fs?=?new?FileStream(img_file?FileMode.Open);
????????????BinaryReader?br?=?new?BinaryReader(fs);
????????????byte[]?contentBytes?=?br.ReadBytes(Convert.ToInt32(fs.Length));
????????????String?base64?=?System.Convert.Tobase64String(contentBytes);
????????????GC.Collect();
????????????return?base64;
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????try
????????????{
????????????????OpenFileDialog?openFileDialog?=?new?OpenFileDialog();
????????????????if?(openFileDialog.ShowDialog()?==?DialogResult.OK)
????????????????{
????????????????????FileStream?fileStream?=?new?FileStream(openFileDialog.FileName?FileMode.Open?FileAccess.Read);
????????????????????pictureBox1.Image?=?Image.FromStream(fileStream);
????????????????????fileStream.Close();
????????????????????fileStream.Dispose();

????????????????????label2.Text?=?openFileDialog.FileName;
????????????????}

????????????????string?image_base64?=?ImageTobase64(this.label2.Text);
????????????????String?querys?=?““;
????????????????String?bodys?=?“{\“img\“:\““?+?image_base64?+?“\“}“;
????????????????String?url?=?host?+?path;
????????????????HttpWebRequest?httpRequest?=?null;
????????????????HttpWebResponse?httpResponse?=?null;

????????????????if?(0?????????????????{
????????????????????url?=?url?+?“?“?+?querys;
????????????????}

????????????????if?(host.Contains(“https://“))
????????????????{
????????????????????ServicePointManager.ServerCertificateValidationCallback?=?new?RemoteCertificateValidationCallback(CheckValidationResult);
????????????????????httpRequest?=?(HttpWebRequest)WebRequest.CreateDefault(new?Uri(url));
????????????????}
????????????????else
????????????????{
????????????????????httpRequest?=?(HttpWebRequest)WebRequest.Create(url);
????????????????}
????????????????httpRequest.Method?=?method;
????????????????httpRequest.Headers.Add(“Authorization“?“APPCODE?“?+?appcode);
????????????????//根據(jù)API的要求,定義相對應(yīng)的Content-Type
????????????????httpRequest.ContentType?=?“application/json;?charset=UTF-8“;
??

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\
?????文件???????19968??2019-04-12?13:27??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\.suo
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\sqlite3\
?????文件???????????0??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\sqlite3\db.lock
?????文件????????4096??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\sqlite3\storage.ide
?????文件???????32768??2019-04-12?11:39??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\sqlite3\storage.ide-shm
?????文件?????1705712??2019-04-12?13:27??WindowsFormsApp1\.vs\WindowsFormsApp1\v15\Server\sqlite3\storage.ide-wal
?????目錄???????????0??2019-04-12?13:26??WindowsFormsApp1\WindowsFormsApp1\
?????文件????????1146??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1.sln
?????文件?????????189??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\App.config
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\bin\
?????目錄???????????0??2019-04-12?11:48??WindowsFormsApp1\WindowsFormsApp1\bin\Debug\
?????文件???????11776??2019-04-12?12:00??WindowsFormsApp1\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe
?????文件?????????189??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe.config
?????文件???????30208??2019-04-12?12:00??WindowsFormsApp1\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.pdb
?????文件????????4443??2019-04-12?13:26??WindowsFormsApp1\WindowsFormsApp1\Form1.cs
?????文件????????4374??2019-04-12?11:44??WindowsFormsApp1\WindowsFormsApp1\Form1.Designer.cs
?????文件????????5817??2019-04-12?11:44??WindowsFormsApp1\WindowsFormsApp1\Form1.resx
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\
?????目錄???????????0??2019-04-12?11:48??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\
?????文件?????????831??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????7276??2019-04-12?11:40??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????目錄???????????0??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\TempPE\
?????文件??????????42??2019-04-12?11:39??WindowsFormsApp1\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csproj.CoreCompileInputs.cache
............此處省略15個文件信息

評論

共有 條評論

相關(guān)資源