/g |
/y |
/yg |
|
|---|---|---|---|
.exec() |
at .lI or later |
at .lI |
same as /y |
.test() |
at .lI or later |
at .lI |
same as /y |
.replace() |
ignores & resets .lI |
at .lI |
/g w/o gaps |
.replaceAll() |
ignores .lI |
TypeError |
/g w/o gaps |
.search() |
no effect | no effect | no effect |
.match() |
Array of group 0 captures | like .exec() |
/g w/o gaps |
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
| // Simple PAC script example | |
| function FindProxyForURL(url, host) { | |
| if ( /*condition to pass the request through a local proxy server */ ) { | |
| return 'PROXY 127.0.0.1:8080'; | |
| /* If you have Tor installed you can route this connection over Tor like so;*/ | |
| /* return 'PROXY 127.0.0.1:9050'; */ | |
| } | |
| if ( /*condition to pass the request through a network proxy server */ ) { |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
None of the string methods modify this – they always return fresh strings.
-
charAt(pos: number): stringES1Returns the character at index
pos, as a string (JavaScript does not have a datatype for characters).str[i]is equivalent tostr.charAt(i)and more concise (caveat: may not work on old engines).
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
| // This is an advanced example! It is not typically required for application code. | |
| // If you are using a library like Redux or MobX, use the container component provided by that library. | |
| // If you are authoring such a library, use the technique shown below. | |
| // This example shows how to safely update subscriptions in response to props changes. | |
| // In this case, it is important to wait until `componentDidUpdate` before removing a subscription. | |
| // In the event that a render is cancelled before being committed, this will prevent us from unsubscribing prematurely. | |
| // We also need to be careful about how we handle events that are dispatched in between | |
| // `getDerivedStateFromProps` and `componentDidUpdate` so that we don't put stale values into the `state`. |
One of the biggest missed opportunities thus far with HTTP/2 ("H/2") is that we are not yet able to sunset WebSockets in favor of H/2. Web Sockets and H/2 both support multiplexing messages bi-directionally and can send both textual and binary data.
Server Sent Events ("SSE"), by contrast, are not bi-directional (they're a "server-push-only" channel) and binary data cannot be sent easily. They are, however, very simple to implement. Adding to the menagerie of options, RTCPeerConnection can also be used to signal data to applications in a low-latency (but potentially lossy) way.
Because H/2 [does not support the handshake (upgrade) that WebSockets use to negotiate a connection](https://daniel.haxx.se/blog/2016/06/15/no-websockets-
| /** | |
| * WHY? - BECAUSE EXCEPTIONS/TRY/CATCH IS A GLOBAL HORRIBLE MESS :-( | |
| * Check out error handling in golang: https://blog.golang.org/error-handling-and-go | |
| */ | |
| /** | |
| * Wrap an "unsafe" promise | |
| */ | |
| function safePromise(promise) { | |
| return promise |