Go不是内部或外部命令

I've been trying to set up my Go workspace, but it doesn't seem to be working. Whenever I type in echo %GOPATH%, it echoes C:Users\y\GoWorkspace. But whenever I type go, it says go is not recognized as an internal or external command. This is the same for any other Go command.

I am using Windows 8 64-bit with Go 1.2.2 32-bit. I have also tried Go 1.2.2 64-bit, but it didn't change anything.

展开翻译

译文

我一直在尝试设置Go工作区,但是它似乎没有用。 每当我键入 echo%GOPATH%</ code>时,它都会回显 C:Users \ y \ GoWorkspace </ code>。 但是,每当我键入 go </ code>时,都会说 go不被识别为内部或外部命令</ code>。 这与其他所有Go命令相同。</ p>

我正在使用Windows 8 64位和Go 1.2.2 32位。 我还尝试了64位Go 1.2.2,但没有任何改变。</ p>
</ div>

dsdtszi0520538
dsdtszi0520538 您是否已将安装位置添加到%PATH%?
接近 6 年之前 回复

2个回答

GOPATH is the path that go uses when you build or test go applications. It does not tell Windows where your go executable is. For this you have to set you path environment variable. You can also set your GOBIN environment variable.

展开翻译

译文



GOPATH是在构建或测试go应用程序时go使用的路径。 它不会告诉Windows go可执行文件在哪里。 为此,您必须设置路径环境变量。 您还可以设置GOBIN环境变量。</ p>
</ div>

dongyi7966
dongyi7966 现在可以正常工作了,我丢失了一个引号。
接近 6 年之前 回复
doufangzhang4454
doufangzhang4454 这不起作用,我在路径中添加了“ C:\ Go”,并将GOBIN设置为“ C:\ Go”
接近 6 年之前 回复

As @JohnGilmore has pointed out the GOPATH is the location the Go tools use (executables). To set the location to the go executable so that Windows can find the command you will need to set your PATH variable.

On Windows:

SET %PATH%=%PATH%;C:\Go\bin

You can also set this so that it is in every new environment by typing 'env' into the Start->search and then choose 'Edit the system environment variables'.

doudu6100
doudu6100 谢谢,问题是我缺少一个引号。
接近 6 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于编写链码时的报错error: RPC failed; curl 18 transfer closed with outstanding read data remaining
从书上看到,编写链码之前应该确定在本系统中有 Hyperledger Fabric 提供的相关API,如果本地系统中没有相关的API,请执行如下下载命令: ``` go get -u github.com/hyperledger/fabric/core/chaincode/shim ``` 我执行之后,报错 ``` # cd .; git clone https://github.com/hyperledger/fabric /home/yous/go/src/github.com/hyperledger/fabric 正克隆到 '/home/yous/go/src/github.com/hyperledger/fabric'... error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: 过早的文件结束符(EOF) fatal: index-pack failed package github.com/hyperledger/fabric/core/chaincode/shim: exit status 128 ``` 查了百度,基本上都在说 curl的postBuffer的默认值太小 我重新设置了一下还是不行。 我发现https://github.com/hyperledger/fabric/core/chaincode/shim 根本打不开网页,是不是这个包被关闭或删除了呢?
go语言怎么对MySQL的事务进行封装
go语言怎么对MySQL事务进行封装,自动commit 自动close 不用增删查改每次都写一遍
Go Go Gorelians 怎么来写
Problem Description The Gorelians travel through space using warp links. Travel through a warp link is instantaneous, but for safety reasons, an individual can only warp once every 10 hours. Also, the cost of creating a warp link increases directly with the linear distance between the link endpoints. The Gorelians, being the dominant force in the known universe, are often bored, so they frequently conquer new regions of space in the following manner. 1) The initial invasion force finds a suitable planet and conquers it, establishing a Regional Gorelian Galactic Government, hereafter referred to as the RGGG, that will govern all Gorelian matters in this region of space. 2) When the next planet is conquered, a single warp link is constructed between the new planet and the RGGG planet. Planets connected via warp links in this manner are said to be part of the Regional Gorelian Planetary Network, that is, the RGPN. 3) As additional planets are conquered, each new planet is connected with a single warp link to the nearest planet already in the RGPN, thus keeping the cost of connecting new planets to the network to a minimum. If two or more planets are equidistant from the new planet, the new planet is connected to whichever of them was conquered first. This causes a problem however. Since planets are conquered in a more-or-less random fashion, after a while, the RGGG will probably not be in an ideal location. Some Gorelians needing to consult with the RGGG might only have to make one or two warps, but others might require dozens---very inconvenient when one considers the 10-hour waiting period between warps. So, once each Gorelian year, the RGGG analyzes the RGPN and relocates itself to an optimal location. The optimal location is defined as a planet that minimizes the maximum number of warps required to reach the RGGG from any planet in the RGPN. As it turns out, there is always exactly one or two such planets. When there are two, they are always directly adjacent via a warp link, and the RGGG divides itself evenly between the two planets. Your job is to write a program that finds the optimal planets for the RGGG. For the purposes of this problem, the region of space conquered by the Gorelians is defined as a cube that ranges from (0,0,0) to (1000,1000,1000). Input The input consists of a set of scenarios where the Gorelians conquer a region of space. Each scenario is independent. The first line of the scenario is an integer N that specifies the total number of planets conquered by the Gorelians. The next N lines of the input specify, in the order conquered, the IDs and coordinates of the conquered planets to be added to the RGPN, in the format ID X Y Z. An ID is an integer from 1 to 1000. X, Y, and Z are integers from 0 to 1000. A single space separates the numbers. A value of N = 0 marks the end of the input. Output For each input scenario, output the IDs of the optimal planet or planets where the RGGG should relocate. For a single planet, simply output the planet ID. For two planets, output the planet IDs, smallest ID first, separated by a single space. Sample Input 5 1 0 0 0 2 0 0 1 3 0 0 2 4 0 0 3 5 0 0 4 5 1 0 0 0 2 1 1 0 3 3 2 0 4 2 1 0 5 3 0 0 10 21 71 76 4 97 32 5 69 70 33 19 35 3 79 81 8 31 91 17 67 52 31 48 75 48 90 14 4 41 73 2 21 83 74 41 69 26 32 30 24 0 Sample Output 3 2 4 31 97
Go语言同包下引用不同文件的全局指针变量为什么为nil呢?
在同包中定义了一个sql.DB指针全局变量, 并在Init方法中将其赋值, 可是在同包中使用这个变量的时候, 却被告知变量为nil, 请问造成这种问题的原因是什么呢? 应该如何解决较为妥善一点呢? model.go ``` package db import ( "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" ) var db *sql.DB func Init() { db, err := sql.Open("mysql", "root@kong@tcp(127.0.0.1:3306)/blog") if err != nil { fmt.Println(err) } db.SetMaxIdleConns(50) db.Ping() } ``` demo.go ``` package db import "fmt" func Print() { fmt.Println(db) } ``` main.go ``` package main func main() { db.Init() db.Print() } ``` 结果: ``` <nil> ```
今天偶然看见一段Python大神写的代码,觉得好厉害,我在想go是不是也能实现一样的方法
今天在维护一个别人写的Python项目,改一个接口,去看了一下项目里面封装了一个方法特别好用,这个方法是数据库层面的,接收四个参数,第一个参数是model实体类,第二个参数是查询成功后需要返回数据的那些字段的一个配置是一个字典类型,第三个参数是区间筛选需要对哪个字段进行区间筛选也是一个字典,四个参数是排序规则也是一个字段,并且这个方法适用于任何一个model实体,第一个参数必传,后面的随意 该方法在返回的时候还自动转成了json,key对应model的字段名 value对应model该字段的值,我在想go怎么封装类似这样的方法 具体项目涉密我就不截图代码了,我说一下大概实现的一个方法 假设我有一个user表 ``` class User(Base): __tablename__ = 'approval_favourable' id = Column(BigInteger(), primary_key=True) username = Column(String()) password = Column(String()) nickname = Column(String()) addtime = Column(Datetime()) ``` 假设我有一个query_db()的方法 ``` def query_db(entity_model,query_dict,Interval,sort) ``` 这个方法接口四个参数,第一个 当我只传一个参数的时候 ``` query_db(User) ``` 返回的结果是这样 ``` [ { "id":1, "username":"admin", "password":"admin", "nickname":"admin", "addtime":"20200101" }, { "id":2, "username":"admin", "password":"admin", "nickname":"admin", "addtime":"20200102" }, { "id":3, "username":"admin", "password":"admin", "nickname":"admin", "addtime":"20200103" } ] ``` 当我传两个参数的时候 ``` query_dict=[ { "field_name":"username" } ] query_db(User,query_dict) ``` 返回的结果是这样的 ``` [ { "username":"admin" }, { "username":"admin" }, { "username":"admin" } ] ``` 当我传三个参数的时候 ``` query_dict=[ { "field_name":"username" }, { "field_name":"addtime" } ] Interval=[ { "field_name":"addtime", "max_value":"这里是时间戳", "min_value":"这里是时间戳" } ] query_db(User,query_dict,Interval) ``` 返回的结果是这样的 ``` [ { "username":"admin", "addtime":"20200101" }, { "username":"admin", "addtime":"20200102" } ] ``` 当我传四个参数的时候 ``` query_dict=[ { "field_name":"username" }, { "field_name":"addtime" }, { "field_name":"id" } ] Interval=[ { "field_name":"addtime", "max_value":"这里是时间戳", "min_value":"这里是时间戳" } ] sort=[ { "field_name":"id", "sort":"desc" } ] query_db(User,query_dict,Interval,sort) ``` 返回的结果是这样的 ``` [ { "id":2, "username":"admin", "addtime":"20200102" }, { "id":1, "username":"admin", "addtime":"20200101" } ] ``` 如果用go语言去实现应该怎么实现呢? 封装的方法适用所有的model实体
阿里云服务器go get 执行完没有src文件夹
![图片说明](https://img-ask.csdn.net/upload/202003/19/1584592529_562670.png) - #### 执行完之后进入GOPATH路径ls,结果只有pkg的文件夹,没有src - ![图片说明](https://img-ask.csdn.net/upload/202003/19/1584592600_356220.png)
新人求问:程序提示无法解析的外部符号,无法解析的外部命令
源代码如下 此处为头文件golf.h //headfile golf #ifndef _golf_ const int len=40; struct golf { char fullname[len]; int handicap; }; void setgolf(golf & g,char *name,int hc); int setgolf(golf & g); void handicap(golf & g,int hc); void showgolf(const golf &g); #endif 函数的声明 fu.cpp //declare the functions #include<iostream> #include<cstring> #include"golf.h" void setgolf(golf & g,const char *name,int hc) { name=g.fullname; g.handicap=hc; } int setgolf(golf & g) { std::cin>>g.fullname; std::cin>>g.handicap; std::string c; c=g.fullname; if(c.empty()) return 0; else return 1; } void handicap(golf & g,int hc) { g.handicap=hc; } void showgolf(const golf &g) { std::cout<<g.fullname<<"and"<<g.handicap; } //主函数部分:gl.cpp #include<iostream> #include"golf.h" int main() { golf ann[2]; setgolf(ann[0],"dazhoang",14); int go=setgolf(ann[1]); handicap(ann[0],14); std::cout<<go; showgolf(ann[0]); std::cout<<std::endl; showgolf(ann[1]); system("pause"); return 0; }
Go Deeper 深度的问题
Problem Description Here is a procedure's pseudocode: go(int dep, int n, int m) begin output the value of dep. if dep < m and x[a[dep]] + x[b[dep]] != c[dep] then go(dep + 1, n, m) end In this code n is an integer. a, b, c and x are 4 arrays of integers. The index of array always starts from 0. Array a and b consist of non-negative integers smaller than n. Array x consists of only 0 and 1. Array c consists of only 0, 1 and 2. The lengths of array a, b and c are m while the length of array x is n. Given the elements of array a, b, and c, when we call the procedure go(0, n, m) what is the maximal possible value the procedure may output? Input There are multiple test cases. The first line of input is an integer T (0 < T ≤ 100), indicating the number of test cases. Then T test cases follow. Each case starts with a line of 2 integers n and m (0 < n ≤ 200, 0 < m ≤ 10000). Then m lines of 3 integers follow. The i-th(1 ≤ i ≤ m) line of them are ai-1 ,bi-1 and ci-1 (0 ≤ ai-1, bi-1 < n, 0 ≤ ci-1 ≤ 2). Output For each test case, output the result in a single line. Sample Input 3 2 1 0 1 0 2 1 0 0 0 2 2 0 1 0 1 1 2 Sample Output 1 1 2
Go Go Gorelians 用程序实现
Problem Description The Gorelians travel through space using warp links. Travel through a warp link is instantaneous, but for safety reasons, an individual can only warp once every 10 hours. Also, the cost of creating a warp link increases directly with the linear distance between the link endpoints. The Gorelians, being the dominant force in the known universe, are often bored, so they frequently conquer new regions of space in the following manner. 1) The initial invasion force finds a suitable planet and conquers it, establishing a Regional Gorelian Galactic Government, hereafter referred to as the RGGG, that will govern all Gorelian matters in this region of space. 2) When the next planet is conquered, a single warp link is constructed between the new planet and the RGGG planet. Planets connected via warp links in this manner are said to be part of the Regional Gorelian Planetary Network, that is, the RGPN. 3) As additional planets are conquered, each new planet is connected with a single warp link to the nearest planet already in the RGPN, thus keeping the cost of connecting new planets to the network to a minimum. If two or more planets are equidistant from the new planet, the new planet is connected to whichever of them was conquered first. This causes a problem however. Since planets are conquered in a more-or-less random fashion, after a while, the RGGG will probably not be in an ideal location. Some Gorelians needing to consult with the RGGG might only have to make one or two warps, but others might require dozens---very inconvenient when one considers the 10-hour waiting period between warps. So, once each Gorelian year, the RGGG analyzes the RGPN and relocates itself to an optimal location. The optimal location is defined as a planet that minimizes the maximum number of warps required to reach the RGGG from any planet in the RGPN. As it turns out, there is always exactly one or two such planets. When there are two, they are always directly adjacent via a warp link, and the RGGG divides itself evenly between the two planets. Your job is to write a program that finds the optimal planets for the RGGG. For the purposes of this problem, the region of space conquered by the Gorelians is defined as a cube that ranges from (0,0,0) to (1000,1000,1000). Input The input consists of a set of scenarios where the Gorelians conquer a region of space. Each scenario is independent. The first line of the scenario is an integer N that specifies the total number of planets conquered by the Gorelians. The next N lines of the input specify, in the order conquered, the IDs and coordinates of the conquered planets to be added to the RGPN, in the format ID X Y Z. An ID is an integer from 1 to 1000. X, Y, and Z are integers from 0 to 1000. A single space separates the numbers. A value of N = 0 marks the end of the input. Output For each input scenario, output the IDs of the optimal planet or planets where the RGGG should relocate. For a single planet, simply output the planet ID. For two planets, output the planet IDs, smallest ID first, separated by a single space. Sample Input 5 1 0 0 0 2 0 0 1 3 0 0 2 4 0 0 3 5 0 0 4 5 1 0 0 0 2 1 1 0 3 3 2 0 4 2 1 0 5 3 0 0 10 21 71 76 4 97 32 5 69 70 33 19 35 3 79 81 8 31 91 17 67 52 31 48 75 48 90 14 4 41 73 2 21 83 74 41 69 26 32 30 24 0 Sample Output 3 2 4 31 97
golang unexpected directory layout when building
```go goroot: /usr/local/Cellar/go/1.13.3/libexec gopath: /Users/mac/go goVersion: 1.13.3 /Users/mac/go | Makefile src | main mr mrapps .....blablabla ``` ```go unexpected directory layout: import path: _/Users/mac/go/src/mr root: /Users/mac/go/src dir: /Users/mac/go/src/mr expand root: /Users/mac/go expand dir: /Users/mac/go/src/mr separator: / ``` 上面的bug是我用如下代码build的时候碰到的 。。 ``` $ pwd /Users/mac/go/mrapps $ go build -buildmode=plugin wc.go ``` wc.go contents ```import "../mr"``` 这是MIT 6.824网课的lab1 第一步就卡住了。。救救
mac 安装vsftpd 连接拒绝
![图片说明](https://img-ask.csdn.net/upload/202003/24/1585021445_621422.jpeg) vsftpd.cnf配置的是 # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's # capabilities. # # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=NO # # Uncomment this to allow local users to log in. local_enable=NO # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) #local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. #anon_upload_enable=YES # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. #anon_mkdir_write_enable=YES # # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES # # Activate logging of uploads/downloads. xferlog_enable=YES # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended! #chown_uploads=YES #chown_username=whoever # # You may override where the log file goes if you like. The default is shown # below. #xferlog_file=/var/log/vsftpd.log # # If you want, you can have your log file in standard ftpd xferlog format. # Note that the default log file location is /var/log/xferlog in this case. #xferlog_std_format=YES # # You may change the default value for timing out an idle session. #idle_session_timeout=600 # # You may change the default value for timing out a data connection. #data_connection_timeout=120 # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. #ascii_upload_enable=YES #ascii_download_enable=YES # # You may fully customise the login banner string: #ftpd_banner=Welcome to blah FTP service. # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that # the user does not have write access to the top level directory within the # chroot) chroot_local_user=YES chroot_list_enable=YES # (default follows) chroot_list_file=/Library/Soft/vsftpd # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES # # When "listen" directive is enabled, vsftpd runs in standalone mode and # listens on IPv4 sockets. This directive cannot be used in conjunction # with the listen_ipv6 directive. listen=NO # # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 # sockets, you must run two copies of vsftpd with two configuration files. # Make sure, that one of the listen options is commented !! #listen_ipv6=YES secure_chroot_dir=/Library/Soft/vsftpd
go语言数组添加元素为什么都是重复的
我从MySQL里面查询到一个结构体数组,然后把结构体遍历存到map里面去,接着在把map存到数组里面去,结果我发现存出来的数据怎么都是重复的,通过下标和append都不好使,好奇怪? 代码如下所示 ``` func (this *Admin_Usre) Tojsons(user []Admin_Usre) []map[string]interface{} { data:=make(map[string]interface{}) res:=make([]map[string]interface{},len(user)) for i:=0;i<len(user);i++{ data["id"]=user[i].ID data["username"]=user[i].Username data["nickname"]=user[i].Nickname data["createdat"]=user[i].CreatedAt if i==0{ print("进来了") res[0]=data } if i==1{ res[1]=data } if i==2{ res[2]=data } fmt.Println(data) fmt.Println(i) fmt.Println(res) } return res } ``` 打印结果如下所示: ``` 进来了map[createdat:2020-02-29 21:24:17 +0800 CST id:1 nickname: username:wzt] 0 [map[createdat:2020-02-29 21:24:17 +0800 CST id:1 nickname: username:wzt] map[] map[] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-02-29 21:38:30 +0800 CST id:2 nickname: username:wzt] 1 [map[createdat:2020-02-29 21:38:30 +0800 CST id:2 nickname: username:wzt] map[createdat:2020-02-29 21:38:30 +0800 CST id:2 nickname: username:wzt] map[] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 21:53:16 +0800 CST id:3 nickname: username:] 2 [map[createdat:2020-03-04 21:53:16 +0800 CST id:3 nickname: username:] map[createdat:2020-03-04 21:53:16 +0800 CST id:3 nickname: username:] map[createdat:2020-03-04 21:53:16 +0800 CST id:3 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 21:54:57 +0800 CST id:4 nickname: username:] 3 [map[createdat:2020-03-04 21:54:57 +0800 CST id:4 nickname: username:] map[createdat:2020-03-04 21:54:57 +0800 CST id:4 nickname: username:] map[createdat:2020-03-04 21:54:57 +0800 CST id:4 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 21:55:38 +0800 CST id:5 nickname: username:] 4 [map[createdat:2020-03-04 21:55:38 +0800 CST id:5 nickname: username:] map[createdat:2020-03-04 21:55:38 +0800 CST id:5 nickname: username:] map[createdat:2020-03-04 21:55:38 +0800 CST id:5 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 21:56:18 +0800 CST id:6 nickname: username:] 5 [map[createdat:2020-03-04 21:56:18 +0800 CST id:6 nickname: username:] map[createdat:2020-03-04 21:56:18 +0800 CST id:6 nickname: username:] map[createdat:2020-03-04 21:56:18 +0800 CST id:6 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 21:59:52 +0800 CST id:7 nickname: username:] 6 [map[createdat:2020-03-04 21:59:52 +0800 CST id:7 nickname: username:] map[createdat:2020-03-04 21:59:52 +0800 CST id:7 nickname: username:] map[createdat:2020-03-04 21:59:52 +0800 CST id:7 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 22:00:33 +0800 CST id:8 nickname: username:] 7 [map[createdat:2020-03-04 22:00:33 +0800 CST id:8 nickname: username:] map[createdat:2020-03-04 22:00:33 +0800 CST id:8 nickname: username:] map[createdat:2020-03-04 22:00:33 +0800 CST id:8 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 22:03:52 +0800 CST id:9 nickname: username:] 8 [map[createdat:2020-03-04 22:03:52 +0800 CST id:9 nickname: username:] map[createdat:2020-03-04 22:03:52 +0800 CST id:9 nickname: username:] map[createdat:2020-03-04 22:03:52 +0800 CST id:9 nickname: userna me:] map[] map[] map[] map[] map[] map[] map[]] map[createdat:2020-03-04 22:06:32 +0800 CST id:10 nickname: username:] 9 [map[createdat:2020-03-04 22:06:32 +0800 CST id:10 nickname: username:] map[createdat:2020-03-04 22:06:32 +0800 CST id:10 nickname: username:] map[createdat:2020-03-04 22:06:32 +0800 CST id:10 nickname: use rname:] map[] map[] map[] map[] map[] map[] map[]] ``` 结果就是这样的 我用append也是一样的 第一次map中的数据id为1 数组存入了1条id为1的数据 第二次map中的数据id为2 数组存入了2条id为2的数据 第三次map中的数据id为3 数组存入了3条id为3的数据 以此类推下去 我很奇怪,当i等于1的时候都没有进入到i等于0这个if条件 它怎么会把数据为下标为0的这个数据给覆盖了
Go Deeper 算法的实现
Problem Description Here is a procedure's pseudocode: go(int dep, int n, int m) begin output the value of dep. if dep < m and x[a[dep]] + x[b[dep]] != c[dep] then go(dep + 1, n, m) end In this code n is an integer. a, b, c and x are 4 arrays of integers. The index of array always starts from 0. Array a and b consist of non-negative integers smaller than n. Array x consists of only 0 and 1. Array c consists of only 0, 1 and 2. The lengths of array a, b and c are m while the length of array x is n. Given the elements of array a, b, and c, when we call the procedure go(0, n, m) what is the maximal possible value the procedure may output? Input There are multiple test cases. The first line of input is an integer T (0 < T ≤ 100), indicating the number of test cases. Then T test cases follow. Each case starts with a line of 2 integers n and m (0 < n ≤ 200, 0 < m ≤ 10000). Then m lines of 3 integers follow. The i-th(1 ≤ i ≤ m) line of them are ai-1 ,bi-1 and ci-1 (0 ≤ ai-1, bi-1 < n, 0 ≤ ci-1 ≤ 2). Output For each test case, output the result in a single line. Sample Input 3 2 1 0 1 0 2 1 0 0 0 2 2 0 1 0 1 1 2 Sample Output 1 1 2
Go Go Gorelians 编写的思路
Problem Description The Gorelians travel through space using warp links. Travel through a warp link is instantaneous, but for safety reasons, an individual can only warp once every 10 hours. Also, the cost of creating a warp link increases directly with the linear distance between the link endpoints. The Gorelians, being the dominant force in the known universe, are often bored, so they frequently conquer new regions of space in the following manner. 1) The initial invasion force finds a suitable planet and conquers it, establishing a Regional Gorelian Galactic Government, hereafter referred to as the RGGG, that will govern all Gorelian matters in this region of space. 2) When the next planet is conquered, a single warp link is constructed between the new planet and the RGGG planet. Planets connected via warp links in this manner are said to be part of the Regional Gorelian Planetary Network, that is, the RGPN. 3) As additional planets are conquered, each new planet is connected with a single warp link to the nearest planet already in the RGPN, thus keeping the cost of connecting new planets to the network to a minimum. If two or more planets are equidistant from the new planet, the new planet is connected to whichever of them was conquered first. This causes a problem however. Since planets are conquered in a more-or-less random fashion, after a while, the RGGG will probably not be in an ideal location. Some Gorelians needing to consult with the RGGG might only have to make one or two warps, but others might require dozens---very inconvenient when one considers the 10-hour waiting period between warps. So, once each Gorelian year, the RGGG analyzes the RGPN and relocates itself to an optimal location. The optimal location is defined as a planet that minimizes the maximum number of warps required to reach the RGGG from any planet in the RGPN. As it turns out, there is always exactly one or two such planets. When there are two, they are always directly adjacent via a warp link, and the RGGG divides itself evenly between the two planets. Your job is to write a program that finds the optimal planets for the RGGG. For the purposes of this problem, the region of space conquered by the Gorelians is defined as a cube that ranges from (0,0,0) to (1000,1000,1000). Input The input consists of a set of scenarios where the Gorelians conquer a region of space. Each scenario is independent. The first line of the scenario is an integer N that specifies the total number of planets conquered by the Gorelians. The next N lines of the input specify, in the order conquered, the IDs and coordinates of the conquered planets to be added to the RGPN, in the format ID X Y Z. An ID is an integer from 1 to 1000. X, Y, and Z are integers from 0 to 1000. A single space separates the numbers. A value of N = 0 marks the end of the input. Output For each input scenario, output the IDs of the optimal planet or planets where the RGGG should relocate. For a single planet, simply output the planet ID. For two planets, output the planet IDs, smallest ID first, separated by a single space. Sample Input 5 1 0 0 0 2 0 0 1 3 0 0 2 4 0 0 3 5 0 0 4 5 1 0 0 0 2 1 1 0 3 3 2 0 4 2 1 0 5 3 0 0 10 21 71 76 4 97 32 5 69 70 33 19 35 3 79 81 8 31 91 17 67 52 31 48 75 48 90 14 4 41 73 2 21 83 74 41 69 26 32 30 24 0 Sample Output 3 2 4 31 97
Go Fishing 的计算
Problem Description This summer vacation, FZU-ACM members get together for training in the name of dream. Some of them like fishing. One afternoon M members of them go fishing together around the lake, they bring many buckets with them and put their fish in either one of N buckets, they can only remember the number of fish they catch, and the number of fish in every bucket. When the sun went down, everyone wants to take away the part belonging to him, so they need to split the N buckets into more buckets (here we can assume the number of buckets they own is unlimited). They want to minimize the times of split. They are so tired, so ask you to help them solve their puzzle. Each time they can only split the fish in one bucket into two buckets. Input The input consists of several test cases. The first line of each case contains two integers N,M.(1<=N,M<8) N representing the number of buckets they put their fish in, and M representing the number of ACM members that go fishing. The next line contains N integers representing the number of fish in each bucket. The next line contains M integers representing the number of fish each ACM member catch. Output Output the minimal times they need to split the fish. Sample Input 2 3 1 2 1 1 1 4 3 2 4 4 3 5 5 3 Sample Output 1 1
--go_out: protoc-gen-go: 系统找不到指定的文件。
protoc --go_out=plugins=grpc:. hello.proto --go_out: protoc-gen-go: 系统找不到指定的文件。
求助:html只能在微信浏览器打开,调用微信接口问题?
大家好 ,新手请教两个个问题 1.网页上输入域名的时候 直接访问了public目录下面的index.html 没有访问index.php 这个是tp模块默认的设置么? 2.这个怎么设置的index.html只能在微信端打开,我应该怎么解除,让他在普通浏览器也能正常打开呢? 个人觉得原因:1.它直接通过index.html里的js调用了微信授权,需要把js里的微信授权取消。但是我没能找到js里微信授权在哪里。 下么是图片: ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584857161_740465.jpg) ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584856909_155952.png) 下么是其中一个js代码: 1.index.5d79cff.js ``` (function(e){function n(n){for(var a,i,s=n[0],u=n[1],c=n[2],l=0,d=[];l<s.length;l++)i=s[l],o[i]&&d.push(o[i][0]),o[i]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);g&&g(n);while(d.length)d.shift()();return r.push.apply(r,c||[]),t()}function t(){for(var e,n=0;n<r.length;n++){for(var t=r[n],a=!0,i=1;i<t.length;i++){var u=t[i];0!==o[u]&&(a=!1)}a&&(r.splice(n--,1),e=s(s.s=t[0]))}return e}var a={},o={index:0},r=[];function i(e){return s.p+"static/js/"+({"pages-aboutUs-aboutUs":"pages-aboutUs-aboutUs","pages-buyLesson-buyLesson":"pages-buyLesson-buyLesson","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail","pages-cargoDetail-cargoDetail":"pages-cargoDetail-cargoDetail","pages-questionDetail-questionDetail":"pages-questionDetail-questionDetail","pages-feedback-feedback":"pages-feedback-feedback","pages-login-login":"pages-login-login","pages-partiPost-partiPost":"pages-partiPost-partiPost","pages-payOrder-payOrder":"pages-payOrder-payOrder","pages-searchDetails-searchDetails":"pages-searchDetails-searchDetails","pages-tabbar-drycargo-drycargo":"pages-tabbar-drycargo-drycargo","pages-tabbar-mine-mine":"pages-tabbar-mine-mine","pages-tabbar-question-question":"pages-tabbar-question-question","pages-tabbar-release-release":"pages-tabbar-release-release","pages-tabbar-search-search":"pages-tabbar-search-search","pages-teacherDetail-teacherDetail":"pages-teacherDetail-teacherDetail","pages-userinfo-userinfo":"pages-userinfo-userinfo"}[e]||e)+"."+{"pages-aboutUs-aboutUs":"f00552b3","pages-buyLesson-buyLesson":"6bf6a2ae","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"35e61b5d","pages-cargoDetail-cargoDetail":"9f2898d6","pages-questionDetail-questionDetail":"9c645e70","pages-feedback-feedback":"e2280327","pages-login-login":"d7b4ab6c","pages-partiPost-partiPost":"78de4437","pages-payOrder-payOrder":"8718e180","pages-searchDetails-searchDetails":"7710a11b","pages-tabbar-drycargo-drycargo":"1312f8dd","pages-tabbar-mine-mine":"f44636f9","pages-tabbar-question-question":"8d8629a7","pages-tabbar-release-release":"fdfe539f","pages-tabbar-search-search":"2c50eba0","pages-teacherDetail-teacherDetail":"65279f5c","pages-userinfo-userinfo":"38dd4057"}[e]+".js"}function s(n){if(a[n])return a[n].exports;var t=a[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(e){var n=[],t=o[e];if(0!==t)if(t)n.push(t[2]);else{var a=new Promise(function(n,a){t=o[e]=[n,a]});n.push(t[2]=a);var r,u=document.createElement("script");u.charset="utf-8",u.timeout=120,s.nc&&u.setAttribute("nonce",s.nc),u.src=i(e),r=function(n){u.onerror=u.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var a=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src,i=new Error("Loading chunk "+e+" failed.\n("+a+": "+r+")");i.type=a,i.request=r,t[1](i)}o[e]=void 0}};var c=setTimeout(function(){r({type:"timeout",target:u})},12e4);u.onerror=u.onload=r,document.head.appendChild(u)}return Promise.all(n)},s.m=e,s.c=a,s.d=function(e,n,t){s.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,n){if(1&n&&(e=s(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)s.d(t,a,function(n){return e[n]}.bind(null,a));return t},s.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="/",s.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],c=u.push.bind(u);u.push=n,u=u.slice();for(var l=0;l<u.length;l++)n(u[l]);var g=c;r.push([0,"chunk-vendors"]),t()})({0:function(e,n,t){e.exports=t("1e48")},"0538":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.mock=n.http=void 0;var o=a(t("795b")),r=a(t("cebc")),i=a(t("42e7")),s=new i.default;n.mock=s,s.setConfig(function(e){return e.baseUrl="https://www.fastmock.site/mock/09d86ed8a861337ae7da96bbb47bc39e/shoppage",e.header=(0,r.default)({},e.header),e}),s.interceptor.request(function(e,n){return e}),s.validateStatus=function(e){return 200===e},s.interceptor.response(function(e){if(1===e.data.error_code)return e.data},function(e){return e});var u=new i.default;n.http=u,u.setConfig(function(e){return e.baseUrl="http://xinghuo.com/index.php/index/",e.header=(0,r.default)({},e.header),e}),u.validateStatus=function(e){return 200===e},u.interceptor.response(function(e){return 200!==e.statusCode?o.default.reject(e):(1===e.data.code||(102===e.data.code?uni.reLaunch({url:"/pages/common/login/login"}):uni.showToast({title:e.data.msg||"加载中",icon:"none"})),o.default.resolve(e.data))},function(e){return e})},"0831":function(e,n,t){"use strict";t.r(n);var a=t("ac83"),o=t("1333");for(var r in o)"default"!==r&&function(e){t.d(n,e,function(){return o[e]})}(r);t("9578");var i,s=t("f0c5"),u=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);n["default"]=u.exports},1333:function(e,n,t){"use strict";t.r(n);var a=t("bc27"),o=t.n(a);for(var r in a)"default"!==r&&function(e){t.d(n,e,function(){return a[e]})}(r);n["default"]=o.a},"1e48":function(e,n,t){"use strict";var a=t("e54b"),o=t("288e"),r=o(t("cebc"));t("cadf"),t("551c"),t("097d"),t("356c"),t("1c31"),t("921b");var i=o(t("e143")),s=o(t("0831")),u=o(t("48a2")),c=a(t("3322")),l=o(t("b90f"));i.default.config.productionTip=!1,i.default.prototype.$api=c,i.default.prototype.websiteUrl="http://xinghuo.tanfangzi.cn",i.default.prototype.getImgUrl=function(e){return this.websiteUrl+e},i.default.prototype.isLogin=function(e){var n=uni.getStorageSync("userInfo");return!!n&&n.token},i.default.prototype.$store=u.default,i.default.prototype.$api=c,i.default.prototype.$utils=l.default,s.default.mpType="app";var g=new i.default((0,r.default)({},s.default));g.$mount()},"279b":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={pages:{"pages/tabbar/search/search":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/login/login":{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/tabbar/question/question":{navigationBarTitleText:"问答",navigationStyle:"custom"},"pages/tabbar/drycargo/drycargo":{navigationBarTitleText:"干货",navigationStyle:"custom"},"pages/tabbar/release/release":{navigationBarTitleText:"发布帖子",navigationStyle:"custom"},"pages/tabbar/mine/mine":{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/searchDetails/searchDetails":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/cargoDetail/cargoDetail":{navigationBarTitleText:"干货详情",navigationStyle:"custom"},"pages/teacherDetail/teacherDetail":{navigationBarTitleText:"讲师详情",navigationStyle:"custom"},"pages/userinfo/userinfo":{navigationBarTitleText:"个人资料",navigationStyle:"custom"},"pages/aboutUs/aboutUs":{navigationBarTitleText:"关于我们",navigationStyle:"custom"},"pages/feedback/feedback":{navigationBarTitleText:"意见反馈",navigationStyle:"custom"},"pages/buyLesson/buyLesson":{navigationBarTitleText:"购买课程",navigationStyle:"custom"},"pages/partiPost/partiPost":{navigationBarTitleText:"参与帖子",navigationStyle:"custom"},"pages/questionDetail/questionDetail":{navigationBarTitleText:"帖子详情",navigationStyle:"custom"},"pages/payOrder/payOrder":{navigationBarTitleText:"支付",navigationStyle:"custom"}},globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"}};n.default=a},3322:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.go=i,n.usersave=n.topay=n.order=n.buy=n.purchase=n.openid=n.userinfo=n.suggestion=n.mydata=n.bannerpost=n.about=n.phone=n.comment=n.videodeta=n.video=n.issue=n.postdeta=n.searchvideo=n.post=n.banner=void 0;var o=a(t("f499")),r=t("0538");function i(e,n){n?(n=(0,o.default)(n),uni.navigateTo({url:"/pages/"+e+"/"+e+"?data="+n})):uni.navigateTo({url:"/pages/"+e+"/"+e})}var s=function(e){return r.http.post("banner/index",e||{})};n.banner=s;var u=function(e){return r.http.post("video/post",e||{})};n.post=u;var c=function(e){return r.http.post("video/search_video",e||{})};n.searchvideo=c;var l=function(e){return r.http.post("video/postdeta",e||{})};n.postdeta=l;var g=function(e){return r.http.post("video/issue",e||{})};n.issue=g;var d=function(e){return r.http.post("video/video",e||{})};n.video=d;var p=function(e){return r.http.post("video/videodeta",e||{})};n.videodeta=p;var f=function(e){return r.http.post("video/comment",e||{})};n.comment=f;var y=function(e){return r.http.post("banner/phone",e||{})};n.phone=y;var b=function(e){return r.http.post("banner/about",e||{})};n.about=b;var m=function(e){return r.http.post("banner/post",e||{})};n.bannerpost=m;var h=function(e){return r.http.post("banner/mydata",e||{})};n.mydata=h;var _=function(e){return r.http.post("banner/suggestion",e||{})};n.suggestion=_;var v=function(e){return r.http.post("banner/user_info",e||{})};n.userinfo=v;var C=function(e){return r.http.post("banner/openid",e||{})};n.openid=C;var T=function(e){return r.http.post("banner/purchase",e||{})};n.purchase=T;var S=function(e){return r.http.post("video/buy",e||{})};n.buy=S;var D=function(e){return r.http.post("video/order",e||{})};n.order=D;var x=function(e){return r.http.post("video/to_pay",e||{})};n.topay=x;var w=function(e){return r.http.post("banner/user_save",e||{})};n.usersave=w},"356c":function(e,n,t){"use strict";(function(e){var n=t("288e"),a=n(t("5176")),o=n(t("e143"));e["____14021FC____"]=!0,delete e["____14021FC____"],e.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{borderStyle:"black",backgroundColor:"#FFFFFF",color:"#333333",selectedColor:"#333333",list:[{pagePath:"pages/tabbar/search/search",iconPath:"static/tabbar/taba1.png",selectedIconPath:"static/tabbar/taba2.png",text:"搜索",redDot:!1,badge:""},{pagePath:"pages/tabbar/question/question",iconPath:"static/tabbar/tabb1.png",selectedIconPath:"static/tabbar/tabb2.png",text:"问答",redDot:!1,badge:""},{pagePath:"pages/tabbar/drycargo/drycargo",iconPath:"static/tabbar/tabc1.png",selectedIconPath:"static/tabbar/tabc2.png",text:"干货",redDot:!1,badge:""},{pagePath:"pages/tabbar/mine/mine",iconPath:"static/tabbar/tabd1.png",selectedIconPath:"static/tabbar/tabd2.png",text:"我的",redDot:!1,badge:""}]}},e.__uniConfig.router={mode:"hash",base:"/"},e.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:3e3},e.__uniConfig.debug=!1,e.__uniConfig.networkTimeout={request:6e3,connectSocket:6e3,uploadFile:6e3,downloadFile:6e3},e.__uniConfig.sdkConfigs={},e.__uniConfig.qqMapKey="XVXBZ-NDMC4-JOGUS-XGIEE-QVHDZ-AMFV2",e.__uniConfig.nvue={"flex-direction":"column"},o.default.component("pages-tabbar-search-search",function(e){var n={component:t.e("pages-tabbar-search-search").then(function(){return e(t("ef27"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-login-login",function(e){var n={component:t.e("pages-login-login").then(function(){return e(t("31d9"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-question-question",function(e){var n={component:t.e("pages-tabbar-question-question").then(function(){return e(t("3c6e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-drycargo-drycargo",function(e){var n={component:t.e("pages-tabbar-drycargo-drycargo").then(function(){return e(t("3b16"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-release-release",function(e){var n={component:t.e("pages-tabbar-release-release").then(function(){return e(t("9932"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-mine-mine",function(e){var n={component:t.e("pages-tabbar-mine-mine").then(function(){return e(t("6d8f"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-searchDetails-searchDetails",function(e){var n={component:t.e("pages-searchDetails-searchDetails").then(function(){return e(t("4d92"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-cargoDetail-cargoDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-cargoDetail-cargoDetail")]).then(function(){return e(t("0c29"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-teacherDetail-teacherDetail",function(e){var n={component:t.e("pages-teacherDetail-teacherDetail").then(function(){return e(t("b00e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-userinfo-userinfo",function(e){var n={component:t.e("pages-userinfo-userinfo").then(function(){return e(t("d13d"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-aboutUs-aboutUs",function(e){var n={component:t.e("pages-aboutUs-aboutUs").then(function(){return e(t("e582"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-feedback-feedback",function(e){var n={component:t.e("pages-feedback-feedback").then(function(){return e(t("b75c"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-buyLesson-buyLesson",function(e){var n={component:t.e("pages-buyLesson-buyLesson").then(function(){return e(t("c589"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-partiPost-partiPost",function(e){var n={component:t.e("pages-partiPost-partiPost").then(function(){return e(t("93e6"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-questionDetail-questionDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-questionDetail-questionDetail")]).then(function(){return e(t("0553"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-payOrder-payOrder",function(e){var n={component:t.e("pages-payOrder-payOrder").then(function(){return e(t("5404"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),e.__uniRoutes=[{path:"/",alias:"/pages/tabbar/search/search",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-tabbar-search-search",{slot:"page"})])}},meta:{id:1,name:"pages-tabbar-search-search",isNVue:!1,pagePath:"pages/tabbar/search/search",isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0,windowTop:0}},{path:"/pages/login/login",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-login-login",{slot:"page"})])}},meta:{name:"pages-login-login",isNVue:!1,pagePath:"pages/login/login",windowTop:0}},{path:"/pages/tabbar/question/question",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:1},__uniConfig.globalStyle,{navigationBarTitleText:"问答",navigationStyle:"custom"})},[e("pages-tabbar-question-question",{slot:"page"})])}},meta:{id:2,name:"pages-tabbar-question-question",isNVue:!1,pagePath:"pages/tabbar/question/question",isQuit:!0,isTabBar:!0,tabBarIndex:1,windowTop:0}},{path:"/pages/tabbar/drycargo/drycargo",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:2},__uniConfig.globalStyle,{navigationBarTitleText:"干货",navigationStyle:"custom"})},[e("pages-tabbar-drycargo-drycargo",{slot:"page"})])}},meta:{id:3,name:"pages-tabbar-drycargo-drycargo",isNVue:!1,pagePath:"pages/tabbar/drycargo/drycargo",isQuit:!0,isTabBar:!0,tabBarIndex:2,windowTop:0}},{path:"/pages/tabbar/release/release",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"发布帖子",navigationStyle:"custom"})},[e("pages-tabbar-release-release",{slot:"page"})])}},meta:{name:"pages-tabbar-release-release",isNVue:!1,pagePath:"pages/tabbar/release/release",windowTop:0}},{path:"/pages/tabbar/mine/mine",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:3},__uniConfig.globalStyle,{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-tabbar-mine-mine",{slot:"page"})])}},meta:{id:4,name:"pages-tabbar-mine-mine",isNVue:!1,pagePath:"pages/tabbar/mine/mine",isQuit:!0,isTabBar:!0,tabBarIndex:3,windowTop:0}},{path:"/pages/searchDetails/searchDetails",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-searchDetails-searchDetails",{slot:"page"})])}},meta:{name:"pages-searchDetails-searchDetails",isNVue:!1,pagePath:"pages/searchDetails/searchDetails",windowTop:0}},{path:"/pages/cargoDetail/cargoDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"干货详情",navigationStyle:"custom"})},[e("pages-cargoDetail-cargoDetail",{slot:"page"})])}},meta:{name:"pages-cargoDetail-cargoDetail",isNVue:!1,pagePath:"pages/cargoDetail/cargoDetail",windowTop:0}},{path:"/pages/teacherDetail/teacherDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"讲师详情",navigationStyle:"custom"})},[e("pages-teacherDetail-teacherDetail",{slot:"page"})])}},meta:{name:"pages-teacherDetail-teacherDetail",isNVue:!1,pagePath:"pages/teacherDetail/teacherDetail",windowTop:0}},{path:"/pages/userinfo/userinfo",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"个人资料",navigationStyle:"custom"})},[e("pages-userinfo-userinfo",{slot:"page"})])}},meta:{name:"pages-userinfo-userinfo",isNVue:!1,pagePath:"pages/userinfo/userinfo",windowTop:0}},{path:"/pages/aboutUs/aboutUs",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"关于我们",navigationStyle:"custom"})},[e("pages-aboutUs-aboutUs",{slot:"page"})])}},meta:{name:"pages-aboutUs-aboutUs",isNVue:!1,pagePath:"pages/aboutUs/aboutUs",windowTop:0}},{path:"/pages/feedback/feedback",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"意见反馈",navigationStyle:"custom"})},[e("pages-feedback-feedback",{slot:"page"})])}},meta:{name:"pages-feedback-feedback",isNVue:!1,pagePath:"pages/feedback/feedback",windowTop:0}},{path:"/pages/buyLesson/buyLesson",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"购买课程",navigationStyle:"custom"})},[e("pages-buyLesson-buyLesson",{slot:"page"})])}},meta:{name:"pages-buyLesson-buyLesson",isNVue:!1,pagePath:"pages/buyLesson/buyLesson",windowTop:0}},{path:"/pages/partiPost/partiPost",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"参与帖子",navigationStyle:"custom"})},[e("pages-partiPost-partiPost",{slot:"page"})])}},meta:{name:"pages-partiPost-partiPost",isNVue:!1,pagePath:"pages/partiPost/partiPost",windowTop:0}},{path:"/pages/questionDetail/questionDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"帖子详情",navigationStyle:"custom"})},[e("pages-questionDetail-questionDetail",{slot:"page"})])}},meta:{name:"pages-questionDetail-questionDetail",isNVue:!1,pagePath:"pages/questionDetail/questionDetail",windowTop:0}},{path:"/pages/payOrder/payOrder",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"支付",navigationStyle:"custom"})},[e("pages-payOrder-payOrder",{slot:"page"})])}},meta:{name:"pages-payOrder-payOrder",isNVue:!1,pagePath:"pages/payOrder/payOrder",windowTop:0}},{path:"/preview-image",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-preview-image",{slot:"page"})])}},meta:{name:"preview-image",pagePath:"/preview-image"}},{path:"/choose-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}]}).call(this,t("c8ba"))},"42e7":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("a4bb"));t("ac6a");var r=a(t("f499")),i=a(t("cebc")),s=a(t("795b"));t("96cf");var u=a(t("3b8d")),c=a(t("d225")),l=a(t("b0b4")),g=a(t("bd86")),d=function(){function e(){var n=this;(0,c.default)(this,e),(0,g.default)(this,"config",{baseUrl:"",header:{"content-type":"application/json;charset=UTF-8"},method:"GET",dataType:"json",responseType:"text"}),(0,g.default)(this,"interceptor",{request:function(e){e&&(n.requestBeforeFun=e)},response:function(e,t){e&&t&&(n.requestComFun=e,n.requestComFail=t)}})}return(0,l.default)(e,[{key:"requestBeforeFun",value:function(e){return e}},{key:"requestComFun",value:function(e){return e}},{key:"requestComFail",value:function(e){return e}},{key:"validateStatus",value:function(e){return 200===e}},{key:"setConfig",value:function(e){this.config=e(this.config)}},{key:"request",value:function(){var n=(0,u.default)(regeneratorRuntime.mark(function n(){var t,a=this,o=arguments;return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},t.baseUrl=this.config.baseUrl,t.dataType=t.dataType||this.config.dataType,t.responseType=t.responseType||this.config.responseType,t.url=t.url||"",t.data=t.data||{},t.params=t.params||{},t.header=t.header||this.config.header,t.method=t.method||this.config.method,n.abrupt("return",new s.default(function(n,o){var s=!0,u={};t.complete=function(e){e.config=u,a.validateStatus(e.statusCode)?(e=a.requestComFun(e),n(e)):(e=a.requestComFail(e),o(e))};var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,a={errMsg:e,config:n};o(a),s=!1};u=(0,i.default)({},a.requestBeforeFun(t,c));var l=(0,i.default)({},u);if(s){var g=e.posUrl(t.url)?t.url:t.baseUrl+t.url;if("{}"!==(0,r.default)(t.params)){var d=e.addQueryString(t.params);g+=-1===g.indexOf("?")?"?".concat(d):"&".concat(d)}l.url=g,uni.request(l)}}));case 10:case"end":return n.stop()}},n,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"get",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request((0,i.default)({url:e,method:"GET"},n))}},{key:"post",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"POST"},t))}},{key:"put",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"PUT"},t))}},{key:"delete",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"DELETE"},t))}},{key:"connect",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"CONNECT"},t))}},{key:"head",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"HEAD"},t))}},{key:"options",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"OPTIONS"},t))}},{key:"trace",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"TRACE"},t))}},{key:"upload",value:function(n,t){var a=this,o=t.filePath,r=t.name,u=t.header,c=t.formData;return new s.default(function(t,s){var l=!0,g={},d={baseUrl:a.config.baseUrl,url:n,filePath:o,method:"UPLOAD",name:r,header:u||a.config.header,formData:c,complete:function(e){e.config=g,200===e.statusCode?(e=a.requestComFun(e),t(e)):(e=a.requestComFail(e),s(e))}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,t={errMsg:e,config:n};s(t),l=!1};g=(0,i.default)({},a.requestBeforeFun(d,p));var f=(0,i.default)({},g);l&&(f.url=e.posUrl(n)?n:a.config.baseUrl+n,uni.uploadFile(f))})}}],[{key:"posUrl",value:function(e){return/(http|https):\/\/([\w.]+\/?)\S*/.test(e)}},{key:"addQueryString",value:function(e){var n="";return(0,o.default)(e).forEach(function(t){n+=t+"="+e[t]+"&"}),n.substring(0,n.length-1)}}]),e}();n.default=d},"48a2":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("e143")),r=a(t("2f62"));o.default.use(r.default);var i=new r.default.Store({state:{hasLogin:!1,userInfo:{},address:{},coords:{},isWeixin:"",openid:""},mutations:{login:function(e,n){e.hasLogin=!0,e.userInfo=n,uni.setStorage({key:"userInfo",data:n})},logout:function(e){e.hasLogin=!1,e.userInfo={},uni.removeStorage({key:"userInfo"})},addressinfo:function(e,n){e.address=n,uni.setStorage({key:"address",data:n})},coordsinfo:function(e,n){e.coords=n,uni.setStorage({key:"coords",data:n})},isweixin:function(e,n){console.log(n),e.isWeixin=n},setopenid:function(e,n){e.openid=n,uni.setStorage({key:"openid",data:n})}},actions:{}}),s=i;n.default=s},"56c3":function(e,n,t){var a=t("ef9f");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=t("4f06").default;o("0afb4e03",a,!0,{sourceMap:!1,shadowMode:!1})},"6e05":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={appid:"__UNI__14021FC"};n.default=a},9578:function(e,n,t){"use strict";var a=t("56c3"),o=t.n(a);o.a},ac83:function(e,n,t){"use strict";var a,o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("App",{attrs:{keepAliveInclude:e.keepAliveInclude}})},r=[];t.d(n,"b",function(){return o}),t.d(n,"c",function(){return r}),t.d(n,"a",function(){return a})},b90f:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("795b"));t("6762");var r=["133","149","153","173","177","180","181","189","199","130","131","132","145","155","156","166","171","175","176","185","186","166","134","135","136","137","138","139","147","150","151","152","157","158","159","172","178","182","183","184","187","188","198"],i=function(e){return 11===e.length&&r.includes(e.slice(0,3))},s=function(e){return new o.default(function(n,t){var a=newTestPhone(e+"");a?n(a):(uni.toast({title:"手机号格式不正确",icon:"none"}),t(a))})},u=function(e){var n=e.title,t=e.icon,a=void 0===t?"success":t,r=e.duration,i=void 0===r?1500:r;return new o.default(function(e,t){uni.showToast({title:n,icon:a,duration:i,success:function(){setTimeout(function(){e()},i)},fail:function(){t()}})})},c={test_phone:i,verifyPhone:s,toast:u};n.default=c},bc27:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};n.default=a},ef9f:function(e,n,t){n=e.exports=t("2350")(!1),n.push([e.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n/*每个页面公共css */.container{font-size:%?30?%}.flex{display:-webkit-box;display:-webkit-flex;display:flex}.flex1{-webkit-box-flex:1;-webkit-flex:1;flex:1}.fdc{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.jcsb{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.jcc{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.jcfe{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.aic{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.por{position:relative}.pof{position:fixed}.poa{position:absolute}.tac{text-align:center}.line{width:100%;height:%?16?%;background-color:#f7f7f7}.bxsbb{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ellipsiss{\r\n\t/* width: 300upx; */overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.nodata{padding:%?100?%;text-align:center}.ylf-button{margin:%?200?% auto;width:%?611?%;height:%?98?%;line-height:%?98?%;border-radius:%?98?%;font-size:$y-fs40;text-align:center;color:#fff;background-color:#60abfc}",""])}}); ```
python小白有关退出while循环的提问
``` command=input("> ").lower() while command!="quit": if command=="start": print("go") elif command=="stop": print("stop") elif command=="help": print("quit,start,stop") else: print("I can't understand") command=input("> ").lower #第一种情况:输入“quit”,直接不进入循环,程序结束 #第二种情况:输入除“quit”外任意字符,再输入“quit”却不退出循环,而执行else ``` 问题就是,我第一次输入“quit”以外的字符后,再输入“quit”程序不应该执行循环的判断语句,此时判断语句不成立,却不退出循环,这是为什么呢
go语言编译时报错can't load package 怎么解决?
go的编译器在 F 盘下,我的项目包gocode在E盘中,我写了个小的Go程序,单独的在main下执行 go build main.go 没有问题,但在gocode下执行就会报如下错误,请问是怎么回事? 我的环境变量是 变量名 GOPATH 变量值 E:\gocode! 变量名 GOROOT 变量值 F:\VS_code\SDK PATH下 %GOROOT%\bin [图片说明](https://img-ask.csdn.net/upload/201910/13/1570978042_774426.png)
Seeing the Stars 程序的问题
Problem Description Dumbear likes to take a walk with his girlfriend, Jing. One day when they were taking a walk, they found that there were so many stars in the sky. But unfortunately, they could see few of the stars because many buildings around blocked their vision. Jing asked Dumbear how many stars they could see. Jing also wanted to see the most beautiful star of them. Dumbear is very dumb, now he wants you to help him. If you know the locations of all the buildings, the directions of all the stars and the location of Dumbear and Jing, can you calculate the number of stars they could see and the minimum distance they should go for seeing the most beautiful star? You can assume all the buildings are cuboids lay on the ground; all the stars are strictly above the ground and are infinite far away. You can also assume all the buildings do not intersect or touch one another and the location of Dumbear and Jing is strictly outside any building. Note that we consider a building blocks their vision if and only if the vision goes through the building strictly. Also note that no one can go through any building. Input The first line contains a single integer T, indicating the number of test cases. Each test case begins with four integers N, M, X, Y indicate the number of the stars, the number of the buildings, and the coordinates of Dumbear and Jing on the ground. Then N lines follow, each line contains three integers Xi, Yi, Zi indicate a star’s direction. If your location is (x, y) on the ground, then the star will be in the direction (x, y, 0) => (x + Xi, y + Yi, Zi). Note that the most beautiful star is always the first. Then M lines follow, each line contains five integers X1i, Y1i, X2i, Y2i, Hi indicate the building’s lower left coordinates, upper right coordinates on the ground and the height of it. Technical Specification 1. 1 <= T <= 10020 2. 1 <= N <= 1000 Note for more than 99% of the test cases, 1 <= N <= 10 3. 1 <= M <= 20 Note for more than 99% of the test cases, 1 <= M <= 5 4. 0 <= |X|, |Y|, |Xi|, |Yi|, |X1i|, |Y1i|, |X2i|, |Y2i| <= 1000 5. X1i < X2i, Y1i < Y2i, 10 <= Zi, Hi <= 100 Output For each test case, output the case number first, then the number of the stars they can see directly and the minimum distance they should go to see the most beautiful star. You should round the distance to 2 digits after the decimal point. Sample Input 1 3 1 0 0 1 1 1 1 0 1 0 1 1 1 1 3 3 2 Sample Output Case 1: 2 1.00
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
【JSON解析】浅谈JSONObject的使用
简介 在程序开发过程中,在参数传递,函数返回值等方面,越来越多的使用JSON。JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,同时也易于机器解析和生成、易于理解、阅读和撰写,而且Json采用完全独立于语言的文本格式,这使得Json成为理想的数据交换语言。 JSON建构于两种结构: “名称/值”对的集合(A Collection of name/va...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
只因接了一个电话,程序员被骗 30 万!
今天想给大家说一个刚刚发生在我身边的一起真实的诈骗经历,我的朋友因此被骗走30万。注:为了保护当事人隐私,部分情节进行了修改。1平安夜突来的电话开始以为就像普通的诈骗一样,想办法让你把钱...
我一个37岁的程序员朋友
周末了,人一旦没有点事情干,心里就瞎想,而且跟几个老男人坐在一起,更容易瞎想,我自己现在也是 30 岁了,也是无时无刻在担心自己的职业生涯,担心丢掉工作没有收入,担心身体机能下降,担心突...
python自动下载图片
近日闲来无事,总有一种无形的力量萦绕在朕身边,让朕精神涣散,昏昏欲睡。 可是,像朕这么有职业操守的社畜怎么能在上班期间睡瞌睡呢,我不禁陷入了沉思。。。。 突然旁边的IOS同事问:‘嘿,兄弟,我发现一个网站的图片很有意思啊,能不能帮我保存下来提升我的开发灵感?’ 作为一个坚强的社畜怎么能说自己不行呢,当时朕就不假思索的答应:‘oh, It’s simple. Wait for me for a ...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
【程序人生】程序员接私活常用平台汇总
00. 目录 文章目录00. 目录01. 前言02. 程序员客栈03. 码市04. 猪八戒网05. 开源众包06. 智城外包网07. 实现网08. 猿急送09. 人人开发10. 开发邦11. 电鸭社区12. 快码13. 英选14. Upwork15. Freelancer16. Dribbble17. Remoteok18. Toptal19. AngelList20. Topcoder21. ...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
立即提问