小编Bo *_*son的帖子

有没有办法将iOS应用程序分发给特定的人群(超过100个)?

据我所知,分发iOS应用程序的方法有两种:

1)应用程序商店:应用程序将向公众开放

2)Ad-Hoc:app将被共享到一组设备(最多100个)

我为公司构建了一个应用程序,他们希望只有100多台设备才能让员工看到该应用程序.因此,Ad-Hoc方法将无效.

我想知道是否有办法在App Store上发布应用程序,但将其隐藏起来.即,如果有人搜索它,应用程序将只显示?

我有什么选择?

iphone app-store ad-hoc-distribution ios

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

定义矢量类型时的前向声明错误?

我正在尝试尽可能多地使用前向声明来最小化编译时间.我注意到当我转发声明一个使用类似std :: vector的类作为成员对象的类时(这里的例子):

class myTypeA
class A
{
  A(){};
  ~A(){};
  std::vector<myTypeA > getTypeA();

}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

microsoft visual studio 9.0\vc\include\vector(1112) : error C2036: 'myTypeA *' : unknown size
1>        c:\program files\microsoft visual studio 9.0\vc\include\vector(1102) : while compiling class template member function 'bool std::vector<_Ty>::_Buy(unsigned int)'
1>        with
1>        [
1>            _Ty=myTypeA
1>        ]
1>        d:\cpp\A.h(15) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1>        with
1>        [
1>            _Ty=myTypeA
1>        ]
Run Code Online (Sandbox Code Playgroud)

当我使用#include"myTypeA.h"时,这工作正常,为什么?

c++ forward-declaration

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

检查字符串是否为web上的web地址或ip

我需要验证在TextEdit中输入的字符串是否是Web地址,例如."www.stackoverflow.com"或IP地址,例如."64.34.119.12".我试过这两种方法没有成功.我有一个名为ip的私有类变量.

方法1:

public boolean isAdress(){

        boolean isaddr = true;
        try
        {
            ip = new NetTask().execute(""+textEdit1.getText()).get();
        }
        catch (Exception ex)
        {
            isaddr = false;
        }
        return isaddr;
    }
Run Code Online (Sandbox Code Playgroud)

方法2是我在将其发送到NetTask之前检查字符串的方法.

public boolean isAdress(){
        String adress = textEdit1.getText().toString();
        boolean isaddr = true;
        if (adress.length() > 0) {
            String[] nums = adress.split(".");
            if (nums.length == 4) {
                for (String str : nums) {
                    int i = Integer.parseInt(str);
                    if ((i < 0) || (i > 255)) {
                        isaddr = false;
                    }
                }
            } 
        }
        return …
Run Code Online (Sandbox Code Playgroud)

ip validation android ip-address

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

可以将一条语句分成多行吗?

我目前正在学习一个非常基础的 C++ 课程,我们正在编写一个程序来检查输入是否是字符串或其中是否包含数字。我目前有我的代码,一切似乎都按顺序进行,但是,当我尝试测试它时,出现错误:

行长度应小于或等于 80 个字符。

错误位置揭示了这个问题:

if ((checknum == 1 && checkVector[0] == 1)|| checknum == 0 || checknum == strlength) {
Run Code Online (Sandbox Code Playgroud)

有没有办法将其分成多行以避免此错误?如果没有所有空格,它不会让我运行它。

c++

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

从SuperView中删除视图,通知iPhone上的子视图

从超级视图中删除视图时会触发什么事件?其子视图是否收到任何消息?例如,我将subview2和subview3添加到subview1中,如下所示

super_view - > subview1 - > subview2 - > subview3

如果我删除subview1例如

[subview1 removeFromSuperview]; 
Run Code Online (Sandbox Code Playgroud)

它的子视图(subview2和subview3)接收什么事件?

有没有办法让子视图知道他们的超级视图被删除了?

iphone cocoa-touch uikit uiview

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

一个类中的声明顺序是否重要?

有人可以在课堂上解释私人和公共秩序.它重要与否?

例如:

class Account{
public:
    Account(string firstName, string lastName, int id);
    void printAccount();
private:
    string strLastName;     
    string strFirstName;    
};
Run Code Online (Sandbox Code Playgroud)

它会是一样的:

class Account{
private:
    string strLastName;     
    string strFirstName; 
public:
    Account(string firstName, string lastName, int id);
    void printAccount();
};
Run Code Online (Sandbox Code Playgroud)

c++

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

#define是否等同于函数?

当你看到如下行:

#define IX(i,j) ((i)+(N+2)*(j))
Run Code Online (Sandbox Code Playgroud)

相当于:

int IX(int i, int j) {

    return ((i)+(N+2)*(j));

}
Run Code Online (Sandbox Code Playgroud)

你怎么知道返回类型等?

c

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

try {} catch(){} c ++

我有以下方法:

class MyClass 
{
public:
    MyClass;

    bool method (MyClass &obj);
};

void MyClass::method (MyClass &obj)
{
    MyClass *c = new MyClass;
    try{
        //code 
        //access another method 
        return true;
    }
    catch (std::string s)
    {
    }
    return false;
}
Run Code Online (Sandbox Code Playgroud)

我应该在哪里删除之前或之前指向c对象的指针 ?MyClass:return truereturn false

c++ try-catch

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

当函数返回时,变量是否会超出范围?

void main()
{
    File f;
    DoSomething(f);
    DoSomething2(&f);
}

void DoSomething(File& f)
{
    f.Process();
} // will f go out of scope when this function returns?

void DoSomething2(File* f);
Run Code Online (Sandbox Code Playgroud)

两个问题:

  1. 如注释中所示,当函数返回时,f是否会超出范围?
  2. 你建议用引用或指针写函数吗?(我说的是私人功能)

c++ scope

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

从URL问题中保存图像

我正在尝试从URL下载图像:http: //appworld.blackberry.com/webstore/servedimages/340582.png?t = 2

我在用 HttpWebRequest webRespose Stream BinaryReader FileStream BinaryWriter

这适用于其他网站和图像,但我在上面给出的网址给了我一个空的0字节文件..

这意味着我无法保存该URL中的图像.

有没有人可以帮助我?

c# url image

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