请教大虾,怎么访问代理服务器的websocket服务?

请教大虾,怎么访问代理服务器的websocket服务?不使用代理服务器的话,websocket是可以访问,代理之后就访问不到了

2个回答

代理阻塞访问了吗。。。。。。。。。

zhangyf911028
zhangyf911028 应该不是,http协议的访问都是正常的,就websocket访问不到
2 年多之前 回复

你有啥做的代理服务器? Ngix ? 试试反向代理

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
websocket 服务器推送数据库数据到浏览器

刚接触web方面的知识,想实现一个小项目,就是服务器不断的从数据库里取出最新的数据,然后把数据推送给web浏览器,看资料说websocket可以很好的实现这个功能,但是websocket的API就那几个监听事件,况且Onmessage,在接受到浏览器到服务器,或者服务器到浏览器的数据时,才会执行,但是,我现在不用浏览器发请求,就是浏览器连上服务器后,服务器就一直不断的推送数据到浏览器,用java实现,应该怎么做呢?有谁做过这方面的东西,请说说你们的做法

javaweb在web.xml中配置欢迎页面为websocket服务访问地址,无法直接通过访问项目根路径来访问websocket

如题,在web.xml中配置欢迎页面为websocket服务访问地址,无法直接通过访问项目根路径来访问websocket服务(访问路径为:ws://127.0.0.1:8080/项目名/),而访问路径后面加websocket服务url是可以访问的。 请教一下大神,是我的配置存在问题,还是访问websocket本身不支持通过欢迎页面访问(web服务器用的tomcat),如果是不支持的话,请问,通过什么方式能做到“通过访问项目根路径来访问websocket服务”,主要是为了达到通过ip和端口就能直接访问websocket服务,web.xml和websocket类内容如下: **_web.xml文件:_** ``` <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>TestWeb</display-name> <servlet> <servlet-name>testAction</servlet-name> <servlet-class>com.ch.TestAction</servlet-class> </servlet> <servlet-mapping> <servlet-name>testAction</servlet-name> <url-pattern>/test</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>ws</welcome-file> </welcome-file-list> </web-app> ``` **_websocket服务类:_** ``` @ServerEndpoint("/ws") public class WebSocketServer { private Session session; //存储用户名和server的对应关系 // private static Set<WebSocketServer> users = new HashSet<WebSocketServer>(); //监听建立连接 @OnOpen public void open(Session session){ this.session=session; System.out.println(getDatetime(new Date()) + " 客户端已连接"); } //监听连接关闭 @OnClose public void close(Session session){ //关闭websocket System.out.println(getDatetime(new Date()) + " 客户端断开连接"); } //监听用户发送的消息并向每个客户端推送消息 @OnMessage public void sendMessage(String message){ System.out.println(getDatetime(new Date()) + " 客户端发送消息:" + message); } @OnError public void onError(Session session, Throwable error) { System.out.println(getDatetime(new Date()) + " 客户端出错"); error.printStackTrace(); } } ```

.net 服务器 WebSocket wss无法连接

如题 跪求帮助 .net 服务器 WebSocket wss无法连接 出错WebSocket opening handshake timed out

运行phpwebsocket服务器.php

<div class="post-text" itemprop="text"> <p>I am playing around with phpwebsocket. I got the code from <a href="http://code.google.com/p/phpwebsocket/" rel="nofollow">http://code.google.com/p/phpwebsocket/</a>. the implementation is that I have to run the server.php using command line which starts the socket linstening on a port. but I am wondering if I upload the script to my blog server(one.com), how can I start the server.php without command line? </p> <p>thanks for any tips.</p> </div>

如何在停止服务器或长时间重启服务器后自动启动websocket服务器

<div class="post-text" itemprop="text"> <p>I am using the ratchet websocket server on CentOs. The problem is it is stopped after some time. I have used the screen command to solve the problem but when server is rebooted it does not start automatically. Is there any way to start the websocket server automatically when it was stopped or killed or server was restarted?</p> </div>

使用nodejs客户端访问golang websocket服务器

<div class="post-text" itemprop="text"> <p>I am a newbie to NodeJS. Assume that I have a echo server implemented with Golang's websocket package:</p> <pre> package main import ( "code.google.com/p/go.net/websocket" "log" "net/http" ) func EchoServer(ws *websocket.Conn) { var msg string websocket.Message.Receive(ws, &amp;msg) log.Printf("Message Got: %s ", msg) websocket.Message.Send(ws, msg) } func main() { http.Handle("/echo", websocket.Handler(EchoServer)) err := http.ListenAndServe(":8082", nil) if err != nil { panic(err.Error()) } } </pre> <p>What should the nodejs client code look like ? </p> </div>

带有Web代理的Golang Gorilla Websocket

<div class="post-text" itemprop="text"> <p>I'm working on a POC using Gorilla/Websocket to communicate, through a Web Proxy, with the Websocket Check Website "echo.websocket.org".</p> <p>I'm using the free online Proxy "hide.me/en/" for testing.</p> <p>When I simply try to communicate with "echo.websocket.org" (Server side), my client-site Websocket POC reach the response.</p> <p>But when i try to add the Proxy gesture, everything goes wrong :(</p> <p>Here is a sample of my code :</p> <pre><code>package main import ( "flag" "log" "net/url" "os" "os/signal" "time" "github.com/gorilla/websocket" "net/http" ) var addrWebsocket = flag.String("addrWebsocket", "echo.websocket.org", "http service address") func main() { flag.Parse() log.SetFlags(0) interrupt := make(chan os.Signal, 1) signal.Notify(interrupt, os.Interrupt) //Initialize the WebSocket URL and the Path to follow uWS := url.URL{Scheme: "wss", Host: *addrWebsocket} //Initialize the Proxy URL and the Path to follow uProxy, _ := url.Parse("https://hide.me/en/proxy") //Set the Dialer (especially the proxy) dialer := websocket.Dialer{ Proxy: http.ProxyURL(uProxy), } //dialer := websocket.DefaultDialer ==&gt; with this default dialer, it works ! c, _, err := dialer.Dial(uWS.String(), nil) // ==&gt; With the proxy config, it fails here ! defer c.Close() done := make(chan struct{}) go func() { defer c.Close() defer close(done) for { _, message, err := c.ReadMessage() if err != nil { log.Println("read:", err) return } log.Printf("recv: %s", message) } }() ticker := time.NewTicker(time.Second) defer ticker.Stop() for { select { case t := &lt;-ticker.C: err := c.WriteMessage(websocket.TextMessage, []byte(t.String())) if err != nil { log.Println("write:", err) return } case &lt;-interrupt: log.Println("interrupt") err := c.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, "")) if err != nil { log.Println("write close:", err) return } select { case &lt;-done: case &lt;-time.After(time.Second): } c.Close() return } } } </code></pre> <p>I'm a very beginner in Go so don't hesitate to correct me if my code un not clear and clean.</p> <p>Thanks for your help !</p> </div>

Websocket:无法与基本websocket服务器建立连接

<div class="post-text" itemprop="text"> <p>I've tried very basic websocket tutorial using ratchet php, exactly as shown in <a href="http://socketo.me/docs/hello-world" rel="nofollow">http://socketo.me/docs/hello-world</a></p> <p>Code for websocket server:</p> <pre><code>&lt;?php error_reporting(E_ALL); ini_set('display_errors', '1'); require 'vendor/autoload.php'; require 'chat.php'; use Ratchet\Server\IoServer; use HHWS\Chat; $server = IoServer::factory( new Chat(), 8080 ); $server-&gt;run(); </code></pre> <p>To run the server I did:</p> <pre><code>$ php ws-server.php </code></pre> <p>And to test the connection with the server I did:</p> <pre><code>telnet 127.0.0.1 8080 </code></pre> <p>This worked perfectly fine when tested LOCALLY. Users can chat using multiple telnet terminals. </p> <p>I then uploaded the code to live server. And the tried running the server. Then tried to connect to this server using telnet just like before, it couldn't connect. All it shows is "Trying.." message and then " Unable to connect to remote host: Connection timed out".</p> <p>I don't know why this is happening, and what the problem is. The code is exactly the same. And this is very basic hello world example I'm doing. Can anyone help me on this. Do using "Websockets" have any other requirements on the live server to work. </p> <p><strong>Update:</strong> Actually, the live server is <strong>Amazon EC2</strong>; does this require setting up additional things for websocket to work?</p> </div>

如何使用websocket通过ip地址从远程PC连接到Web服务器

<div class="post-text" itemprop="text"> <p>I followed <a href="https://www.flynsarmy.com/2012/02/php-websocket-chat-application-2-0/" rel="nofollow">this tutorial</a> to create a Websocket chat example with PHP.</p> <p>It works well on localhost but when I try to connect the server from another computer it does not connect. I tried changing the start server IP to my LAN ipv4 address but it did not work. When I tried to use my external IP, the server did not start with the error:</p> <blockquote> <p>Warning: socket_bind(): unable to bind address [10049]: The requested address is not valid in its context.</p> </blockquote> <p>Is there any way to connect from another client to the server running in my LAN IP address or external IP address?</p> </div>

WebSocket客户端与Java的Socket服务器通信

客户端使用websocket,服务器使用Java Socket。客户端经过new webSocket(utl)之后,服务器端可以收到请求头,但是客户端的webSocket.readyState一直是0,没有连接成功,这个是因为什么呢?是不是因为服务器端不可以用Java Socket

如何用python和服务器建立websocket连接

谢谢大家,找了很多,没有例子。无法返回正确的结果,求帮助或提供思考和相关文档,感激不尽

您如何对WebSocket服务器进行docker化?

<div class="post-text" itemprop="text"> <p>I'm having trouble with putting my WebSocket server in a Docker container.</p> <p>This is the server code, which writes to a new connection with "connected".</p> <pre><code>// server.go func RootHandler(w http.ResponseWriter, r *http.Request) { upgrader := websocket.Upgrader{ // (Uses gorilla/websocket) ReadBufferSize: 4096, WriteBufferSize: 4096, } conn, err := upgrader.Upgrade(w, r, nil) if err != nil { panic(err) } if err = conn.WriteMessage(websocket.TextMessage, []byte("connected")); err != nil { panic(err) } } func main() { fmt.Println("server is running") // For graceful shutdown stop := make(chan os.Signal, 1) signal.Notify(stop, os.Interrupt) server := http.Server{Addr: "localhost:8000"} defer server.Close() http.HandleFunc("/", RootHandler) go func() { err := server.ListenAndServe() if err != nil &amp;&amp; err != http.ErrServerClosed { panic(err) } }() &lt;-stop } </code></pre> <p>Here is the client:</p> <pre><code>// client.go func main() { connection, _, err := websocket.DefaultDialer.Dial("ws://localhost:8000", nil) if err != nil { panic(err) } _, b, err := connection.ReadMessage() if err != nil { panic(err) } fmt.Println(string(b)) // "connected" } </code></pre> <p>Running <code>server.go</code> then <code>client.go</code> prints "connected", showing that the code is working. Now I want to put the server in a Docker container. This is <code>dockerfile</code>:</p> <pre class="lang-none prettyprint-override"><code>FROM golang:1.11.4-alpine3.8 COPY . $GOPATH/src/websocket-test WORKDIR $GOPATH/src/websocket-test RUN ["go", "build", "server.go"] EXPOSE 8000 CMD ["./server"] </code></pre> <p>I use these commands to build and start the container, exposing 8000/tcp.</p> <pre class="lang-none prettyprint-override"><code>docker build -t websocket-test . docker run -p 8000:8000 websocket-test </code></pre> <p>I can confirm that the server is running because it prints "server is running". If I start <code>client.go</code> outside the container, it panics:</p> <pre class="lang-none prettyprint-override"><code>panic: read tcp [::1]:60328-&gt;[::1]:8000: read: connection reset by peer </code></pre> <p>What I expect is the same outcome as before—printing "connected" on the client side. The error message means that the server dropped the connection before the handshake. I don't understand the "60328" number. As far as I know, WebSocket doesn't change ports on upgrade, so I should be okay with exposing just 8000.</p> <p>I do not know what I must change to be able to connect via WebSocket to my server.</p> </div>

在Apache服务器上使用WebSocket

<div class="post-text" itemprop="text"> <p>With all the buzz around WebSockets, it's pretty hard to find a good walkthrough on how to use them with an Apache server on Google.</p> <p>We're developing a plugin, in PHP (symfony2), which will run from time to time kind of a chat instance. And we find WebSockets more interesting, standard and quick than AJAX for this matter. The thing is, we don't have much sysadmin ressources in our group and we find hard to gather good informations on the following matters:</p> <ul> <li>Can we run a WebSocket instance on a traditional Apache, dedicated server, and if yes, do you have useful links for us?</li> <li>If we need to mod the server, what kind of tools would you recommend knowing that we are not too skilled in sysadmin so we can't afford to have a high maintenance b*** on this.</li> </ul> <p>Thank you very much, </p> <p>ps: we'll link back to your blog/site as we'll make a technical/informational post on our devblog about this part of our app.</p> <p>Thank you again!</p> </div>

Java实现Websocket客户端,Nginx服务器下无法建立连接。是什么原因?

Java实现Websocket客户端,去连接另外一个websocket服务器。 线下测试是可以的。 客户端在tomcat服务器下面 服务端在另外一个tomcat服务器下面 线上无法连接 多了一个ngnix的反向代理 客户端和服务端都在这nigix的代理下面 补充一点:线上ngnix代理下的websocket服务器。通过前端js是可以连接的 只有后端用java进行连接连接不上

从外部网络连接到Websocket服务器

<div class="post-text" itemprop="text"> <p>I'm not sure whether to ask this question on a programming forum or linux administration forum as it involves both programming with web sockets and server admin. Basically I am trying to follow this guide "<a href="http://41j.com/blog/2014/12/simple-websocket-example-golang/" rel="nofollow">http://41j.com/blog/2014/12/simple-websocket-example-golang/</a>". I have a centos basic server that has a static IP and I've port forwarded it to ports 22 and 80 (ssh and http). I can compile and run the server app fine, but i cannot connect the client. I'm currently out of ideas since I've never messed with networking before. I read somewhere that html5 websockets go through ports 80 and 443 when given an external IP. What I want is to start the server app on port say something like 1445 and then lets pretend my external IP is 244.214.21.44 and then have client connection string look like 'ws//244.214.21.44:1445/echo'. What am I missing, do I need to install apache or something?</p> <p>Thanks for reading.</p> </div>

使用PHP发送到WebSocket服务器?

<div class="post-text" itemprop="text"> <p>I'm running a Node.js WebSocket server on port 3000 on the same machine that I'm running Apache/PHP by running a reverse-proxy through Apache. This is my HTTPD file:</p> <pre><code> &lt;VirtualHost *:80&gt; ProxyRequests off SSLProxyEngine on ProxyPass /node/ ws://localhost:3000/node/ ProxyPassReverse /node/ ws://localhost:3000/node/ &lt;/VirtualHost&gt; &lt;VirtualHost *:443&gt; ProxyRequests off SSLProxyEngine on ProxyPass /node/ ws://localhost:3000/node/ ProxyPassReverse /node/ ws://localhost:3000/node/ &lt;/VirtualHost&gt; </code></pre> <p>Let's say my domain name is "example.com". Then, to connect to the WebSocket server through a browser, I would use this JS:</p> <pre><code>var connection = new WebSocket("wss://example.com/node/"); </code></pre> <p>This works fine, and I'm successfully sending and receiving messages from browsers.</p> <p>However, I also need to be able to send (not receive) messages to the WebSocket server using PHP, from the same machine. I've tried several configurations of fsockopen, and none of them have worked. Here are the ones I've tried, with the resulting error messages:</p> <pre><code>$fp = fsockopen("example.com/node/", 3000); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("ssl://example.com/node/", 3000); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("tls://example.com/node/", 3000); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("http://example.com/node/", 3000); //Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? $fp = fsockopen("https://example.com/node/", 3000); //Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? $fp = fsockopen("wss://example.com/node/", 3000); //Unable to find the socket transport "wss" - did you forget to enable it when you configured PHP? $fp = fsockopen("ws://example.com/node/", 3000); //Unable to find the socket transport "ws" - did you forget to enable it when you configured PHP? $fp = fsockopen("example.com/node/", 443); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("ssl://example.com/node/", 443); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("tls://example.com/node/", 443); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("http://example.com/node/", 443); //Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? $fp = fsockopen("https://example.com/node/", 443); //Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? $fp = fsockopen("wss://example.com/node/", 443); //Unable to find the socket transport "wss" - did you forget to enable it when you configured PHP? $fp = fsockopen("ws://example.com/node/", 443); //Unable to find the socket transport "ws" - did you forget to enable it when you configured PHP? $fp = fsockopen("example.com/node/", 80); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("ssl://example.com/node/", 80); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("tls://example.com/node/", 80); //php_network_getaddresses: getaddrinfo failed: Name or service not known $fp = fsockopen("http://example.com/node/", 80); //Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? $fp = fsockopen("https://example.com/node/", 80); //Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? $fp = fsockopen("wss://example.com/node/", 80); //Unable to find the socket transport "wss" - did you forget to enable it when you configured PHP? $fp = fsockopen("ws://example.com/node/", 80); //Unable to find the socket transport "ws" - did you forget to enable it when you configured PHP? </code></pre> <p>I've also tried all of those configurations using "localhost" and "127.0.0.1". And I've also experimented using the built-in PHP library functions socket_create and socket_connect, with all of those same hostnames, IP's, and ports - all resulting in the same types of "unknown host" errors. What am I doing wrong? What is the right way to do this?</p> </div>

节点websocket客户端侦听Golang websocket服务器

<div class="post-text" itemprop="text"> <p>I am trying to post messages using Golang websocket and listen on Node client side.</p> <p>Here's part of code:</p> <p>Golang:</p> <pre><code>func NewUpgrader() *websocket.Upgrader { return &amp;websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, CheckOrigin: func(r *http.Request) bool { return true }, } func (s WebsocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { upgrader := NewUpgrader() ws, err := upgrader.Upgrade(w, r, nil) if err != nil { log.Errorf("websocket: could not upgrade %v", err) fmt.Fprintf(w, "websocket: could not upgrade %v", err) return } go func() { defer ws.Close() for msg := range s.Messages { json, _ := json.Marshal(msg) err := ws.WriteMessage(1, json) if err != nil { log.Errorf("websocket: error sending message: %v", err) } } }() </code></pre> <p>By doing this I can get all the messages when I run the code below on Google console </p> <p><code>ws = new WebSocket('ws://localhost:8080/ws') ws.onmessage = function(msg) { console.log(JSON.parse(msg.data)) }</code></p> <p>And I add the same two lines code on my client side, now I got these errors</p> <p>Golang side:</p> <p><code>INFO[0009] 400 GET localhost:8080/ws (0 bytes) id: 77b7355412f2ffcd ERRO[0009] websocket: could not upgrade websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header</code></p> <p>Client side(browser console):</p> <p><code>GET http://localhost:8080/ws 400 (Bad Request) Failed to load http://localhost:8080/ws: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4000' is therefore not allowed access. The response had HTTP status code 400. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Uncaught (in promise) TypeError: Failed to fetch</code></p> <p>I tried to compare these two get request(Google console vs my client-side code). I found out that for google console there's a header <code>Connection:[Upgrade]</code>, but the header looks like this <code>Connection:[keep-alive]</code> in my client-side code.</p> <p>Not sure if this is the reason why I can not connect these two, any ideas?</p> <p>Thanks!</p> </div>

阿里云服务器收不到websocket握手消息

代码如下,这段代码在我的vm虚拟机里可以正常运行,服务端能收到握手消息。但把代码放到阿里云服务器上时就,能收到accept请求,就是没触发read事件。有没谁遇到过相同的问题,求解啊! 是不是阿里云服务器的环境哪有问题,还是有哪个库有问题。 服务端代码: for (n = 0; n < nfds; ++n) { if (events[n].data.fd == listenfd) { connfd = accept(listenfd, (struct sockaddr *)&cliaddr,&socklen); if (connfd < 0) { perror("accept error"); continue; } sprintf(buf, "accept form %s:%d\n", inet_ntoa(cliaddr.sin_addr), cliaddr.sin_port); printf("%d:%s", ++acceptCount, buf); if (curfds >= MAXEPOLLSIZE) { fprintf(stderr, "too many connection, more than %d\n", MAXEPOLLSIZE); close(connfd); continue; } if (setnonblocking(connfd) < 0) { perror("setnonblocking error"); } ev.events = EPOLLIN | EPOLLET; ev.data.fd = connfd; if (epoll_ctl(kdpfd, EPOLL_CTL_ADD, connfd, &ev) < 0) { fprintf(stderr, "add socket '%d' to epoll failed: %s\n", connfd, strerror(errno)); return -1; } curfds++; continue; } // 处理客户端请求 if (handle(events[n].data.fd) < 0) { epoll_ctl(kdpfd, EPOLL_CTL_DEL, events[n].data.fd,&ev); curfds--; } } } int handle(int connfd) { int nread; char buf[MAXLINE]; nread = read(connfd, buf, MAXLINE);//读取客户端socket流 if (nread == 0) { printf("client close the connection\n"); close(connfd); return -1; } if (nread < 0) { perror("read error"); close(connfd); return -1; } buf[nread] = '\0'; printf("received:%s\n",buf); write(connfd, buf, nread);//响应客户端 return 0; } 客户端就是new WebSocket(url)

用c#和websocket做服务器端主动发消息给web客户端?

求教各位大神,用c#怎么写websocket实现服务器端主动发消息给web客户端的功能。就比如数据库的数据更新了,服务器就主动发更新的消息给客户端。求代码啊

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

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

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

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

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

和黑客斗争的 6 天!

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

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

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

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

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

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

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

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

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

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

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

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

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

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

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

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

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

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

百度工程师,获利10万,判刑3年!

所有一夜暴富的方法都写在刑法中,但总有人心存侥幸。这些年互联网犯罪高发,一些工程师高技术犯罪更是引发关注。这两天,一个百度运维工程师的案例传遍朋友圈。1...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

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

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

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

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

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

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

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

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

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

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

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

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

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

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

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

立即提问
相关内容推荐