标签: sharing

OpenGL和多个GPU - 一般可能性

我想知道,是否有可能同时在多个GPU上运行多窗口OpenGL应用程序?更具体地说,假设我创建了一个具有两个窗口的应用程序,每个窗口彼此共享它的GL上下文.现在,如果我将其中一个窗口从显示器1(在GPU 1上运行)移动到显示器2(在GPU 2上运行),这实际上是否有效?单独分享上下文是否可以解决问题?

我的第一个猜测是否定的.如果这真的不那么简单,有没有办法实现这一目标?我还可以想象这取决于两个GPU是否由相同的驱动程序控制(更糟糕的是,让机器有ATI和nVidia卡,两者都支持不同的GL版本).

我很感激有关这个主题的任何见解,纯信息,因为我快速谷歌搜索后找不到任何东西.有谁知道可能性?

编辑:顺便说一句,不幸的是我目前没有多台GPU可用的机器,所以我会测试一下.

opengl gpu sharing openglcontext

5
推荐指数
1
解决办法
2519
查看次数

FB,TWITTER,G +共享网址和修复预览图像

我有这些简单的社交分享链接:

FB share link
     <a href="#" class="share-fb" onclick='window.open( "https://www.facebook.com/sharer/sharer.php?u=http://mysite.org", "myWindow", 
                  "status = 1, height = 300, width = 600, resizable = 0" )'></a>

TWITTER share link
<a href="#" class="share-tw" onclick='window.open( "https://twitter.com/intent/tweet?url=http://mysite.org", "myWindow", 
              "status = 1, height = 300, width = 600, resizable = 0" )'></a>
GOOGLE PLUS
 <a href="#" class="share-g" onclick='window.open( "https://plus.google.com/share?url=http://mysite.org", "myWindow", 
              "status = 1, height = 300, width = 600, resizable = 0" )'>
             </a>
Run Code Online (Sandbox Code Playgroud)

这些链接打开一个弹出窗口,共享页面链接.

我想要的是add a fixed site image preview用户要分享的每个链接.

如何添加预览图像,固定,foreach(FB,TWITTER,G +)?

注意:预览图像是指在此照片中显示的图像(链接www.google.it旁边):

在此输入图像描述

对于FB分享者我试过: …

twitter url sharing facebook-sharer google-plus

5
推荐指数
1
解决办法
8847
查看次数

在FaceBook Android上共享内容

我使用intent和Action.SEND在社交网络上分享我的自定义消息,如WhatsApp,twitter,Facebook和GMail.Gmail和除Facebook以外的其他应用程序一切正常!如何自定义我的代码以在Facebook上分享内容?我在Facebook上使用Facebook SDK分享没问题,但我想用意图来做.

这是我用的:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, knowTitle+"Read the full article via MomsApp by EnfaMama A+ at http://meadjohnsonasia.com.my/mobileapp");

sendIntent.putExtra(Intent.EXTRA_SUBJECT, "I just read "+knowTitle);
sendIntent.setType("*/*");
startActivity(Intent.createChooser(sendIntent, "Share Your Favorite Article"));
Run Code Online (Sandbox Code Playgroud)

android facebook sharing android-intent

5
推荐指数
1
解决办法
1万
查看次数

在 xamarin 的路径上共享违规

我对 Android 编程很陌生。我有一个代码,它在指定的文件夹中创建一个文件,然后尝试向其中写入一些内容。像下面这样:

        path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);
        var filename = Path.Combine(path, "Test.xml");
        Directory.CreateDirectory (path);
        if (!File.Exists (path + "/" + "Test.xml")) {
            File.Create (path + "/" + "Test.xml");
        }
        using (var streamWriter = new StreamWriter(filename, true))
        {
            streamWriter.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
            streamWriter.WriteLine ("<Apples>");
            streamWriter.WriteLine ("</Apples>");
        }
Run Code Online (Sandbox Code Playgroud)

使用 (var streamWriter = new StreamWriter(filename, true)) 时,我在路径错误遇到了共享冲突

有人可以指出我到底哪里出错并为我提供解决方案。

谢谢,阿尼尔班

path sharing

5
推荐指数
1
解决办法
1万
查看次数

我可以让YouTube出现在我的OS X应用程序的共享表中吗?

根据Apple文档,YouTube不包含在可用的共享服务中,实际上当我查看"系统偏好设置"中的"共享菜单"扩展时,我看不到它.

使用NSSharingServicePicker如下方式在我自己的应用程序中显示共享表也不包括YouTube.

NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:@[movieFileURL]];
[sharingServicePicker showRelativeToRect:myView.bounds ofView:myView preferredEdge:NSMinYEdge];
Run Code Online (Sandbox Code Playgroud)

但是,在QuickTime Player或iMovie中使用共享表时,YouTube是一个选项,如下所示.有没有办法让YouTube在我的应用程序中显示为一个选项,或者Apple是否只是将YouTube添加到这些应用程序而不将其添加到操作系统范围列表中?

YouTube在QuickTime播放器中共享 YouTube在iMovie中分享

youtube macos sharing

5
推荐指数
1
解决办法
2950
查看次数

UIActivityViewController:排除非Apple共享扩展?

我想阻止我的应用使用扩展机制将其内容分享给某些其他应用.例如,我希望用户能够共享链接,但不能使用Gmail应用.

我对这部纪录片的理解是:以下内容应该有效:

// vieController previously initialised like this: UIActivityViewController(activityItems: [provider], applicationActivities: nil)

viewController.excludedActivityTypes = ["com.google.Gmail.ShareExtension"]
Run Code Online (Sandbox Code Playgroud)

这不起作用.我错过了什么吗?非Apple活动类型是否不适用于此机制?

sharing ios uiactivityviewcontroller ios-extensions

5
推荐指数
1
解决办法
1008
查看次数

FaceBook 的 SLComposeViewController 总是返回 SLComposeViewControllerResult.Done

就在最近,我的标准共享代码按预期工作。当用户取消Facebook 共享时,SLComposeViewController.completionHandler 返回 SLComposeViewControllerResult。取消

然而,现在,在 Apple 或 Facebook 进行更新后(更改包括撰写视图的新设计),completionHandler 总是得到结果Done

我在以下方面得到相同的行为:

  • iPhone 6s plus 运行 iOS 9.0.2
  • iPhone 6 plus 运行 iOS 9.0.2
  • 运行 iOS 8.2 的 iPhone 5s

其他人有同样的问题吗?下面是我的代码:

        let fbComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)

        fbComposeViewController.addURL( NSURL(string:"http://www.some.url.com/)"))
        fbComposeViewController.completionHandler = { (result:SLComposeViewControllerResult) -> Void in
            switch result {
            case SLComposeViewControllerResult.Cancelled:
                print("Cancelled") // Never gets called
                break

            case SLComposeViewControllerResult.Done:
                print("Done")
                break
            }
        }

        self.presentViewController(fbComposeViewController, animated: true) {
        }
Run Code Online (Sandbox Code Playgroud)

facebook sharing swift ios9

5
推荐指数
1
解决办法
1334
查看次数

iOS:在不同用户之间共享数据

我对此非常困惑,如果在其他地方已经回答了,请原谅我。我对 iOS 很陌生,想创建一个简单的购物清单应用程序。用户 A 应该能够创建一个可以与用户 B 私下共享的购物清单。一旦共享,用户 B 应该不仅可以查看 A 的清单,还可以对其进行修改。B 所做的任何更改也应反映在 A 的列表中。

Apple 的 Cloudkit 是否提供这样的功能?我还阅读了一些关于 BaaS、PaaS 等的内容,但不知道它们是否是我需要的。任何帮助将不胜感激。谢谢

sharing ios cloudkit

5
推荐指数
2
解决办法
2482
查看次数

如何使用意图共享分享GIF图像到可用的应用程序?

我想与whatsapp等可用的应用程序共享.gif,但无法在我的drawable资源中获得有效的Uri gri.

 Uri path = Uri.parse("android.resource://my_package_name/" + R.drawable.gif_1);
    Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
    shareIntent.setType("image/gif");
    shareIntent.putExtra(Intent.EXTRA_STREAM, path);
Run Code Online (Sandbox Code Playgroud)

有很多关于共享图像的解决方案,但没有关于gif共享的解决方案,请帮忙

android sharing gif android-intent

5
推荐指数
1
解决办法
4768
查看次数

使用版本控制在项目之间共享 Json Schema 文件

问题

我们有一些独立的项目(微服务),在他们生命中的某个时刻会引用一些 JSON 模式文件,不用说每个项目都有自己的编程堆栈(尽管主要是 Nodejs 和 Golang)。

在保持版本控制的同时在不同项目之间共享此类数据的最佳实践是什么。

波纹管我描述了我自己的解决方案,但是我也想得到您的反馈。

我的解决方案

  1. 我已经建立了一个 github 项目并将 json 模式文件放在那里
  2. 对于架构的每次更改,我都会更新 repo 并用新版本标记它
  3. 我使用jsdelivr像这样访问它:https : //cdn.jsdelivr.net/gh/[GITHUB-ID]/[GITHUB-PROJECT]@[TAG]/schema.js
  4. 当我想克隆需要架构文件的随机微服务的代码时,作为构建过程的一部分,我从jsdelivr下载架构文件并将其保存到我的本地存储库,但是下载的架构文件被 git 忽略.

你怎么看,有没有更好更顺畅的方法来处理这个案子?

schema json sharing multiple-projects microservices

5
推荐指数
1
解决办法
1225
查看次数