我试图做的推送通知我的应用程序和以下链接 http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
我的系统已经成功连接到telnet,但是当我输入连接ssl证书和私钥的查询时,发现错误
$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-dev-cert.pem -key apns-dev-key.pem
unable to load client certificate private key file
1301:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-44/src/crypto/pem/pem_lib.c:648:Expecting: ANY PRIVATE KEY
Run Code Online (Sandbox Code Playgroud)
任何人都可以告诉我什么类型的错误以及它的解决方案是什么?
提前致谢
我收到以下错误
可访问性不一致:参数类型'Db.Form1.ConnectionString'比方法'Db.Form1.BuildConnectionString(Db.Form1.ConnectionString)'更难访问
//Name spaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualBasic;
using System.Collections;
using System.Diagnostics;
using System.Data.OleDb;
using System.IO;
using System.Drawing.Printing;
//
namespace Db
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void SetBusy()
{
this.Cursor = Cursors.WaitCursor;
Application.DoEvents();
}
public void SetFree()
{
this.Cursor = Cursors.Default;
Application.DoEvents();
}
//connection string into parts
struct ConnectionString
{
public string Provider;
public string DataSource;
public …Run Code Online (Sandbox Code Playgroud) 我有一个包含一系列文档的产品文档.例如
{
id: 1,
name: "J-E-L-L-O",
store:[{id: 1,
name: "Store X"},
{id: 2,
name: "Store Y"}]
}
Run Code Online (Sandbox Code Playgroud)
我想将"Store Y"的名称更改为"Store Z",例如.当时,我不知道对象的索引.所以,我拉出整个数组,找到要更新的对象,更改名称,然后尝试使用更新的数组设置"store"的值.
productCollection.Update(query, Update.Set("store", storeList.ToBsonDocument()));
Run Code Online (Sandbox Code Playgroud)
但是,我收到一个错误: "An Array value cannot be written to the root level of a BSON document."
我想我只需要知道如何将自定义对象数组序列化为BsonDocuments数组.
在此先感谢您的帮助.
您好我需要禁用UIImagePicker的旋转.
如果用户在iPhone处于"风景"时拍照,则按钮将旋转并且拍摄的照片也将旋转.我想禁用该选项,因此加速度计将无法工作,它将始终像纵向模式一样拍照.
我怎样才能做到这一点?
谢谢,Matan Radomski.
请帮助,我正在尝试运行已编译的java类并获取错误但是当我尝试检查我的java环境时,它指向不同的方式,如下所示
c:\NetBeansProjects\Hello\src>javac -version
javac 1.7.0
c:\NetBeansProjects\Hello\src>java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
Run Code Online (Sandbox Code Playgroud)
根据我的电脑(Windows 7),我有
C:\Program Files (x86)\Java
jdk1.6.0_25
jdk1.7.0
jre6
jre7
Run Code Online (Sandbox Code Playgroud)
我怎么能把它全部指向Java 7或只有Jave 6 .....只想尝试java 7来看看与java 6相比的牢度...希望我写的所有内容都有帮助.
干杯.
我只想澄清一下.有什么区别 -
private static int STUDENT_AGE = 18;
Run Code Online (Sandbox Code Playgroud)
和
private static final int STUDENT_AGE = 18;
Run Code Online (Sandbox Code Playgroud)
在球场内?
Jon Skeet解释说"根本与某个特定实例无关",好吧我想我明白了.那么最终在这种情况下究竟做了什么呢?
下面的代码不起作用是因为学生年龄被指定为静态最终?这是否意味着默认年龄根本无法覆盖?那么是否可以创建指定非默认年龄的构造函数?
private String myName;
private String myAddress;
private int myYearEnrolled;
private String myGender;
private static final int STUDENT_AGE = 18;
public Student(String name, String address, int year, String gender) {
myName = name;
myAddress = address;
myYearEnrolled = year;
myGender = gender;
}
public Student(int age)
{
STUDENT_AGE = age;
}
Run Code Online (Sandbox Code Playgroud) 我是iOS开发的新手,我有一个应用程序全部设置并准备分发,但我似乎每次只在我的DEVICE上运行应用程序时出现此错误,iOS模拟器工作得很好.下面是完整的错误:
应用程序验证失败.签名无效,包含不允许的权利,或者未使用iPhone分发证书签名.(-19011)
这是整个日志:
Validate "/Users/masonsocha/Library/Developer/Xcode/DerivedData/Multibrowser-brgeiknbjgrywwehhohafjwxjqnk/Build/Products/App Store-iphoneos/Multibrowser.app"
cd /Users/masonsocha/Desktop/Apps/MultiBrowser
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/masonsocha/Library/Developer/Xcode/DerivedData/Multibrowser-brgeiknbjgrywwehhohafjwxjqnk/Build/Products/App Store-iphoneos/Multibrowser.app"
warning: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
Executable=/Users/masonsocha/Library/Developer/Xcode/DerivedData/Multibrowser-brgeiknbjgrywwehhohafjwxjqnk/Build/Products/App Store-iphoneos/Multibrowser.app/Multibrowser
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
AssertMacros: trust_result == kSecTrustResultUnspecified, file: codesign_wrapper.c, line: 594
AssertMacros: profile, file: codesign_wrapper.c, line: 918
codesign_wrapper-0.7.10: Failed to load provision profile from: /Users/masonsocha/Library/Developer/Xcode/DerivedData/Multibrowser-brgeiknbjgrywwehhohafjwxjqnk/Build/Products/App Store-iphoneos/Multibrowser.app/embedded.mobileprovision
- (null)
Run Code Online (Sandbox Code Playgroud)
我已经尝试缩短项目名称的长度,这对Xcode 4.3.2我目前正在使用OSX Lion没有帮助.我整晚都把头发拉了出来,请帮忙!
我觉得愚蠢,但我一直在寻找这个.我正在使用谷歌地理编码器API,我需要一些json响应的帮助.这是我拥有的JSONObject:
{
"viewport": {
"southwest": {
"lng": -78.9233749802915,
"lat": 36.00696951970851
},
"northeast": {
"lng": -78.92067701970849,
"lat": 36.0096674802915
}
},
"location_type": "ROOFTOP",
"location": {
"lng": -78.922026,
"lat": 36.0083185
}
}
Run Code Online (Sandbox Code Playgroud)
如何将"位置"子字段拉入自己的变量?我试着jsonObjectVariable.getString("location");和jsonObjectVariable.getDouble()等,但它无法正常返回.你在json对象中称为子字段是什么?我已经读过你可以使用object.subobject语法访问子字段,但我只是没有得到我需要的东西.
(我使用json-org作为库)
谢谢您的帮助!
为什么我使用此代码会出现分段错误?
/* solver.h header file */
10 struct options{
11 unsigned int one:1, two:1, three:1, four:1, five:1, six:1, seven:1, eight:1, nine:1;
12 };
13
14
15 /* structure to describe a cell */
16 struct cell{
17 short value;
18 struct options open_options;
19 };
Run Code Online (Sandbox Code Playgroud)
solver.c:
5 #include <stdio.h>
6 #include "solver.h"
7
8
9
10
11
12 int main(){
13 struct cell board [9][9];
14 int i=0,j=0;
15
16
17 for(i = 1; i<10; i++)
18 for(j = 1; …Run Code Online (Sandbox Code Playgroud)