sharing

sharing variables between running applications in C#

江枫思渺然 提交于 2019-11-27 06:21:28
问题 I am developing in C# two simple applications, running in the same local machine without network requirements. The first application initializes an DLL (Class1) and set a variable. The second application just read it the data which was previously stored. Both applications instanciates the same Class1. Code: DLL (Class1): public class Class1 { private string variableName; public string MyProperty { get { return variableName; } set { variableName = value; } } } Application A: class Program {

How to export an activity so other apps can call it?

不羁岁月 提交于 2019-11-27 04:50:04
问题 Well I searched a lot, but I didn't find a precise answer how to export an Activity, so an app can start it with startActivityforResult . How do I achieve that? Do I have to change the Manifest in some ways? 回答1: You need to declare an intent-filter in your Manifest (I took the following example from Barcode Scanner) : <activity android:name="..."> <intent-filter> <action android:name="com.google.zxing.client.android.SCAN" /> <category android:name="android.intent.category.DEFAULT" /> <

Sharing C# code between Windows and Silverlight class libraries

拈花ヽ惹草 提交于 2019-11-26 23:15:34
问题 We wrote a small Windows class library that implements extension methods for some standard types (strings initially). I placed this in a library so that any of our projects would be able to make use of it by simply referencing it and adding using XXX.Extensions. A problem came up when we wanted to use some of these methods in Silverlight. Although all the code was compatible, a Windows library can't be referenced in Silverlight so we created a Silverlight library that had links to the same

Is it possible to add a link to download a file that can only be downloaded by sharing it on Facebook?

无人久伴 提交于 2019-11-26 22:47:34
Is this scenario possible? Customer goes to my website, wants to download a PDF technical document that interests them, they click the Download button and a Facebook share window appears to log them in to share it to Facebook. Once they click Share and it is posted on their wall then the download begins? Many thanks. Ian UPDATE According to Facebook new policy, this act is not allowed. Use at your own risk. I hold no responsibilities for using this. Yes, using the JavaScript SDK , it provides a response (it doesn't anymore) We will create an if statement to see if the response has a post_id if

Sharing a complex object between Python processes?

那年仲夏 提交于 2019-11-26 21:56:04
I have a fairly complex Python object that I need to share between multiple processes. I launch these processes using multiprocessing.Process . When I share an object with multiprocessing.Queue and multiprocessing.Pipe in it, they are shared just fine. But when I try to share an object with other non-multiprocessing-module objects, it seems like Python forks these objects. Is that true? I tried using multiprocessing.Value. But I'm not sure what the type should be? My object class is called MyClass. But when I try multiprocess.Value(MyClass, instance) , it fails with: TypeError: this type has

Object Sharing between Applications?

梦想与她 提交于 2019-11-26 20:16:13
问题 Let's say I have a large data array updated 1000+ times per second. Another application wants to access and read the array in a short interval. Both applications are on the same machine. I have tried using WCF for interprocess communication, but serializing and sending the whole array (or a large object) thousands of times per second is unfeasible performance wise. Is there a way to directly access objects from different applications in c#? 回答1: There are a few IPC technologies you can use

Sharing variables between C# and C++

僤鯓⒐⒋嵵緔 提交于 2019-11-26 20:13:57
问题 I'm writing a software in c# which needs to call many times and by many threads a function in a c++ unmanaged dll. I have a C++ file like that: // "variables" which consist in some simple variables (int, double) // and in some complex variables (structs containing arrays of structs) extern "C" { __declspec(dllexport) int function1() { // some work depending on random and on the "variables" } } and a C# class like that public class class1 { // "variables" <--- the "same" as the C++ file's ones

Updating GUI (WPF) using a different thread

那年仲夏 提交于 2019-11-26 19:55:29
Just have a problem here that I have no idea how to fix. I am doing a small project which involves a GUI and serial data. The GUI is being run by the main thread and since the data variables that hold my incoming serial data need to be updated continuously, these are being updated in a second thread. The problem is when I need to update some textboxes on the GUI, these need to be updated with data from the secondary thread and that is where my problem lies. I can't update them directly from the secondary thread and I have no idea how I would transfer data from my secondary thread and work out

Has Facebook sharer.php changed to no longer accept detailed parameters?

牧云@^-^@ 提交于 2019-11-26 19:23:30
We have been opening a sharing popup (via window.open) with the URL like https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][0]=EXAMPLE and until some unknown point in the last month or so everything was fine. What is happening now is; the popup dialog appears and correctly includes the Title, Description, Image and URL provided by the query string parameters, but when the post is submitted, the resulting wall post on Facebook is missing the Title, Description and Image, though it still links to the correct URL. Does anyone know if

Sharing & modifying a variable between multiple files node.js

我的未来我决定 提交于 2019-11-26 19:17:53
问题 main.js var count = 1; // psuedocode // if (words typed begins with @add) require('./add.js'); // if (words typed begins with @remove) require('./remove.js'); // if (words typed begins with @total) require('./total.js'); module.exports.count = count; total.js var count = require('./main.js').count; console.log(count); add.js var count = require('./main.js').count; count += 10; console.log(count); remove.js var count = require('./main.js').count; count -= 10; console.log(count); console.log 1