小编Lui*_*ese的帖子

水平ListView Xamarin.Forms

任何方法来创建ListViewhorizontal scrollXamarin.Forms类似图像

ListView水平

这就是我为垂直所做的

var myListView = new ListView
{
    ItemTemplate = new DataTemplate(typeof(ImageCell))
};
Run Code Online (Sandbox Code Playgroud)

c# listview xamarin xamarin.forms

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

如何在 C# 中规范化漂亮的 unicode 字符串?

例如,我从 REST API 收到了具有这种风格的文本

  • ?

  • ?

  • ????? ????????????? ???? ? ?????G?

但这不是斜体、粗体或下划线,因为它是字符串类型。这种文字使它失败了我的正则表达式^[a-zA-Z0-9._]*$

我想标准化在标准字符串中收到的这个字符串,以使我的 Regex 仍然有效。

c# string unicode

21
推荐指数
1
解决办法
846
查看次数

Xamarin通知服务扩展问题

我有Notification Service Extension的问题.我已按照一步一步的文档 https://developer.xamarin.com/guides/ios/platform_features/introduction-to-ios10/user-notifications/enhanced-user-notifications/#Working_with_Service_Extensions

为了实现,我已经这样做了.

  • 添加了具有相同前缀的应用程序的通知服务扩展(添加后缀,例如:APP:com.testapp.main - EXT:com.testapp.main.notificationextension)
  • 将APPID标识符com.testapp.main.notificationextension创建到Apple的成员中心
  • 创建证书和配置文件以发送APP ID com.testapp.main.notificationextension的推送通知
  • 导入Xcode和Xamarin证书和配置
  • 参考Notification Extension参考构建我的应用程序.
  • 创建存档以上传到TestFlight
  • 已签名的应用程序及其分发证书和配置文件
  • 签名扩展及其分发证书和配置文件
  • 上传到TestFlight
  • 下载并允许我的应用推送通知
  • 使用Localytics Dashboard发送富传推通知以进行消息传递 - 设备接收推送通知但未通过NotificationService.cs通知服务扩展代码!

这是我的NotificationService代码:

using System;
using Foundation;
using UserNotifications;

namespace NotificationServiceExtension
{
    [Register("NotificationService")]
    public class NotificationService : UNNotificationServiceExtension
    {
        Action<UNNotificationContent> ContentHandler { get; set; }
        UNMutableNotificationContent BestAttemptContent { get; set; }
        const string ATTACHMENT_IMAGE_KEY = "ll_attachment_url";
        const string ATTACHMENT_TYPE_KEY = "ll_attachment_type";
        const string ATTACHMENT_FILE_NAME = "-localytics-rich-push-attachment.";

        protected NotificationService(IntPtr handle) : base(handle)
        {
            // Note: this .ctor should …
Run Code Online (Sandbox Code Playgroud)

notifications push-notification xamarin.ios ios localytics

16
推荐指数
1
解决办法
2398
查看次数

SQL Server按顺序加入

我在输入中有2个字符串,例如'1,5,6'和'2,89,9',具有相同数量的元素(3或加号).我想要的那两个字符串作为"纵坐标连接"

1   2
5   89
6   9
Run Code Online (Sandbox Code Playgroud)

我想要分配一个rownumber并在2个结果集之间建立一个连接

SELECT a.item, b.item  FROM 
  (
  SELECT  
  ROW_NUMBER() OVER (ORDER BY (SELECT 0)) AS rownumber,
  *  FROM dbo.Split('1,5,6',',')
  ) AS a
  INNER JOIN   
  (
  SELECT  
  ROW_NUMBER() OVER (ORDER BY (SELECT 0)) AS rownumber,
  *  FROM dbo.Split('2,89,9',',')
 ) AS b ON a.rownumber = b.rownumber 
Run Code Online (Sandbox Code Playgroud)

这是最好的做法吗?

sql sql-server join sql-server-2008

7
推荐指数
2
解决办法
1780
查看次数

单声道ARMv7和LLVM

我正在将我的应用更新到ios6,我有以下问题

  • 使用ARMv7构建应用程序无法使用标志LLVM ...(错误MT3001)

我的系统配置是

  • MonoDevelop 3.0.4.7
  • MonoTouch 6.0.0.0
  • 单声道2.10.9

参考问题:iOS 6 Mono和向后兼容性

UPDATE

错误是

无法组装ICSharpCode.SharpZipLib.dll(MT3001)

详细输出

/Users/TEST/Desktop/Xcode_4.5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc  -miphoneos-version-min=3.1 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Users/TEST/Desktop/Xcode_4.5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -c /var/folders/_3/x0_zyy9j0r5_gg94nc3r51zm0000gn/T/tmp371fb2f4.tmp/mscorlib.dll.7.s -o /var/folders/_3/x0_zyy9j0r5_gg94nc3r51zm0000gn/T/tmp371fb2f4.tmp/mscorlib.dll.7.o
error MT3001: Could not AOT the assembly '/Users/TEST/Public/Progetti/AppTest/bin/iPhone/Release/ICSharpCode.SharpZipLib.dll'
  at MTouch+<CompileAssemblies>c__AnonStoreyB.<>m__E (System.String s) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[System.String].<>m__34 (System.String e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[System.String,System.Object].<>m__32 () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] …
Run Code Online (Sandbox Code Playgroud)

mono monodevelop xamarin.ios armv7 ios6

5
推荐指数
0
解决办法
1174
查看次数

ProgressHUD和TouchUpInside

我有我的ViewController

public partial class TestView
        : MvxViewController
{
...code here...
}
Run Code Online (Sandbox Code Playgroud)

我在按钮事件TouchUpInside上加载我的下一个ViewController,如下所示:

btnSearch.TouchUpInside  += (object sender, EventArgs e) => {
        BTProgressHUD.Show("test");
        ViewModel.GoParameterizedCommand.Execute(null);
    };
Run Code Online (Sandbox Code Playgroud)

它在ViewDidLoad中定义的那个事件.我在下一个ViewController上显示的"测试"消息,而不是在加载这个消息时.我怎么能在加载过程中显示该消息,而不是在下一个ViewController加载时?我也尝试过使用MBProgressHUD

btnSearch.TouchUpInside  += (object sender, EventArgs e) => {
        var hud = new MTMBProgressHUD (View) {
            LabelText = "Waiting...",
            RemoveFromSuperViewOnHide = true
        };


        View.AddSubview(hud);
        hud.Show (animated: true);

        ViewModel.GoParameterizedCommand.Execute(null);
    };
Run Code Online (Sandbox Code Playgroud)

但行为也一样.

c# xamarin.ios ios mbprogresshud mvvmcross

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

CrittercismIOS与MvvmCross发生冲突

我正在通过CrittercismIOS集成崩溃报告,我在Xamarin Component商店中使用了组件

https://components.xamarin.com/view/crittercism

但应用程序崩溃并报告错误.

2015-11-25 10:49:50.621 MyApp[40227:2065265] critical: Stacktrace:

2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at <unknown> <0xffffffff>
2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) [0x00016] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:650
2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceMono (bool) [0x000ca] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:113
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceSlow (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0001a] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:87
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceDefaultCtor (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0002a] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5734
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.Activator.CreateInstance (System.Type,bool) [0x00040] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:214
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.Activator.CreateInstance (System.Type) [0x00000] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:147
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical: …
Run Code Online (Sandbox Code Playgroud)

xamarin.ios crittercism mvvmcross xamarin xamarin-component

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

iOS 6单声道和向后兼容性

我正在将我的应用程序更新为ios6,并且我遇到以下问题

  1. 无法通过支持ARMv6 + ARM v7的体系结构构建应用程序,但仅支持ARM v7(错误是iOS6与ARM v6不兼容).这意味着我的应用程序无法与所有设备一起使用?

  2. 使用ARMv7构建应用程序无法使用标志LLVM ...(错误MT3001)

  3. 使用SD 6构建应用程序也将向后兼容iOS下层和所有其他设备(请参阅问题/错误1).

我的系统配置是

  • MonoDevelop 3.0.4.7
  • MonoTouch 6.0.0.0
  • 单声道2.10.9

mono monodevelop xamarin.ios armv7 ios6

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

将具有不同格式的字符串转换为日期

我有一个带有字符串列(varchar(200))的表,其中包含不同格式的日期。例如

may 24 1983 12:00AM
1981-01-13 00:00:00
1979-01-13 00:00:00:123
Run Code Online (Sandbox Code Playgroud)

我想将此日期转换为要提取年份的日期。我该怎么办?我使用了STR_TO_DATE,但效果不佳。我必须为每种不同的格式使用SUBSTRING吗?

MySQL 5.0.95版

mysql sql date-conversion

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

备份数据未记录的表

我试图了解是否可以在数据库备份中包含未记录的表。

http://www.postgresql.org/docs/9.3/static/sql-createtable.html

这里解释了崩溃表被截断(如预期),但没有提到备份或每日“屏幕截图”。

有人有一些经验吗?

我正在使用 PostgreSQL 9.2。

backup

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