未找到

node.js用saml2连接Identity Provider服务器完成Azure AD/Active Directory域帐号身份认证
by ourjs keys Node.JS 1679642750810

Azure Active Directory提供无缝单一登录,介绍如下:

https://learn.microsoft.com/zh-cn/azure/active-directory/hybrid/how-to-connect-sso-quick-start

网站可通过 saml2 或 oauth2 协议,通过Windows域帐号登陆网站应用:

未发布 Kendo UI常用示例汇总(四)
by AABBbaby keys 分享 1459823595894

<Kendo UI Professional试用版下载>

Kendo UI Professional 提供开源和商业两个版本。开源版 Kendo UI Core,有40+个框架和组件;商业版整合了之前的Kendo UI WebKendo UI Mobile 和 Kendo UI DataViz ,一共有70+个框架和组件。作为Kendo UI的升级版,Kendo UI Professional既可以开发网页版应用程序,也可以开发移动版应用程序,并且在性能上也有显著的优化和提升。

未发布 助力大数据集成,且看DataStage新玩法
by chenjunji123456 keys 分享 1474511983271
未发布 Zend Studio使用教程:使用PHP 7进行开发(二)
by AABBbaby keys 分享 1525919185724

【特惠专享】Zend Guard在线订购专享特别优惠!在线订购>>

【特惠专享】Zend Studio线订购专享特别优惠!在线订购>>

本教程将为大家介绍Zend Studio新版本中支持PHP 7的一些新功能,以便您可以在项目中开始使用PHP 7。

Zend Studio最新试用版下载请猛戳>>>

教程内容

在本教程中,您将学习:

  • 如何使用PHP 7 Express将项目迁移到PHP 7
  • 如何创建一个新的PHP 7项目
  • 如何为现有项目添加对PHP 7的支持
  • 如何在Zend Studio中运行PHP 7项目

先决条件

未发布 【示例教程】使用leadtools的WCF接口功能实现从web端上传Dicom影像文件
by Harriet666 keys 分享 1517903663716
Leadtools 19总套包下载>>>
 
leadtools为web端提供了wcf接口来供用户可以登录pacs系统,检索,查看以及上传影像。本篇博客讲解如何创建一个网页来实现上传功能,通过WCF进行dicom文件的上传时,是将dicom文件转换为base64数据流,分段进行传输。
 
本篇博客运行的前提是已经部署完成Leadtools HTML5 Web Viewer,可以正常浏览。参考https://www.evget.com/article/2018/2/6/27757.html
 
在部署完成后,将下面的代码复制到一个HTML文件中,即可运行进行测试。另外需要添加html文件所需的jquery.min.js到同文件夹路径下。
<head>
    <meta charset="UTF-8">
head>

<form onsubmit="return false;">
    <input type="hidden" name="file_base64" id="file_base64">
    <input type="file" id="fileup" multiple="multiple">
    <input type="submit" value="submit" onclick="$.post('./uploader.php', $(this).parent().serialize());">
    <div>
        <div id="msg">div>
    div>
form>
<script src="scripts/jquery.min.js">script>
<script>

    $(document).ready(function () {
        authcookie = login();
        document.cookie = "authcookie=" + authcookie;
        $("#fileup").change(function () {
            getauthcookie("authcookie");
            filelist = this.files;
            file = filelist[fileindex];
            upload(file);
        });
    });
    var authcookie;//保存authcookie
    var filelist;//上传文件列表
    var file;//当前上传文件
    var tempfile = "";//临时文件名称
    var position = 0;
    var size = 40000;//分段大小
    var done = false;
    var fileindex=0;//当前上传文件序列号

    function upload(tempfile) {
        if(position==0)
            done=false;
        var reader = new FileReader();
        if (file.size > position + 40000)
            reader.readAsArrayBuffer(file.slice(position, position + 40000));
        else 
            reader.readAsArrayBuffer(file.slice(position, file.size));
        reader.onload = function (e) {
            if (e.target.readyState === 2) {
                var base64string = base64ArrayBuffer(e.target.result);
                var data = {
                    authenticationCookie: authcookie,
                    dicomData: base64string,
                    fileName: tempfile,
                    status: position==0?"start":"append"
                };
                tempfile = senddata(JSON.stringify(data));
                if (!done) {
                    position += 40000;
                    upload(tempfile);
                    if (position+40000>file.size)
                        done = true;
                }
                else {
                    var data = {
                        authenticationCookie: authcookie,
                        dicomData: "",
                        fileName: tempfile,
                        status: "done"
                    };
                    tempfile = senddata(JSON.stringify(data));
                    position = 0;
                    $("#msg").html($("#msg").html()+"第"+(fileindex+1)+"个文件已经上传完成

"); fileindex += 1; if (fileindex < filelist.length) { file = filelist[fileindex]; upload(tempfile); } else { fileindex = 0; $("#msg").html($("#msg").html() + "文件全部已经上传完成

"); } } } }; } function senddata(data) { var result; $.ajax({ type:"post", url: "http://localhost/MedicalViewerService19/StoreService.svc/UploadDicomImage", data: data, contentType: "application/json", dataType: "json", success: function(data){result= data}, async: false }); return result; } function login() { var auth; var logininfo = { userName: "a", password: "a", userData: "" }; $.ajax({ type: "post", url: "http://localhost/MedicalViewerService19/AuthenticationService.svc/AuthenticateUser", data: JSON.stringify(logininfo), contentType: "application/json", dataType: "text", success: function (data) { auth= data }, async: false }); return auth; } function query() { } function getauthcookie() { document.cookie.split(";").forEach(function (val, index) { var index = val.indexOf("="); if ($.trim(val.substring(0, index)) == "authcookie") { authcookie = $.trim(val.substring(index + 1, val.length)); } }); return ""; } function base64ArrayBuffer(arrayBuffer) { var base64 = ''; var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var bytes = new Uint8Array(arrayBuffer); var byteLength = bytes.byteLength; var byteRemainder = byteLength % 3; var mainLength = byteLength - byteRemainder; var a, b, c, d; var chunk; // Main loop deals with bytes in chunks of 3 for (var i = 0; i < mainLength; i = i + 3) { // Combine the three bytes into a single integer chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; // Use bitmasks to extract 6-bit segments from the triplet a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18 b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12 c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6 d = chunk & 63; // 63 = 2^6 - 1 // Convert the raw binary segments to the appropriate ASCII encoding base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]; } // Deal with the remaining bytes and padding if (byteRemainder == 1) { chunk = bytes[mainLength] a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2 // Set the 4 least significant bits to zero b = (chunk & 3) << 4; // 3 = 2^2 - 1 base64 += encodings[a] + encodings[b] + '=='; } else if (byteRemainder == 2) { chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1]; a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10 b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4 // Set the 2 least significant bits to zero c = (chunk & 15) << 2 // 15 = 2^4 - 1 base64 += encodings[a] + encodings[b] + encodings[c] + '='; } return base64; } script>

6

未发布 2016年,我们为什么要学习C++?
by Elyn keys 分享 1467874660215
C++引入了面向对象的概念,使得开发人机交互类型的应用程序更为简单、快捷。很多优秀的程序框架包括Boost、Qt、MFC、OWL、wxWidgets、WTL就是使用的C++。那么除此之外,学习C++还有哪些重要的作用呢?
未发布 用户界面框架jQuery EasyUI示例大全之菜单和拆分按钮演示
by AABBbaby keys 分享 1472780939831

<jQuery EasyUI最新试用版免费下载>

jQuery EasyUI致力于帮助web开发者更轻松的打造出功能丰富并且美观的UI界面。jQuery EasyUI提供了基于当下流行的jQuery core和HTML5的控件,助您打造适合当今网络的应用程序。

未发布 使用jQuery EasyUI添加工具栏到数据网格
by AABBbaby keys 分享 1474337962283

<jQuery EasyUI最新试用版免费下载>

本教程中的示例说明了如何将工具栏添加到数据网格中,您可以在数据网格顶部的工具栏上放置按钮。

未发布 2016 | 大数据平台类产品资讯汇总
by chenjunji123456 keys 分享 1480051351453
未发布 IntelliJ IDEA使用技巧(一)——常用快捷键
by zoujiajun33 keys 分享 1505898176111

IntelliJ IDEA在业界被公认为最好的Java开发平台之一,今天小编在这里开始给大家带来IntelliJ IDEA使用技巧连载文章,希望对大家的开发起到帮助哦~

第一篇是关于IntelliJ IDEA常用的一些快捷键,如果熟练使用,开发将会变得事半功倍哦~一起来看看吧!



 近期热门 - 点击最多
  1. React结合vite使用vue3,在纯typescript的react hooks中使用vue
  2. valtio基于Proxy代理比redux\zustand更简洁的react状态管理库
  3. React Native为http网络请求添加timeout超时异常处理: 用XMLHttpRequest替换fetch发送的区别
  4. React Native使用fetch发送http登陆验证请求失败:无法读取set-cookie并显示network request failed
  5. 克服Redux的缺点在React/Native中使用消息队列,pubsub-js更加简洁的组件间通信和状态传递方法
  6. Springboot+Gradle+Mysql+Jpa最简单实例教程
  7. SpringBoot+Spring6入门指南: 使用命令行快速搭建restful web api模板
  8. 如何通过 winax 的 ActiveXObject 或 Excel.Application 往 excel 中插入一张图片
  9. node.js用activex/com+自动化读写excel时查询接口、参数的调试方法
  10. TypeScript定义数字范围类型即仅包含【小时:分钟】的时间类型,每天指定时间点执行任务

  全端社区 - 最新回复
  1. valtio基于Proxy代理比redux\zustand更简洁的react状态管理库
  2. Windows与Mac通过git ssh和rsync实现文件共享互传
  3. Windows与Mac通过git ssh和scp实现文件共享互传
  4. React结合vite使用vue3,在纯typescript的react hooks中使用vue
  5. 使用PubSub-JS时ReactNative在后台运行一段时间唤醒后,组件无法scribe到publish的事件,typescript实现一个事件订阅发布组件
  6. React Native为http网络请求添加timeout超时异常处理: 用XMLHttpRequest替换fetch发送的区别
  7. ReactNative获取Android/iOS的MAC/IP地址: react-native-device-info模块的安装与使用
  8. React Native使用fetch发送http登陆验证请求失败:无法读取set-cookie并显示network request failed
  9. 克服Redux的缺点在React/Native中使用消息队列,pubsub-js更加简洁的组件间通信和状态传递方法
  10. Springboot+Gradle+Mysql+Jpa最简单实例教程

  开源的 OurJS
OurJS开源博客已经迁移到 OnceOA 平台。

  关注我们
扫一扫即可关注我们:
OnceJS

OnceOA