小编hea*_*ude的帖子

%op%运营商的意思是什么?例如"%in%"?

我尝试做这个简单的搜索但是%在R中的percent()符号上找不到任何东西.

%in%以下代码的含义是什么?

time(x) %in% time(y)哪里xy都是矩阵.

我如何查找%in%%stuff%模式后面的帮助和类似功能,因为我找不到帮助文件?

相关问题:

syntax r operators r-faq

40
推荐指数
4
解决办法
4万
查看次数

C#=>运营商?

我对=>C#中的运算符有疑问.

我正在看Expression Blend 4样本.Contact示例中有一行包括:

//In C:\Program Files (x86)\Microsoft Expression\Blend 4\Samples\en\Contacts\
//Contacts\ViewModels\ContactsViewModel.cs: 

contactDetailWindow.Closed += (o, e) =>
{                              
   finishedCallback(contactDetailWindow.DialogResult);

   // Or, C:\Program Files (x86)\Microsoft Expression\Blend 4\Samples\en\
   // Contacts\Contacts\ViewModels\ContactsViewModel.cs
   this.EditContact(newContact, dialogResult =>
   {
        if (dialogResult.HasValue && dialogResult.Value)
        {
        this.Contacts.Add(newContact);
        }
   });
};
Run Code Online (Sandbox Code Playgroud)

什么是=>运营商真正在做什么?它是否压倒一切?

c# lambda

22
推荐指数
3
解决办法
3万
查看次数

对于WPF,免费烛台示例?

我一直在寻找一个示例或教程来向我展示如何在WPF中制作烛台图表.我想用C#而不是XAML动态加载数据系列.我在XAML中的静态示例中看到过http://www.codeproject.com/KB/silverlight/SilverlightFinancialChart.aspx?msg=3104202 这是针对Visifire的,但希望用简单的C#填充.有人知道任何选择吗?谢谢

c# wpf candlestick-chart

12
推荐指数
1
解决办法
8512
查看次数

Redis是否仅允许字符串表示,但不允许数字值

我在这里的研究得到的答案很复杂.

  • 有人可以验证Redis服务器只能存储任何数值的表示吗?

  • 例如,如果我在lpush中使用带有double类型的Java客户端(Jedis),在发送到Redis之前是否需要将其转换为等效的字符串类型?

  • 或者有没有办法可以发送实际的数字类型,如双?如果是这样,是否有任何关于如何实现此目的的示例代码?

谢谢

java redis jedis

11
推荐指数
1
解决办法
1966
查看次数

Visual Studio 2012 C++使用Boost Signal2编译错误

我正在使用带有以下Boost Signals2代码的Visual Studio 2012 Ultimate:https://github.com/cfobel/boost_signals2/blob/master/hello_world_0.cpp 它会生成以下错误:

c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory(348): error C4996: 'std::_Uninitialized_copy0': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xmemory(333) : see declaration of 'std::_Uninitialized_copy0'
1>          c:\libraries\boost_1_52_0\boost\signals2\detail\auto_buffer.hpp(192) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<I,boost::variant<T0_,T1>*>(_InIt,_InIt,_FwdIt)' …
Run Code Online (Sandbox Code Playgroud)

c++ boost visual-studio boost-signals2

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

在Visual Studio 2012中为.NET C++ CLR支持的DLL项目降级.NET framework 4.5到4?

我在链接Visual C#.NET framework 4.0支持的项目时遇到此错误,因为我在4.5 .NET Framework中添加了C++ CLR DLL的引用.

error CS0246: The type or namespace name 'project' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)

因此,如何在Visual Studio 2012中将.NET Framework 4.5降级为4.0以支持此C++ CLR支持的DLL项目?

我之前看到过这个原因.对于我的C++,这个链接可能有助于我的事业http://msdn.microsoft.com/en-us/library/bb772098(v=vs.90).aspx

我刚刚发现了这个警告:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3274: The primary reference "X" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". 
Run Code Online (Sandbox Code Playgroud)

有人见过这个吗?那么我如何降级C++ DLL呢?

谢谢

.net c++ frameworks visual-studio

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

为什么在我的WebClient DownloadFileAsync方法下载空文件?

我有这个C#代码,但最终的esi.zip结果是0长度或基本上是空的.URL确实存在并确认手动下载文件.我很困惑买这个.

string zipPath = @"C:\download\esi.zip";

Client.DownloadFileAsync(new Uri("http://ec.europa.eu/economy_finance/db_indicators  
 /surveys/documents/series/nace2_ecfin_1409/all_surveys_total_sa_nace2.zip"), zipPath)
Run Code Online (Sandbox Code Playgroud)

谢谢

更新:我更新了根本不存在空格的代码,但它仍然下载0个字节.

c# url download

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

八度运行正常,但不显示情节?

我在那里使用Octave 2.3.4和绘图命令.我是Octave的新人.由于某种原因,此图不显示.这是我的M文件样本:

        1;

clear all;

%%%%%%%%% parameters setting  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
r=0.01; %risk free rate
S0=50; %underlying price 1

%create an implied volatiltiy surface using below parameters:
basevol=0.25; %implied volatility at time t=0 and in center of strike axis
skewT=-0.001; %icrease in vol for one unit increase in maturity
v1=0.1; %defines how much a smile is raised at left end from base vol
v3=0.2; %defines how much a smile is raised at right end from base vol

nK=100; %no. of strike steps …
Run Code Online (Sandbox Code Playgroud)

octave

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

如何将字典列表转换为IDictionary"C#"

有一个查询的答案

我试图了解将什么放入这个LINQ细分市场

pair => pair.Key, pair => pair.Value
Run Code Online (Sandbox Code Playgroud)

我的确切列表定义是这样的:

List<Dictionary<string, StockDetails>> myList = new List<Dictionary<string, StockDetails>>();
Run Code Online (Sandbox Code Playgroud)

这是我尝试过但它被标记为构建错误:

IDictionary<string, StockDetails> dictionary = myList.ToDictionary(myList => myList.Key, pair => myList.Value);
Run Code Online (Sandbox Code Playgroud)

如上所述,我只是想了解如何为成功构建正确定义它的LINQ部分:

myList => myList.Key, pair => myList.Value);
Run Code Online (Sandbox Code Playgroud)

我的构建错误是

Error   7   'System.Collections.Generic.Dictionary<string,xx.Models.StockDetails>' does not contain a definition for 'Key' and no extension method 'Key' accepting a first argument of type 'System.Collections.Generic.Dictionary<string,xx.Models.StockTickerDetails>' could be found (are you missing a using directive or an assembly reference?)

    xxxx    
Error   9   'System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,xx.Models.StockTickerDetails>>' does not contain a …
Run Code Online (Sandbox Code Playgroud)

c# linq idictionary

3
推荐指数
1
解决办法
2041
查看次数

MATLAB错误"在此上下文中不允许使用函数定义."

可能重复: 如何更正"在提示符或脚本中不允许使用函数定义"

毫不奇怪,如果我尝试在MATLAB中运行以下M脚本,我会收到错误

??? 错误:文件:kalmanmle.m行:47列:1在此上下文中不允许使用函数定义.

我不确定这是否可以像我一样运行.或者,我将如何在MATLAB命令行上运行它?

clear all;

%  State space reprsentation to be forcasted by kalman filter
%   zhi(t+1) = F*zhi(t) + v(t+1)   --> unbobserved varaibles
%   v~N(0,Q)
%   y(t) = A'*x(t) + H'*zhi(t) + w(t)
%   w~N(0,R)

global y;
global x;
global Hvec;
%%----    Enter  Input parameters
F = 0.9;
Q = 0.1;
A = 2;
n = 100;
Hvec = zeros(n,1); %index returns process
indexshock = normal_rnd(0,0.1,n,1);
Hvec(1) = 0;
for i = 2:n,
    Hvec(i) = 0.95*Hvec(i-1) …
Run Code Online (Sandbox Code Playgroud)

matlab

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