communication

Angular: Pass data from Material Dialog to component, which didn't open the dialog

人盡茶涼 提交于 2019-11-27 08:42:05
问题 I have a network.component which opens my dialog send-tx-dialog.component. The user fills the send-tx-dialog with information. I want to send that information to another component: transaction-pool.component. And after that I want to display the data in a data table dynamically. I tried to use push() but it didn't work. What is a possible way to do that? Following some code which I think could be important. Part of the TS of the dialog: constructor( private fb: FormBuilder, private dialogRef:

What is the easiest way to do inter process communication in C#?

為{幸葍}努か 提交于 2019-11-27 05:02:27
I have two C# applications and I want one of them send two integers to the other one (this doesn't have to be fast since it's invoked only once every few seconds). What's the easiest way to do this? (It doesn't have to be the most elegant one.) The easiest and most reliable way is almost certainly IpcChannel (a.k.a. Inter Process Communication Channel); that's what it's there for. You can get it up and running with a couple of lines of code and configuration. Groo You can try .NET Remoting. Here is a simple example: CodeProject .NET Remoting . If you are using .NET 3.5, you should go for WCF,

How should I communicate between activities? [duplicate]

末鹿安然 提交于 2019-11-27 02:10:09
This question already has an answer here: How to send an object from one Android Activity to another using Intents? 35 answers I have 3 buttons. Button A, B, and C. Button A resides in Fragment. It starts intent (activity). Within the new activity button B and C reside. Button B says "NEW" while button C says "OK". What I want to do is after clicking button B ("NEW") the intent should hold that button until the user hits button C ("OK") where the activity should destroy itself and go back to fragment where there is now a new button called ("NEW"). What are some easy ways to do this? And should

Pass data from a ASP.NET page to ASCX user controls loaded dynamically

巧了我就是萌 提交于 2019-11-27 00:51:08
问题 I'm developing an ASP.NET application with C# and Ajax. I have a page that holds user controls loaded dynamically. I need to pass some data (integer values and some strings) to the user control that has been loaded dynamically . Now I use Session to pass these values, but I think I can use another way; something like VIEWSTATE or hidden input. What do you recommend me? UPDATE: The fact that I load the controls dynamically is important because controls are loaded on every postback, and I can't

Calling Java app with “subprocess” from Python and reading the Java app output

Deadly 提交于 2019-11-26 22:18:02
问题 What is the nicest way to read the output (i.e. via System.out.println) of a Java app which is called from Python with subprocess.Popen("java MyClass", shell=True) without writing and reading a file? (Using Jython etc is not a possible solution) 回答1: p1 = subprocess.Popen(["/usr/bin/java", "MyClass"], stdout=subprocess.PIPE) print p1.stdout.read() 回答2: I just found the solution: p = subprocess.Popen("java MyClass", shell=True, stdout=subprocess.PIPE) output, errors = p.communicate() S.Mark's

Tools to measure MPI communication costs [closed]

℡╲_俬逩灬. 提交于 2019-11-26 20:13:58
I'm using MPI and I want to measure the communication costs, so that I can then compare them to the 'processing' costs, e.g., how much time do I need to scatter a list through n processes and then compare it to how much time I need to sort it. Does anyone know any tools to measure this communication costs? (the scatter for example) Is there anything to make measurements on MPI communication costs like there is, for example, PAPI to analyse code performance? Thanks in advance! Jonathan Dursi Yes, there's lots of such tools. MPI defines a tools interface that allows other libraries to interject

Working with USB devices in .NET

微笑、不失礼 提交于 2019-11-26 19:30:43
Using .Net (C#), how can you work with USB devices? How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write). Is there a native .Net solution to do this? Jon Limjap There is no native (e.g., System libraries) solution for this. That's the reason why SharpUSBLib exists as mentioned by moobaa . If you wish to roll your own handler for USB devices, you can check out the SerialPort class of System.IO.Ports . I've tried using SharpUSBLib and it screwed up my computer (needed a system restore). Happened to a coworker on the same project too. I

Peer-to-Peer communication options

风格不统一 提交于 2019-11-26 19:09:30
问题 can anybody confirm what are the currently allowed methods for peer-to-peer communications within the Android framework? I need to transfer json strings and I'm currently using SMS which works ok but the problem is that the data also ends up as lots of text messages. I've read Reto Meier's first edition of Professional Android Application Development where he says that the data transfer options were not implemented due to security concerns. Has this changed at all and how would you do peer-to

android communication between two applications

谁都会走 提交于 2019-11-26 18:42:22
I need some help in how to start developing two android applications (on one phone) which communicate with each other. Application A sends a string to application B. Application B receives the string for example "startClassOne", app B using a method starts classOne and gets the result. The result is sent back (again as string!) to Application A. Application A writes in the console the received string from B. Hello, i need some help in how to start developing two android applications (on one phone) which communicate with each other. On the whole, you generally don't want to artificially split

Tablet(iPad/Android)-Server Communication Protocol

倖福魔咒の 提交于 2019-11-26 17:51:49
问题 I am going to build a client-server application. The client here is an iPad (or an android-based) tablet. The server is a normal pc. Both the clients and the server are connected to the same network (using WiFi). Is there a standard way (protocol) for communication between the clients and the server? Are there any framework that can be used to ease this communication? Thank you 回答1: The answer depends by what you define by "server", "client", and "protocol". Technically, the answer is "yes";