kaijuyizhikun
被强煎DA蛋蛋
2021/01/19 01:21
  • python

能一步一步教教吗,c语言里面是3<4<5>2是false能理解,现在正常的不懂了。。。。。

0个回复
hardWorkingCer
李逸非_
2021/01/19 00:43
  • c语言

0个回复
Zoeygi
一介咸鱼罢了
2021/01/18 23:57
  • c语言
  • c++

 

0个回复
qq_40522959
奋斗中的cc
2021/01/18 23:46
  • vue.js
  • node.js

大神们这个问题怎么解啊

0个回复
luxuncang
红尘觅沧桑
2021/01/18 23:36
  • 开发语言

vscode中使用Markdown,只能使用.Markdown扩展名,不能使用.md扩展名

 

0个回复
AimerDawn
エメの恋文
2021/01/18 23:29
  • python

求教,这里的190行为什么会有意外缩进这个错误,真搞不懂,新手,求教

0个回复
xianxian_123
xianxian_123
2021/01/18 23:27
  • oracle

SELECT * FROM(  SELECT sign_ind,COUNT(1) FROM ${temporary_table} group by sign_ind) ORDER BY SIGN_IND;

0个回复
CCXhua
CCXhua
2021/01/18 22:59
  • python

c

ch

che

chen

cheng

chengd

chengdu

0个回复
weixin_44530731
weixin_44530731
2021/01/18 22:53
  • android-studio
  • android

 

0个回复
qq_53434943
qq_53434943
2021/01/18 22:52
  • 问答团队
  • java
  • 开发语言
  • eclipse

 

 

 

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n,out;
		int c[]=new int[7];
		out=0;
		char r;
		r=' ';
		n=in.nextInt();
		String array[]=new String[n];
		for(int i=0;i<n;i++)
		{
			array[i]=in.next().intern();
		}
		for (int i = 0; i < array.length; i++) {
//			System.out.println(array[i]);
			for(int j=0;j<7;j++)
			{
				
				if(j==0|j==2|j==4|j==6)
				{
					c[j]=(int)array[i].charAt(j)-48;
					if(r=='*'&j>=2)
					{
						c[j]=c[j]*c[j-2];
						c[j-2]=0;
					}			
					if(r=='/'&j>=2)
					{
						c[j]=c[j-2]/c[j];
						c[j-2]=0;
					}					
					if(r=='-'&j>=2)
					{
						c[j]=-c[j];
					}
				}
				if(j==1|j==3|j==5)
				{
					r=array[i].charAt(j);

				}
			}
			out=c[0]+c[2]+c[4]+c[6];
//			System.out.println(c[0]);
//			System.out.println(c[2]);
//			System.out.println(c[4]);
//			System.out.println(c[6]);
//			System.out.println(out);
			if(out==24)
			{
				System.out.println("Yes");
			}
			else
				System.out.println("No");
		}
	}

}

 

0个回复
weixin_41359495
H_Franky
2021/01/18 22:51
  • sql
  • mysql

如果一篇文章带有评论功能,那么按道理是一张文章表和一张评论表,文章表有文章的相关信息和文章发表者的信息,那么评论表应该评论人信息和文章信息,若关联两张表,评论表的只需文章对于id就行吗?是否有必要添加中间表做关联?

1个回复
weixin_46368553
斜月三心洞
2021/01/18 22:48
  • c语言

源文件中包含<stdio_ext.h>后编译通过,但链接时报错,提示找不到我所引用的函数,应该是<stdio_ext.h>需要链接不同于<stdio.h>的库函数,到底应该链接哪个库文件呢?

0个回复
mik01
mik01
2021/01/18 22:47
  • c语言

 

0个回复
weixin_46223869
你家轩哥
2021/01/18 22:41
  • unix
  • linux
  • centos
  • ubuntu
#!/bin/bash
clear
>ip-up.txt
>ip-down.txt

read -p "please input addr" ipc
for i in {1..254}
 do
  ping -c 2 -W 1 $ipc.$i &>/dev/null
  
  if [ $? -eq 0 ] ; then
     echo "$ipc.$i is up" &>/dev/null >>ip-up.txt
	else
	echo "$ipc.$i is down" &>/dev/null >>ip-down.txt
  fi
 done
wait
sort -n -k 4 -t . ip-up.txt  -o ip-up.txt
cat ip-up.txt
sort -n -k 4 -t . ip-down.txt -o ip-down.txt
cat ip-down.txt

echo "ping test are finished"

这个是慢的那个。。

#!/bin/bash

#V1.0 2019-09-10

#Ping test shell script by tutor



clear

>ip-up.txt

>ip-down.txt



while true;

 do

    read -p "Please input the ip segment for ping test(like 192.168.100) : "  segment





     if [ -z $segment  ] ; then



       segment="192.168.100"



     fi





    echo -n "the ip segment is ${segment} , are you sure to continue [y/n] ? "



    read  action



     if [ -z $action  ] ; then

          break

     fi



     if [  "$action" =  "y"  ]; then

         break

     fi

done



echo "ping test is ready to run! "



for i in  {1..254}

 do

      {
        ping -c2 -W1 ${segment}.${i}  &>/dev/null

        if [ $? -eq 0 ]; then

           echo "${segment}.$i is up" &>/dev/null  >> ip-up.txt

        else

           echo "${segment}.$i is down" &>/dev/null >> ip-down.txt

        fi

     }&

done



wait

            sort -n -k 4 -t . ip-up.txt -o ip-up.txt

            cat ip-up.txt

            sort -n -k 4 -t . ip-down.txt -o ip-down.txt

            cat ip-down.txt



echo "ping test are finished!"

这个是快的那个

 

两个脚本速度差距特别大,求大佬解惑。。。拜托了 

 

0个回复
weixin_44645309
厕所打你
2021/01/18 22:21
  • javascript
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>test</title>
  </head>
  <body>
    <button>1111</button>
    <button>2222</button>
    <button>3333</button>
  </body>
  <script>
    for(var i=0;i<3;i++){
      document.getElementsByTagName("button")[i].onclick=function(){
        alert(i);
      }
    }
  </script>
</html>

为什么点击每个按钮都会弹出3??

1个回复
qq_29463163
C/C++ Qt_MFC
2021/01/18 22:20
  • c++

各位大神们:本人在原有的MFC项目加http通信向服务器 post json数据的功能 ,由于mfc类提供的CHttpFIle不支持数据量大的传输,所以本人使用了curllib库,软件环境VS2017 x64 MFC ,在主线程post 一个很大长的json数据(29kb),已经测试通过。但现在想在MFC多线程CWinThread下使用curlib库curl_easy_perform()却一直阻塞,无法返回。post不成功。即便是很短的json数据(1kb),也不成功。请问我该如何解决,感谢了

0个回复
weixin_54466370
weixin_54466370
2021/01/18 22:16
  • 问答团队

gdc-client download: error: argument -m/--manifest: can't open 'gdc_manifest.20210118_102139.txt': [Errno 2] No such file or directory: 'gdc_manifest.20210118_102139.txt'怎么解决

0个回复
m0_49359842
星点灯丶
2021/01/18 22:09
  • java

今天在使用ssm中分页插件pagehelper时发生一个奇怪的事情


```java
 <!--pagehelper-->
    <pagehelper.version>5.1.2</pagehelper.version>

    <!--pagehelper-->
    <dependency>
      <groupId>com.github.pagehelper</groupId>
      <artifactId>pagehelper</artifactId>
      <version>${pagehelper.version}</version>
    </dependency>
```
同样的代码,都是用aop实现的

```java
    public Object invoke(ProceedingJoinPoint args) throws Throwable{

        Object[] params = args.getArgs();
        //分页对象
        PageBean pageBean=null;
        for (Object param : params) {
            if(param instanceof PageBean){
                pageBean= (PageBean) param;
                break;
            }
        }
        //设置分页参数
        if(null!=pageBean&&pageBean.isPagination()){
            PageHelper.startPage(pageBean.getPage(),pageBean.getRows());
        }
        //执行方法,得到返回结果
        Object result = args.proceed(params);
        System.out.println(result);
        JsonResponseBody data= (JsonResponseBody) result;
        if(null!=pageBean&&pageBean.isPagination()){
            if(null==data.getData())
                return new JsonResponseBody<>(ResponseStatus.STATUS_602);
            List lst= (List) data.getData();
            PageInfo pi=new PageInfo(lst);
            pageBean.setTotal(pi.getTotal()+"");
            return new JsonResponseBody<>(lst,pageBean.getTotal());
        }
        return new JsonResponseBody<>(data.getData());
    }
```
但是有一个方法在切入AOP之后总是报错,如下:
```java
org.springframework.web.util.NestedServletException
```
百度了一下,说是jar包冲突,于是把jar包改成 5.1.0,果然问题解决了,
但是之后我改回5.1.2,结果也不报错了,
原因不明

0个回复
qq_48307395
秋小澈
2021/01/18 21:54
  • python


用的是Jupyter,求大神解答!急!

代码如下:
import numpy as np
t=np.arange(1,10,1)
print(t)
y=0.9*t+np.sin(t)
y
import matplotlib.pyplot as plt
%matplotlib inline
plt.plot(t,y,'db')
model=np.polyfit(t,y,deg=1)
model
t2=np.arange=(-2,12,1)
t2

y2predict=np.polyval(model,t2)
y2predict

plt.plot(t,y,'o',t2,y2predict,'x')
plt.show()
在这里出问题了 报错代码如下
TypeError                                 Traceback (most recent call last)
<ipython-input-8-d0e83e3a8d52> in <module>
      1 plt.plot(t,y,'o',t2,y2predict,'x')
----> 2 plt.show()

D:\anaconda\lib\site-packages\matplotlib\pyplot.py in show(*args, **kwargs)
    351     """
    352     _warn_if_gui_out_of_main_thread()
--> 353     return _backend_mod.show(*args, **kwargs)
    354 
    355 

D:\anaconda\lib\site-packages\ipykernel\pylab\backend_inline.py in show(close, block)
     41             display(
     42                 figure_manager.canvas.figure,
---> 43                 metadata=_fetch_figure_metadata(figure_manager.canvas.figure)
     44             )
     45     finally:

D:\anaconda\lib\site-packages\ipykernel\pylab\backend_inline.py in _fetch_figure_metadata(fig)
    178     if _is_transparent(fig.get_facecolor()):
    179         # the background is transparent
--> 180         ticksLight = _is_light([label.get_color()
    181                                 for axes in fig.axes
    182                                 for axis in (axes.xaxis, axes.yaxis)

D:\anaconda\lib\site-packages\ipykernel\pylab\backend_inline.py in <listcomp>(.0)
    181                                 for axes in fig.axes
    182                                 for axis in (axes.xaxis, axes.yaxis)
--> 183                                 for label in axis.get_ticklabels()])
    184         if ticksLight.size and (ticksLight == ticksLight[0]).all():
    185             # there are one or more tick labels, all with the same lightness

D:\anaconda\lib\site-packages\matplotlib\axis.py in get_ticklabels(self, minor, which)
   1253         if minor:
   1254             return self.get_minorticklabels()
-> 1255         return self.get_majorticklabels()
   1256 
   1257     def get_majorticklines(self):

D:\anaconda\lib\site-packages\matplotlib\axis.py in get_majorticklabels(self)
   1205     def get_majorticklabels(self):
   1206         """Return this Axis' major tick labels, as a list of `~.text.Text`."""
-> 1207         ticks = self.get_major_ticks()
   1208         labels1 = [tick.label1 for tick in ticks if tick.label1.get_visible()]
   1209         labels2 = [tick.label2 for tick in ticks if tick.label2.get_visible()]

D:\anaconda\lib\site-packages\matplotlib\axis.py in get_major_ticks(self, numticks)
   1376         r"""Return the list of major `.Tick`\s."""
   1377         if numticks is None:
-> 1378             numticks = len(self.get_majorticklocs())
   1379 
   1380         while len(self.majorTicks) < numticks:

D:\anaconda\lib\site-packages\matplotlib\axis.py in get_majorticklocs(self)
   1281     def get_majorticklocs(self):
   1282         """Return this Axis' major tick locations in data coordinates."""
-> 1283         return self.major.locator()
   1284 
   1285     def get_minorticklocs(self):

D:\anaconda\lib\site-packages\matplotlib\ticker.py in __call__(self)
   2274     def __call__(self):
   2275         vmin, vmax = self.axis.get_view_interval()
-> 2276         return self.tick_values(vmin, vmax)
   2277 
   2278     def tick_values(self, vmin, vmax):

D:\anaconda\lib\site-packages\matplotlib\ticker.py in tick_values(self, vmin, vmax)
   2282         vmin, vmax = mtransforms.nonsingular(
   2283             vmin, vmax, expander=1e-13, tiny=1e-14)
-> 2284         locs = self._raw_ticks(vmin, vmax)
   2285 
   2286         prune = self._prune

D:\anaconda\lib\site-packages\matplotlib\ticker.py in _raw_ticks(self, vmin, vmax)
   2265             low = edge.le(_vmin - best_vmin)
   2266             high = edge.ge(_vmax - best_vmin)
-> 2267             ticks = np.arange(low, high + 1) * step + best_vmin
   2268             # Count only the ticks that will be displayed.
   2269             nticks = ((ticks <= _vmax) & (ticks >= _vmin)).sum()

TypeError: 'tuple' object is not callable

 

0个回复
justintac
TωT
2021/01/18 21:47
  • eclipse

 

0个回复
m0_46700664
m0_46700664
2021/01/18 21:45
  • python

这段代码会出现TypeError: There are no type variables left in dict[{'id': '1001', 'name': '张三', 'english': 100, 'python': 100, 'java': 100}]这个问题,是为什么呢?

```
mode=input('请选择排序方式(1.按英语成绩排序 2.按python成绩排序 3.按java成绩排序 0.按总成绩排序)')
    if mode=='1':
        student_new.sort(key=lambda a:int(a['english']),reverse=asc_or_desc_bool)
    elif mode=='2':
        student_new.sort(key=lambda x:int(x['python']),reverse=asc_or_desc_bool)
    elif mode=='3':
        student_new.sort(key=lambda x:int(x['java']),reverse=asc_or_desc_bool)
    elif mode=='0':
        student_new.sort(key=lambda x:int(x['english'])+int(x['python'])+int(x['java']),reverse=asc_or_desc_bool)
    else:
```

1个回复
qingtiankai
清天开
2021/01/18 21:42
  • 小程序
  • android
  • 人工智能
  • 测试用例
  • 多彩生活

手机怎么实现利用USB 外接红外触摸屏和显示器

将手机视频信号传出到显示器,同时用外接红外触摸屏进行控制

 

0个回复
Wei_guang_yp
发轫灬微光
2021/01/18 21:37
  • java
  • intellij-idea

为什么不能像图1一样直接运行测试,我看视频里面都可以,看了各种帖子好像都不行,不知道是哪里出的问题,1、安装了插件;2、资源文件夹也设置过,也没用,而且视频里不用设置资源文件夹也能用;3、不是maven项目,没有pom.xml。

1个回复
FGFGFGISMEN
郭泊昱
2021/01/18 21:26
  • 多彩生活

 

0个回复