我的代码完全正常,直到大约3天前.我已经尝试回到一个更老的提交,它工作了100%,现在它仍然与exc_bad崩溃.崩溃只发生在设备上运行应用程序时,如果我在模拟器上运行应用程序或使用仪器在设备上运行应用程序,它运行完全正常.当我更改我的谷歌API密钥时,它说"您可能没有权限使用此API密钥",但不再崩溃.
该应用程序仅在通过xcode在设备上运行应用程序时崩溃.如果稍后在设备上运行相同版本而未连接到xcode,则可以正常工作.
我不知道我可以在这里添加哪些信息来帮助调试问题.我最近将xcode更新为6.4并使用最新更新更新了OSX.
我正在使用谷歌1.10.1 sdk版本,使用CocoaPods安装
我用来添加地图的代码:
self.mapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera];
self.mapView.myLocationEnabled = YES;
self.mapView.settings.myLocationButton = YES;
self.mapView.delegate = self;
[self.mapView addObserver:self
forKeyPath:@"myLocation"
options:NSKeyValueObservingOptionNew
context:NULL];
[self.view insertSubview:self.mapView atIndex:1];
Run Code Online (Sandbox Code Playgroud)
错误本身在code = 1,code = 2和code = 257之间变化.我尝试使用故事板而不是代码添加GMSMapView.我已经尝试安装旧版本的xcode并再次运行但它没有改变任何东西.
如果我注释掉插入子视图行,该应用程序不会崩溃.我试过运行僵尸乐器工具,但当我使用乐器运行时,应用程序工作正常.
#0 0x0000000100c5dc34 in EAGLContext_renderbufferStorageFromDrawable(EAGLContext*, objc_selector*, unsigned long, id<EAGLDrawable>) ()
#1 0x00000001002404c0 in gmscore::renderer::ios::GLRenderTarget::CreateFramebuffer() ()
#2 0x00000001002403cc in gmscore::renderer::ios::GLRenderTarget::FrameStart() ()
#3 0x00000001002e7af4 in gmscore::renderer::EntityRenderer::Draw(bool) ()
#4 0x00000001002516f4 in -[GMSPhoenixRenderer drawIfNeeded] ()
#5 0x00000001002329a0 in -[GMSEntityRendererView draw] ()
#6 0x000000010028dc74 in -[GMSDisplayLink displayLinkFired:] ()
#7 0x0000000100c5ca9c …Run Code Online (Sandbox Code Playgroud) 我正在为3.1 iOS SDK做scrumptios facebook开发人员教程.我已经设法从Facebook显示我的个人资料名称,但FBProfilePictureView不会显示图片
这是iboutlet的代码
@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage;
Run Code Online (Sandbox Code Playgroud)
这是我用来显示图片的内容
self.useProfileImage.profileID = user.id;
Run Code Online (Sandbox Code Playgroud)
我已经确认它通过在标签中显示它来更改图像的profileid变量.
当我第一次运行项目时,我遇到了这个错误
"2012-05-18 04:04:11.620 Scrumptious [6548:f803] Interface Builder文件中的未知类FBProfilePictureView."
并通过添加[FBProfilePictureView class];
到app delegate中的"applicationdidfinishlaunching:withoptions"来解决FB教程建议的方式.
任何想法为什么图片不会显示?
我有一个问题,从管理员删除对象不会删除与之关联的文件.经过一些研究,我决定在模型中实现post_delete.出于某种原因,我无法使s3删除文件,即使在搜索了大量的指南和片段后,也许有人知道.我用django 1.5和boto.继承我的模型代码:
from django.db import models
from django.contrib.auth.models import User
from fileservice.formatChecker import ContentTypeRestrictedFileField
from south.modelsinspector import add_introspection_rules
import os
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from django.core.files.storage import default_storage as storage
add_introspection_rules([
(
[ContentTypeRestrictedFileField], # Class(es) these apply to
[], # Positional arguments (not used)
{ # Keyword argument
"content_types": ["content_types", {}],
"max_upload_size": ["max_upload_size", {}]
},
),
], ["^fileservice\.formatChecker\.ContentTypeRestrictedFileField"])
class Contentfile(models.Model):
content = ContentTypeRestrictedFileField(upload_to='uploads/', content_types=['video/mp4', 'application/pdf', 'image/gif', 'image/jpeg', 'image/png'],max_upload_size=5242880,blank=True, null=True, help_text='Upload a file to add …Run Code Online (Sandbox Code Playgroud) 我有一些奇怪的问题,我似乎无法找到解释.我显示一个带有单个输入的弹出窗口,我绑定到我的范围内的变量我将$ scope传递给弹出窗口.绑定工作,我可以看到设置的变量,它随着我的输入而改变.但是一旦我关闭弹出窗口并在"点击"功能上注销该范围变量"它似乎又恢复到原始值.
编辑:一支笔,展示了一般问题:http: //codepen.io/anon/pen/ariDh
码:
var sendPopup = $ionicPopup.show({
title: $translate.instant(popupTitle),
subTitle: $translate.instant('POPUP_WITH_MESSAGE_SUBTITLE'),
templateUrl: 'templates/leave-message-popup.html',
scope: $scope,
buttons: [
{ text: $translate.instant('BUTTON_CANCEL') },
{
text: $translate.instant('BUTTON_SEND'),
type: 'button-positive',
onTap: function(e) {
console.log("contact message:" + $scope.contactMessage);
if (!$scope.contactMessage) {
console.log("preventing default");
e.preventDefault();
} else {
$scope.sendData(contactType);
}
}
},
]
});
Run Code Online (Sandbox Code Playgroud)
模板:
<input type="text" ng-model="contactMessage" name="message" placeholder="{{'PLACEHOLDER_CONTACT_MESSAGE' | translate}}" required autofocus>
{{contactMessage}}
Run Code Online (Sandbox Code Playgroud) 有人能解释Xcode开发者计算机,osx服务器和使用远程git存储库之间的关系吗?
我想将我的更改提交到远程仓库(bitbucket)并让我的os x服务器运行机器人吗?
新:经过一番乱搞,我已经设法为远程服务器制作机器人,但现在我收到以下错误
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is disabled (you can enable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is enabled (you can disable this by editing the TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist
622a6bc3406c764e9e97ec156818b739ecb40ee9 refs/heads/master
Run Code Online (Sandbox Code Playgroud)
只有我已经这样做了,它没有改变任何东西.
还有一个错误:
xcodebuild: error: The project 'testOnlineGit3' does not contain a scheme named 'testOnlineGit3.xcscheme'.
Run Code Online (Sandbox Code Playgroud)
我的方案是共享的,这就是它的名字,所以我不确定如何修复它
新:改变我的方案名称,现在机器人工作,但我仍然得到以前的警告,我不确定他们的意思,任何人都知道如何让他们消失?
我在我的项目中使用Django Suit。\nDjango Suit 带有一个默认页脚,我想更改或删除它。\n根据文档上的说明:
\n\n\n\n\n\n\n\n您必须扩展 base_site.html 模板才能自定义页脚链接、版权文本或添加额外的 JS/CSS 文件。示例文件可在 github 上找到。
\n将自定义的 base_site.html 模板文件复制到您的项目\xe2\x80\x99s main\n application template/admin/ 目录中,并取消注释并编辑\n 您想要扩展的块。
\n
但是当我这样做时,每当我取消注释其中一个块时,我都会出现以下错误:
\n\nException Type: TemplateSyntaxError\n\nException Value:Could not parse the remainder: \'% block footer_links %\' from \'% block footer_links %\'\nRun Code Online (Sandbox Code Playgroud)\n\n知道为什么会发生这种情况以及如何解决它吗?
\n\n基本站点.html:
\n\n{% extends "admin/base.html" %}\n{% load admin_static %}\n\n{# Additional <head> content here, some extra meta tags or favicon #}\n{#{% block extrahead %}#}\n{#{% endblock %}#}\n\n\n{# Additional CSS includes #}\n{#{% block …Run Code Online (Sandbox Code Playgroud) 我按照Realm网站上的指南进行操作,但我的测试仍然会产生不同的结果,具体取决于它们的随机顺序.
它们在单独运行时成功,或者因为数据已经设置而失败.例如:
XCTAssert(observer.events[0].value.element == "", "Initail hub name is expected to be equal to be an empty string but was \(String(describing: observer.events[0].value.element))")
XCTAssert(observer.events[1].value.element == testHubName, "Initail hub name is expected to be equal to be the name we set but was \(String(describing: observer.events[1].value.element))")
Run Code Online (Sandbox Code Playgroud)
在此示例中,event[0]已设置为testHubName.或者它得到一个@throw RLMException(@"Object has been deleted or invalidated.");
所以我猜有一些种类的竞争,但这是在我的setup方法:
func setupRealm() {
testRealm = try! Realm(configuration: Realm.Configuration(inMemoryIdentifier: "DORSessionViewModelTestsRealm"))
try! self.testRealm.write {
self.testRealm.deleteAll()
}
}
Run Code Online (Sandbox Code Playgroud)
所以据我所知,每次测试都应该有一个新的Realm,那么比赛在哪里进行?
编辑:添加课程的更大部分
class DORSessionViewModelTests: XCTestCase {
var …Run Code Online (Sandbox Code Playgroud) 我的代码目前看起来像这样
NSURL *URL = [NSURL URLWithString:URLForSend];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc]
initWithRequest:request];
operation.responseSerializer = [AFJSONResponseSerializer serializer];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject)
{
NSLog(@"%@", responseObject);
[BoxJsonDataHelper gotNewJson:responseObject];
} failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Request Failure Because %@",[error userInfo]);
}];
[operation start];
Run Code Online (Sandbox Code Playgroud)
但是当尝试编辑接收到的对象中的字典时,我收到有关使用属于可变字典而不是字典的方法的错误.如何使AFNetworking使用嵌套的可变对象?
我有以下字符串:"@ [1484987415095898:274:Page Four]"并且我想要捕获名称,所以我写了以下regexp
@\[[\d]+:[\d]+:(.*)]
它似乎工作,但现在我正在努力了解如何替换以前的字符串与捕获组一.
即
"Lorem ipsum @ [1484987415095898:274:Page Four] dolores" - >
"Lorem ipsum Page Four dolores"
注意,我看到了如何使用此堆栈问题获取捕获组, 但是,如何找到从中提取的原始字符串并替换它?
我希望我的用户能够向数据库添加一个对象(在我的例子中是一个文件),并且该对象自动转到最后一个“位置”,稍后该用户将能够使用某种 UI 来更改该对象位于表格“上方”或“重新排序”。
显然,表没有顺序,它是数据表基础的一部分。阅读了一些帖子后,我发现我有两个选择:
对我来说,我从数据库中读取的次数比写入的次数多得多,所以我选择了第一个。我的问题是如何实现添加新文件、删除旧文件和更改顺序。
目前,正如我每次对数据库进行任何更改时看到的那样,我都必须调用 ORDER_BY 整数字段,然后:
唯一的问题是,我觉得为每一个小变化进行调用和更改如此多的数据库行确实非常昂贵。还有其他办法吗?我确信这是一个非常常见的问题。
我使用一个简单的视图类来强制下载文件的pk.文件下载的名称出来是pk.我希望它是原始文件名,就像在服务器上一样.我怎么做?
*我是django的新手
这里是视图的代码
class GetFileContent(View):
def get(self,request, userName, pk):
user = User.objects.filter(username = userName)
filtered = File.objects.filter(pk = pk, published=True, file_owner = user)
data = filtered[0].content
return HttpResponse(data, content_type='application/force-download')
pass
Run Code Online (Sandbox Code Playgroud) django ×4
ios ×4
python ×4
objective-c ×2
swift ×2
afnetworking ×1
amazon-s3 ×1
angularjs ×1
database ×1
django-suit ×1
download ×1
facebook ×1
file ×1
git ×1
google-maps ×1
json ×1
osx-server ×1
profile ×1
realm ×1
regex ×1
sdk ×1
sql ×1
view ×1
xcode ×1