next

在SharePoint 平台上发布一个Power BI 报表

落爺英雄遲暮 提交于 2020-11-19 05:42:13
使用SharePoint 列表数据创建一个桌面版的Power BI 报表 1. Let's use the same data Finance Sample Workbook from Power BI site for this example as well 2. Load the data in SharePoint List 3. Open the Power BI for desktop tool and sign in using your O365 ID & password 4. Click File -> New -> It should open the blank report 5. Click Get Data option from Home menu -> More -> Online Services -> SharePoint Online List as shown below: 6. Enter the SharePoint URL - just the site collection but not till the List URL 7. Once you enter, select Microsoft account option from Anonymous, Windows, Microsoft account options

Core2.0知识整理

亡梦爱人 提交于 2020-11-19 05:17:08
概述 Commond-Line ASP.NET结构文件 Startup 配置文件 中间件和依赖注入 依赖注入原理 框架自带的依赖注入(IServiceCollection) 依赖注入生命周期 依赖注入使用方式 通过构造函数 MVC的ActionAction中可以使用 [FromServices]来注入对象、 中间件(MiddleWare) Use:进入中间件http管道模式, Map:映射分支 Run: 执行,并返回Response public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseMyMiddleware(); } public class MyMiddleware { private readonly RequestDelegate _next; public MyMiddleware(RequestDelegate next) { _next = next; } public Task Invoke(HttpContext context) { // 这里是获取context信息后处理的代码 return this ._next(context); } } public static class MyMiddlewareExtensions { public

Cat VS Dog HDU

妖精的绣舞 提交于 2020-11-19 02:52:30
Cat VS Dog Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) Total Submission(s): 4383 Accepted Submission(s): 1602 Problem Description The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/hers dislike-animal must be a dog, and vice versa. Now the zoo administrator is removing some animals, if one child's like-animal is not removed and his/hers dislike-animal is removed, he/she will be happy. So the administrator wants to know which animals he

.Net Core Web Api实践(一)中间件的使用

可紊 提交于 2020-11-19 00:17:03
前言: 从2019年年中入坑.net core已半年有余,总体上来说虽然感觉坑多,但是用起来还是比较香的。本来我是不怎么喜欢写这类实践分享或填坑记录的博客的,因为初步实践坑多,文章肯定也会有各种错误,跟别人优秀的文章比起来,好像我写的东西没有什么存在的价值。但是入坑.net core以来,这种思想开始慢慢改变了,毕竟我依靠别人解决问题的文章也不尽是教科书般的存在,但是很使用。所以,把自己的实践过程记录出来,一方面是巩固和完善自己的技术栈,另一方能帮助到其他人,或者跟他人共同探讨,也不算闭门造轮子,自娱自乐了吧。.net core web api的实践记录,就由中间件的使用开始吧。 1、必要的知识储备 在阅读这篇文章的时候,我希望读者已经了解接口的逆变与协变、泛型、委托等知识点(个人认为这是了解.net各种框架的必备知识),同时也知道.net core的依赖注入、生命周期的相关内容(园子里前几名的大佬,对这块都有非常优秀的讲解,这里我就不作介绍,有需要的童鞋可以留言,我提供连接)。 2、.net core webapi项目中配置中间件 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure

从零开始的KMP&&AC自动机

我只是一个虾纸丫 提交于 2020-11-18 23:59:46
五一机房的专题是字符串问题,自己刚好也在学习字符串匹配,于是就打算写篇关于最近学的几个经典的算法的 $Blog$ ~ 嗯,还是先甩定义 <font face="楷体"><p align="left"> 模式匹配 是数据结构中字符串的一种基本运算,给定一个子串,要求在某个字符串中找出与该子串相同的所有子串,这就是模式匹配。<p align="right">——参考自 $Baidupedia$ </p></font> 熟悉几个名词 模式串:给定的子串 $P$ 匹配串:待查找的字符串 $T$ 失配:按位匹配的过程中,某一位不匹配时称当前位置失配 接下来会介绍两种算法 $KMP$ :解决单个模式串的匹配问题的一种算法 $AC$ 自动机:解决多个模式串的匹配问题的一种算法 $KMP$ 甩定义 <font face="楷体"><p align="left"> $KMP$ $(Knuth$ - $Morris$ - $Pratt)$ 即克努斯-莫里斯-普拉特算法,该算法可在一个主文本字符串 内查找一个词的出现位置。此算法通过运用对这个词在不匹配时本身就包含足够的信息来确定下一个匹配将在哪里开始的发现,从而避免重新检查先前匹配的字符。 这个算法是由高德纳和沃恩·普拉特在1974年构思,同年詹姆斯 $·H·$ 莫里斯也独立地设计出该算法,最终由三人于 $1977$ 年联合发表。<p align=

服务器开发- Asp.Net Core中的websocket,并封装一个简单的中间件

Deadly 提交于 2020-11-18 23:55:14
先拉开MSDN的文档,大致读一遍 (https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/websockets) WebSocket 是一个协议,支持通过 TCP 连接建立持久的双向信道。 它可用于聊天、股票报价和游戏等应用程序,以及 Web 应用程序中需要实时功能的任何情景。     使用方法    安装 Microsoft.AspNetCore.WebSockets 包。 配置中间件。 接受 WebSocket 请求。 发送和接收消息。 如果是创建的asp.net core项目,默认会有一个all的包,里面默认带了websocket的包。所以,添加的时候,注意看一下 然后就是配置websocket的中间件 app.UseWebSockets();   如果需要更细致的配置websocket,MSDN文档上也提供了一种配置缓冲区大小和ping的option var webSocketOptions = new WebSocketOptions() { KeepAliveInterval = TimeSpan.FromSeconds( 120 ), //向客户端发送“ping”帧的频率,以确保代理保持连接处于打开状态 ReceiveBufferSize = 4 * 1024 // 用于接收数据的缓冲区的大小。

nginx 500错误分析

非 Y 不嫁゛ 提交于 2020-11-18 20:03:39
在春节时浅橙的接口nginx上偶尔会报500的错误,但tomcat应用日志里找不到什么东西。后来想到有可能不是应用报的错,而是在应用处理之前tomcat就报错了,于是在spring boot中加上了tomcat的访问日志。几天后,发现了这个错 org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@4542552a rejected from java.util.concurrent.ThreadPoolExecutor@a3464b4[Running, pool size = 10 , active threads = 10 , queued tasks = 0 , completed tasks = 43433 ] 看起来是线程池的问题,而且是业务逻辑进入处理之前出的问题,业务逻辑的总入口是 * 浅橙请求我方api接口封装 * * @Description * * @author <a href="changjunhui8173@adpanshi.com"

【C++】【三】单向链表

怎甘沉沦 提交于 2020-11-18 15:29:11
// 单向链表.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include<stdlib.h> typedef struct LINKNODE { void* data; struct LINKNODE* next; }linknode; typedef struct LINKLIST { LINKNODE* head; int size; }linklist; //print function ptr typedef void(*PRINTLINKNODE)(void*); //init linklist* Init_linklist() { linklist* list = (linklist*)malloc(sizeof(linklist)); list->size=0; //头节点,方便判断位置 list->head = (linknode*)malloc(sizeof(linknode)); list->head->data = NULL; list->head->next = NULL; return list; } void Insert_linklist(linklist* list, int pos, void* data) { if (list == NULL) { return; }

【C++】【五】循环链表

大憨熊 提交于 2020-11-18 15:28:26
// 单向循环链表.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include<stdlib.h> #include <iostream> #define CIRCLELINKLIST_TRUE 1 #define CIRCLELINKLIST_FALSE 0 typedef struct clinknode { struct clinknode* next; }clinknode; typedef struct circlelinkist { clinknode head; int size; }circlelinkist; typedef int(*COMPARE)(clinknode*, clinknode*); typedef void(*PRINTNODE)(clinknode*); circlelinkist* Init_circlelinkist() { circlelinkist* clist = (circlelinkist*)malloc(sizeof(circlelinkist)); clist->head.next = &(clist->head); clist->size = 0; return clist; } void Insert_circlelinkist(circlelinkist* clist, int

3分钟短文 | Laravel 中间件传递数据到控制器

雨燕双飞 提交于 2020-11-18 08:36:35
引言 Laravel分层设计中,一般在路由阶段对请求进行初步的过滤筛选, 对不合格的或者非法的请求,直接可以中断请求,返回错误结果。 一般我们也是这么做的,但是你想过没有,中间件如何传递数据到下游?本文就来说一说。 学习时间 比如有一个需求,根据用户身份,判断其是否可以访问某个页面。先注册一个路由地址,在 route.php 文件内添加如下参数: Route::get('pages/{id}', [ 'as' => 'pages', 'middleware' => 'pageUser', 'uses' => 'PagesController@view' ]); 接着是实现 PageUserMiddleware.php 中间件逻辑,代码如下: public function handle($request, Closure $next) { $pageId = $request->route('id'); $page = Page::with('users')->where('id', $pageId)->first(); if(!$page->users()->wherePivot('user_id', Auth::user()->id)->exists()) { return redirect()->route('redirectRoute'); } return $next(