小编Pic*_*les的帖子

如何同时发送捆绑的卡?

我已经设置了一个Java应用程序,我正在创建一组4张卡片.问题是所有卡片都不会立刻进入.有时候只有一个出现,然后几秒钟或几分钟后出现其他卡片.如何让他们同时出现在耳机上?

编辑:我尝试了HTML分页,但是没有用,现在我觉得我更困惑了.所以在我的senario中,我想向用户发送一堆他们可以导航到的地标.我希望捆绑中的所有地标,我想要捆绑的捆绑包不是捆绑中的选项说"这里是你的地标",我希望捆绑包同时到达用户.我怎样才能做到这一点?

TimelineItem timelineItemEmpire = new TimelineItem();
timelineItemEmpire.setText("Empire State Building");

// Triggers an audible tone when the timeline item is received
timelineItemEmpire.setNotification(new NotificationConfig().setLevel("DEFAULT"));
Location empireLoc = new Location();
empireLoc.setLatitude(40.748492);
empireLoc.setLongitude(-73.985868);
timelineItemEmpire.setLocation(empireLoc);

// Attach an image, if we have one
URL url = new URL(WebUtil.buildUrl(req, "/static/images/empirestate.jpg"));
timelineItemEmpire.setBundleId(bundleId);

List<MenuItem> menuItemList = new ArrayList<MenuItem>();
menuItemList.add(new MenuItem().setAction("NAVIGATE"));
timelineItemEmpire.setMenuItems(menuItemList);

MirrorClient.insertTimelineItem(credential, timelineItemEmpire, contentType, url.openStream());

TimelineItem timelineItemCP = new TimelineItem();
timelineItemCP.setText("Central Park");

// Triggers an audible tone when the timeline item is received
timelineItemCP.setNotification(new NotificationConfig().setLevel("DEFAULT"));

// Attach …
Run Code Online (Sandbox Code Playgroud)

java google-glass google-mirror-api

7
推荐指数
1
解决办法
446
查看次数

如何从ImageMagick Image获取c缓冲区

我正在使用ImageMagick的iPhone端口.我试图循环动画gif的帧并将每个帧转换为UIImage.我知道我可以用NSData初始化一个UIImage,我可以用const void*初始化.那么如何获取图像的缓冲区和长度?

这是代码:

    MagickReadImage(wand, filename);

        while(MagickHasNextImage(wand)) {
             Image *myImage = GetImageFromMagickWand(wand);
             //HELP ME PLEASE
             const void *myBuff =myImage->blob;  //guessing this is the right way to get the buffer?
             int myLength = ????? //no idea how to get the length
             NSData *myData = [[NSData alloc] initWithBytes:myBuff length:myLength];
             UIImage myImage = [[UIImage alloc] initWithData:myData]];
             MagickNextImage(wand);
    }
Run Code Online (Sandbox Code Playgroud)

c++ imagemagick objective-c

6
推荐指数
1
解决办法
821
查看次数

如何在我的Lucene应用程序中使用ASCIIFoldingFilter?

我有一个标准的Lucene应用程序,它从索引中搜索.我的索引包含很多法语术语,我想使用ASCIIFoldingFilter.

我做了很多搜索,我不知道如何使用它.构造函数接受一个TokenStream对象,当你发送一个字段时,我是否在分析器上调用检索TokenStream的方法?那我该怎么办?有人能指出我正在使用TokenFilter的例子吗?谢谢.

java lucene

3
推荐指数
2
解决办法
5064
查看次数