sub

BVA将excel题库转换为word版

匿名 (未验证) 提交于 2019-12-03 00:34:01
'单选题有答案相关代码: Sub 单选有答案() Dim WdApp As Word.Application Dim owd As Word.Document Dim i, j As Integer Dim Rcount, Colcount As Integer Rcount = Sheets(1).UsedRange.Rows.Count Colcount = 7 Set WdApp = New Word.Application WdApp.Visible = True Set owd = WdApp.Documents.Add owd.Content.InsertAfter ("单选题") owd.Content.InsertAfter (Chr(10)) For i = 2 To Rcount owd.Content.InsertAfter (CStr(Sheets(1).Cells(i, 1)) + ". ") owd.Content.InsertAfter (Sheets(1).Cells(i, 2)) owd.Content.InsertAfter (Chr(10)) For j = 3 To 6 owd.Content.InsertAfter (Sheets(1).Cells(1, j) + ". " + CStr(Sheets(1).Cells(i, j)) + "

为什吗C++中的模板不支持分离编译

匿名 (未验证) 提交于 2019-12-03 00:30:01
按照我们之前的习惯,写出的代码是这样的 // Template.h #pragma once #include <stdio.h> #include <iostream> using namespace std ; int Add( int a, int b); //对普通函数的声明 template < class T> T Sub(T a,T b); //对模板函数的声明 //Template.cpp #include "Template.h" int Add( int a, int b) //普通函数的定义 { return a+b; } template < class T> T Sub(T a,T b) //模板函数的定义 { return a-b; } //test.cpp #include "Template.h" int main() { cout << "ret_1:" <<Add( 1 , 2 )<<endl; cout << "ret_2:" <<Sub( 3 , 6 )<<endl; return 0 ; } Makefile文件是这样写的: a.out: Template .cpp test .cpp g++ -g -o $@ $^ .PHONY: clean clean: rm -f a .out 我们进行编译后发现: 说未定义的Sub函数

Nginx编译安装第三方模块http_substitutions_filter_module

烂漫一生 提交于 2019-12-03 00:24:35
1. >>ngx_http_substitutions_filter_module OR HttpSubModule ? 为了应急处理或者一些需要,有时候需要使用Nginx的反向代理某站点,并通过 HttpSubModule 和ngx_http_substitutions_filter_module 模块替换正文内容和URL。 但是通常LNMP套件安装的webserver并没有编译安装nginx官方模块HttpSubModule(官方option),并且,官方自带的模块 HttpSubModule 只能匹配1条规则,但是使用第三方模块ngx_http_substitutions_filter_module 可以匹配多条规则。 备注: ngx_http_substitutions_filter_module 是指第三方nginx模块 substitutions4nginx (原: Google Code 现: github ) HttpSubModule 是指Nginx官方的 with-http_sub_module模块(option) Nginx自身带的module并不多,这也是它为什么性能好,系统开销较小的原因之一,相比apache,它不能动态的加载module,如果之前编译安装了Nginx,这时候就需要重新编译nginx添加模块,并替换掉原先的nginx执行文件。 2. 1

AVL树

匿名 (未验证) 提交于 2019-12-03 00:22:01
数据结构上机课花了点时间实现的AVL树,基本上在抄书。。 包含了二叉树、二叉查找树和AVL树的实现,不过毕竟没有真正学过C++,对OOP也还不算很熟悉。。碰到了一些问题: 继承的类也不能访问父类的private成员,不过可以用 using 父类::成员名 的方式访问父类的protected成员 子类中重载了父类的某个成员函数后,对子类和父类中的该函数 ͬʱ 加virtual关键字修饰,可以在运行时判断具体需要调用的函数是哪一个版本 还没有深入研究过虚函数……总之OOP有点复杂,但好像有点优美? #include < iostream > #include < stack > using namespace std; enum Balance_factor {left_higher, equal_height, right_higher}; enum Error_code {success, not_present, duplicate_error}; template < class Record > struct Binary_node { Record data ; Binary_node < Record > * left, * right; Binary_node() {left = right = NULL ;}; Binary_node(const Record & x

Apache Nifi技术内幕

匿名 (未验证) 提交于 2019-12-03 00:21:02
2.4.3 为数据流添加Controller Service 为一个数据流添加Controller Service,你可以右击处理组然后选择Configure,如 也可以通过控制台的操作面板选择Configure,如 当从控制面板进入Controller Service添加配置页面,需要对于Controller Service的应用范围需要特别注意。在没有选中任何处理组的情况下点击控制面板添加配置完成的Controller Service的范围是当前父处理组的范围,它将会被应用到父处理组下的所有子处理组。如 Sub Process Group 1和 Sub Process Group 2都属于Parent Process Group,在没有选择任何处理组情况下,从控制面板进入Controller Service添加配置页添加的Controller Service的应用范围是Parent Process Group,那么Sub Process Group 1和 Sub Process Group 2都可以关联使用这个Controller Service,如 在选择了Sub Process Group 1处理组的情况下,从控制面板进入Controller Service添加配置页添加的Controller Service的应用范围是Sub process group 1,如

C++ 重写String类

匿名 (未验证) 提交于 2019-12-03 00:21:02
codeblocks gcc version 4.9.2 (tdm-1) 构造方法 描述 String(char *s,int len) 构造方法初始化数据 成员方法 描述 char *getStr() 获取当前的String(打印) int getLength() 获取当前String的长度 char *Strcpy(char *s) 字符串的复制 char *Strcat(char *s) 字符串的连接 int Compare(char *b) 字符串的比较 char *substring(int sub_start,int sub_end) 指定起始终止位置求子串 void exchange(char *s) 字符串的交换 int BF_Find_String(char *s) 在当前字符串String中查找子串 int indexOf(char index) 查找某字符在当前String中第一次出现的位置 void toUpperCase() 字符串小写转大写 void toLowerCase() 字符串大写转小写 char *trim() 消除字符串中的空格 char *SplitStr() 消除{,!”“#$%&’()*+,-./}的字符 void set(int index,char letter) 在指定字符串的指定位置添加某字符 #include<

MOSSE跟踪算法源码解析

匿名 (未验证) 提交于 2019-12-03 00:19:01
MOSSE 算法源码简单解析 源码 如下: // This file ispart of the OpenCV project. // It is subject to the license terms in the LICENSEfile found in the top-level directory // of this distribution and athttp://opencv.org/license.html. // //[1] David S. Bolme et al. "Visual Object Trackingusing Adaptive Correlation Filters" // http://www.cs.colostate.edu/~draper/papers/bolme_cvpr10.pdf // // // credits: // Kun-Hsin Chen: for initial c++ code // Cracki: for the idea of only converting the usedpatch to gray // #include "opencv2/tracking.hpp" namespace cv { namespace tracking { struct DummyModel : TrackerModel {

【DP?】1218. Longest Arithmetic Subsequence of Given Difference

匿名 (未验证) 提交于 2019-12-03 00:13:02
arr difference arr difference . 思路:直观的思路是,先用一个map记住所有出现的数字的索引号,然后从头遍历数组,遇到每一个数的时候,用一个指针指向序列的下一个数,直到序列结束,记录这个序列的长度,对每一个元素都这样做。比如, 【1,3,2,5,7,6,5,3,1】 -2 从元素1开始,序列的下一个数是-1,但不存在。pass 元素3,序列下一个数是1,指针指向最后一个1,然后序列结束,长度为2. 以此类推,找到最大长度。 这个思路可以pass36/38的数据,但是会TLE。 更好的思路是,用一个map<int,int>记录结束于某元素的最长序列长度。遍历数组: 这里,如果arr[i]-difference即序列中的上一个元素不存在,则为0+1=1,是一个元素的长度。 如果上一个元素存在,则序列长度就是结束于上一个元素的长度加一。 【1,3,2,5,7,6,5,3,1】 -2 map的最大值就是最长序列。 class Solution { public: int longestSubsequence(vector<int>& arr, int difference) { map<int,int > count; int answer=1; for(int i=0;i<arr.size();i++){ count[arr[i]]=1+count[arr

Vue 核心最基本的功能

匿名 (未验证) 提交于 2019-12-03 00:08:02
~~~ <html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <h4>声明式渲染 </h4> <i>Vue.js 的核心是一个允许采用简洁的模板语法来声明式地将数据渲染进 DOM 的系统</i><br> 文本插值 <div id="app" style ="border:solid 1px red; "> {{ message }} </div> <script type="text/javascript"> var app = new Vue({ el: '#app', data: { message: 'Hello Vue!' } }) </script> 注:<sub>所有东西都是响应式的。我们要怎么确认呢?打开你的浏览器的 JavaScript 控制台 (就在这个页面打开),并修改 app.message 的值,你将看到上例相应地更新。</sub> <hr/> 指令绑定 <div id="app-2" style ="border:solid 1px red; "> <span v-bind:title="message"> 鼠标悬停几秒钟查看此处动态绑定的提示信息! </span> </div> <script type="text

ccf csp 201909-2 小明种树(续)

匿名 (未验证) 提交于 2019-12-03 00:06:01
import java . util . Scanner ; public class Two { public static void main ( String [] args ) { Scanner sc = new Scanner ( System . in ); int N = sc . nextInt (); long T = 0 , D = 0 , E = 0 ; boolean [] drop = new boolean [ N ]; for ( int i = 0 ; i < N ; i ++){ drop [ i ] = false ; int m = sc . nextInt (); int subTot = 0 ; for ( int j = 0 ; j < m ; j ++){ int sub = sc . nextInt (); if ( sub > 0 ){ if ( j == 0 ){ subTot = sub ; } else if ( subTot != sub ){ D ++; subTot = sub ; drop [ i ] = true ; } } else { subTot += sub ; } } T += subTot ; } for ( int i = 0 ; i < N ; i ++){ if ( drop [ i ] &&