嘿我已经做了很多环顾四周,看到了许多答案,如何在旧版本的Xcode中做到这一点,但它们似乎不适用于Xcode 6.那么如何在模拟器中运行旧版本的iOS Xcode 6.
谢谢您的帮助
我正在制作一个新的应用程序,并开始尝试在实际手机上启动,但继续得到以下错误
The certificate used to sign "APP" has either expired or has been revoked.
An updated certificate is required to sign and install the application.
Run Code Online (Sandbox Code Playgroud)
这是我试图解决它
但我继续得到错误,
我还尝试手动生成证书和手动配置配置文件,而不是使用"自动管理签名",并选择显示不构建错误的配置文件,当我单击信息按钮时说明在11个月内到期并且具有所有选中标记
我该如何解决这个错误?
非常感谢你提前帮助.
编辑
我现在正试图手动执行此操作,这是我采取的步骤,
我究竟做错了什么?
谢谢
我只是更新到Xcode 6,现在在FacebookSDK.framework> Headers> FBOpenGraph.h我有2个警告,一个读取
'atomic' attribute on property 'description' does not match the property inherited from NSObject
Run Code Online (Sandbox Code Playgroud)
第二读
'copy' attribute on property 'description' does not match the property inherited from NSObject
Run Code Online (Sandbox Code Playgroud)
代码I中第69行的这两个警告都在该行上方添加了注释这是我正在处理的.h文件
/*
* Copyright 2010-present Facebook.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable …Run Code Online (Sandbox Code Playgroud) 我正在使用一些javascript向/var/www/cgi-bin我的Web服务器上的python脚本发出一个帖子请求,然后在这个python脚本中我想将图像文件保存到我的html文件夹中,以便稍后可以检索它.
位于/var/www/html,但现在我知道如何做到这一点的唯一方法是将python脚本设置为chmod 777,我不想这样做.
那么我怎样才能保存我使用javascript从我的网页抓取的文件,然后通过POST发送到服务器的javascript?
目前当我这样做时,我得到一个错误,说python没有权限保存,因为它的chmod是755.
我这里是python代码,我知道它的工作原理错误就是说我没有权限写这个文件
fh = open("/var/www/html/logo.png", "wb")
fh.write(photo.decode('base64'))
fh.close()
Run Code Online (Sandbox Code Playgroud) 我有这个XML:
<menu>
<day name="monday">
<meal name="BREAKFAST">
<counter name="Bread">
<dish>
<name>Plain Bagel</name>
</dish>
<counter/>
<meal/>
<day/>
<day name="tuesday">
<meal name="LUNCH">
<counter name="Other">
<dish>
<name>Cheese Bagel</name>
</dish>
<counter/>
<meal/>
<day/>
<menu/>
Run Code Online (Sandbox Code Playgroud)
如果day标签的属性等于星期一,那么现在我正在尝试这样做.然后饭标属性等于BREAKFAST,然后我想得到计数器的属性."面包".
我已经设置了xml pull解析器,但我正在努力获得这个值.这是我尝试过的,我现在看到它不能也不会起作用......所以任何有关如何设置它的帮助都会很棒.
while (eventType != XmlResourceParser.END_DOCUMENT) {
String tagName = xmlData.getName();
switch (eventType) {
case XmlResourceParser.START_TAG:
if (tagName.equalsIgnoreCase("day")) {
if (xmlData.getAttributeValue(null, "name").equalsIgnoreCase(day)) {
if (tagName.equalsIgnoreCase("meal")) {
mealArray.add(xmlData.getAttributeValue(null, "name"));
Log.i(TAG, xmlData.getAttributeValue(null, "name"));
}
}
}
break;
case XmlResourceParser.TEXT:
break;
case XmlPullParser.END_TAG:
break;
}
eventType = xmlData.next();
}
Run Code Online (Sandbox Code Playgroud) 我有一个包含视频的NSURL,我想每秒十次录制该视频的一帧.我有代码可以捕获我的播放器的图像,但是我无法将其设置为每秒捕获10帧.我正在尝试这样的事情,但是它返回了视频的相同初始帧,正确的次数?这是我有的:
AVAsset *asset = [AVAsset assetWithURL:videoUrl];
CMTime vidLength = asset.duration;
float seconds = CMTimeGetSeconds(vidLength);
int frameCount = 0;
for (float i = 0; i < seconds;) {
AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
CMTime time = CMTimeMake(i, 10);
CGImageRef imageRef = [imageGenerator copyCGImageAtTime:time actualTime:NULL error:NULL];
UIImage *thumbnail = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
NSString* filename = [NSString stringWithFormat:@"Documents/frame_%d.png", frameCount];
NSString* pngPath = [NSHomeDirectory() stringByAppendingPathComponent:filename];
[UIImagePNGRepresentation(thumbnail) writeToFile: pngPath atomically: YES];
frameCount++;
i = i + 0.1;
}
Run Code Online (Sandbox Code Playgroud)
但是,不是在视频的当前时间i获取帧,我只是得到初始帧?
如何每秒10次获取视频帧?
谢谢您的帮助 :)
嘿大家我正在裁剪从iPhone上的相机拍摄的视频然后裁剪它像这样播放它.当我这样做的时候,我在视频的底部和右侧有一条奇怪的绿线?不确定为什么会发生这种情况或如何解决它.这是我如何裁剪.
- (UIImageOrientation)getVideoOrientationFromAsset:(AVAsset *)asset
{
AVAssetTrack *videoTrack = [[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
CGSize size = [videoTrack naturalSize];
CGAffineTransform txf = [videoTrack preferredTransform];
if (size.width == txf.tx && size.height == txf.ty)
return UIImageOrientationLeft; //return UIInterfaceOrientationLandscapeLeft;
else if (txf.tx == 0 && txf.ty == 0)
return UIImageOrientationRight; //return UIInterfaceOrientationLandscapeRight;
else if (txf.tx == 0 && txf.ty == size.width)
return UIImageOrientationDown; //return UIInterfaceOrientationPortraitUpsideDown;
else
return UIImageOrientationUp; //return UIInterfaceOrientationPortrait;
}
- (AVAssetExportSession*)applyCropToVideoWithAsset:(AVAsset*)asset AtRect:(CGRect)cropRect OnTimeRange:(CMTimeRange)cropTimeRange ExportToUrl:(NSURL*)outputUrl ExistingExportSession:(AVAssetExportSession*)exporter WithCompletion:(void(^)(BOOL success, NSError* error, NSURL* videoUrl))completion
{
// NSLog(@"CALLED"); …Run Code Online (Sandbox Code Playgroud) 我一直在查看 gitlab CI 文档,但找不到有关合并分支时如何运行作业的任何内容。
假设我有一个 MR,源分支位于其中feature-1,我正在将其合并到master.
分支合并后,我想要运行一项作业。这是我尝试过的:
after_merge:
stage: after_merge
image: my_image
only:
- master
- merge_requests
script:
- ls
# more of the script
Run Code Online (Sandbox Code Playgroud)
该作业在我创建 MR 时运行,但当我合并此 MR 时,master 没有发生任何事情,所以我不确定它为什么运行。
我需要的是在合并代码后运行这项工作,我一直在审查这个https://docs.gitlab.com/ee/ci/yaml/#only except- basic 和这个https://docs.gitlab.com /ee/ci/merge_request_pipelines/index.html但无法弄清楚。
我有一个名为阵列的NSarray.它看起来像这样
array = @[@"one", @"two", @"three"];
Run Code Online (Sandbox Code Playgroud)
我希望这个数组大写.什么是最好的方法来解决这个问题.我只能想到制作一个名为mutableArray的NSMutableArray.
并做这样的事情
for(int i = 0; i < array.lenght; i++) {
self.mutableArray = addObject:[array[i] capitalizedString];
}
Run Code Online (Sandbox Code Playgroud)
还是有另一种更好的方法吗?
这是github上的链接https://github.com/spennyf/cropVid/tree/master尝试一下你的自我,看看我在谈论它需要1分钟来测试.谢谢!
我正在拍摄带有正方形的视频,以显示vid的哪一部分将被裁剪.像这样:

现在我正在做一张纸,正方形有4条线,顶部和底部有半条线差异.然后我使用我将发布的代码裁剪视频,但是当我显示视频时,我看到了这个(忽略背景和绿色圆圈):

你可以看到有超过四行,所以我设置它来裁剪某个部分,但它增加了更多,当我使用相机中显示的相同矩形,以及用于裁剪的相同矩形?
所以我的问题是为什么裁剪的尺寸不一样?
这是我如何裁剪和显示:
//this is the square on the camera
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-80)];
UIImageView *image = [[UIImageView alloc] init];
image.layer.borderColor=[[UIColor whiteColor] CGColor];
image.frame = CGRectMake(self.view.frame.size.width/2 - 58 , 100 , 116, 116);
CALayer *imageLayer = image.layer;
[imageLayer setBorderWidth:1];
[view addSubview:image];
[picker setCameraOverlayView:view];
//this is crop rect
CGRect rect = CGRectMake(self.view.frame.size.width/2 - 58, 100, 116, 116);
[self applyCropToVideoWithAsset:assest AtRect:rect OnTimeRange:CMTimeRangeMake(kCMTimeZero, CMTimeMakeWithSeconds(assest.duration.value, 1))
ExportToUrl:exportUrl ExistingExportSession:exporter WithCompletion:^(BOOL success, NSError *error, NSURL *videoUrl) …Run Code Online (Sandbox Code Playgroud)