会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132476个问题
JAVA 全系列/第一阶段:JAVA 快速入门/面向对象详解和JVM底层内存分析 21616楼
JAVA 全系列/第一阶段:JAVA 快速入门/面向对象详解和JVM底层内存分析 21617楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/异常机制 21618楼

react-goodlive-stage4-details.zip

老师,我那个房屋评估价的哪个星星出不来

WEB前端全系列/第十六阶段:React企业级项目/宜居(商城类)高级React实战项目(旧) 21620楼

#测试Text多行文本
from tkinter import *
import webbrowser

class Application(Frame):

    def __init__(self,master=None):
        super().__init__(master)
        self.master=master
        self.pack()
        self.createWidget()

    def createWidget(self):   #定义框内容以及属性

        self.w = Text(root,width=40,height=10,bg="white",font=("宋体",18))
        self.w.pack()
        #self.w.insert(1.0)代表在第1行0列插入内容
        #行:123...;列:012...
        self.w.insert(1.0,"0123456789\n0纵观世界与天下\n奇闻异事")
        self.w.insert(2.3, "xxx")

        Button(self, text="重复插入文本", command=self.insertText).pack(side="left")
        Button(self, text="命令行返回文本", command=self.returnText).pack(side="left")
        Button(self, text="添加图片", command=self.addImage).pack(side="left")
        Button(self, text="添加组件", command=self.addWidget).pack(side="left")
        Button(self, text="通过tag精确控制文本", command=self.TextTag).pack(side="left")  #Tag标记


    def insertText(self):
        #INSERT代表从光标处插入内容
        #END在末尾插入内容
        self.w.insert(INSERT,"HE")
        self.w.insert(END, "ST")
        #在指定位置插入指定文本内容
        self.w.insert(2.8,"acz")   #在第2行第8列的位置插入

    def returnText(self):
        #获取文本的内容,并在命令行打印输出,get(初始位置, 终止位置)--获得该区域内容
        print(self.w.get(2.0, 2.5))
        print("文本所有内容:" + self.w.get(1.0, END))

    def addImage(self):
        #添加图片image_create()
        #定义全局变量globle p 或 对象属性self.p
        #global p
        self.p = PhotoImage(file="imgs/13.gif")
        self.w.image_create(END, image=self.p)

    def addWidget(self):
        #添加组件window_create()
        b=Button(self.w,text="点击")  #master为建好的文本域self.w
        self.w.window_create(INSERT,window=b)

    def TextTag(self):
        self.w.delete(1.0,END)
        self.w.insert(1.0,"good dood study!\n尚学堂\n百度一下,你就知道")
        #Tag--标记
        self.w.tag_add("IM",1.0,1.5)   #在指定区域内添加标记,将标记命名为good
        #标记属性定义,标记backgrond背景色,foreground标记体颜色,underline下划线
        self.w.tag_config("IM",background="yellow",foreground="red",underline=True)
        #标记事件绑定,即点击会出现的情况
        self.w.tag_add("bd", 3.0, 3.2)  # 在指定区域内添加标记
        self.w.tag_config("bd",background="blue",underline=True)
        self.w.tag_bind("bd","<Button-1>",self.webshow)  #<Button-1>点击左键

    #定义参数event,将<Button-1>点击左键作为参数event传入
    def webshow(self,event):
        webbrowser.open("https://www.baidu.com/")


if __name__=="__main__":
    root=Tk()                        #创建框大小、位置以及标题
    app=Application(master=root)
    root.title("Text_test")
    root.geometry("500x300+450+200")
    root.mainloop()

老师,请问这个为什么这个程序中图片部分的不能显示,点了没反应是为什么呢?没有图片出来?


Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 21623楼

#测试Text多行文本
from tkinter import *
import webbrowser

class Application(Frame):

    def __init__(self,master=None):
        super().__init__(master)
        self.master=master
        self.pack()
        self.createWidget()

    def createWidget(self):   #定义框内容以及属性

        self.w = Text(root,width=40,height=10,bg="white",font=("宋体",18))
        self.w.pack()
        #self.w.insert(1.0)代表在第1行0列插入内容
        #行:123...;列:012...
        self.w.insert(1.0,"0123456789\n0纵观世界与天下\n奇闻异事")
        self.w.insert(2.3, "xxx")

        Button(self, text="重复插入文本", command=self.insertText).pack(side="left")
        Button(self, text="命令行返回文本", command=self.returnText).pack(side="left")
        Button(self, text="添加图片", command=self.addImage).pack(side="left")
        Button(self, text="添加组件", command=self.addWidget).pack(side="left")
        Button(self, text="通过tag精确控制文本", command=self.TextTag).pack(side="left")  #Tag标记


    def insertText(self):
        #INSERT代表从光标处插入内容
        #END在末尾插入内容
        self.w.insert(INSERT,"HE")
        self.w.insert(END, "ST")
        #在指定位置插入指定文本内容
        self.w.insert(2.8,"acz")   #在第2行第8列的位置插入

    def returnText(self):
        #获取文本的内容,并在命令行打印输出,get(初始位置, 终止位置)--获得该区域内容
        print(self.w.get(2.0, 2.5))
        print("文本所有内容:" + self.w.get(1.0, END))

    def addImage(self):
        #添加图片image_create()
        #定义全局变量globle p 或 对象属性self.p
        #global p
        self.p = PhotoImage(file="imgs/13.gif")
        self.w.image_create(END, image=self.p)

    def addWidget(self):
        #添加组件window_create()
        b=Button(self.w,text="点击")  #master为建好的文本域self.w
        self.w.window_create(INSERT,window=b)

    def TextTag(self):
        self.w.delete(1.0,END)
        self.w.insert(1.0,"good dood study!\n尚学堂\n百度一下,你就知道")
        #Tag--标记
        self.w.tag_add("IM",1.0,1.5)   #在指定区域内添加标记,将标记命名为good
        #标记属性定义,标记backgrond背景色,foreground标记体颜色,underline下划线
        self.w.tag_config("IM",background="yellow",foreground="red",underline=True)
        #标记事件绑定,即点击会出现的情况
        self.w.tag_add("bd", 3.0, 3.2)  # 在指定区域内添加标记
        self.w.tag_config("bd",background="blue",underline=True)
        self.w.tag_bind("bd","<Button-1>",self.webshow)  #<Button-1>点击左键

    #定义参数event,将<Button-1>点击左键作为参数event传入
    def webshow(self,event):
        webbrowser.open("https://www.baidu.com/")


if __name__=="__main__":
    root=Tk()                        #创建框大小、位置以及标题
    app=Application(master=root)
    root.title("Text_test")
    root.geometry("500x300+450+200")
    root.mainloop()

老师,请问这个为什么这个程序中图片部分的不能显示,点了没反应是为什么呢?没有图片出来?


Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 21624楼
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 21625楼

老师:

     下午好!我改为vue-cli.3.011后,可以跑起来了,前后台通行,但在cmd运行中出现以下截图中的现像“[nodemon] app crashed - waiting for file changes before starting...”,怎样处理呢?谢谢!




D:\project zl\egoshop\egoshop>npm run dev


> egoshop@0.1.0 dev D:\project zl\egoshop\egoshop

> concurrently "npm run serve" "nodemon mock/index.js"


[1] [nodemon] 2.0.7

[1] [nodemon] to restart at any time, enter `rs`

[1] [nodemon] watching path(s): *.*

[1] [nodemon] watching extensions: js,mjs,json

[1] [nodemon] starting `node mock/index.js`

[1] events.js:287

[1]       throw er; // Unhandled 'error' event

[1]       ^

[1]

[1] Error: listen EADDRINUSE: address already in use :::3002

[1]     at Server.setupListenHandle [as _listen2] (net.js:1313:16)

[1]     at listenInCluster (net.js:1361:12)

[1]     at Server.listen (net.js:1449:7)

[1]     at Function.listen (D:\project zl\egoshop\egoshop\node_modules\_express@4.17.1@express\lib\application.js:618:24)

[1]     at Object.<anonymous> (D:\project zl\egoshop\egoshop\mock\index.js:27:5)

[1]     at Module._compile (internal/modules/cjs/loader.js:1133:30)

[1]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)

[1]     at Module.load (internal/modules/cjs/loader.js:977:32)

[1]     at Function.Module._load (internal/modules/cjs/loader.js:877:14)

[1]     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)

[1] Emitted 'error' event on Server instance at:

[1]     at emitErrorNT (net.js:1340:8)

[1]     at processTicksAndRejections (internal/process/task_queues.js:84:21) {

[1]   code: 'EADDRINUSE',

[1]   errno: 'EADDRINUSE',

[1]   syscall: 'listen',

[1]   address: '::',

[1]   port: 3002

[1] }

[1] [nodemon] app crashed - waiting for file changes before starting...


WEB前端全系列/第二十阶段:Vue2企业级项目(旧)/Ego商城高级Vue实战项目 21626楼

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginServiceImpl': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.ManagerDubboService. No provider available for the service com.ego.dubbo.service.ManagerDubboService from the url zookeeper://192.168.8.128:2181/org.apache.dubbo.registry.RegistryService?application=ego-manage&dubbo=2.0.2&init=false&interface=com.ego.dubbo.service.ManagerDubboService&methods=selectManagerByUsername&pid=11868&qos.enable=false&register.ip=192.168.8.1&release=2.7.5&side=consumer&sticky=false&timestamp=1620719406122 to the consumer 192.168.8.1 use dubbo version 2.7.5
	at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:145) ~[spring-context-support-1.0.5.jar:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1427) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]
	at com.ego.ManageApplication.main(ManageApplication.java:11) [classes/:na]
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.ManagerDubboService. No provider available for the service com.ego.dubbo.service.ManagerDubboService from the url zookeeper://192.168.8.128:2181/org.apache.dubbo.registry.RegistryService?application=ego-manage&dubbo=2.0.2&init=false&interface=com.ego.dubbo.service.ManagerDubboService&methods=selectManagerByUsername&pid=11868&qos.enable=false&register.ip=192.168.8.1&release=2.7.5&side=consumer&sticky=false&timestamp=1620719406122 to the consumer 192.168.8.1 use dubbo version 2.7.5
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:355) ~[dubbo-2.7.5.jar:2.7.5]
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:266) ~[dubbo-2.7.5.jar:2.7.5]
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:151) ~[dubbo-2.7.5.jar:2.7.5]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:249) ~[dubbo-2.7.5.jar:2.7.5]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:142) ~[dubbo-2.7.5.jar:2.7.5]
	at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:358) ~[spring-context-support-1.0.5.jar:na]
	at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:538) ~[spring-context-support-1.0.5.jar:na]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:141) ~[spring-context-support-1.0.5.jar:na]
	... 17 common frames omitted

我直接用老师的源码都会报这个错误,这个@Reference没有用是怎么回事


JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:基于SpringSecurity实现后台登录功能 21628楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637