I_am_Maker
I_am_Maker
2021/01/20 18:34
  • linux
  • ubuntu

我的Ubuntu是win10下内置的,我并没有预设swap,当然,也无法更改

最后一图,即使改到了0644,但是最后那个依旧无法运行

总结:麻烦给孩子指个明路:如何更改预设的swap,或者如何解决最后一幅图

0个回复
milkteaGu
奶茶睡不着
2021/01/20 18:32
  • json
  • python

在vscode中,用F5或者点debug调试,直接忽略断点,自动运行至程序结束。请问如何解决这个问题呢?

0个回复
I_am_Maker
I_am_Maker
2021/01/20 18:23
  • linux
  • ubuntu

只是我的电脑内存太小,小麦基因组大小十几个GB,

命令也很简单bowtie-build   ./genome.fa  ./genome,

有意的可以回复一下我吗?

0个回复
qq_37197062
超级菜芽人
2021/01/20 18:23
  • java
  • github
  • svn
  • git
  • java-ee

列如 有master主干和test开发分支。

master分支的内容为 select * from table

test分支的内容修改为 select * from table where id = 1

现在修改master内容为 select * from table6 , 切换test分支对master执行merge into current合并。

现在idea解决冲突的情况是master合并的代码会覆盖掉where id = 1这一段

不然 select * from table和 select * from table where id = 1同时存在,要解决只能手动去改。

怎么实现从master合并只修改为table6而不覆盖where id = 1,也不需要我手动去改

0个回复
weixin_45289635
落羽轻音
2021/01/20 18:15
  • java
  • tomcat

这是网页代码:

<
        <div class="login_button">
            <input class="btn" type="button" value="登录" onclick="usesrLogin()">
        </div>

这是js

"use strict";
window.onload = function (){
    background();
    $(".login_input").val("admin001")
    $(".login_tips").css("display","none")
}
function inputFocus(e){
    $(e).parent().siblings(".login_tips").css("color", "#ddd");
}
function inputBlur(e){
    $(e).parent().siblings(".login_tips").css("color", "#aaa");
}
function inputUp(e){
    var count=$(e).val().length;
    if(count==0){
        $(e).parent().siblings(".login_tips").css("display","block");
    }else{
        $(e).parent().siblings(".login_tips").css("display","none");
    }
}
function background(){
    $(".background_img").css("opacity", "1");
}
function usesrLogin() {
    console.info("login")
    $.ajax({
        url: 'UserServlet',
        type: 'POST',
        async: true,
        timeout: 5000,
        data:{
            method: "userLogin",
            userName: $("#username").val(),
            userPassword: $("#password").val()
        },
        beforeSend: function (){

        },
        success: function (msg){
            if (msg == "登录成功"){
                $(location).attr('href', 'main.html')
            }else {
                alert(msg)
            }
        },
        error: function (){

        },
        complete: function (){

        }
    });
}
function usesrRegister(){
    $.ajax({
        url: 'UserServlet',
        type: 'POST',
        async: true,
        timeout: 5000,
        data:{
            method: "userRegister",
            userName: $("#username").val(),
            userPassword: $("#password").val()
        },
        beforeSend: function (){

        },
        success: function (msg){
            alert(msg)
        },
        error: function (){

        },
        complete: function (){

        }
    });
}

这是java代码



@WebServlet(name = "UserServlet", urlPatterns = "/UserServlet")
public class UserServlet extends HttpServlet {
    private final int MIN_USER_NAME = 8;
    private final int MIN_USER_PASSWORD = 6;
    private static UserService userService = new UserSlmpl();
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
        response.setContentType("text/html;charset=UTF-8");
        request.setCharacterEncoding("UTF-8");
        String method = request.getParameter("method");
        PrintWriter pw = response.getWriter();
        System.out.println("收到的请求method:" + method);
        switch (method){
            case "userRegister":
                userRegister(request, response, pw);
                break;
            case "userLogin":
                userLogin(request, response, pw);
                break;
            default:
        }
    }
    private void userLogin(HttpServletRequest request, HttpServletResponse response, PrintWriter pw) throws IOException, ServletException{
        String user = request.getParameter("userName");
        String pasw = request.getParameter("userPassword");
        if (user.length() < MIN_USER_NAME) {
            pw.write("用户名必须大于8位");
            return;
        }
        if (pasw.length() < MIN_USER_PASSWORD) {
            pw.write("密码必须大于6位");
            return;
        }
        if (userService.ifUserNameNotExist(user)) {
            pw.write("用户名不存在");
            return;
        }
        if (userService.login(user, pasw)) {
            pw.write("登录成功");
        } else {
            pw.write("密码错误");
        }
    }
    private void userRegister(HttpServletRequest request, HttpServletResponse response, PrintWriter pw) throws IOException{
        String user = request.getParameter("userName");
        String pasw = request.getParameter("userPassword");
        if (user.length() < MIN_USER_NAME) {
            pw.write("用户名必须大于8位");
            return;
        }
        if (pasw.length() < MIN_USER_PASSWORD) {
            pw.write("密码必须大于6位");
            return;
        }
        if (userService.register(user, pasw)) {
            pw.write("注册成功");
        } else {
            pw.write("用户名已存在");
        }
    }
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }
}
0个回复
weixin_39902607
Qnix_
2021/01/20 18:02
  • c语言
  • c++

蓝桥杯嵌入式的板子CT117E,stm32f103rbt6,官方的keil项目打开可以正常读取设备名称,自己创建项目读取不到设备名称

0个回复
GongWei_
听听那晚风
2021/01/20 17:58
  • javascript
  • vue.js
var a = [
        { name: "aa", children: [{ name: "aa1" }, { name: "aa2" }] },
        { name: "bb", children: [{ name: "bb1" }, { name: "bb2" }] },
        { name: "cc", children: [{ name: "cc1" }, { name: "cc2" }] },
        { name: "dd", children: [{ name: "dd1" }, { name: "dd2" }] },
        { name: "ee", children: [{ name: "ee1" }, { name: "ee2" }] },
      ];
var b = ["aa1","aa2","cc1", "bb2","dd1" ];
//目标对象
var mune = [
        { name: "aa", children: [{ name: "aa1" },{ name: "aa2" }] },
        { name: "bb", children: [{ name: "bb2" }] },
        { name: "cc", children: [{ name: "cc1" }] },
        { name: "dd", children: [{ name: "dd1" }] },
      ];

 

0个回复
weixin_44011969
谷大内斯
2021/01/20 17:53
  • python

win10系统右下角出现黄色叹号,显示一个或者多个设备驱动程序可能无法正常工作。然后选择疑难解答,又显示疑难解答出现意外错误,向导无法继续。图片上的是详细信息,求大神指点一二。

 

0个回复
weixin_42496855
weixin_42496855
2021/01/20 17:44
  • android

安卓刚usb连接电脑的时候,会识别出来,然后立刻就无法识别了。

用着好好的,突然就这样了。

不知道电脑哪里的问题,求高手指点。

我的电脑不显示手机文件,adb也差不到设备

0个回复
qq_34351067
tf_q568897492
2021/01/20 17:43
  • 神经网络
  • 深度学习
  • 人工智能

谁有打电话和同时抽烟打电话的目标检测标注数据集,有百度云分享链接

0个回复
tarzai
特拉仔
2021/01/20 17:41
  • erlang
  • tomcat

是这张哦,不是地址栏的小图标

0个回复
weixin_43538415
今天是周五嘛
2021/01/20 17:29
  • 负载均衡

请问这两种方案哪一个好一点呀  无线网要带100台手机左右
 

 

0个回复
ycgyab
ycgyab
2021/01/20 17:28
  • html5
  • javascript

 layui如何兼容ie7有什么办法可以解决的

2个回复
weixin_51661781
浪峰舞雪
2021/01/20 17:27
  • python
a=requests.get('https://www.23us.com/html/78/78926/').content.decode('gbk')#decode('gbk')为编码方式
b='<a href="(\d+\.html)">.*?</a>'
c=re.compile(b)
d=c.findall(a)
for i in d[0:1]:
    hrefs='https://www.23us.com/html/78/78926/'+i
    a=requests.get(hrefs).content.decode('gbk')
    b='<h1>(.*?)</h1>.*?<dd id="contents".*?>(.*?)</dd>'
    b=b.replace('/<br \/>', "\r")
    c=re.compile(b,re.S)
    d=c.findall(a)
    print(d)

 

0个回复
HWahMing
Joamin-H
2021/01/20 17:25
  • django
  • python

 

0个回复
weixin_54626591
坦笑&&life
2021/01/20 17:22
  • 深度学习
  • python
  • 机器学习
  • 人工智能
  • 开发语言

网上的方法基本上试遍了,比如在settings中plugin、下载contrib包等

0个回复
weixin_54760260
weixin_54760260
2021/01/20 17:18
  • 问答团队
  • 开发语言

用matlab建模一个锌溴液流电池系统,然后对他的均衡控制进行分析,如果有更多的内容就更好

0个回复
yqq_3747
yqq_3747
2021/01/20 17:18
  • java
  • eclipse

地址动态调用WebService出现问题 :Error reading XMLStreamReader: Unexpected EOF in prolog

服务端接口

package com.example.demo.ibiz;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebService;

import com.example.demo.entitys.UserEntity;

@WebService(name = "userWebService", targetNamespace = "http://ibiz.demo.example.com")
public interface IUserWebServiceBIZ {
	
	@WebMethod
	public List<UserEntity> getUserEntitys();
	
}

服务端接口实现类

package com.example.demo.biz;

import java.util.List;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.example.demo.entitys.UserEntity;
import com.example.demo.ibiz.IUserWebServiceBIZ;
import com.example.demo.mapper.UserMapper;

@Component
@WebService(serviceName = "userWebService", targetNamespace = "http://ibiz.demo.example.com", 
endpointInterface = "com.example.demo.ibiz.IUserWebServiceBIZ")
public class UserWebServiceBIZ implements IUserWebServiceBIZ {

	@Autowired
	private UserMapper userMapper;

	@Override
	public List<UserEntity> getUserEntitys() {
		return userMapper.selectList(null);
	}
	
}

CXF配置类

package com.example.demo.config;

import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.example.demo.ibiz.IUserWebServiceBIZ;


@Configuration
public class WebServiceConfig {
	
	@Autowired
	private IUserWebServiceBIZ userWebServiceBIZ;
	
    @Bean(name = "cxfServlet")
    public ServletRegistrationBean<CXFServlet> cxfServlet() {
        return new ServletRegistrationBean<>(new CXFServlet(), "/services/*");
    }
    
    @Bean(name = Bus.DEFAULT_BUS_ID)
    public SpringBus springBus(){
        return  new SpringBus();
    }
    
    @Bean(name = "sweptPayEndpoint")
    public Endpoint sweptPayEndpoint() {
        EndpointImpl endpoint = new EndpointImpl(springBus(), userWebServiceBIZ);
        endpoint.publish("/userWebService");
        return endpoint;
    }
}

客户端调用

package com.example.demo;

import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class CxfWebserviceApplication {

	public static void main(String[] args) {
		SpringApplication.run(CxfWebserviceApplication.class, args);
		invokeService_2();
	}
	
	public static void invokeService_2(){
	    // 创建动态客户端
	    JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
	    Client client = dcf.createClient("http://localhost:8000/EasyExcel/services/userWebService?wsdl");
	    // 需要密码的情况需要加上用户名和密码
//	    client.getOutInterceptors().add(new ClientLoginInterceptor("", ""));
	    Object[] objects = new Object[0];
	    try {
	        // invoke("方法名",参数1,参数2,参数3....);
	        //这里注意如果是复杂参数的话,要保证复杂参数可以序列化
	        objects = client.invoke("getUserEntitys");
	        System.out.println("返回数据:" + objects[0]);
	    } catch (java.lang.Exception e) {
	        e.printStackTrace();
	    }
	}
}

客户端调用错误信息

org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:292) ~[cxf-rt-bindings-soap-3.2.6.jar:3.2.6]
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:70) ~[cxf-rt-bindings-soap-3.2.6.jar:3.2.6]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:833) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1695) [cxf-rt-transports-http-3.2.6.jar:3.2.6]
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572) [cxf-rt-transports-http-3.2.6.jar:3.2.6]
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373) [cxf-rt-transports-http-3.2.6.jar:3.2.6]
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673) [cxf-rt-transports-http-3.2.6.jar:3.2.6]
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:537) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:339) [cxf-core-3.2.6.jar:3.2.6]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:325) [cxf-core-3.2.6.jar:3.2.6]
	at com.example.demo.CxfWebserviceApplication.invokeService_2(CxfWebserviceApplication.java:32) [main/:na]
	at com.example.demo.CxfWebserviceApplication.main(CxfWebserviceApplication.java:15) [main/:na]
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:684) ~[woodstox-core-5.1.0.jar:5.1.0]
	at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2213) ~[woodstox-core-5.1.0.jar:5.1.0]
	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2119) ~[woodstox-core-5.1.0.jar:5.1.0]
	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1175) ~[woodstox-core-5.1.0.jar:5.1.0]
	at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1198) ~[woodstox-core-5.1.0.jar:5.1.0]
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:173) ~[cxf-rt-bindings-soap-3.2.6.jar:3.2.6]
	... 18 common frames omitted

org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:292)
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:70)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:833)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1695)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1572)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1373)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:673)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:537)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:339)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:325)
	at com.example.demo.CxfWebserviceApplication.invokeService_2(CxfWebserviceApplication.java:32)
	at com.example.demo.CxfWebserviceApplication.main(CxfWebserviceApplication.java:15)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:684)
	at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2213)
	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2119)
	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1175)
	at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1198)
	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:173)
	... 18 more

百度了好久依旧无法解决

0个回复
weixin_40114354
花算子
2021/01/20 17:13
  • c语言

C语言的初级问题

第一个函数要求用户输入一个1~5的数字,打印数字对应的文字并返回用户所选的数字。将数字传入第二个函数,第二个函数打印该数字对应的金额。

第一个函数中有一个while()循环来实现不断的录入。但出现了一个bug:第一次输入时程序并不打印金额,第二次输入时才打印金额。

 

 

 

头文件:

#ifndef HOTEL_H_INCLUDED
#define HOTEL_H_INCLUDED

#define HOTEL1 872
#define HOTEL2 1838
#define HOTEL3 789
#define HOTEL4 1658
#define DISCOUNT 0.95

/*
    声名以下函数
*/

//显示酒店名称,提示用户选择,返回用户的选择
int Choice(void);

//接收用户选择的酒店序号输出酒店的单价
double Price(int);

 

主函数文件

 

#include <stdio.h>
#include <stdlib.h>
#include "hotel2.h"

/*
    1: 显示酒店名称和序号
    2:用户选择要入住的酒店序号并返回
    3:用户选择要入住的天数
    4:显示最终价格
*/

int main()
{
    int choice;//用户选择的酒店序号
    int price;//返回所选酒店的单价

    printf("欢迎进入酒店入住系统\n");

    while((choice = Choice()) != 5)
    {
        choice = Choice();
        price = Price(choice);

    }

    return 0;
}

 

实现函数的文件:

 

#include <stdio.h>
#include "hotel2.h"

//实现头文件中声名的函数

int Choice(void)//显示酒店名称,提示用户选择,返回用户的选择
{
    int i;//循环变量
    int choice;//用户的选择
    int value;
    char hotelNames[4][50] = {
    "贝罗酒店","香榭丽舍广场酒店","阿斯图里亚斯特拉奥佩拉酒店","斯克里布索菲特酒店"
    };//酒店名称

    for(i = 0; i< 4; i++)//打印酒店名称
    {
        printf("%d:\t%s\n", i + 1, hotelNames[i]);
    }

    printf("5:\t退出\n\n");

    printf("请选择入住的酒店:");

    while(value = (scanf ("%d", &choice)) != 1 || choice < 1 || choice > 5)//当输入不合法时重新输入
    {
        if(value != 1)
        {
            scanf("%*s");//清空缓存
        }

        printf("请输入:1-5 之间的整数\n");
    }

    if(choice != 5)
    {
        printf("您选择的酒店是:%d\t%s\n", choice, hotelNames[choice - 1]);
    }
    if(choice == 5)
    {
        printf("感谢使用\n");
    }

    return choice;

}



//接收用户选择的酒店序号输出酒店的单价
double Price(int choice)
{
    double price;

    switch(choice)
    {
    case 1:
        price = HOTEL1;
        break;
    case 2:
        price = HOTEL2;
        break;
    case 3:
        price = HOTEL3;
        break;
    case 4:
        price = HOTEL4;
        break;
    }

    printf("所选酒店的单价是:%.2lf\n\n", price);

    return price;
}

 

1个回复
shyany
//Pluto.
2021/01/20 17:10
  • spring
  • java

spring项目中的properties中如何做到像springboot application.properties 变量之间互相调用

比如这样的 application.properties中可以这样写

rootPath=e:/root
filePath1=${rootPath}/file-path/testFile1.xml
filePath2=${rootPath}/file-path/testFile2.xml

但在spring项目中 如何实现在properties通过${}  调用变量

0个回复
qq_37209658
阿小啊
2021/01/20 17:09
  • javascript
  • java

js如何清空或者初始化第一次存放在FormData中的数据信息,然后再次存放新的数据信息

0个回复
littleleaf123
傅里叶的忧伤
2021/01/20 17:09
  • 深度学习
  • python
  • 机器学习
  • 数据挖掘

如图所示,怎么由式(1)、式(2)推出来的式(3)

 

1个回复