message-passing

Chrome Extension: Message Passing (Sending the DOM to popup.js) returns 'null'

故事扮演 提交于 2019-12-01 12:49:11
I would like to use a Chrome Extension to download the current page's DOM. I'm not sure why, but when my download occurs, the result is just a text file with either 'null' or 'undefined', rather than the DOM. I've tried to assimilate the knowledge from here and here , but I can't seem to get the message from content.js through to popup.js . Additionally, I'm not sure why this actually works. When I read the docs , it seems like I need to send the message from popup.js to content.js by selecting the active tab: chrome.tabs.query({currentWindow: true, active: true}, function(tabs) { chrome.tabs

PHP/Javascript passing message to another page

佐手、 提交于 2019-12-01 11:10:36
问题 So let me explain: I basically want so when you post a comment, (i use a js/jquery script to send string to insert.php which inserts to the database) you will receive 2+ points. Now i have done so you get +2 points, BUT i want to display a message like stackoverflow. I already know how to display a message like stackoverflow, but in somehow i need to send from insert.php(after you inserted), this: <div id='message' onclick="closeNotice()" style="display: none;"> Hey, <b><? echo $pusername; ?>

Parallelism in Python

此生再无相见时 提交于 2019-12-01 02:12:56
What are the options for achieving parallelism in Python? I want to perform a bunch of CPU bound calculations over some very large rasters, and would like to parallelise them. Coming from a C background, I am familiar with three approaches to parallelism: Message passing processes, possibly distributed across a cluster, e.g. MPI . Explicit shared memory parallelism, either using pthreads or fork() , pipe() , et. al Implicit shared memory parallelism, using OpenMP . Deciding on an approach to use is an exercise in trade-offs. In Python, what approaches are available and what are their

When is messaging (e.g. JMS) an alternative for multithreading?

流过昼夜 提交于 2019-11-30 20:39:28
I work on a data processing application in which concurrency is achieved by putting several units of work on a message queue that multiple instances of a message driven bean (MDB) listen to. Other than achieving concurrency in this manner, we do not have any specific reason to use the messaging infrastructure and MDBs. This led me to think why the same could not have been achieved using multiple threads. So my question is, in what situations can asynchronous messaging (e.g. JMS) be used as an alternative to mutithreading as a means to achieve concurrency ? What are some advantages

How do I pass back data from a remote window to a chrome extension's background page?

喜你入骨 提交于 2019-11-30 15:04:35
问题 I have a chrome extension, and from my background page I open a remote window: chrome.windows.create({ type : 'popup', url : "https://www.example.com/mypage.html" }, function(newWindow) { }); On my remote page (https://www.example.com/mypage.html) I am waiting for the user to perform an action. When this action is performed, I need to pass back to the extension some data. How can I do this? I could not find anything relevant in the docs (http://developer.chrome.com/extensions/messaging.html)

How do I pass back data from a remote window to a chrome extension's background page?

China☆狼群 提交于 2019-11-30 13:01:58
I have a chrome extension, and from my background page I open a remote window: chrome.windows.create({ type : 'popup', url : "https://www.example.com/mypage.html" }, function(newWindow) { }); On my remote page ( https://www.example.com/mypage.html ) I am waiting for the user to perform an action. When this action is performed, I need to pass back to the extension some data. How can I do this? I could not find anything relevant in the docs ( http://developer.chrome.com/extensions/messaging.html ) It is basically possible. What you should do is to use the content script as a bridge between your

Does Erlang always copy messages between processes on the same node?

怎甘沉沦 提交于 2019-11-30 12:15:45
A faithful implementation of the actor message-passing semantics means that message contents are deep-copied from a logical point-of-view, even for immutable types. Deep-copying of message contents remains a bottleneck for implementations the actor model, so for performance some implementations support zero-copy message passing (although it's still deep-copy from the programmer's point-of-view). Is zero-copy message-passing implemented at all in Erlang? Between nodes it obviously can't be implemented as such, but what about between processes on the same node? This question is related. I don't

What library can I use to do simple, lightweight message passing?

泄露秘密 提交于 2019-11-30 07:26:59
I will be starting a project which requires communication between distributed nodes(the project is in C++). I need a lightweight message passing library to pass very simple messages(basically just strings of text) between nodes. The library must have the following characteristics: No external setup required. I need to be able to get everything up-and-running in my code - I don't want to require the user to install any packages or edit any configuration files(other than a list of IP addresses and ports to connect to). The underlying protocol which the library uses must be TCP(or if it is UDP,

When is messaging (e.g. JMS) an alternative for multithreading?

三世轮回 提交于 2019-11-30 05:39:18
问题 I work on a data processing application in which concurrency is achieved by putting several units of work on a message queue that multiple instances of a message driven bean (MDB) listen to. Other than achieving concurrency in this manner, we do not have any specific reason to use the messaging infrastructure and MDBs. This led me to think why the same could not have been achieved using multiple threads. So my question is, in what situations can asynchronous messaging (e.g. JMS) be used as an

what does it mean configuring MPI for shared memory?

老子叫甜甜 提交于 2019-11-30 03:56:13
I have a bit of research related question. Currently I have finished implementation of structure skeleton frame work based on MPI (specifically using openmpi 6.3 ). the frame work is supposed to be used on single machine. now, I am comparing it with other previous skeleton implementations (such as scandium , fast-flow , ..) One thing I have noticed is that the performance of my implementation is not as good as the other implementations. I think this is because, my implementation is based on MPI (thus a two sided communication that require the match of send and receive operation) while the