communication

Android Client Server communication

落花浮王杯 提交于 2019-11-30 11:43:32
I have an application in Android which get latitude and longitude from GPS. I want to send these lat and long to server at particular port and want to receive the response of server into my Android application. Kindly give the direction so that I can make it possible. There are many ways to perform this data transfer using the Android platform. My preference is to use JSON to communicate between the App and the server. For an example of how to implement this in your app read through this article: http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/ Mohammad

How does the Hamming code work?

为君一笑 提交于 2019-11-30 11:34:52
问题 When transmitting data, the Hamming code apparently allows you to recreate data that has been corrupted over the wire (an error correcting code). How does this work and what are its limitations, if any? Are there any better solutions for error correction (as opposed to retransmission)? Are there circumstances where retransmission is better? 回答1: Let's try to explain it a bit: We have a 3 bit number. The possibilities can be presented as a cube where each bit represent an axis. The eight

PC to PC USB communication

本小妞迷上赌 提交于 2019-11-30 09:00:26
问题 How can I communicate between two PC's via USB? I want a program to send numbers trough the USB port to another PC on which another program would show these numbers. I have the feeling that this is impossible because PC's are meant to be hosts and not devices, but is USB truly this limited? I actually hate that USB is not like a COM port which just has an input buffer and an output buffer. You send and receive with ease. I looked at libusb and I could use it, but I can't find a way to make

Sending TCP data from Android (as client) - no data being sent?

拜拜、爱过 提交于 2019-11-30 02:08:49
I'm trying to send data from my Android app to my PC over TCP. The code is as follows: Socket socket = new Socket("10.0.78.75", 50505); OutputStream out = socket.getOutputStream(); PrintWriter output = new PrintWriter(out); mStatusText.setText("Sending Data to PC"); output.println("Hello from Android"); mStatusText.setText("Data sent to PC"); socket.close(); mStatusText.setText("Socket closed"); I don't get any errors at all while doing this, however, the server application (written in C#) does not get any data. It sees the client connect to it, and sees that data is being sent, however, the

Communication between two iOS devices

情到浓时终转凉″ 提交于 2019-11-30 02:05:22
I am looking for a way to have one iPhone app send a message to another app on a different phone (sort of like a Sender-Receiver set up). I am looking for the best possible way to do this. Does anyone have any ideas and/or tutorials? Thanks for the help. You should use GameKit. It is super easy to send messages between two iOS devices using it. Here's a great tutorial: Game Kit . You can also get more information about it here from the docs: About Game Kit . You communicate by creating an ad-hoc bluetooth or local wireless network. lmirak provided insightful info about device communication

How does the Hamming code work?

≯℡__Kan透↙ 提交于 2019-11-30 01:16:32
When transmitting data, the Hamming code apparently allows you to recreate data that has been corrupted over the wire (an error correcting code). How does this work and what are its limitations, if any? Are there any better solutions for error correction (as opposed to retransmission)? Are there circumstances where retransmission is better? Let's try to explain it a bit: We have a 3 bit number. The possibilities can be presented as a cube where each bit represent an axis. The eight possibilities are on the corners. 000 --------001 | \ | \ | 100---------101 | | | | | | | | 010-|-------011 | \|

Communication between Windows Store app and native desktop application

ぐ巨炮叔叔 提交于 2019-11-29 23:06:11
! For the sake of simplifying things I will refer to Windows Store applications (also known as Metro or Modern UI) as "app" and to common desktop applications as "application" ! I believe this is still one of the most unclear yet important questions concerning app-development for developers who already have established applications on the market: How to manage communication between apps and applications on a Windows 8 system? (please let's not start a debate on principles - there're so many use cases where this is really required!) I basically read hundrets of articles in the last few days but

Communication between different forms

落花浮王杯 提交于 2019-11-29 21:16:19
问题 In C#, using winforms, what is the best way to make forms talk to each other? Sending data, messages, strings, whatever, from on to the other? Delegates? Ideas? 回答1: We'ved used something called the Event Pattern successfully in several Winform applications. Here's a good link that will help you get started. 回答2: You can create events in one form and then register for those events in the other form. You can also simply access properties from one form to the other. For example maybe in the

HTML5编程之旅 第2站 Communication

匆匆过客 提交于 2019-11-29 21:14:38
HTML5 Communication 初探 本文主要探讨用于构建实时跨源通信的两个模块:跨文档消息通信( Cross Document Messaging )和 XMLHttpRequestLevel2 。通过这两个模块,我们可以构建不同域间进行安全通信的 Web 应用。 一、跨文档消息通信 出于安全方面的看的考虑,运行在同一浏览器中的框架、标签页、窗口间的通信一直多受到严格的限制。但是现实中还存在一些合理的让不同站点的内容能在浏览器内进行交互的需求,其中 Mashup 就是一个典型的例子,它是各种不同应用的结合体。为了满足上述需求,引入了一种新的功能:跨文档消息通信。其可以确保 iframe 、标签页、窗口间安全地进行跨源通信。 发送消息使用 postMessage API ,其示例代码如下: chatFrame.contentWindow.postMessage(content,url); 接受消息时,需要在页面中添加一个事件处理函数,当消息到达时,通过检查消息的来源来决定如何对这条消息如何处理,示例代码如下: window.addEventListener("message",messageHandler,true); function messageHandler(e){ switch(e.origin){//表示数据发送源 case "friend.example

Designers and developers working together [closed]

夙愿已清 提交于 2019-11-29 20:55:04
The rich presentational capabilities of WPF and Silverlight mean developers like me will be working closely with graphic designers more often these days, as is the case in my next project. Does anyone out there have any tips and experience (from both points of view) on making this go more smoothly? For example, when I mentioned source control to a designer recently, I was quickly told you can't source control graphics, images etc, so it is a waste of time. So I responded: ok but, what about XAML files in WPF/Silverlight? Scott Hanselman spoke about this topic in a podcast , but he focused more