小编Shi*_*ner的帖子

如何在Xamarin表单NavigationPage中更改backGround颜色

我正在尝试在navigationPage中更改navigationBar的背景颜色我正在使用此代码`使用System;

using System;
using Xamarin.Forms;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
namespace P
{
public class App : Application
{
    public App ()
    {
 MainPage = new NavigationPage(new LoginPage());
    }
    protected override void OnStart ()
    {
    }
    protected override void OnSleep ()
    {
    }
    protected override void OnResume ()
    {
        // Handle when your app resumes
    }
   }
  }
Run Code Online (Sandbox Code Playgroud)

我该怎么做?

c# xamarin xamarin.forms

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

MongoDB 不在嵌套文档数组中使用索引

我有一个庞大而复杂的集合,如下所示:

{ 
"_id" : ObjectId("574c55312368e5aa90bbf27b"), 
"id" : NumberInt(10000), 
"BookieId" : NumberInt(1), 
"EventBookieId" : null, 
"LeagueId" : NumberInt(214), 
"LeagueNameId" : NumberInt(4571), 
"Team1Id" : NumberInt(435), 
"Team1NameId" : null, 
"Team2Id" : NumberInt(430), 
"Team2NameId" : null, 
"EventDateTime" : ISODate("2013-09-14T13:00:00.000+0000"), 
"isNew" : true, 
"CountryId" : NumberInt(36), 
"isCountry" : true, 
"isLeague" : true, 
"Gameid" : null, 
"Reversed" : false, 
"eventId" : NumberInt(10000), 
"bets" : [
    {
        "id" : NumberInt(1), 
        "EventConnectionId" : NumberInt(10000), 
        "isCorners" : false, 
        "DateTime" : ISODate("2013-09-10T08:06:43.333+0000"), 
        "IsLive" : false, 
        "Team1Score" : null, 
        "Team2Score" : …
Run Code Online (Sandbox Code Playgroud)

arrays indexing collections nested mongodb

4
推荐指数
1
解决办法
3687
查看次数

MongoDB C#驱动程序和DateTime字段

我正在使用C#驱动程序将文档插入MongoDB集合,当我调试应用程序时,其中一个字段类型与DateTime我在"FrameTimeStamp"字段中看到服务器时间我将传递给Mongo,这是我的代码:

FrameDocument frameDoc = new FrameDocument();
frameDoc.Frame = imageBA;
frameDoc.EventCodeId = 1;
frameDoc.SesionId = 1;
frameDoc.FrameTimeStamp = DateTime.Now;
frameDoc.ServerUserId = (int)toMongoDt.Rows[0]["ServerUserId"];
frameDoc.TraderId = (int)toMongoDt.Rows[0]["TraderId"];
frameDoc.ActivePick = (int)toMongoDt.Rows[0]["ActivePick"];
frameDoc.TraderName = (string)toMongoDt.Rows[0]["TraderName"];
frameDoc.ServerUserName = (string)toMongoDt.Rows[0]["ServerUserName"];

var mongoCon = "mongodb://127.0.0.1";
MongoClient client = new MongoClient(mongoCon);
var db = client.GetDatabase("Video");

var frameCollection = db.GetCollection<FrameDocument>("Frame");
frameCollection.InsertOne(frameDoc);
Run Code Online (Sandbox Code Playgroud)

在shell中,当我读取数据时,我会看到以下格式: 2016-08-14T06:10:3​​3.295Z并且时间不是服务器时间,它的UTC,我如何强制mongo将DateTime写为我通过了,?

c# datetime-format mongodb

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

Jquery mobile 1.2和PhoneGap 2.2.0页面过渡闪烁

在使用JqueryMobile 1.2和PhoneGap/Cordova 2.2.0进行项目时,我遇到了页面转换问题,当我在元素上使用data-transition = slide时,它工作得非常慢'如果我使用data-transition = none我得到屏幕之间的黑色闪烁,我正在使用IOS 6.1在iphone 4上工作'我已经尝试了所有的答案,我发现听到但没有任何效果,当我使用data-transition ="none"导航时,我仍然会发出黑色闪烁

我希望有人可以帮助我'听到的是代码:

<!doctype html>
<html>
<head>
    <title> jQuery Mobile Boilerplate - Collapsibles Content</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- jQuery Mobile CSS bits -->
    <link rel="stylesheet" href="css/jquery.mobile-1.2.0.min.css" />

    <!-- if you have a custom theme, add it here -->
    <link rel="stylesheet"  href="themes/jQuery-Mobile-Boilerplate.css" />

    <!-- Custom css -->
    <link rel="stylesheet" href="css/custom.css" />

    <!-- Javascript includes -->
    <script src="js/jquery-1.8.2-min.js"></script>
    <script src="js/mobileinit.js"></script>
    <script src="js/jquery.mobile-1.2.0.min.js"></script>
    <script src="js/application.js"></script>
</head> 
<body> 
    <div data-role="page">

        <div data-role="header">
            <a …
Run Code Online (Sandbox Code Playgroud)

iphone jquery jquery-mobile cordova ios6

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

Docker 构建错误,存档/tar:不支持套接字

我是 Docker 的新手,正在尝试构建映像。我使用 Docker commit 命令成功地做到了这一点,但是当我尝试使用 Dockerfile 做到这一点时,我收到以下错误:

shim@shim-Inspiron-5570:~$ sudo docker build -t shim/debian .
[sudo] password for shim: 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/116f2fb4b7 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/11a6628921 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/2cb20241cd to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/4964606154 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/bc1be858c1 to tar: archive/tar: sockets not supported 
^Cnding build context to Docker daemon …
Run Code Online (Sandbox Code Playgroud)

linux docker dockerfile

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

Mac上的Android Studio错误

刚刚在我的mac上用osx 10.8.4安装了Android Studio 0.2.2并且opend新项目尝试编译它并得到了这个:'Gradle:执行失败的任务':MyApplication:dexDebug'.

无法运行命令:/ Applications/Android Studio.app/sdk/build-tools/18.0.0/dx --dex --output /Users/shimon_wi/AndroidStudioProjects/MyApplicationProject/MyApplication/build/libs/MyApplication-debug.dex/Users/shimon_wi/AndroidStudioProjects/MyApplicationProject/MyApplication/build/classes/debug/Users/shimon_wi/AndroidStudioProjects/MyApplicationProject/MyApplication/build/dependency-cache/debug/Applications/Android Studio.app/sdk/extras/android/m2repository/ com/android/support/support-v4/13.0.0/support-v4-13.0.0.jar错误代码:1输出:/ Applications/Android Studio.app/sdk/build-tools/18.0.0/dx:line 31:dirname:没有这样的文件或目录/ Applications/Android Studio.app/sdk/build-tools/18.0.0/dx:line 34:basename:没有这样的文件或目录

/Applications/Android Studio.app/sdk/build-tools/18.0.0/dx: line 48: dirname: No such file or directory
/Applications/Android Studio.app/sdk/build-tools/18.0.0/dx: line 52: basename: No such file or directory`
Run Code Online (Sandbox Code Playgroud)

有人知道如何克服这个问题吗?

android android-studio

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

MongoDB C# 驱动程序 字段投影

您好,我在 mongoDB 中有一个集合,我只想从中获取部分字段,我创建了一个类,将数据插入到 Mongo

班级代码:

public class  FrameDocument
{

    public ObjectId _id { get; set; }
    public Nullable<System.DateTime> FrameTimeStamp { get; set; }
    public Nullable<int> ActivePick { get; set; }
    public Nullable<int> TraderId { get; set; }
    public Nullable<int> EventCodeId { get; set; }
    public byte[] Frame { get; set; }
    public int ServerUserId { get; set; }
    public int SesionId { get; set; }
    public string TraderName { get; set; }
    public string ServerUserName { get; set; }


} …
Run Code Online (Sandbox Code Playgroud)

c# database mongodb nosql

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

Ionic 4 Angular 6 创建应用程序不询问 Cordova 集成问题

我是 Ionic 的新手,刚刚安装了它,还在我的 Ubuntu 18.04 机器上安装了 Cordova,然后我使用这些命令创建了一个应用程序

npm install -g ionic
npm install -g cordova
Run Code Online (Sandbox Code Playgroud)

然后我使用命令使用这些创建一个应用程序

ionic start ionic4Tut --type=angular
Run Code Online (Sandbox Code Playgroud)

但我没有得到有关将 cordova 集成到项目中的问题,如所有教程中所示,

Integrate your new app with Cordova to target native iOS and Android? (y/N)
Run Code Online (Sandbox Code Playgroud)

有人知道那是什么方法吗?

ionic-framework

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