Posts in 2021
-
Most votes on ajax questions 2
May 01, 2021 in FAQ
Most votes on ajax questions 2. #11 Is Safari on iOS 6 caching $.ajax results? #12 jQuery AJAX submit form #13 Scroll to bottom of div? #14 Ajax request returns 200 OK, but an error event is fired instead of success #15 How to make an AJAX call without jQuery? #16 jQuery Ajax File Upload #17 jQuery Ajax error handling, show custom exception messages #18 Wait until all jQuery Ajax requests are done? #19 jQuery Ajax POST example with PHP #20 Updating address bar with new URL without hash or reloading the page
Read all the top votes questions and answers in a single page. #11: Is Safari on iOS 6 caching $.ajax results? (Score: 1089) Created: 2012-09-20 Last updated: 2021-03-12 Tags: javascript, jquery, ajax, caching, mobile-safari Since the upgrade to iOS …
-
Most votes on ajax questions 10
May 01, 2021 in FAQ
Most votes on ajax questions 10. #91 how to bypass Access-Control-Allow-Origin? #92 jQuery Ajax calls and the Html.AntiForgeryToken() #93 Determine if $.ajax error is a timeout #94 JavaScript implementation of Gzip #95 Ajax success event not working #96 When is the @JsonProperty property used and what is it used for? #97 Set timeout for ajax (jQuery) #98 Origin <origin> is not allowed by Access-Control-Allow-Origin #99 What does a Ajax call response like 'for (;;); { json data }' mean? #100 How to communicate between iframe and the parent site?
Read all the top votes questions and answers in a single page. #91: how to bypass Access-Control-Allow-Origin? (Score: 210) Created: 2011-09-27 Last updated: 2019-02-02 Tags: javascript, php, jquery, ajax, cors I’m doing a ajax call to my own …
-
Most votes on ajax questions 1
May 01, 2021 in FAQ
Most votes on ajax questions 1. #1 How do I return the response from an asynchronous call? #2 Why does Google prepend while(1); to their JSON responses? #3 How can I upload files asynchronously? #4 How do I format a Microsoft JSON date? #5 Abort Ajax requests using jQuery #6 Disable same origin policy in Chrome #7 How to manage a redirect request after a jQuery Ajax call #8 How can I get jQuery to perform a synchronous, rather than asynchronous, Ajax request? #9 How to manually send HTTP POST requests from Firefox or Chrome browser? #10 Serializing to JSON in jQuery
Read all the top votes questions and answers in a single page. #1: How do I return the response from an asynchronous call? (Score: 5928) Created: 2013-01-08 Last updated: 2020-09-11 Tags: javascript, jquery, ajax, asynchronous I have a function foo …
-
Android OkHttp change User-Agent header
April 18, 2021 in Android
Android OkHttp addHeader(“User-Agent”) does not work troubleshooting.
Symptom Use OkHttpClient.Builder() to add User-Agent header. val okHttpClient = OkHttpClient.Builder() .addNetworkInterceptor { chain -> val requestBuilder = chain.request().newBuilder() .addHeader("User-Agent", userAgent) With this code, …
-
Weird Android junit test failure java.lang.NoClassDefFoundError: android/content/Context
April 15, 2021 in Android
Symptom Have a Android project run junit test fine, suddenly it failed to run unit test with following error: xxxxTest initializationError java.lang.NoClassDefFoundError: android/content/Context at java.lang.Class.getDeclaredMethods0(Native Method) …
-
ECDSA signature verify in kotlin and Go
January 16, 2021 in Security
How to verify ECDSA signature generated by kotlin and verify it in Go?
Introduction Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve cryptography. ECDSA keys and signatures are shorter than in RSA for the same security level. A 256-bit …
Posts in 2020
-
Test TLS Connectivity with OpenSSL Command Line
December 13, 2020 in Security
Use OpenSSL command line to test TLS server connectivity, check server certificate.
Introduction openssl s_client is a SSL/TLS client program can be used to test TLS server connectivity, check server certificate. usage: s_client args -4 - Force IPv4 -6 - Force IPv6 -host host - use -connect instead -port port - use -connect instead …
-
Linux SO_BINDTODEVICE and mac IP_BOUND_IF to bind socket to a network interface
September 18, 2020 in Linux
Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF / IPV6_BOUND_IF to bind socket to a network interface
SO_BINDTODEVICE on Linux In Linux, SO_BINDTODEVICE can be used to bind a socket to network interface. e.g. #include <sys/types.h>#include <sys/socket.h> const char *interface_name = "eth0"; setsockopt(socket_fd, SOL_SOCKET, …
-
Find 3rd party gems global variables in ruby
June 03, 2020 in Rails
Find 3rd party gems global variables in ruby
Why Need Find Global Variables In rails, if you want to use puma as rails server, you need make sure your app is thread safe, not only your app code itself, also 3rd party gems should also thread safe. One of requirement for thread safe is avoid …
-
Splunk != vs. NOT
April 15, 2020 in Splunk
Different between
!=
andNOT
in Splunk search.When you want to exclude results from your search you can use the NOT operator or the != field expression. However there is a significant difference in the results that are returned from these two methods. != vs. NOT Comparison Both!= field …