小编pes*_*ssi的帖子

元标记itemprop

我想在我的网页中包含提取的结构化数据.

我将此包含在描述中:

<meta itemprop="description" content="my description" />
Run Code Online (Sandbox Code Playgroud)

但是我意识到页面上已经存在正常的元描述:

<meta name="description" content="my description" />
Run Code Online (Sandbox Code Playgroud)

是否可以将两者合并或者将它们合并在一起可能就像:

<meta itemprop="description" name="description" content="" />
Run Code Online (Sandbox Code Playgroud)

html5 meta-tags microdata

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

使用C#的Google Drive API - 正在上传

我正在尝试使用asp.net应用程序中的Google Drive API上传文件.

问题:代码在本地工作,但上传到服务器时没有任何反应(页面只是继续加载...没有同意屏幕显示.帮助appreaciated."UploadedPdf"文件夹是可写的,client_secrets.json存在于该文件夹中.

注意:我没有在服务器上安装任何内容,只是将包含Google API dll的所有文件上传到服务器的bin文件夹中.

UserCredential credential;
        using (var filestream = new FileStream(Server.MapPath("UploadedPdf/client_secrets.json"),
            FileMode.Open, FileAccess.Read))
        {
            credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                GoogleClientSecrets.Load(filestream).Secrets,
                new[] { DriveService.Scope.Drive },
                "user",
                CancellationToken.None,
                new FileDataStore(Server.MapPath("UploadedPdf/"))).Result;
        }

        // Create the service.
        var service = new DriveService(new BaseClientService.Initializer()
        {
            HttpClientInitializer = credential,
            ApplicationName = "Drive API Sample",
        });

        Google.Apis.Drive.v2.Data.File body = new Google.Apis.Drive.v2.Data.File();
        body.Title = "My document";
        body.Description = "A test document";
        body.MimeType = "text/plain";

        byte[] byteArray = System.IO.File.ReadAllBytes(Server.MapPath("UploadedPdf/sample.txt"));
        System.IO.MemoryStream stream = new System.IO.MemoryStream(byteArray);

        FilesResource.InsertMediaUpload request = …
Run Code Online (Sandbox Code Playgroud)

c# asp.net google-api google-drive-api google-api-dotnet-client

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

asp.net中长时间运行的进程#

我有一个Web应用程序,在后面的代码中有一个长时间运行(资源密集型)进程,最终输出是一个pdf文件(图像到pdf转换工具)

它运行良好..因为我在一个专用服务器上,它现在完全不是资源问题.

但是,我想知道如果一次处理超过20个用户,系统将达到其资源限制.

我已经看到用户输入他们的电子邮件的在线服务,我想这些流程在后台排队,结果通过1st-1st out方法通过电子邮件发送.

有人可以请教我如何使用C#在asp.net应用程序中实现这种逻辑?

c# asp.net process long-integer

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

UIGestureRecognizer无法识别

我试图创建一个应该可拖动的标签.但是被拖动的事件没有被触发(用断点检查).下面是代码.

 - (IBAction)InsertText:(UIBarButtonItem *)sender {

    UILabel *lblWatermark = [[UILabel alloc] initWithFrame:currentImage.frame];
    lblWatermark.text = @"Copyright";
    lblWatermark.userInteractionEnabled = YES;
    [lblWatermark sizeToFit];


    UIPanGestureRecognizer *gesture = [[UIPanGestureRecognizer alloc]
                                       initWithTarget:self
                                       action:@selector(labelDragged:)];
    [lblWatermark addGestureRecognizer:gesture];
    [currentImage addSubview:lblWatermark];
}
- (void)labelDragged:(UIPanGestureRecognizer *)gesture
{
    UILabel *label = (UILabel *)gesture.view;
    CGPoint translation = [gesture translationInView:label];

    // move label
    label.center = CGPointMake(label.center.x + translation.x,
                               label.center.y + translation.y);
        [gesture setTranslation:CGPointZero inView:label];
}
Run Code Online (Sandbox Code Playgroud)

先感谢您,

cocoa-touch uilabel ios

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