communication

GUI and windows service communication

二次信任 提交于 2019-11-26 17:34:11
I know since Vista, that C# can't hook a UI form directly to the windows service. This was stated on the Microsoft Site. My question in this regard is: "What is the best mode of communication from a UI to the service?" I have heard of Remoting, Web services, and direct TCP. Are there other methods? How do they rank against the previously mentioned methods? How complicated are they to implement? My application is for intranet use, not internet. Microsoft platform will be on both sides, so interoperability is not a factor, but speed is. I mean I want to get across the smallest packet possible on

Serial comm with PHP on Windows

我只是一个虾纸丫 提交于 2019-11-26 16:45:20
问题 I am looking for a way to communicate with RS232 serial COM port on windows. I have found 2 solutions on the net, one which is not totally free (introduces deliberate delays on the function) and another with limited capability on Windows. The latter can only write to a COM port on Windows, not read. I can't look at the code of the first solution since it is compiled into a .dll (makes sense, otherwise people can just edit the delay and not purchase it...) and the second one seems only to use

communicate c program and php

北战南征 提交于 2019-11-26 16:38:35
问题 I want to have a web page (written in php because it's what i know) that displays an input value. I want that value to be passed to a c programa that's already running. I though of using sockets to communicate between both process, but how do I manage to do that? how can I use fsockopen to connect to a local socket. 回答1: Some simple solutions I can think of are: Redis You could use redis as your ipc using hiredis as your c client library. I never used hiredis library before but did it just

using serial port RS-232 in android?

独自空忆成欢 提交于 2019-11-26 15:57:58
问题 I want to send signals via serial port using the JavaComm API classes on an Android device, and here is how I imagine it: 1- the Android device would be: Archos 3.2 which has android 2.2 and USB host mode. 2- include RxTx lib package with my Android app. and include RxTx native code using Android NDK. 3- a short cable which is usb-->serial. Could you explain to me where I might face problems? 回答1: I just ported the JavaCOMM ( GNU RXTX ) library to the Android. Here is the link http://v-lad

is assignment operator '=' atomic?

放肆的年华 提交于 2019-11-26 15:46:46
问题 I'm implementing Inter-Thread Communication using global variable. //global var volatile bool is_true = true; //thread 1 void thread_1() { while(1){ int rint = rand() % 10; if(is_true) { cout << "thread_1: "<< rint <<endl; //thread_1 prints some stuff if(rint == 3) is_true = false; //here, tells thread_2 to start printing stuff } } } //thread 2 void thread_2() { while(1){ int rint = rand() % 10; if(! is_true) { //if is_true == false cout << "thread_1: "<< rint <<endl; //thread_2 prints some

Tkinter: invoke event in main loop

巧了我就是萌 提交于 2019-11-26 14:07:57
问题 How do you invoke a tkinter event from a separate object? I'm looking for something like wxWidgets wx.CallAfter . For example, If I create an object, and pass to it my Tk root instance, and then try to call a method of that root window from my object, my app locks up. The best I can come up with is to use the the after method and check the status from my separate object, but that seems wasteful. 回答1: To answer your specific question of "How do you invoke a TkInter event from a separate object

Android - getTargetFragment and setTargetFragment - What are they used for

孤者浪人 提交于 2019-11-26 13:48:52
问题 I tried searching but i'm still a little lost. I usually do fragment to fragment communication through an Activity via interfaces or a BroadcastReceiver . Anyway, my question is what is the use of getTargetFragment ? Can someone provide a use case or just a quick example so i can comprehend its usage? 回答1: Use case = 2 fragments hosted by the same activity. Where startActivityForResult() establishes a relationship between 2 activities, setTargetFragment() defines the caller/called

How should I communicate between activities? [duplicate]

大憨熊 提交于 2019-11-26 12:31:14
问题 This question already has answers here : How to send an object from one Android Activity to another using Intents? (35 answers) Closed 5 years ago . 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

Android apps, communicating with a device plugged in the USB port

帅比萌擦擦* 提交于 2019-11-26 12:16:52
问题 I\'m thinking about an Android app (with possibly an accompanying physical device), and I\'m trying to figure out whether this is something that\'s feasible. 1) Let\'s say I plug my Android to my PC. Would it be possible for an app installed on the PC to communicate with an app running in the cell phone? I just need a very simplistic data exchange, it can even be one-way (just data pushed from the cell phone to the listening app on the PC, whenever the cell phone wants, I don\'t need any data

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

白昼怎懂夜的黑 提交于 2019-11-26 11:25:48
问题 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.) 回答1: 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. 回答2: You can try .NET