在MSDN上,我Portable Class Library在版本信息下注意到有关a的部分.
请参阅System.Object示例.http://msdn.microsoft.com/en-us/library/system.object.aspx
我做了一个简短的谷歌搜索,找不到任何关于Portable Class Library.这里有谁知道它是什么或在哪里可以找到更多相关信息?
嘿,这将是一个愚蠢的问题.我试图在我的本地系统上获取一个文件,然后我不断被FileNotFoundException抛出.
有人让我直接请:)
if( File.Exists(@"C:\logs\hw-healthways-prod_2009-08-26.tar"))
{
Console.WriteLine("Yay");
}
else
{
throw new FileNotFoundException();
}
Run Code Online (Sandbox Code Playgroud)
尝试将文件移动到与正在执行的应用程序相同的位置,并执行以下操作:
if( File.Exists("hw-healthways-prod_2009-08-26.tar"))
Run Code Online (Sandbox Code Playgroud)
一样.
然后我做了一个随机的txt文件并把它停在那里.."me.txt"
它有效吗?!那么你的文件名是什么问题?
我有一个简单的插入语句到MonoDroid上的SQLite数据库中的表.
它说,当插入数据库时
SQLite错误Mono.Data.Sqlite.SqliteStatement.BindParameter中提供给命令的参数不足
我认为存在错误或错误消息具有误导性.因为我只有5个参数而且我提供了5个参数,所以我看不出这是怎么回事.
我的代码如下,任何帮助将不胜感激.
try
{
using (var connection = new SqliteConnection(ConnectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
command.CommandTimeout = 0;
command.CommandText = "INSERT INTO [User] (UserPK ,Name ,Password ,Category ,ContactFK) VALUES ( @UserPK , @Name , @Password , @Category , @ContactFK)";
command.Parameters.Add(new SqliteParameter("@Name", "Has"));
command.Parameters.Add(new SqliteParameter("@Password", "Has"));
command.Parameters.Add(new SqliteParameter("@Cateogry", ""));
command.Parameters.Add(new SqliteParameter("@ContactFK", DBNull.Value));
command.Parameters.Add(new SqliteParameter("@UserPK", DbType.Guid) {Value = Guid.NewGuid()});
var result = command.ExecuteNonQuery();
return = result > 0 ;
}
}
}
catch (Exception exception)
{ …Run Code Online (Sandbox Code Playgroud) 我activity在我的应用程序中使用电子邮件和密码字段进行了简单的登录.没有与一个奇怪的问题hint和cursor位置在电子邮件中EditText:

从图像中可以看出,默认情况下,cursor它不在第一个位置.它在提示后显示(好像hint是输入文本)
到目前为止layout,密码EditText与电子邮件密码相同,但它没有此问题:

任何人都知道为什么会这样?我该如何解决?
这是活动的布局:
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
style="@style/LoginFormContainer"
android:orientation="vertical" >
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:hint="@string/prompt_password"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:gravity="center" >
<!-- sign in button -->
<TextView
android:gravity="center"
android:id="@+id/sign_in_button"
android:layout_width="120dip"
android:layout_height="50dip"
android:layout_alignParentRight="true"
android:layout_marginLeft="25dip"
android:layout_marginRight="20dip"
android:background="@drawable/btn_background_login_and_offered_and_followers"
android:clickable="true"
android:onClick="signInButton"
android:text="@string/action_sign_in_register" />
<!-- …Run Code Online (Sandbox Code Playgroud) 我们有许多设备(大约50-60个设备)通过MQTT连接到IoTHub.为了节省电量,我们的设备每5分钟唤醒一次,保持清醒1秒钟以获取任何消息,如果没有任何消息,他们会重新入睡.这工作正常,直到大约2周前,当这停止工作.
在尝试了一些事情之后,我们发现如果我们将Stay-Awake时间增加到3秒,那么当设备连接时,IoTHub会将消息推送到设备.平均而言,一旦设备连接,物联网中心大约需要2.5秒才能推送消息.这将很快耗尽我们的电池,我们不能将其用作解决方案.考虑到设备与IoTHub位于同一区域,等待消息的发送似乎太长了.
我们还注意到,有时连接超时需要增加到接近10秒才能成功连接,这似乎太长了.
在我们的物联网设备上,我们使用的是MQTT协议,由于硬件资源有限,我们无法使用Azure IoT sdk
所以这里的问题是:
一旦设备连接,IoTHub花费2-3秒推送mqtt消息是否正常?
与IoTHub建立连接需要10秒钟是否正常?
更新1 - 2017年5月5日上午10:11
我通过MSDN向Microsoft提出了这个问题,这里是问题的链接:https://social.msdn.microsoft.com/Forums/en-US/9d24c261-2280-4515-8e89-8097625307ee/azure-iothub-是-既能更比23秒到调度的消息-通MQTT到所述的设备,当?论坛= azureiothub
我们在云服务上使用Azure sdk.然而,在物联网设备上,由于硬件限制,我们无法使用sdk,因此我们只是使用MQTT协议来连接,订阅,处理消息,然后断开连接.我们位于澳大利亚(墨尔本SE),我们正在测试多个部署,有些部署在AU,有些部署在美国东部,所有部署都给我们类似的延长等待时间来连接和发送/推送消息到物联网设备
我使用Azure移动服务组件在Xamarin.iOS上开发了一个应用程序,它一直工作正常,就在今天我做了一些更改然后我开始得到这个例外.无论我做什么,它仍然认为这个.Ext库缺失了
找不到当前平台的Windows Azure移动服务程序集.确保当前项目引用Microsoft.WindowsAzure.Mobile和以下特定于平台的程序集:Microsoft.WindowsAzure.Mobile.Ext.
我已经确保通过Xamarin.Studio删除和安装组件,我还添加了库的手动引用(具有特定于平台的扩展)但仍然没有用.
有任何想法吗?
有谁知道学习如何实施A/B split测试的任何好资源(书籍,文章,现有软件等)ASP.NET?
关于何时unregisterListener为传感器管理器,我有基本的问题.是应该在onStop()或onDestroy().
用例:
我想accelorometer点击开始按钮记录,当用户点击停止按钮时停止.数据的频率是每分钟.所以我开始了timer.
但问题是,每次orientation根据Android架构进行更改onStop()都会被调用.在onStop()我取消计时器和取消注册听众.
再次如果我在onResume()频率中启动定时器/寄存器监听器将不会保持1分钟并且在没有用户按下开始按钮的情况下记录数据.
有人可以帮我解决这个问题.
谢谢.
我需要一些有经验的人的帮助.我希望这很容易.我只是想表明新的视图(创建它没有 XML layouts上述主程序的观点).这是整合AdMob.com广告块:
我写了这样的代码:
AdView ad = new AdView(this);
ad.layout(10, 10, 100, 100);
ad.setVisibility(View.VISIBLE);
ad.bringToFront();
ad.requestFocus();
ad.invalidate();Run Code Online (Sandbox Code Playgroud)
如你所见 - 没有任何帮助,没有窗口可见
我做错了什么?谢谢!
PS我是在制作Activity的onCreate(Bundle),但我也在其他地方试过.
我正在尝试使用该调用编写asynchronous测试。到目前为止,这是我的代码。mochadone();
it('should have data.', function () {
db.put(collection, key, json_payload)
.then(function (result) {
result.should.exist;
done();
})
.fail(function (err) {
err.should.not.exist;
done();
})
})
Run Code Online (Sandbox Code Playgroud)
但是,结果是代码仅在不等待 then的情况下执行,否则将无法真正返回结果。是否done();需要在代码中的其他位置?
还在此处发布了整个仓库:https : //github.com/Adron/node_testing_testing
android ×3
.net ×2
c# ×2
testing ×2
ado.net ×1
asp.net ×1
asp.net-mvc ×1
asynchronous ×1
azure ×1
controls ×1
file ×1
java ×1
javascript ×1
mocha.js ×1
mqtt ×1
node.js ×1
sqlite ×1
view ×1
xamarin ×1
xamarin.ios ×1