hi3559深度学习问题,大家有遇到的吗

用hi3559深度学习,自己生成的wk,运行的时候报HI_MPI_SVP_NNIE_Forward failed,大家有遇到的吗?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
使用HI3559a做深度学习nnie_mapper时遇到下面的问题
![图片说明](https://img-ask.csdn.net/upload/201901/15/1547542467_137666.png) 有没有大佬知道怎么解决
HI3559AV100平台vgs 处理osd HI_MPI_VGS_AddOsdTask 怎么使用
vgs 叠加osd,HI_MPI_VGS_AddOsdTask 这个api怎么使用呢? 参数中 VGS_ADD_OSD_S中,U64PhyAddr osd图像的物理地址,该怎么赋值呢? 使用场景是:在视频中显示图片或文字符号 有没有demo的可供参考
我用了两个定时器一个读i2c ,一个读 IO口可是I2C只能程序运行的时候打开这是为什么那
```void sanjitutai::OnTimer(UINT_PTR nIDEvent) { switch (nIDEvent) { case DealData_timer://每秒一次的处理 DealData(); /*KillTimer(DealData_timer);*/ break; case BatteryData_timer: //每分钟一次的处理 ReadBattery(); /* KillTimer(BatteryData_timer);*/ break; default: ; } CDialog::OnTimer(nIDEvent); } BOOL sanjitutai::ReadBattery() { HANDLE hI2C; // I2C设备操作号 I2C_TRANSACTION_INFO i2cInfo; byte InBuffer = 0 ; hI2C = I2C_Open(L"I2C1:"); if(hI2C == INVALID_HANDLE_VALUE) { printf("Open I2C Device fail!\r\n"); I2C_Close(hI2C); return 0; } I2C_Close(hI2C); return 0; } ```
Walk 旅行的问题
Problem Description Alice would like to visit Bob. However, they live in a hilly landscape, and Alice doesn’t like to walk in hills. She has a map of the area, showing the height curves. You have to calculate the total altitude climbed, and the total altitude descended, for the route which minimizes these numbers. It does not matter how far she has to walk to achieve this. Since you don’t know what the landscape looks like in between the height curves, you cannot know exactly how much climb and descent she will actually get in practice, but you should calculate the minimum possible under optimal conditions based on what you can deduce from the map. The map is represented as an xy grid. Alice lives in (0, 0), and Bob lives in (100 000, 0). The height curves are represented as polygons, where a polygon cannot intersect itself or another polygon. Furthermore, neither Alice nor Bob lives exactly on a height curve. Second test case from sample input (compressed). Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with 0 ≤ N ≤ 2 500, the number of height curves. One line for each height curve, with 1 ≤ Hi ≤ 1 000 being the height of the curve, 3 ≤ Pi ≤ 2 000 the number of vertices in the polygon, and the vertices x1, y1, …, xPi, yPi having integral values −300 000 ≤ xi, yi ≤ 300 000. There will be no more than 200 000 polygon vertices in total in all test cases. Output Per testcase: One line with two numbers: the total altitude climbed and the total altitude descended. Sample Input 2 2 20 3 10 10 0 -10 -10 10 25 3 20 20 0 -20 -20 20 3 100 4 -1 1 1 1 1 -1 -1 -1 300 8 -2 2 2 2 2 -2 5 -2 5 1 6 1 6 -3 -2 -3 50 8 3 3 100001 3 100001 -1 7 -1 7 2 4 2 4 -1 3 -1 Sample Output 5 0 200 250 Source
调用高德地图webapi无法显示'点标记'图标,复制下官网的代码也不行,有时候甚至没有反应,刚学习不太懂怎么回事?
![点击添加无用,多试几次有时候会有无法显示图片的黑框](https://img-ask.csdn.net/upload/201912/24/1577155738_802652.png) 点击添加无用,多试几次有时候会有无法显示图片的黑框 ``` 官方代码如下 <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <title>默认点标记</title> <link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"/> <style> html, body, #container { height: 100%; width: 100%; } .amap-icon img, .amap-marker-content img{ width: 25px; height: 34px; } .marker { position: absolute; top: -20px; right: -118px; color: #fff; padding: 4px 10px; box-shadow: 1px 1px 1px rgba(10, 10, 10, .2); white-space: nowrap; font-size: 12px; font-family: ""; background-color: #25A5F7; border-radius: 3px; } .input-card{ width: 18rem; z-index: 170; } .input-card .btn{ margin-right: .8rem; } .input-card .btn:last-child{ margin-right: 0; } </style> </head> <body> <div id="container"></div> <div class="input-card"> <label style="color:grey">点标记操作</label> <div class="input-item"> <input id="addMarker" type="button" class="btn" onclick="addMarker()" value="添加点标记"> <input id="updateMarker" type="button" class="btn" onclick="updateIcon()" value="更新点标记图标"> </div> <div class="input-item"> <input id="clearMarker" type="button" class="btn" onclick="clearMarker()" value="删除点标记"> <input id="updateMarker" type="button" class="btn" onclick="updateContent()" value="更新点标记内容"> </div> </div> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=此处我用了自己的KEY"></script> <script type="text/javascript"> var marker, map = new AMap.Map("container", { resizeEnable: true, center: [116.397428, 39.90923], zoom: 13 }); // 实例化点标记 function addMarker() { marker = new AMap.Marker({ icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png", position: [116.406315,39.908775], offset: new AMap.Pixel(-13, -30) }); marker.setMap(map); } function updateIcon() { marker.setIcon('//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png') } function updateContent() { if (!marker) { return; } // 自定义点标记内容 var markerContent = document.createElement("div"); // 点标记中的图标 var markerImg = document.createElement("img"); markerImg.className = "markerlnglat"; markerImg.src = "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png"; markerContent.appendChild(markerImg); // 点标记中的文本 var markerSpan = document.createElement("span"); markerSpan.className = 'marker'; markerSpan.innerHTML = "Hi,我被更新啦!"; markerContent.appendChild(markerSpan); marker.setContent(markerContent); //更新点标记内容 marker.setPosition([116.391467, 39.927761]); //更新点标记位置 } // 清除 marker function clearMarker() { if (marker) { marker.setMap(null); marker = null; } } </script> </body> </html> ```
Cycling 的寻找问题
Problem Description You want to cycle to a programming contest. The shortest route to the contest might be over the tops of some mountains and through some valleys. From past experience you know that you perform badly in programming contests after experiencing large differences in altitude. Therefore you decide to take the route that minimizes the altitude difference, where the altitude difference of a route is the difference between the maximum and the minimum height on the route. Your job is to write a program that finds this route. You are given: the number of crossings and their altitudes, and the roads by which these crossings are connected. Your program must find the route that minimizes the altitude difference between the highest and the lowest point on the route. If there are multiple possibilities, choose the shortest one. For example: In this case the shortest path from 1 to 7 would be through 2, 3 and 4, but the altitude difference of that path is 8. So, you prefer to go through 5, 6 and 4 for an altitude difference of 2. (Note that going from 6 directly to 7 directly would have the same difference in altitude, but the path would be longer!) Input On the first line an integer t (1 <= t <= 100): the number of test cases. Then for each test case: One line with two integers n (1 <= n <= 100) and m (0 <= m <= 5000): the number of crossings and the number of roads. The crossings are numbered 1..n. n lines with one integer hi (0 <= hi <= 1 000 000 000): the altitude of the i-th crossing. m lines with three integers aj , bj (1 <= aj , bj <= n) and cj (1 <= cj <= 1 000 000): this indicates that there is a two-way road between crossings aj and bj of length cj . You may assume that the altitude on a road between two crossings changes linearly. You start at crossing 1 and the contest is at crossing n. It is guaranteed that it is possible to reach the programming contest from your home. Output For each testcase, output one line with two integers separated by a single space: the minimum altitude difference, and the length of shortest path with this altitude difference. Sample Input 1 7 9 4 9 1 3 3 5 4 1 2 1 2 3 1 3 4 1 4 7 1 1 5 4 5 6 4 6 7 4 5 3 2 6 4 2 Sample Output 2 11
Rolling Hongshu 是怎么写的
Problem Description To see his girl friend, sweet potato has to go over thousands of mountains. What make things worse, many bitter potatoes lives in these mountains. They hate sweet potato because they don't have girl friends. In the world of potatoes, friction force does not exist. So the way potatoes travel is very simple: they start with an initial speed, rolling forward and waiting to get to the destination. Bitter potatoes lived in different places. When sweet potato rolls passing their home, they begin to chase him (surely by rolling with an initial speed). If sweet potato is caught by a bitter potato, his date with girl friend has to be canceled. Now sweet potato wants to know the minimum initial speed necessary to see his girl friend. Input First line is an integer T (T ≤ 50), the number of test cases. At the beginning of each case is three integers, N, M and w, indicate the number of peaks in the mountains, the number of bitter potatoes and the weight of sweet potato separately. 2 ≤ N ≤ 1000, 0 ≤ M ≤ 1000, 0 < w < 100000. The next N lines each contain a pair of integers. Each pair of integers xi, hi describe a peak. xi is the horizontal distant between sweet potato's home and the peak. hi is the height of the peak. All xi are different. 0 = x1 < x2 < … < xn ≤ 100000000, -100000000 ≤ hi ≤ 100000000. Between adjacent peaks is a smooth slope. The bitter potatoes are on these slopes. The following M lines each contain 3 integers. Each triple of integers pi, vi, mi describe a bitter potato. pi is the horizontal distant between his home and sweet potato’s home. vi is his initial speed. mi is his weight. 0 < pi < xn, 0 ≤ vi ≤ 100000000, 0 < mi < 100000 The gravitational constant in potatoes' world is 20. Sweet potato's home is at point (x1, h1). His girl friend lives at point (xn, hn). Output For each case, you should output “Case k: ” first. Following a number, the lower bound of sweet potato's initial speed rounded to two decimal places. Sample Input 1 6 2 100 0 0 2 5 3 2 4 1 5 3 8 -2 2 15 100 5 11 100 Sample Output Case 1: 20.62
activiti中act_hi_varinst的TASK_ID_存储为null
![图片说明](https://img-ask.csdn.net/upload/201910/11/1570786397_219120.jpg) 利用工作流添加变量,但是添加后act_hi_varinst中的TASK_ID_为null 我的代码如下: ``` Map<String, Object> variables = new HashMap<String, Object>(); variables.put("assignUID","哈哈"); variables.put("assignCUID","哈哈"); variables.put("assignCGID","哈哈"); variables.put("overSuggestion","结案意见"); taskMapper.complete(task.getId(), variables); ``` 麻烦大神找出问题所在,或者谁遇到过,麻烦帮忙解决下
S-Nim 的问题
Problem Description Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The starting position has a number of heaps, all containing some, not necessarily equal, number of beads. The players take turns chosing a heap and removing a positive number of beads from it. The first player not able to make a move, loses. Arthur and Caroll really enjoyed playing this simple game until they recently learned an easy way to always be able to find the best move: Xor the number of beads in the heaps in the current position (i.e. if we have 2, 4 and 7 the xor-sum will be 1 as 2 xor 4 xor 7 = 1). If the xor-sum is 0, too bad, you will lose. Otherwise, move such that the xor-sum becomes 0. This is always possible. It is quite easy to convince oneself that this works. Consider these facts: The player that takes the last bead wins. After the winning player's last move the xor-sum will be 0. The xor-sum will change after every move. Which means that if you make sure that the xor-sum always is 0 when you have made your move, your opponent will never be able to win, and, thus, you will win. Understandibly it is no fun to play a game when both players know how to play perfectly (ignorance is bliss). Fourtunately, Arthur and Caroll soon came up with a similar game, S-Nim, that seemed to solve this problem. Each player is now only allowed to remove a number of beads in some predefined set S, e.g. if we have S =(2, 5) each player is only allowed to remove 2 or 5 beads. Now it is not always possible to make the xor-sum 0 and, thus, the strategy above is useless. Or is it? your job is to write a program that determines if a position of S-Nim is a losing or a winning position. A position is a winning position if there is at least one move to a losing position. A position is a losing position if there are no moves to a losing position. This means, as expected, that a position with no legal moves is a losing position. Input Input consists of a number of test cases. For each test case: The rst line contains a number k (0 < k <= 100) describing the size of S, followed by k numbers si (0 < si <= 10000) describing S. The second line contains a number m (0 < m <= 100) describing the number of positions to evaluate. The next m lines each contain a number l (0 < l <= 100) describing the number of heaps and l numbers hi (0 <= hi <= 10000) describing the number of beads in the heaps. The last test case is followed by a 0 on a line of its own. Output For each position: If the described position is a winning position print a 'W'. If the described position is a losing position print an 'L'. Print a newline after each test case. Sample Input 2 2 5 3 2 5 12 3 2 4 7 4 2 3 7 12 5 1 2 3 4 5 3 2 5 12 3 2 4 7 4 2 3 7 12 0 Sample Output LWW WWL
Obfuscation 的问题怎么做
Problem Description It is a well-known fact that if you mix up the letters of a word, while leaving the first and last letters in their places, words still remain readable. For example, the sentence “tihs snetncee mkaes prfecet sesne”, makes perfect sense to most people. If you remove all spaces from a sentence, it still remains perfectly readable, see for example: “thissentencemakesperfectsense”, however if you combine these two things, first shuffling, then removing spaces, things get hard. The following sentence is harder to decipher: “tihssnetnceemkaesprfecetsesne”. You’re given a sentence in the last form, together with a dictionary of valid words and are asked to decipher the text. Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with a string s: the sentence to decipher. The sentence consists of lowercase letters and has a length of at least 1 and at most 1 000 characters. One line with an integer n with 1 ≤ n ≤ 10 000: the number of words in the dictionary. n lines with one word each. A word consists of lowercase letters and has a length of at least 1 and at most 100 characters. All the words are unique. Output Per testcase: One line with the deciphered sentence, if it is possible to uniquely decipher it. Otherwise “impossible” or “ambiguous”, depending on which is the case. Sample Input 3 tihssnetnceemkaesprfecetsesne 5 makes perfect sense sentence this hitehre 2 there hello hitehre 3 hi there three Sample Output this sentence makes perfect sense impossible ambiguous
Catch The Heart 的计算
Problem Description Do you know Popeye? He likes spinach(菠菜) very much. Maybe you have played some games about him. Now here comes one game. There are many boards, on one board there is a heart, Popeye wants to catch the heart and send it to his GF, Oliver, so that, she will be happy. At the beginning, Popeye is on one board, and the heart is on another board. Every board is described as h, l, and r, the height, the left end and the right end. You can look it as a line (l, h) (r, h) in XY coordinate system. Popeye can walk on the board, jump from one board to another. Notes: 1.He can walk on a board 1 unit per second. 2.He can only jump vertically(垂直地), and it takes 1s for each jumping. 3.He can jump only 1 unit high, so that he can jump only if the difference of the boards’ height is 1. 4.He can only jump up to the left or right point of the board. 5.He can only jump down from the left or right point of the board. You can look the picture: The problem is, find the shortest time to catch the heart. Input The first line of the input contains an integer T (T <= 20) which means the number of test cases. For each case, first line is an integer m (2 <= m <= 10000) which means the number of the boards. Then comes two lines, the first line contains h0, l0, r0, p0 (l0 <= p0 <= r0), which mean the information of the board and the position that the heart on it. Next line contains h1, l1, r1, p1 (l1 <= p1 <= r1), which mean the information of the board and the position that Popeye on it. Then comes m-2 lines, each contains hi, li, ri mean the ith (2 <= i < m) board’s information. There is no common point or common parts for every two boards. All inputs are integers, for each board, 0 <= h <= 10000, 0 <= l < r <= 100000000. Output For each case, output the shortest time to catch the heart if Popeye can catch it, otherwise output -1. Sample Input 3 3 3 4 5 5 1 0 10 0 4 1 2 2 1 1 99999999 1 0 0 100000000 100000000 5 4 0 5 0 0 0 5 0 1 5 10 2 6 15 3 5 10 Sample Output -1 100000000 24
Hi3518ev300 在HI_MIPI_ENABLE_SENSOR_CLOCK 时失败,报错:__osal_unlocked_ioctl - Input param err,it is null!
初始化代码如下: ``` static int hal_mipi_init(void) { int fd = open("/dev/hi_mipi", O_RDWR); if (fd < 0) { ERROR_LOG("open hi_mipi dev fail\n"); return HLE_RET_EIO; } int s32Ret; lane_divide_mode_t enHsMode = LANE_DIVIDE_MODE_0; s32Ret = ioctl(fd, HI_MIPI_SET_HS_MODE, &enHsMode); //LANE_DIVIDE_MODE_0 if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_SET_HS_MODE failed\n"); return HLE_RET_EIO; } s32Ret = ioctl(fd, HI_MIPI_ENABLE_MIPI_CLOCK, &mipiDevAttr[sns].devno); if (HI_SUCCESS != s32Ret) { ERROR_LOG("MIPI_ENABLE_CLOCK %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } s32Ret = ioctl(fd, HI_MIPI_RESET_MIPI, &mipiDevAttr[sns].devno); //ok if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_RESET_MIPI %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } DEBUG_LOG("into mipi pos 001, mipiDevAttr[sns].devno = %d\n",mipiDevAttr[sns].devno); s32Ret = ioctl(fd, HI_MIPI_ENABLE_SENSOR_CLOCK, mipiDevAttr[sns].devno);//此处失败 if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_ENABLE_SENSOR_CLOCK %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } s32Ret = ioctl(fd, HI_MIPI_RESET_SENSOR, &mipiDevAttr[sns].devno);//ok if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_RESET_SENSOR %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } if (ioctl(fd, HI_MIPI_SET_DEV_ATTR, &mipiDevAttr[sns])) //ok { ERROR_LOG("set mipi attr fail\n"); close(fd); return HLE_RET_EIO; } usleep(10000); s32Ret = ioctl(fd, HI_MIPI_UNRESET_MIPI, &mipiDevAttr[sns].devno);//ok if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_UNRESET_MIPI %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } s32Ret = ioctl(fd, HI_MIPI_UNRESET_SENSOR, &mipiDevAttr[sns].devno);//ok if (HI_SUCCESS != s32Ret) { ERROR_LOG("HI_MIPI_UNRESET_SENSOR %d failed\n",mipiDevAttr[sns].devno); return HLE_RET_EIO; } close(fd); return HLE_RET_OK; } ``` 报错截图如下: ![图片说明](https://img-ask.csdn.net/upload/201909/27/1569573288_658307.jpg) 报错的打印:__osal_unlocked_ioctl - Input param err,it is null! 是SDK库里边打的, 不知道什么原因会这样,包括改sensor I2C地址,都试过了。。。。。。。。。。。
快速排序-错误查找,写了个快速排序,但是一直报角标越界...
快速排序,但是一直报如下错误; Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 代码如下: ``` /** * @Description 快速排序 **/ public class QuickSort { public static void main(String[] args) { int[]a = {2,1,5,7,9,0,6,4,3,8}; doSort(a,0,a.length-1); System.out.println(a); } private static void doSort(int[] a, int lo, int hi) { int j = partition(a,lo,hi); doSort(a,lo,j-1); doSort(a,j+1,hi); } private static int partition(int[] a, int lo, int hi) { int i = lo,j = hi+1; int v = a[lo]; while (true){ while (a[++i]<v) if(i==hi)break; while (a[--j] >v) if(j==lo) break; if(i>=j) break; swap(a,i,j); } swap(a,lo,j); return j; } private static void swap(int[] a, int i, int j) { int temp = a[i]; a[i] = a[j]; a[j] = temp; } } ```
Matrix Chain Multiplication 编写
Problem Description Matrix multiplication problem is a typical example of dynamical programming. Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose. For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix. There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C). The first one takes 15000 elementary multiplications, but the second one only 3500. Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy. Input Input consists of two parts: a list of matrices and a list of expressions. The first line of the input file contains one integer n (1 <= n <= 26), representing the number of matrices in the first part. The next n lines each contain one capital letter, specifying the name of the matrix, and two integers, specifying the number of rows and columns of the matrix. The second part of the input file strictly adheres to the following syntax (given in EBNF): SecondPart = Line { Line } <EOF> Line = Expression <CR> Expression = Matrix | "(" Expression Expression ")" Matrix = "A" | "B" | "C" | ... | "X" | "Y" | "Z" Output For each expression found in the second part of the input file, print one line containing the word "error" if evaluation of the expression leads to an error due to non-matching matrices. Otherwise print one line containing the number of elementary multiplications needed to evaluate the expression in the way specified by the parentheses. Sample Input 9 A 50 10 B 10 20 C 20 5 D 30 35 E 35 15 F 15 5 G 5 10 H 10 20 I 20 25 A B C (AA) (AB) (AC) (A(BC)) ((AB)C) (((((DE)F)G)H)I) (D(E(F(G(HI))))) ((D(EF))((GH)I)) Sample Output 0 0 0 error 10000 error 3500 15000 40500 47500 15125
Walk 的代码的编写和设计
Problem Description Alice would like to visit Bob. However, they live in a hilly landscape, and Alice doesn’t like to walk in hills. She has a map of the area, showing the height curves. You have to calculate the total altitude climbed, and the total altitude descended, for the route which minimizes these numbers. It does not matter how far she has to walk to achieve this. Since you don’t know what the landscape looks like in between the height curves, you cannot know exactly how much climb and descent she will actually get in practice, but you should calculate the minimum possible under optimal conditions based on what you can deduce from the map. The map is represented as an xy grid. Alice lives in (0, 0), and Bob lives in (100 000, 0). The height curves are represented as polygons, where a polygon cannot intersect itself or another polygon. Furthermore, neither Alice nor Bob lives exactly on a height curve. Second test case from sample input (compressed). Input On the first line one positive number: the number of testcases, at most 100. After that per testcase: One line with 0 ≤ N ≤ 2 500, the number of height curves. One line for each height curve, with 1 ≤ Hi ≤ 1 000 being the height of the curve, 3 ≤ Pi ≤ 2 000 the number of vertices in the polygon, and the vertices x1, y1, …, xPi, yPi having integral values &#8722;300 000 ≤ xi, yi ≤ 300 000. There will be no more than 200 000 polygon vertices in total in all test cases. Output Per testcase: One line with two numbers: the total altitude climbed and the total altitude descended. Sample Input 2 2 20 3 10 10 0 -10 -10 10 25 3 20 20 0 -20 -20 20 3 100 4 -1 1 1 1 1 -1 -1 -1 300 8 -2 2 2 2 2 -2 5 -2 5 1 6 1 6 -3 -2 -3 50 8 3 3 100001 3 100001 -1 7 -1 7 2 4 2 4 -1 3 -1 Sample Output 5 0 200 250 Source
HI3518ev300 HI_MPI_VPSS_SetExtChnAttr 失败 0xA0078003,报错参数设置无
``` /******************************************************************************* *@ Description :配置VPSS的扩展通道 *@ Input :<vpssGrp>:组号 <vpssChn>:扩展通道号 <bindChn>:绑定到目标物理通道号 <width>:扩展通道图片的宽 <height>:扩展通道图片的高 <frmRate>扩展通道图片的帧率 *@ Output : *@ Return :成功:0 失败:错误码 *@ attention :该接口在H3518ev300(hi3516ev200)的SDK中设置不正常 *******************************************************************************/ static int vpss_config_ext_chn(VPSS_GRP vpssGrp, VPSS_CHN vpssChn, VPSS_CHN bindChn, int width, int height, int frmRate) { int ret; VPSS_EXT_CHN_ATTR_S extAttr = {0}; /*---#------------------------------------------------------------*/ printf("----ExtChnAttr:-----------------------------------------\n"); printf("extAttr.s32BindChn = %d\n",extAttr.s32BindChn); printf("extAttr.u32Width = %d\n",extAttr.u32Width); printf("extAttr.u32Height = %d\n",extAttr.u32Height); printf("extAttr.enVideoFormat = %d\n",extAttr.enVideoFormat); printf("extAttr.enPixelFormat = %d\n",extAttr.enPixelFormat); printf("extAttr.enDynamicRange = %d\n",extAttr.enDynamicRange); printf("extAttr.enCompressMode = %d\n",extAttr.enCompressMode); printf("extAttr.u32Depth = %d\n",extAttr.u32Depth); printf("extAttr.stFrameRate.s32SrcFrameRate = %d\n",extAttr.stFrameRate.s32SrcFrameRate); printf("extAttr.stFrameRate.s32DstFrameRate = %d\n",extAttr.stFrameRate.s32DstFrameRate); printf("-------------------------------------------------------\n"); /*---#------------------------------------------------------------*/ extAttr.s32BindChn = bindChn; extAttr.u32Width = width;//960; extAttr.u32Height = height;//540; extAttr.enVideoFormat = VIDEO_FORMAT_LINEAR; extAttr.enPixelFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420; extAttr.enDynamicRange = DYNAMIC_RANGE_SDR8; extAttr.enCompressMode = COMPRESS_MODE_NONE; extAttr.u32Depth = 0; extAttr.stFrameRate.s32SrcFrameRate = 15; extAttr.stFrameRate.s32DstFrameRate = frmRate; ret = HI_MPI_VPSS_SetExtChnAttr(vpssGrp, vpssChn, &extAttr); if (HI_SUCCESS != ret) { ERROR_LOG("HI_MPI_VPSS_SetExtChnAttr(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret); return HLE_RET_ERROR; } ret = HI_MPI_VPSS_EnableChn(vpssGrp, vpssChn); if (HI_SUCCESS != ret) { ERROR_LOG("HI_MPI_VPSS_EnableChn(%d, %d) fail: %#x!\n", vpssGrp, vpssChn, ret); return HLE_RET_ERROR; } return HLE_RET_OK; } ``` ![图片说明](https://img-ask.csdn.net/upload/201909/29/1569723865_767347.jpg) 实现代码如上所述,VPSS 物理通道号是0,已经创建并使能, 扩展通道5绑定到物理通道0,总是报参数设置无效,怎么回事???
python 正则表达式的问题
import re text='Hi,I am Shirley Hilton.I am his wife.' m=re.findall('\bhi',text) print(m) 为什么这样匹配不到? 按理说应该匹配到‘his'里面的’hi'吧
Avoiding a disaster 的算法
Problem Description Percy likes to be punctual. So much so that he always keeps three watches with him, so that he can be sure exactly what the time is. However, Percy's having a bad day. He found out that one of his watches was giving the wrong time. What's worse, when he went to correct the watch, he corrected the wrong one! That is, one watch was running x minutes behind (where x <= 480) and he wound one of the other watches x minutes forward. He now has three watches reading three different times, and hence is in serious danger of being tardy. Can you help Percy by writing a program that takes in the three times displayed on the watches and returns the correct time? Input The input begins with an integer T indicating the number of cases that follow (0 < T < 100). Each of the following T lines contains one test case, made up of three readings, separated by single space characters: H1:M1 H2:M2 H3:M3 In each reading H1,H2,H3 represent the hours displayed (0 < H1,H2,H3 < 13), and M1,M2,M3 represent the minutes displayed (0 <= M1,M2,M3 < 60). If the number of minutes is less than 10, a leading 0 is added. Output For each test case, one line should be produced, formatted exactly as follows: "The correct time is Hi:Mi". If the number of minutes is less than 10, a leading 0 should be added. If the number of hours is less than 10, a leading 0 should NOT be added. If it is impossible to tell the time from the three readings, print the string: "Look at the sun". Sample Input 3 5:00 12:00 10:00 11:59 12:30 1:01 12:00 4:00 8:00 Sample Output The correct time is 5:00 The correct time is 12:30 Look at the sun
Man Down 的代码写
Problem Description The Game “Man Down 100 floors” is an famous and interesting game.You can enjoy the game from http://hi.baidu.com/abcdxyzk/blog/item/16398781b4f2a5d1bd3e1eed.html We take a simplified version of this game. We have only two kinds of planks. One kind of the planks contains food and the other one contains nails. And if the man falls on the plank which contains food his energy will increase but if he falls on the plank which contains nails his energy will decrease. The man can only fall down vertically .We assume that the energy he can increase is unlimited and no borders exist on the left and the right. First the man has total energy 100 and stands on the topmost plank of all. Then he can choose to go left or right to fall down. If he falls down from the position (Xi,Yi),he will fall onto the nearest plank which satisfies (xl <= xi <= xr)(xl is the leftmost position of the plank and xr is the rightmost).If no planks satisfies that, the man will fall onto the floor and he finishes his mission. But if the man’s energy is below or equal to 0 , he will die and the game is Over. Now give you the height and position of all planks. And ask you whether the man can falls onto the floor successfully. If he can, try to calculate the maximum energy he can own when he is on the floor.(Assuming that the floor is infinite and its height is 0,and all the planks are located at different height). Input There are multiple test cases. For each test case, The first line contains one integer N (2 <= N <= 100,000) representing the number of planks. Then following N lines representing N planks, each line contain 4 integers (h,xl,xr,value)(h > 0, 0 < xl < xr < 100,000, -1000 <= value <= 1000), h represents the plank’s height, xl is the leftmost position of the plank and xr is the rightmost position. Value represents the energy the man will increase by( if value > 0) or decrease by( if value < 0) when he falls onto this plank. Output If the man can falls onto the floor successfully just output the maximum energy he can own when he is on the floor. But if the man can not fall down onto the floor anyway ,just output “-1”(not including the quote) Sample Input 4 10 5 10 10 5 3 6 -100 4 7 11 20 2 2 1000 10 Sample Output 140
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方
致 Python 初学者
文章目录1. 前言2. 明确学习目标,不急于求成,不好高骛远3. 在开始学习 Python 之前,你需要做一些准备2.1 Python 的各种发行版2.2 安装 Python2.3 选择一款趁手的开发工具3. 习惯使用IDLE,这是学习python最好的方式4. 严格遵从编码规范5. 代码的运行、调试5. 模块管理5.1 同时安装了py2/py35.2 使用Anaconda,或者通过IDE来安装模
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片 c# 图片颜色调整 最快 c#多张图片上传 c#密封类与密封方法
立即提问