sharing

Object Sharing between Applications?

大憨熊 提交于 2019-11-28 07:03:47
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#? There are a few IPC technologies you can use that though pre-date WCF are still relevant today. Pipes Pipes is one such technology. It's binary, runs in

Social action sheet (like on iOS 6)

[亡魂溺海] 提交于 2019-11-28 04:31:22
on iOS 6 a change was that when you want to share something it brings up an action sheet similar to this: I have seen a few other apps that use this, is there a native way to do this without making a custom action sheet? Thanks! j9suvak NSString *textToShare = @"your text"; UIImage *imageToShare = [UIImage imageNamed:@"yourImage.png"]; NSArray *itemsToShare = @[textToShare, imageToShare]; UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil]; activityVC.excludedActivityTypes = @[UIActivityTypePrint,

Ignore image when sharing a page with Facebook

大憨熊 提交于 2019-11-28 04:30:08
问题 I know it's possible to tell Facebook to use a certain image when sharing a page by adding a meta tag. But I was wondering if the opposite is possible: telling facebook NOT to user a certain image as the thumbnail when sharing a page. I am asking this question because when I share a link from my site it always shows some image I use in the footer first (as the default thumbnail), which is bad :) so I want Facebook to ignore that specific image when sharing. Thanks in advance! 回答1: This is a

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

为君一笑 提交于 2019-11-28 01:49:54
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? 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" /> </intent-filter> </activity> Then create an intent with the same action string : Intent intent = new Intent("com

Sharing C# code between Windows and Silverlight class libraries

你说的曾经没有我的故事 提交于 2019-11-27 22:56:09
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 class files and put compiler directives into the classes to allow different using declarations and

Sharing variables between C# and C++

点点圈 提交于 2019-11-27 20:10:38
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 // Dll import <--- ok public void method1() { int [] result; for(int i=0; i<many_times; i++) { result

Sharing & modifying a variable between multiple files node.js

[亡魂溺海] 提交于 2019-11-27 17:59:34
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 11 -9 Background: I have an application (irc bot), and I want to add a feature that peeps can do @add 1

UIActivityViewController customize text based on selected activity

巧了我就是萌 提交于 2019-11-27 17:08:25
问题 I want to customize text for the same information but when I am sharing it on Facebook I don't want to use the twitter hash tags or @username scheme... How can I diversify text for sharing based on which sharing service would be used? Ofcourse I'm using UIActivityViewController: UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[shareText, shareURL] applicationActivities:nil]; 回答1: Instead of passing the text strings into the initWithActivityItems

Sharing cookies across different domains and different applications (classic ASP and ASP.NET)

一世执手 提交于 2019-11-27 09:29:16
Is there a way to share cookies across different domains and different applications (classic ASP and ASP.NET) No, there isn't. The issue is the cross domain one, rather than the asp.net/classic asp and is security reasons. If the domains are subdomains you can share the cookies, provided you use a cookie path that both can access (ie. for the domain sub.example.com you can read and write cookies using the example.com domain). You can share cookies via some behind the scenes communication between servers, or through querystrings. Both are ill advised, unless the information in the cookies is

Sharing from Windows Phone 8

╄→尐↘猪︶ㄣ 提交于 2019-11-27 08:44:49
I am working on a Windows Phone 8 app and am trying to share content through the DataTransferManager. The Windows API documentation says it is supported in Windows Phone but when the DataTransferManager.GetForCurrentView() function is called I get an exception System.NotSupportedException was unhandled by user code HResult=-2146233067 Message=Specified method is not supported. Source=Windows InnerException: I have been searching for an answer and can't find anyone else with the same issue, any help would be appreciated. All samples on this topic seem to be Windows 8 specific, but Phone 8 does