初学者的iPhone / iPad应用程序的问题(Beginner iPhone/iPad app question)
我是iPhone和iPad应用程序的初学者,并且想学习编码(猜测他们在这里至少还待上4年)。我运行带双核的Win 7 PC。 我不想改变操作系统到mac只是为了这个,因为我的游戏可能无法在MAC中工作:(大声笑所以我遇到了龙火SDK 。这是正确的方式来做到这一点在Windows上。
- 我会学习所有功能吗?
- 我可以通过应用商店分发吗? 即它应该可以在普通的iPhone上运行,而不是在越狱程序中运行。
所以在我开始之前,我想问问这种方式是否可行。 我知道在MAC上安装它是100%好的
但我想知道如果这种方式是好的,继续和开发iPhone的一些应用程序,而不用担心这是假的
I am a beginner in iPhone and iPad apps and wanted to learn to code(guessing they are here to stay for another 4years least).. I run a Win 7 PC with dual core. I didnt want to change OS to mac just for this as my games may not work in MAC :( lol So i came across Dragon Fire SDK. Is this correct way to do it on windows.
- Will i get all functions to learn.
- Can i distribute it via app store? i.e it should work in normal iPhone and not in jailbreak ones.
So before i begin i wanted to ask if this way is ok. I know installing it on a MAC is 100% ok
But i wanted to know if this way is fine to go ahead with and develop some apps for the iPhone without any worries about this being fake
原文:https://stackoverflow.com/questions/6287073
最满意答案
不,您发现的结构是Java如何处理它(即,重载而不是默认参数)。
对于构造函数,如果重载越来越复杂, 请参阅有效的Java:编程语言指南的第1项提示(考虑静态工厂方法而不是构造函数)。 对于其他方法,重命名某些情况或使用参数对象可以帮助。 这是当你有足够的复杂性,差异化是困难的。 确定的情况是您必须使用参数的顺序进行区分,而不仅仅是数字和类型。
No, the structure you found is how Java handles it (that is, with overloading instead of default parameters).
For constructors, See Effective Java: Programming Language Guide's Item 1 tip (Consider static factory methods instead of constructors) if the overloading is getting complicated. For other methods, renaming some cases or using a parameter object can help. This is when you have enough complexity that differentiating is difficult. A definite case is where you have to differentiate using the order of parameters, not just number and type.
相关问答
更多-
根据规范 ,自Java 1.5(5)以来,支持一直存在。 我相信XInclude支持依靠名称空间感知 ,为了向后兼容的原因,默认关闭。 public class XIncludeDemo { private static final String XML = "\n" + "\n" ...
-
你应该更喜欢默认的参数值。 您不应该创建或使用像Int或String这样的常规类型的隐式参数。 请参阅下面的引文。 默认值是最简单的解决方案。 在语言特征方面复杂。 隐式参数适用于您的方法的某种“上下文”。 如果没有上下文,只是默认值,你可以混淆其他开发人员。 隐式值搜索会花费您一些编译时间。 隐式参数只能在极少数情况下手动指定。 另请参见: Scala中的编程21.5隐式参数/隐式参数的样式规则 : 作为样式规则,最好在隐式参数类型中使用自定义命名类型。 You should definitely pre ...
-
java的子类打印参数的默认值,而不是分配的值(java subclass prints parameter default values instead of assigned values)[2023-06-07]
此代码: public Scratch(int numTeeth) { numTeeth = this.numTeeth; } 与您打算执行的操作相反(使用实例字段中的默认值覆盖参数)。 它应该是: public Scratch(int numTeeth) { this.numTeeth = numTeeth; } 当局部变量重用一个实例字段的名称时,如果它是静态的,则使用this或类名称限定实例变量名称。 为了在将来避免这种情况发生,可以使输入参数成为最终的,这只会导致您的原始代码无法 ... -
存储过程参数的默认值必须是常量 。 您需要执行以下操作: ALTER Procedure [dbo].[my_sp] @currentDate datetime = null AS IF @currentDate is null SET @currentDate = getdate() Default value for stored procedures parameter have to be constants. You'd need to do the following... ALTER Pro ...
-
不,您发现的结构是Java如何处理它(即,重载而不是默认参数)。 对于构造函数,如果重载越来越复杂, 请参阅有效的Java:编程语言指南的第1项提示(考虑静态工厂方法而不是构造函数)。 对于其他方法,重命名某些情况或使用参数对象可以帮助。 这是当你有足够的复杂性,差异化是困难的。 确定的情况是您必须使用参数的顺序进行区分,而不仅仅是数字和类型。 No, the structure you found is how Java handles it (that is, with overloading inst ...
-
我不知道你为什么会得到这个错误信息,但问题是类型不匹配:默认值必须对任何类型参数都有意义(受限于边界)。 即你需要一个(T) -> P ,但::identity可以给你(T) -> T或(P) -> P 证明:如果你换到 fun
identity(x: T): P = throw Exception() fun List .dedupe(by: (T) -> P = ::identity): Unit {} 它汇编。 答案(见下面的评论): 如果P改为Any? ,我们应该能 ... -
当你做x =你没有修改x引用的对象时,你只是改变引用x来指向不同的对象,在这种情况下,是另一个int 。 在这种情况下,事件是否与x指向不可变对象无关。 如果你想用列表来做x = x + [5] ,它也会保持不变。 注意不同之处: def b1(x = []): x = x + [5] print(x) def b2(x = []): x.append(5) print(x) print("b1:") b1() print("b1:") b1() print("b2:" ...
-
对于普通函数,可以设置__defaults__ : def foo(a, b, c, d): print (a, b, c, d) # foo.__code__.co_varnames is ('a', 'b', 'c', 'd') foo.__defaults__ = tuple(None for name in foo.__code__.co_varnames) foo(b=4, d=3) # prints (None, 4, None, 3) For a plain function, ...
-
使用(模拟)可选/默认参数为函数编写Javadoc(Writing Javadoc for functions with (simulated) optional/default arguments)[2022-04-22]
一种解决方案是在包含所有参数的方法中编写完整的Javadoc文档,然后使用@link和/或@see指令链接到重载中的文档,例如: /** * The parameters in the wrapped C++ method are all optional, * so we had to write an overload for each parameter combination. * @param i the int parameter used for x. * @param s the ... -
一般的答案是你不能使用 parameter = parameter || default; 如果用户应该能够传递一个假的参数,那么该参数应该优先于默认值。 在这种情况下,您需要显式测试undefined : parameter = typeof parameter == "undefined" ? default : parameter; 如果用户应该能够传递一个显式的undefined值并且具有优先权(这是一个非常有悖常理的事情),那么你需要测试arguments.length来确定传递了多少个参数, ...