自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(193)
  • 资源 (3)
  • 收藏
  • 关注

原创 AndroidStdio 主窗口消失

在使用多显示器开发,扩展显示AndroidStudio窗口,当退出时未将该窗口返回主显示,会导致下次(未扩展显示)开启该窗口时,无法在主显示器正常显示,解决方案https://blog.csdn.net/wjcommen/article/details/106765714解决方式一:扩展方式连接多显示器,Androidstudio会显示在对应控制显示器但是我连接了还是无法正常显示。解决方式二:关闭Androidstudio,打开该项目下文件:".idea/workspace.xml",找到“Pro

2021-11-22 17:17:52 244

原创 优雅代码书写技巧总结

经过几年代码学习,发现了一些优雅的表示方式,他们有一些特点:例如看起来逼格很高,或者提高运行效率,简化代码等等1第一种在afs课上学到的,如果有多个变量综合起来作为switch的情况,可以使用。比如在想处理a,b,c三个变量取True和false的8种情况:switch(!!a*4+!!b*2+!!c){ case 0: //000 break; case 1://001 break; case 2://010 break; ... case 7: //111 brea

2021-11-04 21:12:24 20

原创 AOR3 对偶理论

对偶理论对于标准问题:max⁡z=cTx\max z=c^Txmaxz=cTxs.t.Ax=bAx=bAx=bx≥0x\ge 0x≥0对偶问题为:min⁡w=yTb\min w=y^Tbminw=yTbs.t.ATy=cA^Ty=cATy=cy≥0y\ge 0y≥0注意: 原问题问题一定是max 目标函数,对偶问题一定是min目标函数。这是为了之后定理记忆的方便。如果把min 目标函数作为原问题,一定要转为Max 目标函数的。弱对偶性原问题目标函数值一定小于对偶问题目标函数值。

2021-10-04 10:36:17 72

原创 Pipline 中的Hazard, Forwarding, Stall, Flush和其他

设计:cmp和地址计算放在ID级Flush和StallFlush产生的结果是:向上传递一条空指令,寄存器值被维持。Stall产生的结果是:不向上传递指令,寄存器的值被维持。对于A->B, 如果A Flush, 那么B得到了一条空指令,流水线在A级停顿,在B级继续。如果A stall, 那么B的值也不会被更新,流水线在B级也停顿下来。Hazard检测与解决对于需要我们解决的Hazard一共有6种,解决方法如下:冲突位置冲突原因解决方法ID和EXEEXE级rd被AL

2021-10-01 18:00:19 48

原创 riscv32-unknown-linux-gnu-: riscv32各种版本gcc工具链编译与安装

1: 下载交叉编译器下载地址: https://github.com/riscv-collab/riscv-gnu-toolchain/releases有若干个版本, 建议下载glibc的:riscv32-elf-ubuntu-18.04-nightly-2021.09.21-nightly.tar.gz377 MBriscv32-elf-ubuntu-20.04-nightly-2021.09.21-nightly.tar.gz450 MBriscv32-glibc-ubuntu-18.04

2021-09-29 21:20:23 148

原创 make: arm-linux-gnueabihf-gcc: Command not found

make: arm-linux-gnueabihf-gcc: Command not found SYNC include/config/auto.conf.cmdscripts/Kconfig.include:39: compiler 'arm-linux-gnueabihf-gcc' not foundmake[2]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1make[1]: *** [Makefile:616: sync

2021-09-25 22:40:08 34

原创 AOR2 单纯形法原理推导

1 线性规划标准形式maxz=cTxs.t.Ax=b,x>0\text{max} \quad z=c^Tx\\\text{s.t.}\quad Ax=b, x>0maxz=cTxs.t.Ax=b,x>0注意点:所有变量都大于0对于不等号情况,需要增加变量。比如x1+x2>2x_1+x_2>2x1​+x2​>2 => x1+x2−x3=2x_1+x_2-x_3=2x1​+x2​−x3​=22 单纯性法对于目标函数: z=c0+c1x1+..cnxnz=

2021-09-23 22:17:46 66

原创 edge disjoint spanning trees(边不相交的生成树)

边不相交的生成树定义:Every two edges have no common point or the only point is an endpoint of both edges.简单来说,就是生成树的任意两个点之间只允许有一条边。

2021-09-19 19:20:34 41

原创 1017 Queueing at Bank (25 分)

Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn to be served and there is a

2021-09-01 19:30:05 9

原创 Vue3.0使用vuex

vuex3.0是在vue2.x上使用的,不支持vue3.0index.js在main.js同级目录新建文件夹store, 在里面新建文件index,js输入:import { createStore } from 'vuex'export const store = createStore({ state () { return { count: 1 } }})state就是想要管理的全局变量main.jsimport { createApp } f

2021-08-29 11:38:55 19

原创 1016 Phone Bills (25 分)

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. When a customer starts connecting a long-distance call, the t

2021-08-28 19:41:57 28

转载 RISCV CSR寄存器对应机器码

2021-08-24 18:06:59 284

原创 js数组分割并去掉空元素

or=or.split(/&nbsp|[^\w]/).filter(Boolean)&nbsp是空格,按照任意非字母和数字进行分割,然后用filter去掉空白包括:"", undefined, false

2021-08-18 17:45:39 82

原创 [vue/no-deprecated-filter] Filters are deprecated.

vue3.x中过滤器已弃用在 3.x 中,过滤器已删除,不再支持。相反地,我们建议用方法调用或计算属性替换它们。使用上面的例子,这里是一个如何实现它的例子。<template> <h1>Bank Account Balance</h1> <p>{{ accountInUSD }}</p></template><script> export default { props: { ac

2021-08-17 11:42:44 487

原创 1015 Reversible Primes (20 分)

A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two positive integers N (<10 5) an

2021-08-16 20:58:42 9

原创 1014 Waiting in Line (30 分)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space inside the yellow line in front of each window is enough

2021-08-16 18:49:36 19

原创 1013 Battle Over Cities (25 分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of the c

2021-08-15 20:47:48 7

原创 1012 The Best Rank (25 分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage students by emphasi

2021-08-14 20:59:46 240

原创 1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their money

2021-08-14 11:36:16 6

原创 1010 Radix (25 分)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integers N1 and N2, your task is to find the radix of one num

2021-08-14 11:26:49 15

原创 1009 Product of Polynomials (25 分)

1009 Product of Polynomials (25 分)This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:K

2021-08-13 16:34:25 7

原创 1008 Elevator (20 分)

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to

2021-08-13 11:42:32 9

原创 1007 Maximum Subsequence Sum (25 分)

Given a sequence of K integers { N1, N2, …, NK}. A continuous subsequence is defined to be { Ni, Ni+1, …, Nj} where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of its elements. For example, given sequence { -2,

2021-08-13 11:26:56 13

原创 1006 Sign In and Sign Out (25 分)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in’s and out’s, you are supposed to find the ones who have unlocked and loc

2021-08-13 09:16:28 13

原创 1005 Spell It Right (20 分)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each case occupies one line which contains an N (≤10100).Out

2021-08-12 22:30:35 10

原创 1004 Counting Leaves (30 分)

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts with a line containing 0<N<100, the number of nodes

2021-08-12 22:12:24 18

原创 1003 Emergency (25 分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are marked

2021-08-11 19:34:03 11

原创 1002 A+B for Polynomials (25 分)

This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:K N1 aN1 N2 aN2… NKaNK​where K is

2021-08-10 11:27:58 14

原创 1001 A+B Format (20 分)

Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input file contains one test case. Each case contains a pair of i

2021-08-10 10:27:38 17

转载 深度学习之PyTorch实战(2)——神经网络模型搭建和参数优化

原文链接:https://www.cnblogs.com/wj-1314/p/9838866.html如果需要小编其他论文翻译,请移步小编的GitHub地址传送门:请点击我上一篇博客先搭建了基础环境,并熟悉了基础知识,本节基于此,再进行深一步的学习。接下来看看如何基于PyTorch深度学习框架用简单快捷的方式搭建出复杂的神经网络模型,同时让模型参数的优化方法趋于高效。如同使用PyTorch中的自动梯度方法一样,在搭建复杂的神经网络模型的时候,我们也可以使用PyTorch中已定义的类和方法,这些类和

2021-08-06 09:54:17 67

原创 vue踩坑和其他

1.axios安装失败:使用淘宝镜像成功 cnpm install axios --save2.vue路由:使用path传参成功。路径只需要和注册时一样即可。3.多页面理解:vue只有一个页面即index.html,但是可以通过挂载不同的组件达到在同一个页面显示不同页的效果。路由通过router.push比较方便4.复杂的传参转为字符串传递。...

2021-07-22 22:41:20 12

原创 vue-cli build 打包图片加载失败

新版的vue-cli,图片位置放在assets下,通过./assets/xxx.png进行引用。打包时出现404,此时在工程目录中新建vue.config.js添加module.exports = { publicPath: './' }重新build 即可。

2021-07-22 17:51:20 31

原创 npm ERR! code ENOENT npm ERR! syscall stat npm ERR! path C:\Users\Ser\https:\registry.nlark.com\vue\

在工程文件夹下安装。

2021-07-20 19:55:56 231

原创 [HarmonyOS] page和abilitySlice的跳转及其他

人性化的细节1.HarmonyOS特别人性化之处在于:app里面的文字尽量都多准备一点语言,到时候就可以根据系统语言切换。(此坑后面细说)page和abilitySlice鸿蒙定义了很多花里胡哨的东西,其中我接触到的主要是page和abilitySlice。在我的世界观中:1.一个应用有很多功能,其中一些是有ui界面的,一些则没有。有ui界面的功能叫做page ability,简称page,私以为这个简称会带来误解。其他的两个暂时不管。2.一个功能可能有多个ui界面。比如登陆功能有loading

2021-07-12 22:17:41 65 1

原创 [题集]ADS13 Randomized Algorithms

1.Let a=(a1,a​2,…,a​i,…,aj,…,an) denote the list of elements we want to sort. In the quicksort algorithm, if the pivot is selected uniformly at random. Then any two elements get compared at most once and the probability of ai and a​j being compared is 2/(j

2021-07-06 23:57:22 30

原创 查询大小估算

For the relational schemas of the campus card database given in problem 1, there are following assumptions:ncard=10,000 , npos=100, ndetail=10,000,000lcard=25, lpos=22, ldetail=29V(campus, pos) = 6, V(location, pos) = 20V(depart, card) = 100, V(name, c

2021-07-01 20:29:30 16

原创 记录openGL绘制失败的经历:画出黑色,纹理加载失败

1.摄像机的坐标有问题,比如get_up被我改了2.纹理绑定错误,应该是二维的,绑定成了立方体3.纹理加载错了图片,或者图片是黑色的(这个不清楚原因,但是改了图片的顺序就不是黑色的了)

2021-06-23 20:56:19 136

原创 Vivado ERROR: [Synth 8-3380] loop condition does not converge after 2000 iterations循环无法综合问题,仿真

仿真问题:可能是设置了断点在退出时没有删除。解决方法:在\XX\XX.sim\sim_1\behav\xsim\xsim.dir\XX_behav里面找到TempBreakPointFile.txt,删除第一行以后的内容。综合问题:Currently Vivado Synthesis does not support a loop limit that is determined by a dynamic variable.This feature will be supported in a fut

2021-06-20 18:39:01 472

原创 学openGL有感

我们教程是这个https://learnopengl-cn.github.io/01%20Getting%20started/01%20OpenGL/平时的实验也是从上面出的,但是我自认为上面翻译的极差,总是不知所云,但是代码还是有一定可读性的。一个学期下来,零零散散的学了基本的图形绘图,纹理,摄像机,图形变换,光照之类的,现在需要写大程了,仔细阅读了代码,才发现对于我对于如何绘制一个场景终于有些了解。现在总结如下,主要是一些定义以及需要干什么,也是我这学期学习的,没学到就没总结,具体的代码网站上都有

2021-06-07 17:06:31 60

原创 论struct是如何恶心人的

struct是python的一个转换字节的模块。但是恶心的地方在于,如果用类似fmt=’??ii’进行编码,就不能用’?'这样一位一位的解码。因为如果bool和Int相连,则bool会被扩展为4位。和char相连就没事,所以用什么编码,就用什么解码。我也是醉了。...

2021-06-04 11:20:35 22

vscode自动配置

vscode自动配置c语言软件,由b站大佬sdshao编写,自动下载配置mingw64,vscode。简单方便实用

2020-06-30

普通物理学2(H)答案详解版

E1-1 (a)Megaphones; (b)Microphones; (C)Decacards Deck of Cards); (d )Gigalows (Gigolos e)Terabulls(Terribles); (f)Decimates; (g)Centipedes; (h)Nanonanettes(?); (i)Picoboos(peek-a Boo); ()Attoboys(atta boy); (k)Two Hectowithits(To Heck With It); ()Iwo Kilomockingbirds (To Kill A Mockingbird, or Tequi

2020-11-03

PotPlayer

功能强大的播放软件,可以用来播放几乎所有的格式的视频,音频,操作简单实用,界面美观大方,比什么迅雷影音之类的好用多了

2020-06-27

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人 TA的粉丝

提示
确定要删除当前文章?
取消 删除