小编AlS*_*Ski的帖子

挂起事件不使用WinRT引发

我在使用WinRT在Windows Phone 8.1上暂停事件时遇到问题,它不会触发.我不知道为什么.这是我的代码:

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
    InitializeComponent();

    Suspending += OnSuspending;
#if DEBUG
    this.displayRequest = new DisplayRequest();
#endif
}

/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory …
Run Code Online (Sandbox Code Playgroud)

c# windows-runtime windows-phone-8.1 win-universal-app uwp

35
推荐指数
1
解决办法
8360
查看次数

与emacs中的列对齐?

我有一个.dat文件,如下所示:

NGC0448 A3D:2010B g:o,r:o,i:o
NGC0474 A3D:2011A,2013A g:o,r:o,i:o,u:o
Run Code Online (Sandbox Code Playgroud)

现在我想将它们对齐为这种形式:

NGC0448    A3D:2010B          g:o,r:o,i:o
NGC0474    A3D:2011A,2013A    g:o,r:o,i:o,u:o
Run Code Online (Sandbox Code Playgroud)

我试着用C-u M-X alignM-x align-regexp使用=,但没有作品.有人能提出解决方案吗?

emacs alignment

10
推荐指数
1
解决办法
4428
查看次数

闪亮的reactiveUI在相同的条件变量上挂起多个uiOutput调用

我试图用滑块进行反应式UI,通过闪亮的下拉进入和退出.我有一个带有reactiveUI滑块的服务器(server.R):

library(shiny)
shinyServer(function(input, output) {
  output$slider1 <- reactiveUI(function() {
    sliderInput("s1", "slide 1", min = 1,  max = 100, value = 1)  
  })

  output$slider2 <- reactiveUI(function() {
    sliderInput("s2", "slide 2", min = 1,  max = 100, value = 1)   
  }) 
})
Run Code Online (Sandbox Code Playgroud)

我可以使用以下代码(ui.R)运行服务器:

library(shiny)
shinyUI(pageWithSidebar(
  headerPanel("Hello Shiny!"),
  sidebarPanel(

    selectInput("dataset", "number of buckets:", 
                choices = c(1,2,3)),

    conditionalPanel(
      condition = "input.dataset==2",
      uiOutput("slider1"),uiOutput("slider2")),

    conditionalPanel(
      condition = "input.dataset==1",
      sliderInput("s1", "slide 1", min = 1,  max = 100, value = 1) 
      )
  ),
  mainPanel(
  )
))
Run Code Online (Sandbox Code Playgroud)

但如果我尝试让两个conditionalPanel调用uiOutput,服务器会冻结: …

r shiny

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

Lync - 与ContactEndpoints的不一致行为

我正在为基于Lync的公司目录开发自定义UI.使用Lync 2013我执行此搜索:

Container.Instance.Lync.ContactManager.BeginSearch(SearchQuery,
            SearchProviders.GlobalAddressList,
            SearchFields.AllFields,
            SearchOptions.IncludeContactsWithoutSipOrTelUri,
            500,
            ContactsAndGroupsCallback, SearchQuery);
Run Code Online (Sandbox Code Playgroud)

对于每个匹配的联系人,我尝试访问其端点以显示电话号码:

var cit = ContactInformationType.ContactEndpoints;
var endpoints = contact.GetContactInformation(cit) as List<object>;
Run Code Online (Sandbox Code Playgroud)

问题

如果找到联系人在我用来连接Lync的帐户的联系人列表中,那么我可以访问完整的详细信息(5个端点).但是,如果他不在联系人列表中,我只能访问1个端点.

任何想法为什么会这样发生?是否需要关闭全球隐私设置?

如何随时访问所有端点?

谢谢.

PS:我试图单独加载结果集中的每个联系人,但仍然会得到相同的行为.

c# lync

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

UILabel在initWithCoder中为零

我需要在表格视图单元格中设置一些标签字体和颜色.

我在用:

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        // Initialization code
        [self customize];
    }
    return self;
}
Run Code Online (Sandbox Code Playgroud)

在自定义方法中,我将两个标签设置为具有相同的字体和文本颜色

self.label1.textColor = somecolor;
self.label2.textColor = somecolor; // same color
Run Code Online (Sandbox Code Playgroud)

问题是,他们最终有不同的颜色(一个深灰色,另一个浅灰色)我检查了笔尖,并设置了出口.通过单步执行代码,我注意到标签在那时是零.那他们在哪里实例化?为什么他们没有相同的颜色?

uilabel ios

2
推荐指数
1
解决办法
588
查看次数