项目发布到was上 登录监听的时候 没有获取到 request.getServletPath()取值 该怎么解决? 10C

图片说明代码是这样

            但是项目放到websphere   没获取到访问路径

            放在本地weblogic上 是能获取到登录地址的

1个回答

https://www.ktanx.com/blog/p/3551
希望对你有帮助

xhd1611
神奇两点半 试了 但是我修改了web.xml 里面路径 还是同样的问题
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
将项目发布到was上 发现监听过滤的时候 request.getServletPath()为空 请问是什么问题引起的?

![图片说明](https://img-ask.csdn.net/upload/201811/01/1541057958_622719.png)本地获取的是正常的 !本地用的weblogic 部署的 ![图片说明](https://img-ask.csdn.net/upload/201811/01/1541057997_214386.png) 部署到was上 服务器上获取就是少了index.jsp ![图片说明](https://img-ask.csdn.net/upload/201811/06/1541511233_445238.png) 这是我配置 ![图片说明](https://img-ask.csdn.net/upload/201811/06/1541511319_118338.png) 这是我的目录树 感谢大神的提点

Php-fpm不会监听端口

<div class="post-text" itemprop="text"> <p>I have been trying to get php-fpm (w nginx) to work with the default port(9000) and it just does not work.I am trying to use php 7.1 (also tried 7.0 and 5.6). The service started fine and I can also see the port open and being listened in ss/netstat. There are no errors in the php-fpm log. Initially I thought it could be an nginx issue, But when I try to test the connection directly using cgi-fcgi -bind -connect 127.0.0.1:9000 it just does not respond and I eventually get a could not connect error. The request doesnot get logged in the access log (when access log enabled).</p> <pre><code> # cgi-fcgi -bind -connect 127.0.0.1:9000 Could not connect to 127.0.0.1:9000 </code></pre> <p>And some times after a restart it just randomly works for a few requests (sometimes 1 request, sometimes 10, varies) and then it just stops working again. The request count in the php-fpm status no longer increases. There is no rhyme or rythm to its behaviour and I could not find a consistent way to get it to work even for those few requests.<br> The issue has been haunting me for 2 days now and its soo inconsistent with nothing in logs. Please help. Thanks for the replies in advance.</p> <p><br> <br> <strong>What I tried so far -</strong> </p> <ol> <li>Tested with nginx to make sure that its not <em>cgi-fcgi</em> issue. Same problem in nginx too could not connect to upstream.</li> <li>Setting the php-fpm log level to debug to see if something pops up. Nothing out of the ordinary found.</li> <li>Enabling access log to see if the request atleast reaches php-fpm. <em>No entry in the access log for the failed requests.</em></li> <li>Changed <em>listen</em> value to 9000 and 0.0.0.0:9000 and the external_ip:9000. All of these changes didnot change the behaviour.</li> <li>Changed to other ports to ensure its not the port number being in use.</li> <li>Increased and decreased <em>pm.start_servers</em> along with other related values to check if its processes running out. Didnot effect, infact all process just idle all the time.</li> <li>Removing and re installing php-fpm</li> <li>Resetting the config to ensure its not a config issue</li> <li>Installing php-fpm from remi repo instead of webstatic repo to ensure its not a bad build</li> <li>Downgrading to php 7.0</li> <li>Stopping all other services to make sure there are no conflicts or alike</li> <li>Change listen.allowed_clients to 'any' to make sure that its not the client being rejected</li> <li>Nuked the server and reinstalled the OS itself to ensure that its not an OS issue after trying multiple things for 2 days straight. (Empty server with no data)</li> <li>It does work absolutely fine with a unix socket instead of port. But a socket will not work for the requirement as if it needs to get anything more than a 100 rows from mysql, I noticed it to just timeout (&gt; 30s) in socket mode.</li> </ol> <p><br> <br></p> <p><strong>Information &amp; Config Below</strong></p> <p>Operating System - CentOS 7</p> <p>PHP-FPM Service status</p> <pre><code> #service php-fpm status Redirecting to /bin/systemctl status php-fpm.service * php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled) Active: active (running) since Sun 2017-04-16 17:12:06 EDT; 14s ago Main PID: 2392 (php-fpm) Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec" CGroup: /system.slice/php-fpm.service |-2392 php-fpm: master process (/etc/php-fpm.conf) |-2393 php-fpm: pool www |-2394 php-fpm: pool www |-2395 php-fpm: pool www |-2396 php-fpm: pool www `-2397 php-fpm: pool www Apr 16 17:12:06 2740.servermania.com systemd[1]: Starting The PHP FastCGI Pr.... Apr 16 17:12:06 2740.servermania.com systemd[1]: Started The PHP FastCGI Pro.... Hint: Some lines were ellipsized, use -l to show in full. </code></pre> <p>Socketstat / netstat . (Last one is php-fpm)</p> <pre><code> # ss -tapn State Recv-Q Send-Q Local Address:Port Peer Address:Port Cannot open netlink socket: Protocol not supported LISTEN 0 0 *:111 *:* users:(("rpcbind",pid=1588,fd=4),("systemd",pid=1,fd=42)) LISTEN 0 0 *:80 *:* users:(("httpd",pid=1871,fd=3),("httpd",pid=1870,fd=3)) LISTEN 0 0 *:22 *:* users:(("sshd",pid=1512,fd=3)) LISTEN 0 0 127.0.0.1:25 *:* users:(("sendmail",pid=416,fd=4)) LISTEN 0 0 127.0.0.1:9000 *:* users:(("php-fpm",pid=2397,fd=0),("php-fpm",pid=2396,fd=0),("php-fpm",pid=2395,fd=0),("php-fpm",pid=2394,fd=0),("php-fpm",pid=2393,fd=0),("php-fpm",pid=2392,fd=6)) </code></pre> <p>The default php-fpm config I am currently trying to get to work.( My config is not working, hence trying to get it to work atleast in default). </p><pre><code>; Start a new pool named 'www'. [www] <pre><code>; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. ; RPM: apache Choosed to be able to access some dir as httpd user = apache ; RPM: Keep a group allowed to write in log dir. group = apache ; The address on which to accept FastCGI requests. ; Valid syntaxes are: ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on ; a specific port; ; 'port' - to listen on a TCP socket to all addresses ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. listen = 127.0.0.1:9000 ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) ;listen.backlog = 511 ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many ; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ; mode is set to 0660 ;listen.owner = nobody ;listen.group = nobody ;listen.mode = 0660 ; When POSIX Access Control Lists are supported you can set them using ; these options, value is a comma separated list of user/group names. ; When set, listen.owner and listen.group are ignored ;listen.acl_users = ;listen.acl_groups = ; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address ; must be separated by a comma. If this value is left blank, connections will be ; accepted from any ip address. ; Default Value: any listen.allowed_clients = any ; Specify the nice(2) priority to apply to the pool processes (only if set) ; The value can vary from -19 (highest priority) to 20 (lower priority) ; Note: - It will only work if the FPM master process is launched as root ; - The pool processes will inherit the master process priority ; unless it specified otherwise ; Default Value: no set ; process.priority = -19 ; Choose how the process manager will control the number of child processes. ; Possible Values: ; static - a fixed number (pm.max_children) of child processes; ; dynamic - the number of child processes are set dynamically based on the ; following directives. With this process management, there will be ; always at least 1 children. ; pm.max_children - the maximum number of children that can ; be alive at the same time. ; pm.start_servers - the number of children created on startup. ; pm.min_spare_servers - the minimum number of children in 'idle' ; state (waiting to process). If the number ; of 'idle' processes is less than this ; number then some children will be created. ; pm.max_spare_servers - the maximum number of children in 'idle' ; state (waiting to process). If the number ; of 'idle' processes is greater than this ; number then some children will be killed. ; ondemand - no children are created at startup. Children will be forked when ; new requests will connect. The following parameter are used: ; pm.max_children - the maximum number of children that ; can be alive at the same time. ; pm.process_idle_timeout - The number of seconds after which ; an idle process will be killed. ; Note: This value is mandatory. pm = dynamic ; The number of child processes to be created when pm is set to 'static' and the ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP ; CGI. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. pm.max_children = 50 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 pm.start_servers = 5 ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' pm.min_spare_servers = 5 ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' pm.max_spare_servers = 35 ; The number of seconds after which an idle process will be killed. ; Note: Used only when pm is set to 'ondemand' ; Default Value: 10s ;pm.process_idle_timeout = 10s; ; The number of requests each child process should execute before respawning. ; This can be useful to work around memory leaks in 3rd party libraries. For ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. ; Default Value: 0 ;pm.max_requests = 500 ; The URI to view the FPM status page. If this value is not set, no URI will be ; recognized as a status page. It shows the following informations: ; pool - the name of the pool; ; process manager - static, dynamic or ondemand; ; start time - the date and time FPM has started; ; start since - number of seconds since FPM has started; ; accepted conn - the number of request accepted by the pool; ; listen queue - the number of request in the queue of pending ; connections (see backlog in listen(2)); ; max listen queue - the maximum number of requests in the queue ; of pending connections since FPM has started; ; listen queue len - the size of the socket queue of pending connections; ; idle processes - the number of idle processes; ; active processes - the number of active processes; ; total processes - the number of idle + active processes; ; max active processes - the maximum number of active processes since FPM ; has started; ; max children reached - number of times, the process limit has been reached, ; when pm tries to start more children (works only for ; pm 'dynamic' and 'ondemand'); ; Value are updated in real time. ; Example output: ; pool: www ; process manager: static ; start time: 01/Jul/2011:17:53:49 +0200 ; start since: 62636 ; accepted conn: 190460 ; listen queue: 0 ; max listen queue: 1 ; listen queue len: 42 ; idle processes: 4 ; active processes: 11 ; total processes: 15 ; max active processes: 12 ; max children reached: 0 ; ; By default the status page output is formatted as text/plain. Passing either ; 'html', 'xml' or 'json' in the query string will return the corresponding ; output syntax. Example: ; http://www.foo.bar/status ; http://www.foo.bar/status?json ; http://www.foo.bar/status?html ; http://www.foo.bar/status?xml ; ; By default the status page only outputs short status. Passing 'full' in the ; query string will also return status for each pool process. ; Example: ; http://www.foo.bar/status?full ; http://www.foo.bar/status?json&amp;full ; http://www.foo.bar/status?html&amp;full ; http://www.foo.bar/status?xml&amp;full ; The Full status returns for each process: ; pid - the PID of the process; ; state - the state of the process (Idle, Running, ...); ; start time - the date and time the process has started; ; start since - the number of seconds since the process has started; ; requests - the number of requests the process has served; ; request duration - the duration in 袖s of the requests; ; request method - the request method (GET, POST, ...); ; request URI - the request URI with the query string; ; content length - the content length of the request (only with POST); ; user - the user (PHP_AUTH_USER) (or '-' if not set); ; script - the main script called (or '-' if not set); ; last request cpu - the %cpu the last request consumed ; it's always 0 if the process is not in Idle state ; because CPU calculation is done when the request ; processing has terminated; ; last request memory - the max amount of memory the last request consumed ; it's always 0 if the process is not in Idle state ; because memory calculation is done when the request ; processing has terminated; ; If the process is in Idle state, then informations are related to the ; last request the process has served. Otherwise informations are related to ; the current request being served. ; Example output: ; ************************ ; pid: 31330 ; state: Running ; start time: 01/Jul/2011:17:53:49 +0200 ; start since: 63087 ; requests: 12808 ; request duration: 1250261 ; request method: GET ; request URI: /test_mem.php?N=10000 ; content length: 0 ; user: - ; script: /home/fat/web/docs/php/test_mem.php ; last request cpu: 0.00 ; last request memory: 0 ; ; Note: There is a real-time FPM status monitoring sample web page available ; It's available in: @EXPANDED_DATADIR@/fpm/status.html ; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it ; may conflict with a real PHP file. ; Default Value: not set pm.status_path = /status ; The ping URI to call the monitoring page of FPM. If this value is not set, no ; URI will be recognized as a ping page. This could be used to test from outside ; that FPM is alive and responding, or to ; - create a graph of FPM availability (rrd or such); ; - remove a server from a group if it is not responding (load balancing); ; - trigger alerts for the operating team (24/7). ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it ; may conflict with a real PHP file. ; Default Value: not set ping.path = /ping ; This directive may be used to customize the response of a ping request. The ; response is formatted as text/plain with a 200 response code. ; Default Value: pong ;ping.response = pong ; The access log file ; Default: not set access.log = /var/log/php-fpm/access.log ; The access log format. ; The following syntax is allowed ; %%: the '%' character ; %C: %CPU used by the request ; it can accept the following format: ; - %{user}C for user CPU only ; - %{system}C for system CPU only ; - %{total}C for user + system CPU (default) ; %d: time taken to serve the request ; it can accept the following format: ; - %{seconds}d (default) ; - %{miliseconds}d ; - %{mili}d ; - %{microseconds}d ; - %{micro}d ; %e: an environment variable (same as $_ENV or $_SERVER) ; it must be associated with embraces to specify the name of the env ; variable. Some exemples: ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e ; %f: script filename ; %l: content-length of the request (for POST request only) ; %m: request method ; %M: peak of memory allocated by PHP ; it can accept the following format: ; - %{bytes}M (default) ; - %{kilobytes}M ; - %{kilo}M ; - %{megabytes}M ; - %{mega}M ; %n: pool name ; %o: output header ; it must be associated with embraces to specify the name of the header: ; - %{Content-Type}o ; - %{X-Powered-By}o ; - %{Transfert-Encoding}o ; - .... ; %p: PID of the child that serviced the request ; %P: PID of the parent of the child that serviced the request ; %q: the query string ; %Q: the '?' character if query string exists ; %r: the request URI (without the query string, see %q and %Q) ; %R: remote IP address ; %s: status (response code) ; %t: server time the request was received ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) ; The strftime(3) format must be encapsuled in a %{&lt;strftime_format&gt;}t tag ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %T: time the log has been written (the request has finished) ; it can accept a strftime(3) format: ; %d/%b/%Y:%H:%M:%S %z (default) ; The strftime(3) format must be encapsuled in a %{&lt;strftime_format&gt;}t tag ; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t ; %u: remote user ; ; Default: "%R - %u %t \"%m %r\" %s" ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" ; The log file for slow requests ; Default Value: not set ; Note: slowlog is mandatory if request_slowlog_timeout is set slowlog = /var/log/php-fpm/www-slow.log ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 ;request_slowlog_timeout = 0 ; The timeout for serving a single request after which the worker process will ; be killed. This option should be used when the 'max_execution_time' ini option ; does not stop script execution for some reason. A value of '0' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 ;request_terminate_timeout = 0 ; Set open file descriptor rlimit. ; Default Value: system defined value ;rlimit_files = 1024 ; Set max core size rlimit. ; Possible Values: 'unlimited' or an integer greater or equal to 0 ; Default Value: system defined value ;rlimit_core = 0 ; Chroot to this directory at the start. This value must be defined as an ; absolute path. When this value is not set, chroot is not used. ; Note: chrooting is a great security feature and should be used whenever ; possible. However, all PHP paths will be relative to the chroot ; (error_log, sessions.save_path, ...). ; Default Value: not set ;chroot = ; Chdir to this directory at the start. ; Note: relative path can be used. ; Default Value: current directory or / when chroot ;chdir = /var/www ; Redirect worker stdout and stderr into main error log. If not set, stdout and ; stderr will be redirected to /dev/null according to FastCGI specs. ; Note: on highloaded environement, this can cause some delay in the page ; process time (several ms). ; Default Value: no ;catch_workers_output = yes ; Clear environment in FPM workers ; Prevents arbitrary environment variables from reaching FPM worker processes ; by clearing the environment in workers before env vars specified in this ; pool configuration are added. ; Setting to "no" will make all environment variables available to PHP code ; via getenv(), $_ENV and $_SERVER. ; Default Value: yes ;clear_env = no ; Limits the extensions of the main script FPM will allow to parse. This can ; prevent configuration mistakes on the web server side. You should only limit ; FPM to .php extensions to prevent malicious users to use other extensions to ; exectute php code. ; Note: set an empty value to allow all extensions. ; Default Value: .php ;security.limit_extensions = .php .php3 .php4 .php5 .php7 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env ;env[HOSTNAME] = $HOSTNAME ;env[PATH] = /usr/local/bin:/usr/bin:/bin ;env[TMP] = /tmp ;env[TMPDIR] = /tmp ;env[TEMP] = /tmp ; Additional php.ini defines, specific to this pool of workers. These settings ; overwrite the values previously defined in the php.ini. The directives are the ; same as the PHP SAPI: ; php_value/php_flag - you can set classic ini defines which can ; be overwritten from PHP call 'ini_set'. ; php_admin_value/php_admin_flag - these directives won't be overwritten by ; PHP call 'ini_set' ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. ; Defining 'extension' will load the corresponding shared extension from ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not ; overwrite previously defined php.ini values, but will append the new value ; instead. ; Default Value: nothing is defined by default except the values in php.ini and ; specified at startup with the -d argument ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com ;php_flag[display_errors] = off php_admin_value[error_log] = /var/log/php-fpm/www-error.log php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 128M ; Set session path to a directory owned by process user php_value[session.save_handler] = files php_value[session.save_path] = /var/lib/php/session php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache </code></pre> <p></p></code></pre> <p>PHP-FPM Error log</p> <pre><code> [16-Apr-2017 17:12:06] NOTICE: fpm is running, pid 2392 [16-Apr-2017 17:12:06] NOTICE: ready to handle connections [16-Apr-2017 17:12:06] NOTICE: systemd monitor interval set to 10000ms </code></pre> <p>Telnet output</p> <pre><code> # telnet 127.0.0.1 9000 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection timed out </code></pre> </div>

如何让XAMPP Apache监听多个网络端口?

<div class="post-text" itemprop="text"> <p>I have xampp apache on my laptop. I have written an Android app and was able to run PHP script from the app using <a href="https://stackoverflow.com/questions/24466389/not-able-to-connect-android-app-running-on-phone-with-localhost">this</a></p> <p>Now I'd like apache to control request from different PORTs ; for instance right now, my Apache's (http-conf file) listens to 192.168.1.40:8011 for my PHP scripts (located in htdocs xampp folder). </p> <p>I'd like Apache to also listen to another port on behalf of another server (Geoserver) lets say for instance 192.168.1.40:8012.</p> <p>That way, it will direct my PHP request to xampp htdocs PHP scripts and direct my Geoserver WMS request to 192.168.1.40:8012/geoserver/Projet_NAME/wms</p> <p>Could you help me do that ?</p> </div>

Golang如何停止继续发出的Http请求

<div class="post-text" itemprop="text"> <p>I was doing some load testing earlier today and found something peculiar, sometimes an Http request doesn't not die and keeps on firing . How can I correct that in my Golang code for instance see the image below . I am load testing loading 1,000 HTTP request but if you notice on the 1,000th request below it takes 392,999 milliseconds or <strong>392 seconds</strong> while the rest of the request takes <strong>2.2 seconds</strong> on average . I have done the test multiple times and sometimes it hangs . This is my code</p> <pre><code>func Home_streams(w http.ResponseWriter, r *http.Request) { var result string r.ParseForm() wg := sync.WaitGroup{} wg.Add(1) go func() { defer wg.Done() db.QueryRow("select json_build_object('Locations', array_to_json(array_agg(t))) from (SELECT latitudes,county,longitudes,"+ "statelong,thirtylatmin,thirtylatmax,thirtylonmin,thirtylonmax,city"+ " FROM zips where city='Orlando' ORDER BY city limit 5) t").Scan(&amp;result) }() wg.Wait() fmt.Fprintf(w,result) } </code></pre> <p>and I connect to the database with this code</p> <pre><code>func init() { var err error db, err = sql.Open("postgres","Postgres Connection String") if err != nil { log.Fatal("Invalid DB config:", err) } if err = db.Ping(); err != nil { log.Fatal("DB unreachable:", err) } } </code></pre> <p>I would say that about 10 % of the time I load test this issue happens and the only way it stops is if I stop the requests manually otherwise it keeps on going indefinitely . I wonder if maybe this issue is addressed here <a href="https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779#.83uzpsp24" rel="nofollow noreferrer">https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779#.83uzpsp24</a> I am still learning my way around Golang . <a href="https://i.stack.imgur.com/DiJND.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DiJND.png" alt="enter image description here"></a></p> </div>

使用JS连接状态的WebSockets

<div class="post-text" itemprop="text"> <p>I use Ratchet PHP websockets lib. When using terminal (telnet) it works on all ports I choose and setup. Have tried localhost, 127.0.0.1, and websockets.test When I use JS it's only in connection mode, and then fails.</p> <p>When connecting via telnet, all messages gets prompted. But not JS.</p> <p>Error message after a good while of waiting:</p> <pre><code>WebSocket connection to 'ws://localhost:8002/' failed: WebSocket opening handshake timed out </code></pre> <p>And the code I use to connect:</p> <pre><code>var host = "ws://localhost:8002"; try { var socket = new WebSocket(host); alert('WebSocket - status ' + socket.readyState); socket.onopen = function (msg) { alert('open'); alert("Welcome - status " + this.readyState); if (this.readyState != 1) { reconnect(); } }; socket.onmessage = function (msg) { alert("Received: " + msg.data); }; socket.onclose = function (msg) { alert("Disconnected - status " + this.readyState); }; } catch (ex) { alert(ex); } $("msg").focus(); </code></pre> </div>

Golang WebSocket客户端,获取结果后关闭连接

<div class="post-text" itemprop="text"> <p>How I can implement this kind of scenario:</p> <p>1.I have LoginHandler which receives some user data - email and signedXml:</p> <pre><code>func LoginHandler(c *gin.Context) { var ( err error data LoginPost ) if err = c.BindJSON(&amp;data); err != nil { c.JSON(http.StatusBadRequest, gin.H{"status": "error"}) return } ... c.JSON(http.StatusOK, gin.H{"status": "ok"}) } </code></pre> <p>2.I need to send signedXml to another server via websocket</p> <p>3.Save result (success or error)</p> <p>4.Close connection</p> <p>Every HTTP request will open connection, send 1 message, get 1 result and finally close socket. I was trying with channel, but no success. Is this possible to implement my case?</p> <p><strong>UPDATE</strong></p> <pre><code>package main import ( "log" "net/url" "github.com/gorilla/mux" "github.com/gorilla/websocket" "net/http" ) func indexHandler(w http.ResponseWriter, r *http.Request) { message := r.FormValue("message") w.Write([]byte(message)) } func postHandler(w http.ResponseWriter, r *http.Request) { var ( message = r.FormValue("message") u = url.URL{Scheme: "ws", Host: "echo.websocket.org", Path: "/"} err error out []byte conn *websocket.Conn ) log.Printf("message: %s ", message) log.Printf("connecting to %s ", u.String()) conn, _, err = websocket.DefaultDialer.Dial(u.String(), nil) if err != nil { log.Fatal("dial:", err) } log.Println("write") if err = conn.WriteMessage(websocket.TextMessage, []byte(message)); err != nil { log.Fatal("write:", err) } log.Println("read") if _, out, err = conn.ReadMessage(); err != nil { log.Fatal("read:", err) } w.Write(out) log.Println("close") conn.Close() } func main() { r := mux.NewRouter() r.HandleFunc("/", indexHandler).Methods("GET") r.HandleFunc("/post", postHandler).Methods("POST") http.Handle("/", r) http.ListenAndServe(":8080", nil) } </code></pre> </div>

提交没有页面重定向

<div class="post-text" itemprop="text"> <p>I want without page redirect when user click submit button.<br> Here I was posting only <code>userid</code>. I want to post <code>password</code> too.</p> <p>This is my HTML text area and button:</p> <pre><code>&lt;input type="text" name="user" id="user" value="" placeholder="Mail-Id"&gt;&lt;br&gt; &lt;input type="text" name="userp" id="userp" value="" placeholder="Password"&gt;&lt;br&gt; &lt;input type="button" name="checkuser" id="checkuser" value="Validated" onclick="test();"&gt; &lt;script&gt; function test() { var username = document.getElementById('user').value; var url = "login.php?user="+username; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var result = xmlhttp.responseText; if(xmlhttp.responseText!='') { document.getElementById('use`enter code here`r_status').innerHTML =result ; } } xmlhttp.open("GET",url,true); xmlhttp.send(); } &lt;/script&gt; </code></pre> <pre class="lang-php prettyprint-override"><code>&lt;?php include_once('B810.php'); $Email = $_REQUEST['user']; //$password = $_REQUEST['userp']; $Q810_1 = "SELECT SIGNUP.EMAIL,SIGNUP.PWD FROM SIGNUP WHERE SIGNUP.EMAIL='".$Email."'"; // AND SIGNUP.PWD='".$password."' "; $R810_1 = mysql_query($Q810_1); $O810 = mysql_fetch_assoc($R810_1); if (($O810)) { echo 'success'; // header("Attendance.html"); // exit(); } else echo 'failure'; } //mysqli_close($con); ?&gt; </code></pre> </div>

js用post上传数据到服务器,responseText返回错误

我的index.js代码是这样的: 目的是将一个随机数字符串上传到服务器上,然后console.log服务器的返回值。 ``` var randomNum = Math.floor(Math.random() * 5).toString(); console.log(randomNum); var xhr = new XMLHttpRequest(); //创建XHR对象 xhr.open("post","helloWorld.js"); xhr.onreadystatechange = function() { if(xhr.readyState == 4) { if((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) { console.log("ok:"+xhr.status); console.log(xhr.responseText); }else { alert("Request was unsuccessful:" + xhr.status); } } //if }; xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); xhr.send(randomNum); ``` 然后我的运行在服务器上的node.js代码名为helloWorld.js是这样的: 目的是接收浏览器传来的随机数,然后返回“ok” ``` //引入模块 var http = require("http"); var url = require("url"); var querystring = require("querystring"); console.log("!!!"); //创建服务器 var server = http.createServer( function(request, response) { console.log("?????"); console.log(request); var getData = ""; request.on("data", function(chunk){ getData += chunk;}); console.log(getData); //response.writeHeader(200,{"Content-Type":"text/javascript;charset=UTF-8"}); response.write("ok"); response.end(); }); //设置监听窗口 server.listen(3333,function(){ console.log("Server running..."); }); ``` 当我打开网站的时候: 1.chorme的控制台输出如下: 第一行是我产生的随机数 第二行是console.log("ok:"+xhr.status);的输出 第三行是console.log(xhr.responseText);的输出,问题出在这里,没有返回“ok”,而是显示了服务器上的文件helloWorld.js的代码,这是为什么呢?如何显示正确的结果“ok”? ![图片说明](https://img-ask.csdn.net/upload/201805/05/1525513748_190263.png) 2.云服务器的控制台输出的结果如下: 这里甚至没有输出“????”,这个我也不知道是为什么。 ![图片说明](https://img-ask.csdn.net/upload/201805/05/1525513777_152081.png) 请求指教!十分感谢!

eXosip创建会话过程中接受到的事件的tid问题

刚开始学习eXosip,编译了网上一个大牛的代码,发现了一个问题。当UAC发送INVITE后,UAS收到后回发一个Ringing,他们的tid都为一,但是如果我把UAS关闭后再打开,UAC发送INVITE,UAS的tid为1,但是UAC收到的tid是2,这是为什么呢? UAS代码: # include <eXosip2/eXosip.h> # include <stdio.h> # include <stdlib.h> # include <Winsock2.h> int main (int argc, char *argv[]) { eXosip_event_t *je = NULL; osip_message_t *ack = NULL; osip_message_t *invite = NULL; osip_message_t *answer = NULL; sdp_message_t *remote_sdp = NULL; int call_id, dialog_id; int i,j; int id; char *sour_call = "sip:140@127.0.0.1"; char *dest_call = "sip:133@127.0.0.1:15060";//client ip char command; char tmp[4096]; int pos = 0; //初始化sip i = eXosip_init (); if (i != 0) { printf ("Can't initialize eXosip!\n"); return -1; } else { printf ("eXosip_init successfully!\n"); } i = eXosip_listen_addr (IPPROTO_UDP, NULL, 15061, AF_INET, 0); if (i != 0) { eXosip_quit (); fprintf (stderr, "eXosip_listen_addr error!\nCouldn't initialize transport layer!\n"); } for(;;) { //侦听是否有消息到来 je = eXosip_event_wait (0,50); //协议栈带有此语句,具体作用未知 eXosip_lock (); eXosip_default_action (je); //printf("call_id is %d,dialog_id is %d \n", je->cid, je->did); eXosip_automatic_refresh (); eXosip_unlock (); if (je == NULL)//没有接收到消息 continue; // printf ("the cid is %s, did is %s/n", je->did, je->cid); switch (je->type) { case EXOSIP_MESSAGE_NEW://新的消息到来 printf (" EXOSIP_MESSAGE_NEW!\n"); if (MSG_IS_MESSAGE (je->request))//如果接受到的消息类型是MESSAGE { { osip_body_t *body; osip_message_get_body (je->request, 0, &body); printf ("I get the msg is: %s\n", body->body); printf ("the cid is %s, did is %s/n", je->did, je->cid); } //按照规则,需要回复OK信息 eXosip_message_build_answer (je->tid, 200,&answer); eXosip_message_send_answer (je->tid, 200,answer); } break; case EXOSIP_CALL_INVITE: //得到接收到消息的具体信息 printf ("Received a INVITE msg from %s:%s, UserName is %s, password is %s\n",je->request->req_uri->host, je->request->req_uri->port, je->request->req_uri->username, je->request->req_uri->password); //得到消息体,认为该消息就是SDP格式. remote_sdp = eXosip_get_remote_sdp (je->did); call_id = je->cid; dialog_id = je->did; printf("call_id is %d,dialog_id is %d \n", je->cid, je->did); eXosip_lock (); eXosip_call_send_answer (je->tid, 180, NULL); printf("je->tid is %d \n",je->tid); i = eXosip_call_build_answer (je->tid, 200, &answer); printf("je->tid is %d \n", je->tid); if (i != 0) { printf ("This request msg is invalid!Cann't response!\n"); eXosip_call_send_answer (je->tid, 400, NULL); } else { _snprintf_s (tmp, 4096, "v=0\r\n" "o=anonymous 0 0 IN IP4 0.0.0.0\r\n" "t=1 10\r\n" "a=username:rainfish\r\n" "a=password:123\r\n"); //设置回复的SDP消息体,下一步计划分析消息体 //没有分析消息体,直接回复原来的消息,这一块做的不好。 osip_message_set_body (answer, tmp, strlen(tmp)); osip_message_set_content_type (answer, "application/sdp"); eXosip_call_send_answer (je->tid, 200, answer); printf ("send 200 over!\n"); } eXosip_unlock (); //显示出在sdp消息体中的attribute 的内容,里面计划存放我们的信息 printf ("the INFO is :\n"); while (!osip_list_eol ( &(remote_sdp->a_attributes), pos)) { sdp_attribute_t *at; at = (sdp_attribute_t *) osip_list_get ( &remote_sdp->a_attributes, pos); printf ("%s : %s\n", at->a_att_field, at->a_att_value);//这里解释了为什么在SDP消息体中属性a里面存放必须是两列 pos ++; } break; case EXOSIP_CALL_ACK: printf ("ACK recieved!\n"); //printf ("the cid is %s, did is %s/n", je->did, je->cid); break; case EXOSIP_CALL_CLOSED: printf ("the remote hold the session!\n"); // eXosip_call_build_ack(dialog_id, &ack); //eXosip_call_send_ack(dialog_id, ack); i = eXosip_call_build_answer (je->tid, 200, &answer); if (i != 0) { printf ("This request msg is invalid!Cann't response!\n"); eXosip_call_send_answer (je->tid, 400, NULL); } else { eXosip_call_send_answer (je->tid, 200, answer); printf ("bye send 200 over!\n"); } break; case EXOSIP_CALL_MESSAGE_NEW://至于该类型和EXOSIP_MESSAGE_NEW的区别,源代码这么解释的 /* // request related events within calls (except INVITE) EXOSIP_CALL_MESSAGE_NEW, < announce new incoming request. // response received for request outside calls EXOSIP_MESSAGE_NEW, < announce new incoming request. 我也不是很明白,理解是:EXOSIP_CALL_MESSAGE_NEW是一个呼叫中的新的消息到来,比如ring trying都算,所以在接受到后必须判断 该消息类型,EXOSIP_MESSAGE_NEW而是表示不是呼叫内的消息到来。 该解释有不妥地方,仅供参考。 */ printf(" EXOSIP_CALL_MESSAGE_NEW\n"); if (MSG_IS_INFO(je->request) ) //如果传输的是INFO方法 { eXosip_lock (); i = eXosip_call_build_answer (je->tid, 200, &answer); if (i == 0) { eXosip_call_send_answer (je->tid, 200, answer); } eXosip_unlock (); { osip_body_t *body; osip_message_get_body (je->request, 0, &body); printf ("the body is %s\n", body->body); } } break; default: printf ("Could not parse the msg!\n"); } } } UAC的代码: #include <eXosip2/eXosip.h> #include <stdio.h> #include <stdlib.h> #include <winsock2.h> int main(int argc, char *argv[]) { struct eXosip_t *context_eXosip; eXosip_event_t *je; osip_message_t *reg = NULL; osip_message_t *invite = NULL; osip_message_t *ack = NULL; osip_message_t *info = NULL; osip_message_t *message = NULL; int call_id, dialog_id; int i, flag; int flag1 = 1; char *source_call = "sip:140@127.0.0.1";//UAC1,端口是15060 char *dest_call = "sip:133@127.0.0.1:15061";//UAS,端口是15061 //在这个例子中,uac和uas通信,则source就是自己的地址,而目的地址就是uac1的地址 char command; char tmp[4096]; printf("i 发起呼叫请求\n\n"); printf("h 挂断\n\n"); printf("q 退出程序\n\n"); printf("s 执行方法INFO\n\n"); printf("m 执行方法MESSAGE\n\n"); //初始化 i = eXosip_init(); if (i != 0) { printf("Couldn't initialize eXosip!\n"); return -1; } else { printf("eXosip_init successfully!\n"); } //绑定uac自己的端口15060,并进行端口监听 i = eXosip_listen_addr(IPPROTO_UDP, NULL, 15060, AF_INET, 0); if (i != 0) { eXosip_quit(); fprintf(stderr, "Couldn't initialize transport layer!\n"); return -1; } flag = 1; while (flag) { //输入命令 printf("Please input the command:\n"); scanf_s("%c", &command,1); getchar(); switch (command) { case 'i'://INVITE,发起呼叫请求 i = eXosip_call_build_initial_invite(&invite, dest_call, source_call, NULL, "This is a call for conversation"); if (i != 0) { printf("Initial INVITE failed!\n"); break; } //格式vot必不可少,原因未知,估计是协议栈在传输时需要检查的 _snprintf_s(tmp, 4096, "v=0\r\n" "o=anonymous 0 0 IN IP4 0.0.0.0\r\n" "t=1 10\r\n" "a=username:htc\r\n" "a=password:070011\r\n"); osip_message_set_body(invite, tmp, strlen(tmp)); osip_message_set_content_type(invite, "application/sdp"); eXosip_lock(); i = eXosip_call_send_initial_invite(invite); //invite SIP INVITE message to send eXosip_unlock(); //发送了INVITE消息,等待应答 flag1 = 1; while (flag1) { je = eXosip_event_wait(0, 200); //Wait for an eXosip event //(超时时间秒,超时时间毫秒) printf("je->tid is %d \n", je->tid); if (je == NULL) { printf("No response or the time is over!\n"); break; } switch (je->type) //可能会到来的事件类型 { case EXOSIP_CALL_PROCEEDING: //收到100 trying消息,表示请求正在处理中 printf("proceeding!\n"); break; case EXOSIP_CALL_RINGING: //收到180 Ringing应答,表示接收到INVITE请求的UAS正在向被叫用户振铃 printf("ringing!\n"); printf("je->tid is %d \n", je->tid); printf("call_id is %d,dialog_id is %d \n", je->cid, je->did); break; case EXOSIP_CALL_ANSWERED: //收到200 OK,表示请求已经被成功接受,用户应答 printf("ok!connected!\n"); call_id = je->cid; dialog_id = je->did; printf("call_id is %d,dialog_id is %d \n", je->cid, je->did); //回送ack应答消息 eXosip_call_build_ack(je->did, &ack); eXosip_call_send_ack(je->did, ack); flag1 = 0; //推出While循环 break; case EXOSIP_CALL_CLOSED: //a BYE was received for this call printf("the other sid closed!\n"); break; case EXOSIP_CALL_ACK: //ACK received for 200ok to INVITE printf("ACK received!\n"); break; default: //收到其他应答 printf("other response!\n"); break; } eXosip_event_free(je); //Free ressource in an eXosip event } break; case 'h': //挂断 printf("Holded!\n"); eXosip_lock(); eXosip_call_terminate(call_id, dialog_id); eXosip_unlock(); break; case 's': //传输INFO方法 eXosip_call_build_info(dialog_id, &info); _snprintf_s(tmp, 4096, "\nThis is a sip message(Method:INFO)"); osip_message_set_body(info, tmp, strlen(tmp)); //格式可以任意设定,text/plain代表文本信息; osip_message_set_content_type(info, "text/plain"); eXosip_call_send_request(dialog_id, info); break; case 'm': //传输MESSAGE方法,也就是即时消息,和INFO方法相比,我认为主要区别是: //MESSAGE不用建立连接,直接传输信息,而INFO消息必须在建立INVITE的基础上传输 printf("the method : MESSAGE\n"); eXosip_message_build_request(&message, "MESSAGE", dest_call, source_call, NULL); //内容,方法, to ,from ,route _snprintf_s(tmp, 4096, "This is a sip message(Method:MESSAGE)"); osip_message_set_body(message, tmp, strlen(tmp)); //假设格式是xml osip_message_set_content_type(message, "text/xml"); eXosip_message_send_request(message); break; case 'q': eXosip_quit(); printf("Exit the setup!\n"); flag = 0; break; } } return(0); }

List View 上的 Item Click 事件

我设置了List view,在Linear 布局中有一个按钮。使用 Onlistitemclick 不能继承ListActivity,但我需要在list view中选择一个item 来打开另外一个视图,然后再添加SQLite DB 的内容。如何实现? public class Contacts extends Activity implements OnClickListener { int NewContact_Request_Code = 1; Button newcontact; ListView listview; public static final String LOG_TAG = "Contacts"; int mInt = 0; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.contactview); // Set the content to contactview.xml // newcontact = NEW CONTACT button // listview = MyList List View newcontact = (Button) findViewById(R.id.baddcontact); listview = (ListView) findViewById(R.id.mylist); // Make a New Database DBContact info = new DBContact(this); // Open , get Information from database and close it info.open(); String[] data = info.queryAll(); info.close(); // listview = getListView(); listview.setTextFilterEnabled(true); // Display the names ArrayAdapter<String> adapter = new ArrayAdapter<String>(Contacts.this, android.R.layout.simple_list_item_1, data); listview.setAdapter(adapter); newcontact.setOnClickListener(this); } // @Override // protected void onListItemClick(ListView l, View v, int position, long id) // { // // TODO Auto-generated method stub // super.onListItemClick(l, v, position, id); // Intent viewintent = new Intent(Contacts.this, ViewContact.class); // String item = (String) getListAdapter().getItem(position); // viewintent.putExtra("name_clicked", item); // startActivity(viewintent); // // } public void onClick(View v) { // TODO Auto-generated method stub Intent newintent = new Intent(Contacts.this, AddNewContact.class); // start actiivity for result - to get the name of the new contact startActivityForResult(newintent, 0); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub super.onActivityResult(requestCode, resultCode, data); // pass the value of the string via cursor and update the list } }

使用Amazon SNS发送短信

<div class="post-text" itemprop="text"> <p>I am trying to send SMS through the AWS SNS using the SDK for php.</p> <p>I already configure the user in IAM (created a user to do this), grant full access to SNS service and check the keys many many times.</p> <p>I am using the code that was posted in this topic for testing <a href="https://stackoverflow.com/questions/38752336/sending-sms-with-amazon-aws-services-php">link</a> and receiving this message error</p> <blockquote> <p>Fatal error: Uncaught exception 'Aws\Sns\Exception\SnsException' with message 'Error executing "Publish" on "<a href="https://sns.us-east-1.amazonaws.com" rel="nofollow noreferrer">https://sns.us-east-1.amazonaws.com</a>"; AWS HTTP error: Client error: <code>POST https://sns.us-east-1.amazonaws.com</code> resulted in a <code>403 Forbidden</code> response: Sender SignatureDo (truncated...) SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details</p> </blockquote> <p>Anyone knows what I am doing wrong? I am not able to find the solution </p> </div>

Paypal IPN监听器总是返回INVALID,但事务在paypal中成功

<div class="post-text" itemprop="text"> <p>I'm working with the paypal adaptive payments and my IPN listener worked fine in the sandbox, but now that we're testing live transactions, it always returns "INVALID", but the actual money has been transferred.</p> <p>Any help on why I always receive "INVALD" is appreciated.</p> <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Paypal_ipn extends CI_Controller { public function index() { log_message('error', ''); log_message('error', ''); log_message('error', '##################'); log_message('error', '##################'); // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate&amp;'.file_get_contents("php://input"); $header = null; // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0 "; $header .= "Host: www.sandbox.paypal.com "; // this line is needed for sandbox, but may not be needed for prod. $header .= "Content-Type: application/x-www-form-urlencoded "; $header .= "Content-Length: " . strlen($req) . " "; $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); $raw_post = file_get_contents("php://input"); $post_array = $this-&gt;decodePayPalIPN($raw_post); log_message('error', "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); $log1 = var_export($post_array, true); log_message('error', $log1); log_message('error', "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); log_message('error', "sender_email = ".$post_array['sender_email']); if(isset($post_array['sender_email'])) { $sender_email = $post_array['sender_email']; } if(isset($post_array['status'])) { $status = $post_array['status']; } if(isset($post_array['payment_request_date'])) { $payment_request_date = $post_array['payment_request_date']; } if(isset($post_array['transaction'][0]['receiver'])) { $receiver0 = $post_array['transaction'][0]['receiver']; } if(isset($post_array['transaction'][1]['receiver'])) { $receiver1 = $post_array['transaction'][1]['receiver']; } if(isset($post_array['transaction'][0]['id'])) { $id0 = $post_array['transaction'][0]['id']; } if(isset($post_array['transaction'][1]['id'])) { $id1 = $post_array['transaction'][1]['id']; } if(isset($post_array['transaction'][0]['invoiceId'])) { $invoiceId0 = $post_array['transaction'][0]['invoiceId']; } if(isset($post_array['transaction'][1]['invoiceId'])) { $invoiceId1 = $post_array['transaction'][1]['invoiceId']; } if(isset($post_array['transaction'][0]['amount'])) { $amount0 = $post_array['transaction'][0]['amount']; } if(isset($post_array['transaction'][1]['amount'])) { $amount1 = $post_array['transaction'][1]['amount']; } if(isset($post_array['transaction'][0]['status'])) { $status0 = $post_array['transaction'][0]['status']; } if(isset($post_array['transaction'][1]['status'])) { $status1 = $post_array['transaction'][1]['status']; } if(isset($post_array['transaction'][0]['id_for_sender_txn'])) { $id_for_sender_txn0 = $post_array['transaction'][0]['id_for_sender_txn']; } if(isset($post_array['transaction'][1]['id_for_sender_txn'])) { $id_for_sender_txn1 = $post_array['transaction'][1]['id_for_sender_txn']; } if(isset($post_array['transaction'][0]['status_for_sender_txn'])) { $status_for_sender_txn0 = $post_array['transaction'][0]['status_for_sender_txn']; } if(isset($post_array['transaction'][1]['status_for_sender_txn'])) { $status_for_sender_txn1 = $post_array['transaction'][1]['status_for_sender_txn']; } if(isset($post_array['transaction'][1]['pending_reason'])) { $pending_reason0 = $post_array['transaction'][1]['pending_reason']; } if(isset($post_array['transaction'][1]['pending_reason'])) { $pending_reason1 = $post_array['transaction'][1]['pending_reason']; } if (!$fp) { log_message('error', 'Problem with !$fp'); // HTTP ERROR } else { $counter = 0; fputs ($fp, $header . $req); $res = ''; while (!feof($fp)) { $res .= fgets ($fp, 1024); log_message('error', "res = $res"); if (strcmp ($res, "VERIFIED") == 0) { log_message('error', 'we verified'); if($status0 == "Completed") { log_message('error', 'we completed'); $this-&gt;load-&gt;model('customer_model'); $results = $this-&gt;customer_model-&gt;get_invoice_info($invoiceId0); if($results != false) { log_message('error', 'results is NOT false'); foreach($results as $row) { if($row-&gt;amount_verified != 1) { log_message('error', 'row-&gt;amount_verified is NOT equal to 1'); log_message('error', "row-&gt;amount = ".$row-&gt;amount); if($row-&gt;amount == $amount0) { //log_message('error', 'row-&gt;amount is equal to amount0'); if($this-&gt;customer_model-&gt;verify_amount($invoiceId0)) { $subject = 'Successful transaction'; $message = 'There was a successful transaction. View the log for details /public_html/application/logs'; $this-&gt;_send_email($subject, $message); } } else { //log_message('error', 'we in the else'); //log_message('error', 'invoiceId0 = '.$invoiceId0); if($this-&gt;customer_model-&gt;update_amount_and_verify($invoiceId0, $row-&gt;amount)) { //log_message('error', 'we inside update_amount_and_verify'); $subject = 'Successful transaction'; $message = 'There was a successful transaction. View the log for details /public_html/application/logs'; $this-&gt;_send_email($subject, $message); } } } } } else { $subject = 'Results Equal False'; $message = 'View the log for details /public_html/application/logs'; $this-&gt;_send_email($subject, $message); } } else { $subject = 'Status NOT Complete!'; $message = 'View the log for details /public_html/application/logs'; $this-&gt;_send_email($subject, $message); } log_message('error', "sender_email = $sender_email"); log_message('error', "payment_request_date = $payment_request_date"); log_message('error', "status = $status"); log_message('error', "receiver0 = $receiver0"); log_message('error', "receiver1 = $receiver1"); log_message('error', "id0 = $id0"); log_message('error', "id1 = $id1"); log_message('error', "invoiceId0 = $invoiceId0"); log_message('error', "invoiceId1 = $invoiceId1"); log_message('error', "amount0 = $amount0"); log_message('error', "amount1 = $amount1"); log_message('error', "status0 = $status0"); log_message('error', "status1 = $status1"); log_message('error', "id_for_sender_txn0 = $id_for_sender_txn0"); log_message('error', "id_for_sender_txn1 = $id_for_sender_txn1"); log_message('error', "status_for_sender_txn0 = $status_for_sender_txn0"); log_message('error', "status_for_sender_txn1 = $status_for_sender_txn1"); log_message('error', "pending_reason0 = $pending_reason0"); log_message('error', "pending_reason1 = $pending_reason1"); // check the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment $counter++; } else if (strcmp ($res, "INVALID") == 0) { log_message('error', 'WE INVALIDDDDDDDDDDDDDDDDDD'); $test = var_export($res, true); $test = str_replace(array(" "," "), '', $test); log_message('error', $test); log_message('error', "Problem with IPN. res = $test"); } } fclose ($fp); } } function decodePayPalIPN($raw_post) { //log_message('error', "testing"); if (empty($raw_post)) { return array(); } # else: $post = array(); $pairs = explode('&amp;', $raw_post); foreach ($pairs as $pair) { list($key, $value) = explode('=', $pair, 2); $key = urldecode($key); $value = urldecode($value); # This is look for a key as simple as 'return_url' or as complex as 'somekey[x].property' preg_match('/(\w+)(?:\[(\d+)\])?(?:\.(\w+))?/', $key, $key_parts); switch (count($key_parts)) { case 4: # Original key format: somekey[x].property # Converting to $post[somekey][x][property] if (!isset($post[$key_parts[1]])) { $post[$key_parts[1]] = array($key_parts[2] =&gt; array($key_parts[3] =&gt; $value)); } else if (!isset($post[$key_parts[1]][$key_parts[2]])) { $post[$key_parts[1]][$key_parts[2]] = array($key_parts[3] =&gt; $value); } else { $post[$key_parts[1]][$key_parts[2]][$key_parts[3]] = $value; } break; case 3: # Original key format: somekey[x] # Converting to $post[somkey][x] if (!isset($post[$key_parts[1]])) { $post[$key_parts[1]] = array(); } $post[$key_parts[1]][$key_parts[2]] = $value; break; default: # No special format $post[$key] = $value; break; }#switch }#foreach return $post; }#decodePayPalIPN() private function _send_email($subject, $message) { //log_message('error', 'we in send_email'); $this-&gt;load-&gt;library('email'); $this-&gt;email-&gt;from('do-not-reply@mysite.com', 'Title'); $this-&gt;email-&gt;to('myemail@gmail.com'); $this-&gt;email-&gt;subject($subject); $this-&gt;email-&gt;message($message); $this-&gt;email-&gt;send(); //log_message('error', 'email error = '.$this-&gt;email-&gt;print_debugger()); } } </code></pre> </div>

XDEBUG始终运行,不仅仅是在GET请求上运行

<div class="post-text" itemprop="text"> <p>The title isn't my best; I was wondering how it's possible to run <code>XDEBUG</code> each time a script is executed on a local server, I have access to all configuration files you'd need, and I have <code>XDEBUG</code> for <code>PHP</code> running happily currently.</p> <p>The only thing is it only runs when there's a <code>GET</code> request formed with the key of <code>XDEBUG_PROFILE</code> set to true, or just set, and currently with the framework I'm working on, </p> <ol> <li><p>The framework doesn't allow for extended <code>GET</code> requests in the URL, only slug-related data to be presented, and</p></li> <li><p>If I try and set <code>$_GET['XDEBUG_PROFILE'] = true</code> in a file on the framework, such as a <code>Controller</code>, the profiler gives unusual data, and creates profiles on other requests such as <code>favicon</code> loads and such and such, which gives awkward data to sift through.</p></li> </ol> <p>So I thought it'd be a <strong><em>smart</em></strong> idea to be able to trigger <code>XDEBUG</code> on every script, just while I do development on the framework to get performance records, etc...</p> <p>My current <code>XDEBUG</code> config in <code>php.ini</code>:</p> <pre><code>[XDebug] ;;;;;;;;;;;;;;;;;; extension=php_xdebug.dll xend_extension_ts="C:/xampp/apache/modules/php_xdebug-2.4.1-5.6-vc11.dll" zend_extension = "\xampp\php\ext\php_xdebug.dll" xdebug.collect_vars = 1 xdebug.show_local_vars = 1 xdebug.collect_params = 4 xdebug.remote_enable = 1 xdebug.remote_connect_back = 1 xdebug.profiler_enable = 1 xdebug.profiler_output_dir = "\xampp\tmp\" xdebug.profiler_output_name = "cachegrind.out.%u.%R" xdebug.profiler_enable_trigger = 1 xdebug.remote_host=127.0.0.1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp </code></pre> <p>I tried to search this up, but the only tutorials were how to actually set up <code>XDEBUG</code> itself, which I've already done, I thought the changed variable would be <code>xdebug.profiler_enable_trigger = 1</code>, but wasn't completely sure.</p> <p>Thanks in advance!</p> </div>

Golang ListenUDP使用BigTable连接阻止多个端口

<div class="post-text" itemprop="text"> <p>I'm creating a simple udp client that listens on multiple ports and saves the request to bigtable.</p> <p>It's essential to listen on different ports before you ask.</p> <p>Everything was working nicely until I included bigtable. After doing so, the listeners block completely.</p> <p>My stripped down code, without bigtable, looks like this:</p> <pre><code>func flow(port string) { protocol := "udp" udpAddr, err := net.ResolveUDPAddr(protocol, "0.0.0.0:"+port) if err != nil { fmt.Println("Wrong Address") return } udpConn, err := net.ListenUDP(protocol, udpAddr) if err != nil { fmt.Println(err) } defer udpConn.Close() for { Publish(udpConn, port) } } func main() { fmt.Print("Starting server.........") for i := *Start; i &lt;= *End; i++ { x := strconv.Itoa(i) go flow(x) } } </code></pre> <p>This works fine however, as soon as I add the following for bigtable, the whole thing blocks. If I remove the go routine that creates the listener (which means I can't listen on multiple ports) it works.</p> <pre><code>func createBigTable() { ctx := context.Background() client, err := bigtable.NewClient(ctx, *ProjectID, *Instance) if err != nil { log.Fatal("Bigtable NewClient:", err) } Table = client.Open("x") } </code></pre> <p>I managed to get it working by adding a query in the createBigTable func but the program still blocks later on.</p> <p>I have no idea if this is an issue with bigtable, grpc or just the way I'm doing it.</p> <p>Would really appreciate some advise about how to fix.</p> <p>--- UPDATE ---</p> <p>I've discovered the issue isn't just with BigTable - I also have the same issue when I call gcloud pubsub.</p> <p>--- UPDATE 2 ---</p> <p>createBigtable is called in the init function (BEFORE THE MAIN FUNCTION):</p> <pre><code>func init() { createBigTable } </code></pre> <p>--- Update 3 ---</p> <p>Output from sigquit can be found here:</p> <p><a href="https://pastebin.com/fzixqmiA" rel="nofollow noreferrer">https://pastebin.com/fzixqmiA</a></p> </div>

使用XHR的进度事件来监视PHP / MySQL查询

<div class="post-text" itemprop="text"> <p>I have made a progress bar to show how much 'progress' an XHR request has made, but it only seems to work with the testing method I used which got a URL's content then JSON encoded it - this was a 'GET' method.</p> <pre><code>function get_album_percent(token) { var loadingDlg = document.getElementById('loadingDlg'), loadingDlg_title = document.getElementById('loadingDlg_title'), loadingDlg_bar = document.getElementById('loadingDlg_bar'), xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { console.log(xhr.readyState); if (xhr.readyState == 1) { if (!loadingDlg.classList.contains('open')) { loadingDlg.classList.add('open'); loadingDlg.classList.remove('close'); } else { loadingDlg.classList.add('close'); loadingDlg.classList.remove('open'); } loadingDlg_title.innerHTML = 'Getting Facebook albums...'; } if (xhr.readyState == 3) { console.log('3', xhr); xhr.onprogress = function(event) { console.log('onloadstart, response', event); var percent = Math.round((event.loaded/event.total) * 100) + '%'; loadingDlg_bar.style.width = percent; } } } xhr.open('POST', 'http://mydomain.co.uk/api/facebook/get/userinfo.php?token=' + token); xhr.send(null); } </code></pre> <p>However when I use the method I wanted to originally use - which got a Facebook users albums, photos and tags from a URL paramter then inserted them into 3 tables using PHP/MySQL - all that happens is that readystate 1 is fired, then 2, 3 and 4 is fired at the end, after the xhr has happened.</p> <p>Is there a reason for this? Are there any solutions?</p> <p>Thanks, Adam C.</p> </div>

memory leak我的 jdbc 被强制注销

memory leak我的 jdbc 被强制注销, 我前几天还好好的,今天发现能够连到数据库oracle,但是新的程序无法在数据库中呈现出来,并且原来的表也没有了 The web application [UsersManager2] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. ## **这个是我的登录Servlet** package com.wzy.view; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class LoginServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); //response.setCharacterEncoding("utf-8"); PrintWriter out = response.getWriter(); //返回一个界面(html技术) out.println("<img src='imgs/1.png'/><hr/>"); out.println("<h1>用户登录</h1>"); //action 应该这样写/web应用名/Servlet的url out.println("<form action='/UsersManager2/LoginCLServlet ' method='post'>"); out.println("用户名:<input type='text' name='id'/><br/>"); out.println("密码:<input type='password' name='password'/><br/>"); out.println("<input type='submit' value='登录'/><br/>"); out.println("</form>"); String errInfo=(String) request.getAttribute("err"); if(errInfo!=null){ out.println("<font color='red'>"+errInfo+"</font>"); } out.println("<hr/><img src='imgs/2.png'/>"); } ## ** 这是登录处理转向Servlet** package com.wzy.controller; import java.io.IOException; import java.io.PrintWriter; import java.sql.*; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class LoginCLServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //向浏览器返回中文 request.setCharacterEncoding("utf-8"); //向控制台返回中文 在这里没什么用 //response.setContentType("text/html;charset=utf-8"); //PrintWriter out = response.getWriter(); //接收用户提交的用户名和密码 String id=request.getParameter("id"); String password=request.getParameter("password"); //到数据库中取验证 Connection ct = null; ResultSet rs= null; PreparedStatement ps=null; try { //1.加载驱动 Class.forName("oracle.jdbc.driver.OracleDriver"); //2.得到连接 ct=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORACLE","c##scott","tiger"); //3.创建PreparedStatement ps=ct.prepareStatement("select * from users where id=? and passwd=?"); //给?赋值 ps.setObject(1,id); ps.setObject(2, password); //4.执行操作 rs=ps.executeQuery(); //5.根据结果做处理 if(rs.next()){ //说明该用户合法 request.getRequestDispatcher("/MainFrame").forward(request,response); }else{ request.setAttribute("err", "用户id或者 密码有误!"); request.getRequestDispatcher("/LoginServlet").forward(request,response); } }catch (Exception e){ request.setAttribute("err", "您的输入id不是数字!"); request.getRequestDispatcher("/LoginServlet").forward(request,response); e.printStackTrace(); } finally{ //关闭资源 if(rs!=null){ try { rs.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } rs=null; } if(ps!=null ){ try { ps.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } ps=null; } if(ct!=null){ try { ct.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } ct=null; } } ## 这是调转后第一个统筹页面**** package com.wzy.view; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class MainFrame extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("<img src='imgs/1.png'/>测试登录servlet页面</a> <a href='/UsersManager2/LoginServlet'>返回重新登录</a><hr/>"); //out.println("<h1>测试登录</h1>"); out.println("<h3>请选择您要进行的操作</h3>"); out.println("<a href='/UsersManager2/ManageUsers'>管理用户</a><br/>"); out.println("<a herf=''>添加用户</a><br/>"); out.println("<a herf=''>查找用户</a><br/>"); out.println("<a herf=''>退出系统</a><br/>"); out.println("<hr/><img src='imgs/2.png'/>"); } ## 接下来点进去会看到一张绿色的表10条信息我之前一直好好的**** 这个是我用jdbc连接oracle 看表的地方现在被强制注销, 我明明打了finally 然后close了,可是 却说我的项目在web application停止后没有被释放,所以为了防止内存泄露要强行关闭jdbc驱动,导致我现在 无法用jdbc 来更新内容,想问一下究竟是怎么回事 , 还望高手指点 下面的程序只能显示到“管理用户”这一行 最下面的数字也能打印但是 jdbc的链接这里被停止了,我现在不明白的是导致我连不上的原因是哪里没被释放,还是要再注册一下呢? package com.wzy.view; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ManageUsers extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("<img src='imgs/1.png'/>测试登录servlet页面</a> <a href='/UsersManager2/LoginServlet'>返回主界面</a> <a href='/UsersManager2/LoginServlet'>安全退出</a><hr/>"); out.println("<h1>管理用户</h1>"); //从数据库中取出用户信息,并显示 //到数据库中去验证 Connection ct=null; ResultSet rs=null; PreparedStatement ps=null; try{ //1.加载驱动 Class.forName("oracle.jdbc.driver.OracleDriver"); //2.得到连接 ct=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORACLE","c##scott","tiger"); //算出共有多少页 rs=ps.executeQuery(); //1.查询rowCount rs.next(); //把游标下移 //4.执行操作 rs=ps.executeQuery(); out.println("<table border=1px bordercolor=green cellspacing=0 width=500px>"); out.println("<tr><th>id</th><th>用户名</th><th>email</th><th>级别</th></tr>"); //循环显示所有用户信息 while(rs.next()){ out.println("<tr><td>"+rs.getInt(1)+ "</td><td>"+rs.getString(2)+ "</td><td>"+rs.getString(3)+ "</td><td>"+rs.getInt(4)+ "</td></tr>"); } out.println("</table>"); //显示分页 }catch(Exception e){ }finally{ //关闭资源 if(rs!=null){ try{ rs.close(); }catch(SQLException e){ e.printStackTrace(); } } rs=null; } if(ps!=null){ try{ ps.close(); }catch (SQLException e){ e.printStackTrace(); } ps=null; } if(ct!=null){ try{ ct.close(); }catch(SQLException e){ e.printStackTrace(); } ct=null; } out.println("1324234"); } 望大神指教,网上有用dbcp 重新写个close和改变 dbcp的配置来解决的,可我是新手还不懂hibernate 也有到server.xml里去关掉memory leak的监听,我试了,不行,我现在的情况是能够连到数据库oracle,但是原先的表无法显示和新写的代码无法传递进去,发生了宕机。还望各路高手救命

带有请求的Python长轮询模式

<div class="post-text" itemprop="text"> <p>I'm doing the long-polling pattern with a PHP script and a MySQL database on a server and python script on the client. If the flag in the database is set to 0, the PHP page responds with the id of the tupel. If the request times out, a new request should be started. This is my code and I can't find my mistake:</p> <pre><code>gotID = False ID = 0 while gotID == False: f = requests.get("http://example.de/ajax_backend.php") print("status: " + str(f.status_code)) print("content: " + f.text) if int(f.status_code) == 200: gotID = True ID = f.text </code></pre> <p>If I run the code like this i get this output. First the flag was set to 1, then in the middle i changed the flag to 0:</p> <p><a href="https://i.stack.imgur.com/2Ne7s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Ne7s.png" alt="console output python script"></a></p> <p>I think there is an error in the <code>if</code> statement, but I can't find it. Can you help me?</p> </div>

MySQL 8.0.19安装教程(windows 64位)

话不多说直接开干 目录 1-先去官网下载点击的MySQL的下载​ 2-配置初始化的my.ini文件的文件 3-初始化MySQL 4-安装MySQL服务 + 启动MySQL 服务 5-连接MySQL + 修改密码 先去官网下载点击的MySQL的下载 下载完成后解压 解压完是这个样子 配置初始化的my.ini文件的文件 ...

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉系统全面的介绍。

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

navicat(内含激活码)

navicat支持mysql的可视化操作,内涵激活码,不用再忍受弹框的痛苦。

HTML期末大作业

这是我自己做的HTML期末大作业,花了很多时间,稍加修改就可以作为自己的作业了,而且也可以作为学习参考

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

基于STM32的电子时钟设计

时钟功能 还有闹钟功能,温湿度功能,整点报时功能 你值得拥有

学生成绩管理系统(PHP + MYSQL)

做的是数据库课程设计,使用的php + MySQL,本来是黄金搭配也就没啥说的,推荐使用wamp服务器,里面有详细的使用说明,带有界面的啊!呵呵 不行的话,可以给我留言!

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

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

程序员的兼职技能课

获取讲师答疑方式: 在付费视频第一节(触摸命令_ALL)片头有二维码及加群流程介绍 限时福利 原价99元,今日仅需39元!购课添加小助手(微信号:itxy41)按提示还可领取价值800元的编程大礼包! 讲师介绍: 苏奕嘉&nbsp;前阿里UC项目工程师 脚本开发平台官方认证满级(六级)开发者。 我将如何教会你通过【定制脚本】赚到你人生的第一桶金? 零基础程序定制脚本开发课程,是完全针对零脚本开发经验的小白而设计,课程内容共分为3大阶段: ①前期将带你掌握Q开发语言和界面交互开发能力; ②中期通过实战来制作有具体需求的定制脚本; ③后期将解锁脚本的更高阶玩法,打通任督二脉; ④应用定制脚本合法赚取额外收入的完整经验分享,带你通过程序定制脚本开发这项副业,赚取到你的第一桶金!

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

Java8零基础入门视频教程

这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

零基础学C#编程—C#从小白到大咖

本课程从初学者角度出发,提供了C#从入门到成为程序开发高手所需要掌握的各方面知识和技术。 【课程特点】 1 由浅入深,编排合理; 2 视频讲解,精彩详尽; 3 丰富实例,轻松易学; 4 每章总结配有难点解析文档。 15大章节,228课时,1756分钟与你一同进步!

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

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

多功能数字钟.zip

利用数字电子计数知识设计并制作的数字电子钟(含multisim仿真),该数字钟具有显示星期、24小时制时间、闹铃、整点报时、时间校准功能

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

想学好JAVA必须要报两万的培训班吗? Java大神勿入 如果你: 零基础想学JAVA却不知道从何入手 看了一堆书和视频却还是连JAVA的环境都搭建不起来 囊中羞涩面对两万起的JAVA培训班不忍直视 在职没有每天大块的时间专门学习JAVA 那么恭喜你找到组织了,在这里有: 1. 一群志同道合立志学好JAVA的同学一起学习讨论JAVA 2. 灵活机动的学习时间完成特定学习任务+每日编程实战练习 3. 热心助人的助教和讲师及时帮你解决问题,不按时完成作业小心助教老师的家访哦 上一张图看看前辈的感悟: &nbsp; &nbsp; 大家一定迫不及待想知道什么是极简JAVA学习营了吧,下面就来给大家说道说道: 什么是极简JAVA学习营? 1. 针对Java小白或者初级Java学习者; 2. 利用9天时间,每天1个小时时间; 3.通过 每日作业 / 组队PK / 助教答疑 / 实战编程 / 项目答辩 / 社群讨论 / 趣味知识抢答等方式让学员爱上学习编程 , 最终实现能独立开发一个基于控制台的‘库存管理系统’ 的学习模式 极简JAVA学习营是怎么学习的? &nbsp; 如何报名? 只要购买了极简JAVA一:JAVA入门就算报名成功! &nbsp;本期为第四期极简JAVA学习营,我们来看看往期学员的学习状态: 作业看这里~ &nbsp; 助教的作业报告是不是很专业 不交作业打屁屁 助教答疑是不是很用心 &nbsp; 有奖抢答大家玩的很嗨啊 &nbsp; &nbsp; 项目答辩终于开始啦 &nbsp; 优秀者的获奖感言 &nbsp; 这是答辩项目的效果 &nbsp; &nbsp; 这么细致的服务,这么好的氛围,这样的学习效果,需要多少钱呢? 不要1999,不要199,不要99,只要9.9 是的你没听错,只要9.9以上所有就都属于你了 如果你: 1、&nbsp;想学JAVA没有基础 2、&nbsp;想学JAVA没有整块的时间 3、&nbsp;想学JAVA没有足够的预算 还等什么?赶紧报名吧,抓紧抢位,本期只招300人,错过只有等时间待定的下一期了 &nbsp; 报名请加小助手微信:eduxy-1 &nbsp; &nbsp;

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

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

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

机器学习实战系列套餐(必备基础+经典算法+案例实战)

机器学习实战系列套餐以实战为出发点,帮助同学们快速掌握机器学习领域必备经典算法原理并结合Python工具包进行实战应用。建议学习顺序:1.Python必备工具包:掌握实战工具 2.机器学习算法与实战应用:数学原理与应用方法都是必备技能 3.数据挖掘实战:通过真实数据集进行项目实战。按照下列课程顺序学习即可! 课程风格通俗易懂,用最接地气的方式带领大家轻松进军机器学习!提供所有课程代码,PPT与实战数据,有任何问题欢迎随时与我讨论。

Java面试题大全(2020版)

发现网上很多Java面试题都没有答案,所以花了很长时间搜集整理出来了这套Java面试题大全,希望对大家有帮助哈~ 本套Java面试题大全,全的不能再全,哈哈~ 一、Java 基础 1. JDK 和 JRE 有什么区别? JDK:Java Development Kit 的简称,java 开发工具包,提供了 java 的开发环境和运行环境。 JRE:Java Runtime Environ...

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

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

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

HoloLens2开发入门教程

本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。

几率大的Redis面试题(含答案)

本文的面试题如下: Redis 持久化机制 缓存雪崩、缓存穿透、缓存预热、缓存更新、缓存降级等问题 热点数据和冷数据是什么 Memcache与Redis的区别都有哪些? 单线程的redis为什么这么快 redis的数据类型,以及每种数据类型的使用场景,Redis 内部结构 redis的过期策略以及内存淘汰机制【~】 Redis 为什么是单线程的,优点 如何解决redis的并发竞争key问题 Red...

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

【数据结构与算法综合实验】欢乐连连看(C++ & MFC)案例

这是武汉理工大学计算机学院数据结构与算法综合实验课程的第三次项目:欢乐连连看(C++ & MFC)迭代开发代码。运行环境:VS2017。已经实现功能:开始游戏、消子、判断胜负、提示、重排、计时、帮助。

YOLOv3目标检测实战:训练自己的数据集

YOLOv3是一种基于深度学习的端到端实时目标检测方法,以速度快见长。本课程将手把手地教大家使用labelImg标注和使用YOLOv3训练自己的数据集。课程分为三个小项目:足球目标检测(单目标检测)、梅西目标检测(单目标检测)、足球和梅西同时目标检测(两目标检测)。 本课程的YOLOv3使用Darknet,在Ubuntu系统上做项目演示。包括:安装Darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 Darknet是使用C语言实现的轻型开源深度学习框架,依赖少,可移植性好,值得深入探究。 除本课程《YOLOv3目标检测实战:训练自己的数据集》外,本人推出了有关YOLOv3目标检测的系列课程,请持续关注该系列的其它课程视频,包括: 《YOLOv3目标检测实战:交通标志识别》 《YOLOv3目标检测:原理与源码解析》 《YOLOv3目标检测:网络模型改进方法》 敬请关注并选择学习!

u-boot-2015.07.tar.bz2

uboot-2015-07最新代码,喜欢的朋友请拿去

php+mysql学生成绩管理系统

学生成绩管理系统,分三个模块:学生,教师和管理员。 管理员模块:负责学生、老师信息的增删改;发布课程信息的增删改,以便让学生选课;审核老师提交的学生成绩并且打印成绩存档;按照课号查询每个课号的学生成绩

web网页制作期末大作业

分享思维,改变世界. web网页制作,期末大作业. 所用技术:html css javascript 分享所学所得

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问