沙盒paypal在线支付成功后返回非法参数invalid

测试的时候,PayPal一直返回invalid,求大神解答
public void ipn() throws IOException, DaoException {
String res ="";
Enumeration en = context.getRequest().getParameterNames();
String str = "cmd=_notify-validate";
while (en.hasMoreElements()) {
String paramName = (String) en.nextElement();
String paramValue = context.getRequest().getParameter(paramName);
str = str + "&" + paramName + "=" + URLEncoder.encode(paramValue);
}
System.out.println(str);

    URL u = new URL("https://www.sandbox.paypal.com/cgi-bin/webscr");
    URLConnection uc = u.openConnection();
    uc.setDoOutput(true);
    uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
    PrintWriter pw = new PrintWriter(uc.getOutputStream());
    pw.println(str);
    pw.close();

    BufferedReader in = new BufferedReader(
    new InputStreamReader(uc.getInputStream()));
    res = in.readLine();
    in.close();
    System.out.println(res);
    // assign posted variables to local variables
    String videoId = context.getRequest().getParameter("item_number");
    String paymentAmount = context.getRequest().getParameter("mc_gross");
    String paymentCurrency = context.getRequest().getParameter("mc_currency");
    // check notification validation
    if (res.equals("VERIFIED")) {
        // check that paymentStatus=Completed
        // check that txnId has not been previously processed
        // check that receiverEmail is your Primary PayPal email
        // check that paymentAmount/paymentCurrency are correct
        // process payment


        System.out.println("Success");
    } else if (res.equals("INVALID")) {
        // log for investigation
        System.out.println("invalid Fail");
    } else {
        // error
        System.out.println("Nothing");
    }

}

2个回答

后来发现是PayPal的账户设置不正确

我沙盒的时候返回是正确的,但正式充值时,一直返回invalid,请问你的paypal账户是什么设置问题呢?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
利用conda安装opencv库(以及其他库)时出现的问题请问怎么解决?
在Anaconda Prompt 中输入`conda install opencv`并运行后显示错误信息: ``` CustomValidationError: Parameter channel_priority = 'flexible' declared in <<merged>> is invalid. The value 'flexible' cannot be boolified. ``` 本人使用的是anaconda清华大学镜像版,windows系统 请问有谁帮忙解决一下吗?感谢!!
Programming the EDSAC
Problem Description The world's first full-scale, stored-program, electronic, digital computer was the EDSAC (Electronic Delay Storage Automatic Calculator). The EDSAC had an accumulator-based instruction set, operating on 17-bit words(and 35-bit double words), and used a 5-bit teletypewriter code for input and output. The EDSAC was programmed using a very simple assembly language: a single letter opcode followed by an unsigned decimal address, followed by the the letter "F"(for full word) or "D"(for double word). For example, the instruction "A 128 F" would mean "add the full word at location 128 to the accumulator", and would be assembled into the 17-bit binary value, 11100000100000000, consisting of a 5-bit opcode(11100="add"), an 11-bit operand (00010000000 = 128), and a single 0 bit denoting a full word operation(a 1 bit would indicate a double word operation). Although arithmetic on the EDSAC was fixed point two's complement binary, it was not mere intger arithmetic (as is common with modern machines). The EDSAC hardware assumed a binary point between the lrftmost bit and its immediate successor. Thus the hardware could handle only values in the range -1.0 <= x < 1.0 . For example: As you can see, the largest possible positive value was: and the smallest possible positive value was: (This also happens to be the increment between successive values on the EDSAC). By a curious coincidence(or an elegant design decision), the opcode for the add operation(11100) was the same as the teleprinter code for the letter"A". The opcode for subtract was the same as the teleprinter code for "S"(01100), and so on. This simplified the programming for the assembler (which, incidentally, was a mere 31 instructions long). The EDSAC teleprinter alphabet was "PQWERTYUIOJ#SZK*?F@D!HNM&LXGABCV"(with "P"=00000, "Q"=00001, and so on, up to "V"=11111) UNfortunately, the EDSAC assembler had no special directives for data values. On the other hand, there was no reason that ordinary instructions couldn't be used for this , thus, an EDSAC programmer desiring to reserve space for the constant 3/4(represented as 01100000000000000) would use the instruction "S O F" and for 1/3(which is approximately represented as 00101010101010101)"T 682 D", and so on. Your job is to write a program that will translate decimal input value into the appropriate EDSAC instructions. Input The frist line of input contains a single integer P,(1<=P<=1000),which is the number of data sets that follow. Each data set is a single line that contains of two space separated values N and D. N is the data set number. D is the decimal number of the from sd.ddd...., where s is an optional minus sign, and d is any decimal digit(0,-9). There will be at least 1 and at most 16 digits after the decimal point. Output For each data set there is one line of output. It contains the data set number(N)followed by a single space, followed by the EDSAC instruction necessary to specify the given constant. The instruction should be printed as follows:the"opcode"character followed by a space followed by the operand(as a non-negative decimal integer)followed by a space followed by an'F'or'D'(as appropriate). If the constant cannot be represented exactly in 17 bits,the value is to be rounded toward zero(up for negative,down for positive numbers). If the input value D is not in the range -1.0 <= D <= 1.0, the string"INVALID VALUE"should be printed instead of an EDSAC instruction. Sample Input 16 1 0.5 2 -0.5 3 -1.0000000 4 0.1 5 0.0000152587890625 6 0.0000152587890624 7 0.0000152587890626 8 -0.0000152587890625 9 -0.0000152587890624 10 -0.0000152587890626 11 0.9999999999999999 12 -0.9999999999999999 13 -5.3 14 9.1 15 -1.0000000000000001 16 0.31415926 Sample Output 1 I 0 F 2 & 0 F 3 ? 0 F 4 Q 1228 D 5 P 0 D 6 P 0 F 7 P 0 D 8 V 2047 D 9 P 0 F 10 V 2047 D 11 * 2047 D 12 ? 0 D 13 INVALID VALUE 14 INVALID VALUE 15 INVALID VALUE 16 T 54 F
我调用他们写的支付宝接口,加载支付宝页面时返回“ 错误码:INVALID_PARAMETER”,
我调用他们写的支付宝接口,加载支付宝页面时返回“ 错误码:INVALID_PARAMETER”,请问是我调用的原因还是接口的问题。
docker启动失败,提示非法参数错误
这是docker.service ![图片说明](https://img-ask.csdn.net/upload/202001/09/1578559101_926421.png) 在docker.service中添加了一个EnvironmentFile,subnet.env ![图片说明](https://img-ask.csdn.net/upload/202001/09/1578559145_878989.png) 无法启动docker,提示invalid argument ![图片说明](https://img-ask.csdn.net/upload/202001/09/1578559214_925575.png)
paypal沙盒测试notify_url不能返回问题
付款成功了,但设置了notify_url,我的程序却没有动静,求教大神! 我的notify_url=http://192.122.2.8:8080/paypalipn/ipn.jsp, **我的程序:** ``` il = request.getParameter("receiver_email"); String payerEmail = request.getParameter("payer_email"); //check notification validation if(res.equals("VERIFIED")) { // check that paymentStatus=Completed // check that txnId has not been previously processed // check that receiverEmail is your Primary PayPal email // check that paymentAmount/paymentCurrency are correct // process payment } else if(res.equals("INVALID")) { // log for investigation } else { // error } %> </body> </html> ```
icmp收包,把IP头给拆了 只留下icmp报文 请大神解释一下啊
int icmp_unpack(char* buf, int len) { int iphdr_len; struct timeval begin_time, recv_time, offset_time; int rtt; //round trip time struct ip* ip_hdr = (struct ip *)buf; iphdr_len = ip_hdr->ip_hl*4; struct icmp* icmp = (struct icmp*)(buf+iphdr_len); //使指针跳过IP头指向ICMP头** len-=iphdr_len; //icmp包长度 if(len < 8) //判断长度是否为ICMP包长度 { fprintf(stderr, "Invalid icmp packet.Its length is less than 8\n"); return -1; }
Symbolic Logic Mechanization 逻辑的算法
Problem Description Marvin, the robot with a brain the size of a planet, followed some . . . markedly less successful robots as the product line developed. One such was Monroe, the robot — except, to help him recognize his name, he was referred to as Moe. He is sufficiently mentally challenged that he needs external assistance to handle symbolic logic. Polish notation is the prefix symbolic logic notation developed by Jan Lukasiewicz (1929). [Hence postfix expressions are referred to as being in Reverse Polish Notation — RPN.] The notation developed by Lukasiewicz (referred to as PN below) uses upper-case letters for the logic operators and lower-case letters for logic variables (which can only be true or false). Since prefix notation is self-grouping, there is no need for precedence, associativity, or parentheses, unlike infix notation. In the following table the PN operator is shown, followed by its operation. Operators not having exactly equivalent C/C++/Java operators are shown in the truth table (using 1 for true and 0 for false). [The operator J is not found in Lukasiewicz’ original work but is included from A.N.Prior’s treatment.] For every combination of PN operators and variables, an expression is a "well-formed formula" (WFF) if and only if it is a variable or it is a PN operator followed by the requisite number of operands (WFF instances). A combination of symbols will fail to be a "well-formed formula" if it is composed of a WFF followed by extraneous text, it uses an unrecognized character [uppercase character not in the above table or a non-alphabetic character], or it has insufficient operands for its operators. For invalid expressions, report the first error discovered in a left-toright scan of the expression. For instance, immediately report an error on an invalid character. If a valid WFF is followed by extraneous text, report that as the error, even if the extraneous text has an invalid character. In addition, every WFF can be categorized as a tautology (true for all possible variable values), a contradiction (false for all possible variable values), or a contingent expression (true for some variable values, false for other variable values). The simplest contingent expression is simply 'p', true when p is true, false when p is false. One very simple contradiction is "KpNp", both p and not-p are true. Similarly, one very simple tautology is "ApNp", either p is true or not-p is true. For a more complex tautology, one expression of De Morgan’s Law is "EDpqANpNq". Input Your program is to accept lines until it receives an empty character string. Each line will contain only alphanumeric characters (no spaces or punctuation) that are to be parsed as potential "WFFs". Each line will contain fewer than 256 characters and will use at most 10 variables. There will be at most 32 non-blank lines before the terminating blank line. Output For each line read in, echo it back, followed by its correctness as a WFF, followed (if a WFF) with its category (tautology, contradiction, or contingent). In processing an input line, immediately terminate and report the line as not a WFF if you encounter an unrecognized operator (even though it may fail to be well-formed in another way as well). If it has extraneous text following the WFF, report it as incorrect. If it has insufficient operands, report that. Use exactly the format shown in the Sample Output below. Sample Input q Cp Cpq A01 Cpqr ANpp KNpp Qad CKNppq JDpqANpNq CDpwANpNq EDpqANpNq KCDpqANpNqCANpNqDpq Sample Output q is valid: contingent Cp is invalid: insufficient operands Cpq is valid: contingent A01 is invalid: invalid character Cpqr is invalid: extraneous text ANpp is valid: tautology KNpp is valid: contradiction Qad is invalid: invalid character CKNppq is valid: tautology JDpqANpNq is valid: contradiction CDpwANpNq is valid: contingent EDpqANpNq is valid: tautology KCDpqANpNqCANpNqDpq is valid: tautology
IDLE import torch报错:SyntaxError: invalid syntax
>>> import torch Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import torch File "C:\Python\Python37\torch.py", line 2 t.abs? ^ SyntaxError: invalid syntax >>> ``` ```
Unexpected CUDA error: invalid argument
我在使用tensorflow-gpu时,运行如下的代码: ``` import tensorflow as tf a = tf.constant([1.0,2.0,3.0],shape = [3],name='a') print(a) ``` 能正确显示 ``tf.Tensor([1. 2. 3.], shape=(3,), dtype=float32)`` 但当我加入以下两行代码 ``` b = tf.constant([1.0,2.0,3.0], shape = [3],name='b') a+b ``` 会报如下的错误 ``` F tensorflow/stream_executor/cuda/cuda_driver.cc:209] Check failed: err == cudaSuccess || err == cudaErrorInvalidValue Unexpected CUDA error: invalid argument ``` 请大神帮忙解答 ================================================ 参照这篇博客,重新安装了一下,问题已经解决了 [https://blog.csdn.net/weixin_43411129/article/details/101390407](https://blog.csdn.net/weixin_43411129/article/details/101390407)
ElasticSearch 6.3.2版本整合springBoot 报错 java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)
在服务器上搭建了一个单机的ElasticSearch 版本6.3.2,因为本地访问服务器的9200端口访问不到(network.host:0.0.0.0启动报错),所以用nginx做了代理9002端口对应9200,9001端口对应9300,直接访问访问成功如下:![图片说明](https://img-ask.csdn.net/upload/202002/08/1581096007_348190.jpg)![图片说明](https://img-ask.csdn.net/upload/202002/08/1581096016_248026.png) 然后我用写了个Demo但是一直报错 java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50); 配置文件如下: ![图片说明](https://img-ask.csdn.net/upload/202002/08/1581096398_340973.jpg) ![图片说明](https://img-ask.csdn.net/upload/202002/08/1581096609_898535.jpg) 错误日志和pom.xml文件如下: ``` exception caught on transport layer [NettyTcpChannel{localAddress=/192.168.1.103:61678, remoteAddress=/xxx.xxx.xxx.xxx:9001}], closing connection io.netty.handler.codec.DecoderException: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472) ~[netty-codec-4.1.31.Final.jar:4.1.31.Final] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) ~[netty-codec-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241) [netty-handler-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:548) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:502) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) [netty-transport-4.1.31.Final.jar:4.1.31.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) [netty-common-4.1.31.Final.jar:4.1.31.Final] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191] Caused by: java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50) at org.elasticsearch.transport.TcpTransport.validateMessageHeader(TcpTransport.java:1315) ~[elasticsearch-6.3.2.jar:6.4.3] at org.elasticsearch.transport.netty4.Netty4SizeHeaderFrameDecoder.decode(Netty4SizeHeaderFrameDecoder.java:36) ~[transport-netty4-client-6.4.3.jar:6.4.3] at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) ~[netty-codec-4.1.31.Final.jar:4.1.31.Final] at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) ~[netty-codec-4.1.31.Final.jar:4.1.31.Final] ... 19 common frames omitted ``` pom.xml文件如下 ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com</groupId> <artifactId>elasticsearchtest</artifactId> <version>0.0.1-SNAPSHOT</version> <name>elasticsearchtest</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>6.3.2</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.3.2</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>6.3.2</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.10</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ``` 请大神帮忙看看,谢谢啦!
swift invalid number of items in section 0
collection view报错 代码如下: let selectIndex = self.photoData.seletedAssetArray.index(of: self.previewPhotoArray[currentIndex]) if selectIndex != nil{ self.rightButton.asyncSetImage(UIImage.zyCreateImageWithView(view: ZYPhotoNavigationViewController.zyGetSelectNuberView(index: "\(selectIndex! + 1)")), for: .selected) } if selectIndex != nil{ if self.rightButton.isSelected == false { let indexPath = IndexPath.init(row: selectIndex!, section: 0) self.photoData.seletedAssetArray.remove(at: self.photoData.seletedAssetArray.index(of: self.previewPhotoArray[currentIndex])!) thumbnailCollectionView.deleteItems(at: [indexPath]) }else{ let indexPath = IndexPath.init(row: selectIndex!, section: 0) thumbnailCollectionView.insertItems(at: [indexPath]) thumbnailCollectionView.reloadItems(at: [indexPath]) thumbnailCollectionViewCellToggeleSelect(indexPath: indexPath) } } 报错信息: 'Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (1) must be equal to the number of items contained in that section before the update (1), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out) 希望指教,谢谢
为什么cookie中带有空格的字符串会添加失败
我在时间的dd日和HH添加一个空格 reponse.addCookie时就会报错, ``` java.lang.IllegalArgumentException: An invalid character [32] was present in the Cookie value at org.apache.tomcat.util.http.Rfc6265CookieProcessor.validateCookieValue(Rfc6265CookieProcessor.java:162) at org.apache.tomcat.util.http.Rfc6265CookieProcessor.generateHeader(Rfc6265CookieProcessor.java:111) at org.apache.catalina.connector.Response.generateCookieString(Response.java:989) at org.apache.catalina.connector.Response.addCookie(Response.java:937) at org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:386) at com.zero.demo.Demo04Cookie.doPost(Demo04Cookie.java:61) ``` 而如果没有空格就可以添加成功 ```java Date date=new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); String loginTime = simpleDateFormat.format(date); System.out.println(loginTime); System.out.println("编码前"+loginTime); String encode = URLEncoder.encode(loginTime, "UTF-8"); System.out.println("编码后"+encode); String decode = URLDecoder.decode(encode, "UTF-8"); System.out.println("解码后"+decode); try{ Cookie loginTime1 = new Cookie("loginTime",decode); System.out.println( loginTime1.getName()); System.out.println(loginTime1.getValue()); response.addCookie(loginTime1); }catch (Exception e) { e.printStackTrace(); System.out.println("未能添加cookie"); } ```
已安装的Nginx追加自带模块始终报错
* Centos7系统下已安装的nginx需要追加http_limit_req_module模块。按照网上的方法,下载了对应版本的源码, 1. 在配置参数后追加--with-http_limit_req_module,出现以下报错 ``` ./configure: error: invalid option "--with-http_limit_req_module" ``` 2. 使用--add-module=http_limit_req_module报找不到config文件 ``` adding module in http_limit_req_module ./configure: error: no http_limit_req_module/config was found ``` 3. 将模块名改成ngx_http_limit_req_module报的也是类似的错误 # 求大神看看应该怎么添加 下面是完整配置参数,nginx版本是1.17.8,--with-http_limit_req_module前的参数是用nginx -V查出来的 ``` ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --with-http_limit_req_module ```
求助!谁知道C++UDP打洞?
# 为什么我的代码不在一个局域网内无法连接,也无反应? 服务器(UDP打洞): ``` #include <Winsock2.h> #include <stdio.h> #include <stdlib.h> #define DEFAULT_PORT 4768 #define BUFFER_SIZE 100 int main() { int serverPort = DEFAULT_PORT; WSADATA wsaData; SOCKET serverListen; struct sockaddr_in serverAddr; if (WSAStartup(MAKEWORD(2,2),&wsaData) != 0 ) { printf("Failed to load Winsock.\n"); return -1; } serverListen = socket(AF_INET,SOCK_DGRAM,0); if (serverListen == INVALID_SOCKET) { printf("socket() failed:%d\n",WSAGetLastError()); return -1; } serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(serverPort); serverAddr.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(serverListen,(LPSOCKADDR)&serverAddr,sizeof(serverAddr)) == SOCKET_ERROR) { printf("bind() failed:%d\n",WSAGetLastError()); return -1; } struct sockaddr_in sourceAddr1; int sourceAddrLen1 = sizeof(sourceAddr1); SOCKET sockC1 = socket(AF_INET,SOCK_DGRAM,0); char bufRecv1[BUFFER_SIZE]; int len; len = recvfrom(serverListen, bufRecv1, sizeof(bufRecv1), 0,(struct sockaddr*)&sourceAddr1,&sourceAddrLen1); if (len == SOCKET_ERROR) { printf("recv() failed:%d\n", WSAGetLastError()); return -1; } printf("C1 IP:[%s],PORT:[%d]\n",inet_ntoa(sourceAddr1.sin_addr) ,ntohs(sourceAddr1.sin_port)); struct sockaddr_in sourceAddr2; int sourceAddrLen2 = sizeof(sourceAddr2); SOCKET sockC2 = socket(AF_INET,SOCK_DGRAM,0); char bufRecv2[BUFFER_SIZE]; len = recvfrom(serverListen, bufRecv2, sizeof(bufRecv2), 0,(struct sockaddr*)&sourceAddr2,&sourceAddrLen2); if (len == SOCKET_ERROR) { printf("recv() failed:%d\n", WSAGetLastError()); return -1; } printf("C2 IP:[%s],PORT:[%d]\n",inet_ntoa(sourceAddr2.sin_addr) ,ntohs(sourceAddr2.sin_port)); char bufSend1[BUFFER_SIZE]; memset(bufSend1,'\0',sizeof(bufSend1)); char* ip2 = inet_ntoa(sourceAddr2.sin_addr); char port2[10]; itoa(ntohs(sourceAddr2.sin_port),port2,10); for (int i=0;i<strlen(ip2);i++) { bufSend1[i] = ip2[i]; } bufSend1[strlen(ip2)] = '^'; for (int i=0;i<strlen(port2);i++) { bufSend1[strlen(ip2) + 1 + i] = port2[i]; } len = sendto(sockC1,bufSend1,sizeof(bufSend1),0,(struct sockaddr*)&sourceAddr1,sizeof(sourceAddr1)); if (len == SOCKET_ERROR) { printf("send() failed:%d\n",WSAGetLastError()); return -1; } else if (len == 0) { return -1; } else { printf("send() byte:%d\n",len); } char bufSend2[BUFFER_SIZE]; memset(bufSend2,'\0',sizeof(bufSend2)); char* ip1 = inet_ntoa(sourceAddr1.sin_addr); char port1[10];//C1的port itoa(ntohs(sourceAddr1.sin_port),port1,10); for (int i=0;i<strlen(ip1);i++) { bufSend2[i] = ip1[i]; } bufSend2[strlen(ip1)] = '^'; for (int i=0;i<strlen(port1);i++) { bufSend2[strlen(ip1) + 1 + i] = port1[i]; } len = sendto(sockC2,bufSend2,sizeof(bufSend2),0,(struct sockaddr*)&sourceAddr2,sizeof(sourceAddr2)); if (len == SOCKET_ERROR) { printf("send() failed:%d\n",WSAGetLastError()); return -1; } else if (len == 0) { return -1; } else { printf("send() byte:%d\n",len); } closesocket(serverListen); closesocket(sockC1); closesocket(sockC2); WSACleanup(); return 0; } ``` 用户C1: ``` #include<Winsock2.h> #include<stdio.h> #include<stdlib.h> #include <thread> #define PORT 7777 #define BUFFER_SIZE 100 int main(int argc,char* argv[]) { char APTTTTT[]="127.0.0.1"; scanf("%s",APTTTTT); int HYH=4768; WSADATA wsaData; struct sockaddr_in serverAddr; struct sockaddr_in thisAddr; thisAddr.sin_family = AF_INET; thisAddr.sin_port = htons(PORT); thisAddr.sin_addr.s_addr = htonl(INADDR_ANY); if (WSAStartup(MAKEWORD(2,2),&wsaData) != 0) { printf("Failed to load Winsock.\n"); return -1; } serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(HYH); serverAddr.sin_addr.s_addr = inet_addr(APTTTTT); SOCKET sockS = socket(AF_INET,SOCK_DGRAM,0); if (sockS == INVALID_SOCKET) { printf("socket() failed:%d\n",WSAGetLastError()); return -1; } if (bind(sockS,(LPSOCKADDR)&thisAddr,sizeof(thisAddr)) == SOCKET_ERROR) { printf("bind() failed:%d\n",WSAGetLastError()); return -1; } SOCKET sockC = socket(AF_INET,SOCK_DGRAM,0); if (sockC == INVALID_SOCKET) { printf("socket() failed:%d\n",WSAGetLastError()); return -1; } char bufSend[] = "I am C1"; char bufRecv[BUFFER_SIZE]; memset(bufRecv,'\0',sizeof(bufRecv)); struct sockaddr_in sourceAddr; int sourceAddrLen = sizeof(sourceAddr); struct sockaddr_in oppositeSideAddr; int len; len = sendto(sockS,bufSend,sizeof(bufSend),0,(struct sockaddr*)&serverAddr,sizeof(serverAddr)); if (len == SOCKET_ERROR) { printf("sendto() failed:%d\n", WSAGetLastError()); return -1; } len = recvfrom(sockS, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); if (len == SOCKET_ERROR) { int TRYY=WSAGetLastError(); if(TRYY!= WSAECONNRESET) { printf("recvfrom() failed:%d\n", WSAGetLastError()); return -1; } } closesocket(sockS); if (bind(sockC,(LPSOCKADDR)&thisAddr,sizeof(thisAddr)) == SOCKET_ERROR) { printf("bind() failed:%d\n",WSAGetLastError()); return -1; } char ip[20]; char port[10]; int i; for (i=0;i<strlen(bufRecv);i++) if (bufRecv[i] != '^') ip[i] = bufRecv[i]; else break; ip[i] = '\0'; int j; for (j=i+1;j<strlen(bufRecv);j++) port[j - i - 1] = bufRecv[j]; port[j - i - 1] = '\0'; oppositeSideAddr.sin_family = AF_INET; oppositeSideAddr.sin_port = htons(atoi(port)); oppositeSideAddr.sin_addr.s_addr = inet_addr(ip); unsigned long ul = 1; ioctlsocket(sockC, FIONBIO, (unsigned long*)&ul); while (1) { Sleep(1000); len = sendto(sockC,bufSend,sizeof(bufSend),0,(struct sockaddr*)&oppositeSideAddr,sizeof(oppositeSideAddr)); if (len == SOCKET_ERROR) { printf("while sending package to C2 , sendto() failed:%d\n", WSAGetLastError()); return -1; }else { printf("successfully send package to C2\n"); } len = recvfrom(sockC, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); if (len == WSAEWOULDBLOCK) { continue; }else { printf("C2 IP:[%s],PORT:[%d]\n",inet_ntoa(sourceAddr.sin_addr) ,ntohs(sourceAddr.sin_port)); printf("C2 says:%s\n",bufRecv); break; } } char buff[1024]={}; while(1) { memset(buff, 0, 1024); scanf("%s",buff); sendto(sockC,buff,sizeof(buff),0,(struct sockaddr*)&oppositeSideAddr,sizeof(oppositeSideAddr)); recvfrom(sockC, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); printf("%s\n\n",bufRecv); } closesocket(sockC); } ``` 用户C2: ``` #include<Winsock2.h> #include<stdio.h> #include<stdlib.h> #include <thread> #define PORT 8888 #define BUFFER_SIZE 100 int main(int argc,char* argv[]) { char APTTTTT[]="127.0.0.1"; scanf("%s",APTTTTT); int HYH=4768; WSADATA wsaData; struct sockaddr_in serverAddr; struct sockaddr_in thisAddr; thisAddr.sin_family = AF_INET; thisAddr.sin_port = htons(PORT); thisAddr.sin_addr.s_addr = htonl(INADDR_ANY); if (WSAStartup(MAKEWORD(2,2),&wsaData) != 0) { printf("Failed to load Winsock.\n"); return -1; } serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(HYH); serverAddr.sin_addr.s_addr = inet_addr(APTTTTT); SOCKET sockS = socket(AF_INET,SOCK_DGRAM,0); if (sockS == INVALID_SOCKET) { printf("socket() failed:%d\n",WSAGetLastError()); return -1; } if (bind(sockS,(LPSOCKADDR)&thisAddr,sizeof(thisAddr)) == SOCKET_ERROR) { printf("bind() failed:%d\n",WSAGetLastError()); return -1; } SOCKET sockC = socket(AF_INET,SOCK_DGRAM,0); if (sockC == INVALID_SOCKET) { printf("socket() failed:%d\n",WSAGetLastError()); return -1; } char bufSend[] = "I am C2"; char bufRecv[BUFFER_SIZE]; memset(bufRecv,'\0',sizeof(bufRecv)); struct sockaddr_in sourceAddr; int sourceAddrLen = sizeof(sourceAddr); struct sockaddr_in oppositeSideAddr; int len; len = sendto(sockS,bufSend,sizeof(bufSend),0,(struct sockaddr*)&serverAddr,sizeof(serverAddr)); if (len == SOCKET_ERROR) { printf("sendto() failed:%d\n", WSAGetLastError()); return -1; } len = recvfrom(sockS, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); if (len == SOCKET_ERROR) { int TRYY=WSAGetLastError(); if(TRYY!= WSAECONNRESET) { printf("recvfrom() failed:%d\n", WSAGetLastError()); return -1; } } closesocket(sockS); if (bind(sockC,(LPSOCKADDR)&thisAddr,sizeof(thisAddr)) == SOCKET_ERROR) { printf("bind() failed:%d\n",WSAGetLastError()); return -1; } char ip[20]; char port[10]; int i; for (i=0;i<strlen(bufRecv);i++) if (bufRecv[i] != '^') ip[i] = bufRecv[i]; else break; ip[i] = '\0'; int j; for (j=i+1;j<strlen(bufRecv);j++) port[j - i - 1] = bufRecv[j]; port[j - i - 1] = '\0'; oppositeSideAddr.sin_family = AF_INET; oppositeSideAddr.sin_port = htons(atoi(port)); oppositeSideAddr.sin_addr.s_addr = inet_addr(ip); unsigned long ul = 1; ioctlsocket(sockC, FIONBIO, (unsigned long*)&ul); while (1) { Sleep(1000); len = sendto(sockC,bufSend,sizeof(bufSend),0,(struct sockaddr*)&oppositeSideAddr,sizeof(oppositeSideAddr)); if (len == SOCKET_ERROR) { printf("while sending package to C1 , sendto() failed:%d\n", WSAGetLastError()); return -1; }else { printf("successfully send package to C1\n"); } len = recvfrom(sockC, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); if (len == WSAEWOULDBLOCK) { continue; }else { printf("C1 IP:[%s],PORT:[%d]\n",inet_ntoa(sourceAddr.sin_addr) ,ntohs(sourceAddr.sin_port)); printf("C1 says:%s\n",bufRecv); break; } } char buff[1024]={}; while(1) { memset(buff, 0, 1024); scanf("%s",buff); sendto(sockC,buff,sizeof(buff),0,(struct sockaddr*)&oppositeSideAddr,sizeof(oppositeSideAddr)); recvfrom(sockC, bufRecv, sizeof(bufRecv), 0,(struct sockaddr*)&sourceAddr,&sourceAddrLen); printf("%s\n\n",bufRecv); } closesocket(sockC); } ```
关于Mac下python pip版本问题以及pycharm安装python第三方库失败问题
我的电脑是mac 10.15版本 目前有两个python: 1. 系统自带Python 2.7.16 2. 自己安装python Python 3.7.3 在终端查询pip版本,结果是2.7的那个: pip 19.3.1 from /Library/Python/2.7/site-packages/pip (python 2.7) 查询pip3,结果显示错误: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 好像问题就是在这里,我在终端用 pip install 安装python第三方库的时候总会有问题,提示pip版本过低,我想更新pip又会失败;或者根本无法安装。 然后我就选择从pycharm上搜索第三方库并安装,奇怪的是有的库可以成功安装,有的库安装失败并提示说pip版本过低,让我尝试从终端安装,可是从终端安装的话又会遇到之前的问题。 请问这个该怎么解决?
C++嵌入Assembler(汇编)汇编内出错?
<!--blog--> <h4><b>我在C++中插入了汇编代码,但汇编代码老报错,不知什么原因。求各位大神帮助!</b></h4> 代码: ```C++ #include <iostream> using namespace std; int main(int argc,char *argv[]) { volatile int a[3] = {0,0,0}; for (int i = 0;i < 3;i ++) cout << a[i] << ends; cout << endl; asm ("inc [esp + 2]");//Assembler:inc [esp + 2] (++ a[1];) for (int i = 0;i < 3;i ++) cout << a[i] << ends; cout << endl; return 0; } ``` 报错信息: ```Message (File(C:\Users\ADMINI~1\AppData\Local\Temp\ccR9LmJd.s)) Assembler messages: (Line(42)) (File(C:\Users\ADMINI~1\AppData\Local\Temp\ccR9LmJd.s)) Error: invalid char '[' beginning operand 1 `[esp+2]' ``` 之后我想是不是这个汇编器不支持<c style="color:red;">Intel</c>,就把那一行汇编改成了<c style="color:red;">AT&T</c>格式的: ``` asm ("inc [esp + 2]");//Assembler:inc [esp + 2] (++ a[1];) ``` | | \/ ``` asm ("inc 2(%esp)");//Assembler:inc 2(%esp) (++ a[1];) ``` 但还是报错了: ``` (File(C:\Users\ADMINI~1\AppData\Local\Temp\ccEzueAV.s)) Assembler messages: (Line(42)) (File(C:\Users\ADMINI~1\AppData\Local\Temp\ccEzueAV.s)) Error: no instruction mnemonic suffix given and no register operands; can't size instruction ``` </h6><b><c style="color:green">本人对<cc style="color:red;">AT&T</cc>不熟悉,麻烦大家看看哪错了,致以感谢!</c></b></h6>
application/json, application/json问题
```javascipt axios({ method:'post', url: axios.defaults.baseURL + "/login", headers:{ 'Content-Type': 'application/json' }, data: { 'email': this.email, 'password': sha512(this.password), 'remember': this.autoLogin } ``` 代码是这样的,然后后台一直报错 ```java Invalid mime type "application/json, application/json": Invalid token character ',' in token "json, application/json"] ``` 后来 'Content-Type': 'application/json'后面加了个分号就好了,但是content type就成了这个 ``` Content-Type: application/json;, application/json ``` 太low了,不知道怎么解决了,搜也搜不到解决方案
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
此博客仅为我业余记录文章所用,发布到此,仅供网友阅读参考,如有侵权,请通知我,我会删掉。 补充 有不少读者留言说本文章没有用,因为天气预报直接打开手机就可以收到了,为何要多此一举发送到邮箱呢!!!那我在这里只能说:因为你没用,所以你没用!!! 这里主要介绍的是思路,不是天气预报!不是天气预报!!不是天气预报!!!天气预报只是用于举例。请各位不要再刚了!!! 下面是我会用到的两个场景: 每日下
Python 植物大战僵尸代码实现(2):植物卡片选择和种植
这篇文章要介绍的是: - 上方植物卡片栏的实现。 - 点击植物卡片,鼠标切换为植物图片。 - 鼠标移动时,判断当前在哪个方格中,并显示半透明的植物作为提示。
死磕YOLO系列,YOLOv1 的大脑、躯干和手脚
YOLO 是我非常喜欢的目标检测算法,堪称工业级的目标检测,能够达到实时的要求,它帮我解决了许多实际问题。 这就是 YOLO 的目标检测效果。它定位了图像中物体的位置,当然,也能预测物体的类别。 之前我有写博文介绍过它,但是每次重新读它的论文,我都有新的收获,为此我准备写一个系列的文章来详尽分析它。这是第一篇,从它的起始 YOLOv1 讲起。 YOLOv1 的论文地址:https://www.c
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
记一次腾讯面试:进程之间究竟有哪些通信方式?如何通信? ---- 告别死记硬背
有一次面试的时候,被问到进程之间有哪些通信方式,不过由于之前没深入思考且整理过,说的并不好。想必大家也都知道进程有哪些通信方式,可是我猜很多人都是靠着”背“来记忆的,所以今天的这篇文章,讲给大家详细着讲解他们是如何通信的,让大家尽量能够理解他们之间的区别、优缺点等,这样的话,以后面试官让你举例子,你也能够顺手拈来。 1、管道 我们来看一条 Linux 的语句 netstat -tulnp | gr...
20行Python代码爬取王者荣耀全英雄皮肤
引言 王者荣耀大家都玩过吧,没玩过的也应该听说过,作为时下最火的手机MOBA游戏,咳咳,好像跑题了。我们今天的重点是爬取王者荣耀所有英雄的所有皮肤,而且仅仅使用20行Python代码即可完成。 准备工作 爬取皮肤本身并不难,难点在于分析,我们首先得得到皮肤图片的url地址,话不多说,我们马上来到王者荣耀的官网: 我们点击英雄资料,然后随意地选择一位英雄,接着F12打开调试台,找到英雄原皮肤的图片
网络(8)-HTTP、Socket、TCP、UDP的区别和联系
TCP/IP协议是传输层协议,主要解决数据如何在网络中传输,而HTTP是应用层协议,主要解决如何包装数据。 一、TCP与UDP的不同 1. 是否需要建立连接。 UDP在传送数据之前不需要先建立连接;TCP则提供面向连接的服务; 2. 是否需要给出确认 对方的传输层在收到UDP报文后,不需要给出任何确认,而 TCP需要给出确认报文,要提供可靠的、面向连接的传输服务。 3.虽然UDP不提供可靠交...
简明易理解的@SpringBootApplication注解源码解析(包含面试提问)
欢迎关注文章系列 ,关注我 《提升能力,涨薪可待》 《面试知识,工作可待》 《实战演练,拒绝996》 欢迎关注我博客,原创技术文章第一时间推出 也欢迎关注公 众 号【Ccww笔记】,同时推出 如果此文对你有帮助、喜欢的话,那就点个赞呗,点个关注呗! 《提升能力,涨薪可待篇》- @SpringBootApplication注解源码解析 一、@SpringBootApplication 的作用是什
防劝退!数据结构和算法难理解?可视化动画带你轻松透彻理解!
大家好,我是 Rocky0429,一个连数据结构和算法都不会的蒟蒻… 学过数据结构和算法的都知道这玩意儿不好学,没学过的经常听到这样的说法还没学就觉得难,其实难吗?真难! 难在哪呢?当年我还是个小蒟蒻,初学数据结构和算法的时候,在忍着枯燥看完定义原理,之后想实现的时候,觉得它们的过程真的是七拐八绕,及其难受。 在简单的链表、栈和队列这些我还能靠着在草稿上写写画画理解过程,但是到了数论、图...
西游记团队中如果需要裁掉一个人,会先裁掉谁?
2019年互联网寒冬,大批企业开始裁员,下图是网上流传的一张截图: 裁员不可避免,那如何才能做到不管大环境如何变化,自身不受影响呢? 我们先来看一个有意思的故事,如果西游记取经团队需要裁员一名,会裁掉谁呢,为什么? 西游记团队组成: 1.唐僧 作为团队teamleader,有很坚韧的品性和极高的原则性,不达目的不罢休,遇到任何问题,都没有退缩过,又很得上司支持和赏识(直接得到唐太宗的任命,既给
开挂的人生!那些当选院士,又是ACM/IEEE 双料Fellow的华人学者们
昨日,2019年两院院士正式官宣,一时间抢占了各大媒体头条。 朋友圈也是一片沸腾,奔走相告,赶脚比自己中了大奖还嗨皮! 谁叫咱家导师就是这么厉害呢!!! 而就在最近,新一年度的IEEE/ACM Fellow也将正式公布。 作为学术届的顶级荣誉,不自然地就会将院士与Fellow作比较,到底哪个含金量更高呢? 学术君认为,同样是专业机构对学者的认可,考量标准不一,自然不能一概而论。 但...
聊聊C语言和指针的本质
坐着绿皮车上海到杭州,24块钱,很宽敞,在火车上非正式地聊几句。 很多编程语言都以 “没有指针” 作为自己的优势来宣传,然而,对于C语言,指针却是与生俱来的。 那么,什么是指针,为什么大家都想避开指针。 很简单, 指针就是地址,当一个地址作为一个变量存在时,它就被叫做指针,该变量的类型,自然就是指针类型。 指针的作用就是,给出一个指针,取出该指针指向地址处的值。为了理解本质,我们从计算机模型说起...
Python语言高频重点汇总
Python语言高频重点汇总 GitHub面试宝典仓库——点这里跳转 文章目录Python语言高频重点汇总**GitHub面试宝典仓库——点这里跳转**1. 函数-传参2. 元类3. @staticmethod和@classmethod两个装饰器4. 类属性和实例属性5. Python的自省6. 列表、集合、字典推导式7. Python中单下划线和双下划线8. 格式化字符串中的%和format9.
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观
代码详解:如何用Python快速制作美观、炫酷且有深度的图表
全文共12231字,预计学习时长35分钟生活阶梯(幸福指数)与人均GDP(金钱)正相关的正则图本文将探讨三种用Python可视化数据的不同方法。以可视化《2019年世界幸福报告》的数据为例,本文用Gapminder和Wikipedia的信息丰富了《世界幸福报告》数据,以探索新的数据关系和可视化方法。《世界幸福报告》试图回答世界范围内影响幸福的因素。报告根据对“坎特里尔阶梯问题”的回答来确定幸...
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外
(经验分享)作为一名普通本科计算机专业学生,我大学四年到底走了多少弯路
今年正式步入了大四,离毕业也只剩半年多的时间,回想一下大学四年,感觉自己走了不少弯路,今天就来分享一下自己大学的学习经历,也希望其他人能不要走我走错的路。 (一)初进校园 刚进入大学的时候自己完全就相信了高中老师的话:“进入大学你们就轻松了”。因此在大一的时候自己学习的激情早就被抛地一干二净,每天不是在寝室里玩游戏就是出门游玩,不过好在自己大学时买的第一台笔记本性能并不是很好,也没让我彻底沉...
如何写一篇技术博客,谈谈我的看法
前言 只有光头才能变强。 文本已收录至我的GitHub精选文章,欢迎Star:https://github.com/ZhongFuCheng3y/3y 我一直推崇学技术可以写技术博客去沉淀自己的知识,因为知识点实在是太多太多了,通过自己的博客可以帮助自己快速回顾自己学过的东西。 我最开始的时候也是只记笔记,认为自己能看得懂就好。但如果想验证自己是不是懂了,可以写成技术博客。在写技术博客的...
字节跳动面试官这样问消息队列:分布式事务、重复消费、顺序消费,我整理了一下
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
面试还搞不懂redis,快看看这40道面试题(含答案和思维导图)
Redis 面试题 1、什么是 Redis?. 2、Redis 的数据类型? 3、使用 Redis 有哪些好处? 4、Redis 相比 Memcached 有哪些优势? 5、Memcache 与 Redis 的区别都有哪些? 6、Redis 是单进程单线程的? 7、一个字符串类型的值能存储最大容量是多少? 8、Redis 的持久化机制是什么?各自的优缺点? 9、Redis 常见性...
大学四年自学走来,这些珍藏的「实用工具/学习网站」我全贡献出来了
知乎高赞:文中列举了互联网一线大厂程序员都在用的工具集合,涉及面非常广,小白和老手都可以进来看看,或许有新收获。
互联网公司的裁员,能玩出多少种花样?
裁员,也是一门学问,可谓博大精深!以下,是互联网公司的裁员的多种方法:-正文开始-135岁+不予续签的理由:千禧一代网感更强。95后不予通过试用期的理由:已婚已育员工更有责任心。2通知接下来要过苦日子,让一部分不肯同甘共苦的员工自己走人,以“兄弟”和“非兄弟”来区别员工。3强制996。员工如果平衡不了工作和家庭,可在离婚或离职里二选一。4不布置任何工作,但下班前必须提交千字工作日报。5不给活干+...
【设计模式】单例模式的八种写法分析
网上泛滥流传单例模式的写法种类,有说7种的,也有说6种的,当然也不排除说5种的,他们说的有错吗?其实没有对与错,刨根问底,写法终究是写法,其本质精髓大体一致!因此完全没必要去追究写法的多少,有这个时间还不如跟着宜春去网吧偷耳机、去田里抓青蛙得了,一天天的....
《面试宝典》:检验是否为合格的初中级程序员的面试知识点,你都知道了吗?查漏补缺
欢迎关注文章系列,一起学习 《提升能力,涨薪可待篇》 《面试知识,工作可待篇》 《实战演练,拒绝996篇》 也欢迎关注公 众 号【Ccww笔记】,原创技术文章第一时间推出 如果此文对你有帮助、喜欢的话,那就点个赞呗,点个关注呗! 《面试知识,工作可待篇》-Java笔试面试基础知识大全 前言 是不是感觉找工作面试是那么难呢? 在找工作面试应在学习的基础进行总结面试知识点,工作也指日可待,欢...
关于研发效能提升的思考
研发效能提升是最近比较热门的一个话题,本人根据这几年的工作心得,做了一些思考总结,由于个人深度有限,暂且抛转引入。 三要素 任何生产力的提升都离不开这三个因素:人、流程和工具,少了其中任何一个因素都无法实现。 人,即思想,也就是古人说的“道”,道不同不相为谋,是制高点,也是高层建筑的基石。 流程,即方法,也是古人说的“法”。研发效能的提升,也就是要提高投入产出比,既要增加产出,也要减...
微博推荐算法简述
在介绍微博推荐算法之前,我们先聊一聊推荐系统和推荐算法。有这样一些问题:推荐系统适用哪些场景?用来解决什么问题、具有怎样的价值?效果如何衡量? 推荐系统诞生很早,但真正被大家所重视,缘起于以”facebook”为代表的社会化网络的兴起和以“淘宝“为代表的电商的繁荣,”选择“的时代已经来临,信息和物品的极大丰富,让用户如浩瀚宇宙中的小点,无所适从。推荐系统迎来爆发的机会,变得离用户更近: 快...
GitHub 标星 1.6w+,我发现了一个宝藏项目,作为编程新手有福了!
大家好,我是 Rocky0429,一个最近老在 GitHub 上闲逛的蒟蒻… 特别惭愧的是,虽然我很早就知道 GitHub,但是学会逛 GitHub 的时间特别晚。当时一方面是因为菜,看着这种全是英文的东西难受,不知道该怎么去玩,另一方面是一直在搞 ACM,没有做一些工程类的项目,所以想当然的以为和 GitHub 也没什么关系(当然这种想法是错误的)。 后来自己花了一个星期看完了 Pyt...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
相关热词 c#如何定义数组列表 c#倒序读取txt文件 java代码生成c# c# tcp发送数据 c#解决时间格式带星期 c#类似hashmap c#设置istbox的值 c#获取多线程返回值 c# 包含数字 枚举 c# timespan
立即提问