使用github怎么只添加上传.c与.h文件呢?

我用keil写单片机程序, 生成一大堆.o .d .uvproj..........不计其数, 我怎么只对.c .h进行版本控制呢

1个回答

你可以添加的时候控制

git add *.h
git add *.c

git commit

qq_21970857
Yihui_He 谢谢您, 不过我第一次添加的时候 那个 message txt 里面, 要添加的文件前面都有 #注释, 这个怎么一次消掉呢
5 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
一堆.c和.h文件 怎么编译生成exe文件呢

![http://imgsrc.baidu.com/forum/w%3D580/sign=dab1ec0e32dbb6fd255be52e3925aba6/304ffbf2b21193133b15a7456e380cd790238df9.jpg]() 我从github上下了一个苹果越狱工具的源码 源码有一堆.c和.h文件 没有dsp和dsw文件 怎么编译生成exe文件呀

centos7 Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive

<!doctype html> <html lang="en"> <head> <title>HTTP Status 500 – Internal Server Error</title> <style type="text/css"> h1 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 22px; } h2 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 16px; } h3 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 14px; } body { font-family: Tahoma, Arial, sans-serif; color: black; background-color: white; } b { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; } p { font-family: Tahoma, Arial, sans-serif; background: white; color: black; font-size: 12px; } a { color: black; } a.name { color: black; } .line { height: 1px; background-color: #525D76; border: none; } </style> </head> <body> <h1>HTTP Status 500 – Internal Server Error</h1> <hr class="line" /> <p><b>Type</b> Exception Report</p> <p><b>Message</b> Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content</p> <p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request. </p> <p><b>Exception</b></p> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Root Cause</b></p> <pre>com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content com.github.tobato.fastdfs.proto.AbstractFdfsCommand.execute(AbstractFdfsCommand.java:48) com.github.tobato.fastdfs.conn.ConnectionManager.execute(ConnectionManager.java:71) com.github.tobato.fastdfs.conn.ConnectionManager.executeFdfsCmd(ConnectionManager.java:56) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadThumbImage(DefaultFastFileStorageClient.java:166) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:83) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:65) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.uploadImageAndCrtThumbImage(FastdfsFileServiceImpl.java:69) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.store(FastdfsFileServiceImpl.java:56) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:127) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:139) com.shiwaixiangcun.core.web.controller.UploadFileController.uploadImages(UploadFileController.java:129) com.shiwaixiangcun.core.web.controller.UploadFileController$$FastClassBySpringCGLIB$$752e37e5.invoke(&lt;generated&gt;) org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) com.shiwaixiangcun.core.context.ControllerAspect.around(ControllerAspect.java:99) sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) com.shiwaixiangcun.core.web.controller.UploadFileController$$EnhancerBySpringCGLIB$$8d35bb21.uploadImages(&lt;generated&gt;) sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Root Cause</b></p> <pre>java.net.SocketTimeoutException: Read timed out java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.socketRead(SocketInputStream.java:116) java.net.SocketInputStream.read(SocketInputStream.java:171) java.net.SocketInputStream.read(SocketInputStream.java:141) java.net.SocketInputStream.read(SocketInputStream.java:127) com.github.tobato.fastdfs.proto.ProtoHead.createFromInputStream(ProtoHead.java:94) com.github.tobato.fastdfs.proto.AbstractFdfsCommand.receive(AbstractFdfsCommand.java:99) com.github.tobato.fastdfs.proto.AbstractFdfsCommand.execute(AbstractFdfsCommand.java:45) com.github.tobato.fastdfs.conn.ConnectionManager.execute(ConnectionManager.java:71) com.github.tobato.fastdfs.conn.ConnectionManager.executeFdfsCmd(ConnectionManager.java:56) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadThumbImage(DefaultFastFileStorageClient.java:166) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:83) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:65) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.uploadImageAndCrtThumbImage(FastdfsFileServiceImpl.java:69) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.store(FastdfsFileServiceImpl.java:56) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:127) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:139) com.shiwaixiangcun.core.web.controller.UploadFileController.uploadImages(UploadFileController.java:129) com.shiwaixiangcun.core.web.controller.UploadFileController$$FastClassBySpringCGLIB$$752e37e5.invoke(&lt;generated&gt;) org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) com.shiwaixiangcun.core.context.ControllerAspect.around(ControllerAspect.java:99) sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) com.shiwaixiangcun.core.web.controller.UploadFileController$$EnhancerBySpringCGLIB$$8d35bb21.uploadImages(&lt;generated&gt;) sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p> <hr class="line" /> <h3>Apache Tomcat/8.5.41</h3> </body> </html> 23000 22122 centos7 端口都开启了一直报错

直接从github上下载没有.git

我用命令向github push一个repo进去,然后下载直接用鼠标点下载到桌面没有.git了。。我想问的是: (1)你们是先clone再pull到桌面的吗? (2)我已经在没有.git的项目里做更新了但是没有repo的情况下这个我该如何push到原repo上?

drone.io不使用GitHub repo的.drone.yml文件

<div class="post-text" itemprop="text"> <p>I have a problem with the CI tool drone. At the Moment I'm using drone.io and with the selft-hosted version I have the same issue. When I try to build my golang test application drone.io always ignores my .drone.yml file. </p> <p>The GitHub repo is: <a href="https://github.com/norbell/dronetest" rel="nofollow noreferrer">https://github.com/norbell/dronetest</a></p> <p>My .drone.yml file looks like this:</p> <pre><code>pipeline: build: image: golang:1.6 commands: - go get - go build </code></pre> <p>And the settings page of my drone.io project looks like this:</p> <p><a href="https://i.stack.imgur.com/qVBtw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qVBtw.png" alt="enter image description here"></a></p> <p>And when I click the build button it shows me that the project was successfully "build":</p> <p><a href="https://i.stack.imgur.com/V2cZV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V2cZV.png" alt="enter image description here"></a></p> <p>Obviously does everything but not building my project. I have done everything I found in the documentation but I can't get it working. </p> <p>When I put <code>go get</code> and <code>go build</code> or <code>go run main.go</code> into the "commands" textarea field of the settings page, drone is suddenly able to build my go application. </p> <p>I'm not sure what I'm doing wrong, so it would be very nice if someone could help me. :)</p> </div>

java.lang.NoClassDefFoundError: Could not initialize class com.github.fommil.netlib.BLAS,到底是哪里出问题了,用的是R软件

本人不是专业搞代码的,对于这种问题有些专业术语可能看不懂 java.lang.NoClassDefFoundError: Could not initialize class com.github.fommil.netlib.BLAS 具体内容是,本人在学《机器学习与R语言》的第六章的一个例子,用到M5P函数,结果出现了如下图的情况。 ![图片说明](https://img-ask.csdn.net/upload/202002/11/1581406209_236447.jpg) 有没有大神帮个忙解答一下

用java开发实现上传、下载、删除github中 README.md文件

如题: 想用java做一套自动化东西。 对外API接口,可以对 GITHUB仓库中的 README.md文件做增删改查操作。 不知道大神们有什么好的方式

无法使用Goland部署Docker容器-DockerClientException-.eslintrc(无此类文件或目录)

<div class="post-text" itemprop="text"> <p>I am building a go app inside a docker container</p> <p>When I try to run a docker container inside Golang with this command preview</p> <pre><code>docker build -f Dockerfile.local -t myGoApp:exp . &amp;&amp; docker run -v /volume:/go --name myGoApp --env-file ./test.env --network=myGoApp_network myGoApp:exp </code></pre> <p>I get: </p> <pre><code>Building image... Failed to deploy 'myGoApp Dockerfile: Dockerfile.local': com.github.dockerjava.api.exception.DockerClientException: Error occurred while preparing Docker context folder.&lt;br/&gt;caused by: java.io.FileNotFoundException: /home/julien/go/src/gitlab.com/xxx/myGoApp/vendor/github.com/influxdata/platform/chronograf/.eslintrc (No such file or directory) </code></pre> <p>When I run the same command on a terminal, it works</p> <p>When I run the equivalent inside a docker compose via Goland, it also works.</p> <p>I also checked, and the <code>.eslintrc</code> in question exists.</p> <p>Why is it happening ? Googling, I could find that it has to do with docker-java, but I could not really find a way to solution.</p> <p>Here is docker version info:</p> <pre><code>Client: Version: 18.09.1 API version: 1.39 Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:35:31 2019 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:02:44 2019 OS/Arch: linux/amd64 Experimental: false </code></pre> <p>Any idea what's wrong ? I need to launch it that way because I want to implement debugging inside a container like explained <a href="https://blog.jetbrains.com/go/2018/04/30/debugging-containerized-go-applications/" rel="nofollow noreferrer">here</a></p> </div>

golang:“去获取github.com/ ..”错误,“找不到头文件”-在哪里配置?

<div class="post-text" itemprop="text"> <p>I am trying to use GO with SFML and in a sample program. I need to install package gosfml using "go get".<br> I am on Mac OSX.</p> <p>I have SFML compiled and installed SFML from source. The include files are under /usr/local/include/SFML </p> <p>The following command gives the error of a header file not being found.</p> <pre><code>&gt; go get github.com/manyminds/gosfml # github.com/manyminds/gosfml go-proj/src/github.com/manyminds/gosfml/circleShape.go:7:11: fatal error: 'SFML/Graphics/CircleShape.h' file not found #include &lt;SFML/Graphics/CircleShape.h&gt; ^ 1 error generated. </code></pre> <p>How can I configure GO to find the header file?</p> <p>Thanks (new to Go)</p> </div>

pagehelper在查询执行时,ExceptionInInitializerError ?

//设置分页信息 PageHelper.startPage(1,10); //执行查询 TbItemExample tbItemExample=new TbItemExample(); List<TbItem> tbItems = tbItemMapper.selectByExample(tbItemExample); java.lang.ExceptionInInitializerError at com.github.pagehelper.dialect.AbstractHelperDialect.processParameterObject(AbstractHelperDialect.java:118) at com.github.pagehelper.PageHelper.processParameterObject(PageHelper.java:88) at com.github.pagehelper.util.ExecutorUtil.pageQuery(ExecutorUtil.java:166) at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:104) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60) at com.sun.proxy.$Proxy23.query(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)

Intel ISPC编译器生成的.h与.obj文件如何使用?

最近在利用ispc做加速的项目,我下载了ispc.exe(https://ispc.github.io/ispc.html),自己编写了一个.ispc文件,使用Windows 命令行的方式,利用ispc.exe将.ispc文件生成了一个.h与.obj文件,在我自己的项目中已经包含了生成的.h文件, 但是 还不清楚如何使用.obj文件,目前当我编译我的项目时,会显示无法解析的外部符号这样的问题,请问有没有人做过相关的项目,请教大家如何使用.h与.obj文件。

如何将.md文件传到github的仓库?

刚开始用github,用msysgit按该网址操作http://jingyan.baidu.com/article/f7ff0bfc7181492e27bb1360.html,可是输密码的时候输不了,是什么原因?还是这个方法不对,需要一些其他的配置?

关于报错闪退的问题?有没有大神来看一眼。。。。

这是我做柱状图的代码 ``` package com.chenxi.bimquanziguankong.fragment; import android.content.Context; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import com.alibaba.fastjson.JSON; import com.blankj.utilcode.util.ToastUtils; import com.chenxi.bimquanziguankong.R; import com.chenxi.bimquanziguankong.appConst.AppConst; import com.chenxi.bimquanziguankong.application.MyApplication; import com.chenxi.bimquanziguankong.common.StringAxisValueFormatter; import com.chenxi.bimquanziguankong.entity.InvestmentControlClass; import com.chenxi.bimquanziguankong.view.LineChart02View; import com.chenxi.bimquanziguankong.view.MyMarkerView; import com.github.mikephil.charting.charts.CombinedChart; import com.github.mikephil.charting.components.AxisBase; import com.github.mikephil.charting.components.XAxis; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.data.BarData; import com.github.mikephil.charting.data.BarDataSet; import com.github.mikephil.charting.data.BarEntry; import com.github.mikephil.charting.data.CombinedData; import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.LineData; import com.github.mikephil.charting.data.LineDataSet; import com.github.mikephil.charting.formatter.IAxisValueFormatter; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Random; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Request; import okhttp3.Response; public class InvestmentAmountControlFragment extends BaseFragment { private View mView; RelativeLayout rl_document_list_is_null; private CombinedChart combineChart; List<InvestmentControlClass> investmentControlClasses = new ArrayList<>(); private List<String> xAxisValues = new ArrayList<>(); XAxis xAxis; YAxis axisLeft; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_new_investment_amount_control, container, false); initView(mView); getxAxisValuesData(); getyAxisValuesData(); MyMarkerView myMarkerView = new MyMarkerView(getActivity(), R.layout.custom_marker_view); myMarkerView.setChartView(combineChart); combineChart.setMarker(myMarkerView); return mView; } private void initView(View mView) { rl_document_list_is_null = mView.findViewById(R.id.rl_document_list_is_null); combineChart = mView.findViewById(R.id.combineChart); combineChart.setDrawBorders(true); // 显示边界 combineChart.getDescription().setEnabled(false); // 不显示备注信息 combineChart.setPinchZoom(true); // 比例缩放 } private void getxAxisValuesData() { String url = AppConst.innerIp + "/api/" + AppConst.getProjectID() + "/InvestmentControlClass"; Request request = new Request.Builder() .url(url) .build(); MyApplication.getOkHttpClient().newCall(request).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { ToastUtils.showShort("数据请求失败"); } @Override public void onResponse(Call call, Response response) throws IOException { if (response.code() == 200) { try { String responseData = response.body().string(); investmentControlClasses = JSON.parseArray(responseData, InvestmentControlClass.class); if (investmentControlClasses.size()!=0){ for (int i = 0; i < investmentControlClasses.size(); i++) { xAxisValues.add(investmentControlClasses.get(i).getName()); } } xAxis = combineChart.getXAxis(); xAxis.setDrawGridLines(false); /*解决左右两端柱形图只显示一半的情况 只有使用CombinedChart时会出现,如果单独使用BarChart不会有这个问题*/ xAxis.setAxisMinimum(-0.5f); xAxis.setAxisMaximum(xAxisValues.size() - 0.5f); xAxis.setGranularity(1f); xAxis.setLabelCount(xAxisValues.size()); // 设置X轴标签数量 xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); // 设置X轴标签位置,BOTTOM在底部显示,TOP在顶部显示 xAxis.setValueFormatter(new StringAxisValueFormatter(xAxisValues)); axisLeft = combineChart.getAxisLeft(); // 获取左边Y轴操作类 axisLeft.setAxisMinimum(0); // 设置最小值 axisLeft.setGranularity(10); // 设置Label间隔 axisLeft.setLabelCount(10); }catch (IOException e){ e.printStackTrace(); } } else { ToastUtils.showShort("数据请求出错!500"); } } }); } private void getyAxisValuesData() { String url = AppConst.innerIp + "/api/" + AppConst.getProjectID() + "/Report/InvestmentControl"; //请求数据 Request fileRrequest = new Request.Builder() .url(url) .build(); Log.e("TAG", "柱状图地址 "+fileRrequest ); MyApplication.getOkHttpClient().newCall(fileRrequest).enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { ToastUtils.showShort("数据请求失败"); } @Override public void onResponse(Call call, Response response) throws IOException { if (response.code() == 200) { String responseData = response.body().string(); getActivity().runOnUiThread(new Runnable() { @Override public void run() { JSONArray jsonArray = null; try { jsonArray = new JSONArray(responseData); //获取柱状图数组 List<BarEntry> barEntries = new ArrayList<>(); List<Entry> lineEntry = new ArrayList<>(); if (xAxisValues.size()!=0){ for (int i = 0; i < xAxisValues.size(); i++) { List<String> list = new ArrayList<>(); for (int j = 0; j < jsonArray.length(); j++) { JSONObject jo = new JSONObject(jsonArray.get(j).toString()); if (i > 0) { list.add(jo.getString(xAxisValues.get(i))); } } String[] ary = list.toArray(new String[list.size()]); float a[] = new float[ary.length]; for (int x = 0; x < ary.length; x++) { a[x] = Float.parseFloat(ary[x]); } barEntries.add(new BarEntry(i, a)); float sum = 0; for (int z = 0; z < a.length; z++) { sum = sum + a[z]; } lineEntry.add(new Entry(i, sum)); } } //柱状图数据 BarDataSet barDataSet = new BarDataSet(barEntries, ""); barDataSet.setColors(Color.parseColor("#ae312e"), Color.parseColor("#2a3f4e"), Color.parseColor("#579199") , Color.parseColor("#be765d"), Color.parseColor("#82b49e")); BarData barData = new BarData(); barData.addDataSet(barDataSet); //折线图数据 LineDataSet lineDataSet = new LineDataSet(lineEntry, "总和"); lineDataSet.setColor(Color.parseColor("#b71c1c")); lineDataSet.setCircleColor(Color.parseColor("#b71c1c")); lineDataSet.setValueTextColor(Color.parseColor("#f44336")); lineDataSet.setLineWidth(3f); lineDataSet.setHighlightEnabled(false); LineData lineData = new LineData(); lineData.addDataSet(lineDataSet); //组和图数据 CombinedData combinedData = new CombinedData(); // 创建组合图的数据源 combinedData.setData(barData); // 添加柱形图数据源 combinedData.setData(lineData); // 添加折线图数据源 combineChart.setData(combinedData); // 为组合图设置数据源 combineChart.invalidate(); } catch (JSONException e1) { e1.printStackTrace(); } } }); } else { ToastUtils.showShort(response.message()); } } }); } } ``` 然后偶然会出现闪退的现象报错信息如下有大神帮忙看下吗感激不尽 loge报错信息 ``` 07-17 16:03:30.221 13514-13514/com.chenxi.bimquanziguankong E/CrashHandler: In thread: Thread[main,5,main] UncaughtException detected: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at com.github.mikephil.charting.data.DataSet.getEntryForIndex(DataSet.java:286) at com.github.mikephil.charting.utils.Transformer.generateTransformedValuesLine(Transformer.java:184) at com.github.mikephil.charting.renderer.LineChartRenderer.drawValues(LineChartRenderer.java:547) at com.github.mikephil.charting.renderer.CombinedChartRenderer.drawValues(CombinedChartRenderer.java:96) at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:264) at android.view.View.draw(View.java:15231) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.updateDisplayListIfDirty(View.java:14162) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.draw(View.java:15234) at android.widget.FrameLayout.draw(FrameLayout.java:598) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.updateDisplayListIfDirty(View.java:14162) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.draw(View.java:15234) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2554) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2376) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2006) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1085) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5909) at android.view.C 07-17 16:03:30.247 13514-13514/com.chenxi.bimquanziguankong E/AndroidRuntime: FATAL EXCEPTION: main Process: com.chenxi.bimquanziguankong, PID: 13514 java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at com.github.mikephil.charting.data.DataSet.getEntryForIndex(DataSet.java:286) at com.github.mikephil.charting.utils.Transformer.generateTransformedValuesLine(Transformer.java:184) at com.github.mikephil.charting.renderer.LineChartRenderer.drawValues(LineChartRenderer.java:547) at com.github.mikephil.charting.renderer.CombinedChartRenderer.drawValues(CombinedChartRenderer.java:96) at com.github.mikephil.charting.charts.BarLineChartBase.onDraw(BarLineChartBase.java:264) at android.view.View.draw(View.java:15231) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.updateDisplayListIfDirty(View.java:14162) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.draw(View.java:15234) at android.widget.FrameLayout.draw(FrameLayout.java:598) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.updateDisplayListIfDirty(View.java:14162) at android.view.View.getDisplayList(View.java:14189) at android.view.View.draw(View.java:14959) at android.view.ViewGroup.drawChild(ViewGroup.java:3405) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198) at android.view.View.draw(View.java:15234) at android.view.View.updateDisplayListIfDirty(View.java:14167) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368) at android.view.View.updateDisplayListIfDirty(View.java:14127) at android.view.View.getDisplayList(View.java:14189) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2554) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2376) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2006) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1085) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5909) ```

在构建时无法在golang中找到包“ github.com/user../../”

<div class="post-text" itemprop="text"> <p>I am trying to build a project from github source code. I have found some source code importing a package something like below:</p> <pre><code>import ( "os" "github.com/bivas/rivi/commands" "github.com/mitchellh/cli" ) </code></pre> <p>However, while building a project every time it throws an error:</p> <pre><code>user-MacBook-Pro:rivi user$ go build rivi.go rivi.go:6:2: cannot find package "github.com/bivas/rivi/commands" in any of: /usr/local/Cellar/go/1.7.5/libexec/src/github.com/bivas/rivi/commands (from $GOROOT) ($GOPATH not set) rivi.go:8:2: cannot find package "github.com/mitchellh/cli" in any of: /usr/local/Cellar/go/1.7.5/libexec/src/github.com/mitchellh/cli (from $GOROOT) ($GOPATH not set) </code></pre> <p>how to build this project. Currently I am trying to build this one <a href="https://github.com/bivas/rivi" rel="nofollow noreferrer">project</a> into my system.</p> <p><strong><em>EDITED:</em></strong></p> <p>After running this command <code>go install</code> or <code>go get</code>:</p> <pre><code>package github.com/bivas/rivi/commands: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/connectors/github: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/autoassign: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/automerge: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/commenter: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/labeler: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/locker: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/sizing: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/slack: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/status: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/bivas/rivi/engine/actions/trigger: cannot download, $GOPATH not set. For more details see: go help gopath package github.com/mitchellh/cli: cannot download, $GOPATH not set. For more details see: go help gopath </code></pre> </div>

spring boot整合fastdfs 注入接口提示that could not be found

报错:: *************************** APPLICATION FAILED TO START *************************** Description: Field ffsClient in com.eharmony.iams.api.collect.ImageCollectController required a bean of type 'com.github.tobato.fastdfs.service.FastFileStorageClient' that could not be found. Action: Consider defining a bean of type 'com.github.tobato.fastdfs.service.FastFileStorageClient' in your configuration. 注入: @Autowired //@Qualifier("DefaultFastFileStorageClient") protected FastFileStorageClient ffsClient; //接口 public interface FastFileStorageClient extends GenerateStorageClient {} // 实现 @Component public class DefaultFastFileStorageClient extends DefaultGenerateStorageClient implements FastFileStorageClient {}

idea创建的maven项目上传到github,哪些文件需要ignore

刚接触idea,想自己新建个项目用git管理。传到github上的项目结构如下,没有同步.idea .iml 文件: ![没有上传.idea *.iml 文件](https://img-ask.csdn.net/upload/201612/12/1481524731_211115.png) 可是用另一台电脑git clone,idea打开项目时提示如下,应该是没有idea相关的配置信息: ![应该是没有idea相关的配置信息](https://img-ask.csdn.net/upload/201612/12/1481524881_160933.png) 现在问题是网上都说idea相关的配置信息不需要track,初次导入项目到底要加哪些信息,别人能正常打开?

如何使godoc链接到github上的源代码

<div class="post-text" itemprop="text"> <p>On the godoc site, most libraries (<a href="http://godoc.org/github.com/beego/memcache" rel="nofollow">http://godoc.org/github.com/beego/memcache</a> for example) link directly to the source on github. When I run the godoc tool locally, this is not the case. We also have a local godoc server for our team, and it similarly does not link to the source on github. Our code is stored on github, and is organized accordingly (ie, github.com/mycompany/packagename). Is there a way to tell the godoc tool to link to code on github, even if it's in a private repo?</p> </div>

Docker:无法解析主机:github.com-进行获取。

<div class="post-text" itemprop="text"> <p>When running my Dockerfile I need to grab dependencies. This is done using <code>go get ./...</code>.</p> <p>However when doing <code>docker build -t test .</code> it hangs at the go get command. </p> <h3>here is the error message</h3> <blockquote> <p>exec go get -v -d </p> <p>github.com/gorilla/mux (download) cd .; git clone <a href="https://github.com/gorilla/mux" rel="nofollow">https://github.com/gorilla/mux</a> /go/src/github.com/gorilla/mux Cloning into '/go/src/github.com/gorilla/mux'... fatal: unable to access '<a href="https://github.com/gorilla/mux/" rel="nofollow">https://github.com/gorilla/mux/</a>': Could not resolve host: github.com package github.com/gorilla/mux: exit status 128</p> </blockquote> <h3>here is the dockerfile</h3> <pre><code>FROM golang # Create a directory inside the container to store all our application and then make it the working directory. RUN mkdir -p /go/src/example-app WORKDIR /go/src/example-app # Copy the example-app directory (where the Dockerfile lives) into the container. COPY . /go/src/example-app # Download and install any required third party dependencies into the container. RUN go-wrapper download RUN go-wrapper install RUN go get ./... # Set the PORT environment variable inside the container ENV PORT 8080 # Expose port 8080 to the host so we can access our application EXPOSE 8080 # Now tell Docker what command to run when the container starts CMD ["go-wrapper", "run"] </code></pre> </div>

如何从github获取go-socket.io以在Go中使用

<div class="post-text" itemprop="text"> <p>My Go version is:</p> <blockquote> <p>go version go1.12.9 windows/amd64</p> </blockquote> <p>From this link:</p> <p><a href="https://github.com/googollee/go-socket.io/tree/v1.0" rel="nofollow noreferrer">https://github.com/googollee/go-socket.io/tree/v1.0</a></p> <p>I run this code in cmd:</p> <blockquote> <p>go get github.com/googollee/go-socket.io</p> </blockquote> <p>But i cant run this code :</p> <pre><code>package main import ( "log" "net/http" "github.com/googollee/go-socket.io" ) func main() { server, err := socketio.NewServer(nil) if err != nil { log.Fatal(err) } server.On("connection", func(so socketio.Socket) { log.Println("on connection") so.Join("chat") so.On("chat message", func(msg string) { log.Println("emit:", so.Emit("chat message", msg)) server.BroadcastTo("chat", "chat message", msg) }) so.On("disconnection", func() { log.Println("on disconnect") }) }) server.On("error", func(so socketio.Socket, err error) { log.Println("error:", err) }) http.Handle("/socket.io/", server) http.Handle("/", http.FileServer(http.Dir("./asset"))) log.Println("Serving at localhost:5000...") log.Fatal(http.ListenAndServe(":5000", nil)) } </code></pre> <p>I cant run it , why?</p> <p>I think my problem is in getting V1.4 and v1.0 </p> <blockquote> <p>go get github.com/googollee/go-socket.io</p> </blockquote> <p>how can i get v1.0 for Golang from github?</p> <p>But this code work well</p> <pre><code>package main import ( "fmt" "log" "net/http" "github.com/googollee/go-socket.io" ) func main() { server, err := socketio.NewServer(nil) if err != nil { log.Fatal(err) } server.OnConnect("/", func(s socketio.Conn) error { s.SetContext("") fmt.Println("connected:", s.ID()) return nil }) http.Handle("/socket.io/", server) http.Handle("/", http.FileServer(http.Dir("./asset"))) log.Println("Serving at localhost:8000...") log.Fatal(http.ListenAndServe(":8000", nil)) } </code></pre> </div>

github ssh -T git@github.com ssh key建立失败

创建github账户操作失败。 具体操作如下: 1.打开gitbash, 2. ssh-keygen -t rsa -C "my_mailaddress_" //在目录下~/.ssh 下生成 id_rsa id_rsa.pub 3. cd到~/.ssh目录下, clip < id_rsa.pub //拷贝到粘贴板 4. 然后再github网站上 add ssh key 以上都正常 但是: Administrator@SU2UBZP0BSW9O46 ~/.ssh $ ssh -T git@github.com The authenticity of host 'github.com (192.30.255.113)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? 似乎是rss key有问题,我又重新生成rsskey,重新github add ssh key,报错还是一样。 查了下log: Administrator@SU2UBZP0BSW9O46 ~/.ssh $ ssh -v git@github.com OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Connecting to github.com [192.30.255.113] port 22. debug1: Connection established. debug1: identity file /c/SPB_Data/.ssh/identity type -1 debug1: identity file /c/SPB_Data/.ssh/id_rsa type 1 debug1: identity file /c/SPB_Data/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version libssh-0.7.0 debug1: no match: libssh-0.7.0 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.6 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-sha1 none debug1: kex: client->server aes128-cbc hmac-sha1 none debug1: sending SSH2_MSG_KEXDH_INIT debug1: expecting SSH2_MSG_KEXDH_REPLY The authenticity of host 'github.com (192.30.255.113)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? 似乎还是rss key原因,请问各位大神,是否还有其他原因呢?操作哪里不正确啊? 谢谢

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐