出于CI的目的,我需要能够在我们的每晚构建中生成XCARCHIVE和IPA文件.IPA适用于我们的测试人员,使用我们的临时密钥签名,XCARCHIVE将发送给客户端,以便他们可以将其导入Xcode并在他们满意时将其提交到应用商店.
通过一些谷歌搜索来生成IPA很简单,但是如何生成.XCARCHIVE文件是我的目标.我发现的最接近的是:
xcodebuild -scheme myscheme archive
Run Code Online (Sandbox Code Playgroud)
但是,这会将.xcarchive存储在一些难以找到的文件夹中,例如:
/Users/me/Library/Developer/Xcode/Archives/2011-12-14/MyApp 14-12-11 11.42 AM.xcarchive
Run Code Online (Sandbox Code Playgroud)
有没有办法控制存档的放置位置,名称是什么,以及如何避免重新编译它?我想最好的结果是从你执行'xcodebuild构建'时生成的DSYM和APP生成xcarchive - 这可能吗?
我正在使用NanoHTTPD在Android应用程序中呈现Web服务器.我正在使用wifi锁来保持网络活跃,并使用CPU锁定以保持CPU清醒,并通过前台服务保持其运行,以便它永远不会死亡.
我发现它可以从其他设备访问半小时,然后半小时无法访问.每当它变得无法访问时,我可以在Android设备上打开safari并浏览到0.0.0.0:30000并验证服务器确实在运行.我也检查确保wifi连接似乎是.
有什么建议去哪儿看?
我在这里关注rails教程:http://railstutorial.org/chapters/filling-in-the-layout#top
当我运行"rspec spec /"时,我得到一堆看起来像这样的错误:
1) LayoutLinks should have a Home page at '/'
Failure/Error: Unable to find matching line from backtrace
stack level too deep
# C:/Ruby19/lib/ruby/1.9.1/forwardable.rb:185
2) LayoutLinks should have a Contact page at '/contact'
Failure/Error: Unable to find matching line from backtrace
stack level too deep
# C:/Ruby19/lib/ruby/1.9.1/forwardable.rb:185
Run Code Online (Sandbox Code Playgroud)
但是当我在我的网络浏览器中访问localhost:3000 /和localhost:3000/contact时,页面就在那里,并且有正确的标题.这是我的myrailsroot\spec\requests\layout_links_spec.rb文件:
require 'spec_helper'
describe "LayoutLinks" do
it "should have a Home page at '/'" do
get '/'
response.should have_selector('title', :content => "Home")
end
it "should have …Run Code Online (Sandbox Code Playgroud) 假设我有NSSet一个字符串.如果我发送containsObject:另一个字符串,它是一个不同的指针,但完全相同的字符串值,将返回YES?
此外,它涉及到同样的故事removeObject:吗?即,具有不同指针但具有相同字符串值的不同对象将导致删除?
我正在创建一个负载测试程序,它使用libev为我正在处理的应用程序创建大量开放式TCP连接.由于nofiles限制,目前它以256个连接轰炸:
ulimit -n
256
Run Code Online (Sandbox Code Playgroud)
通过执行以下操作,我可以将此值增加到1024:
ulimit -n 1024
Run Code Online (Sandbox Code Playgroud)
但我不能进一步增加它.理想情况下,我想将其设置为1048576.它给出以下错误:
ulimit: open files: cannot modify limit: Invalid argument
Run Code Online (Sandbox Code Playgroud)
如何在osx上进一步增加ulimit?
我在我的网络应用程序中收到"未找到线程绑定请求"错误,并希望得到一些帮助.我正在尝试使用struts2 + spring + hibernate,并使用spring来管理hibernate会话工厂,并将hibernate会话注入我的struts操作.我希望这是有道理的.当应用程序启动时,没有错误,但是当我发出第一个Web请求时,它会弹出"未找到线程绑定请求"错误.这是我的春季配置:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="hibernateSessionFactory" scope="singleton"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml" />
</bean>
<bean id="hibernateSession" factory-bean="hibernateSessionFactory"
factory-method="openSession" destroy-method="close" scope="request" class="org.hibernate.Session" />
</beans>
Run Code Online (Sandbox Code Playgroud)
这是我的行动:
package actions.events;
import org.hibernate.Session;
public class Listing {
Session session;
public void setHibernateSession(Session value) throws Exception
{
session = value;
}
public String execute() {
return "success";
}
}
Run Code Online (Sandbox Code Playgroud)
我唯一的领先是,如果我删除上面的'setHibernateSession'函数,我不会得到错误,因为如果动作不需要一个(懒惰的实例化),大概春天不打扰创建会话.
这是例外:
Unable to instantiate Action, actions.events.Listing, defined for 'Listing' in namespace '/events'Error creating bean with …Run Code Online (Sandbox Code Playgroud) 只是想知道如何在haskell中获得字符的ascii值?我试图在ghci中使用'ord'函数,基于我在这里阅读的内容:
http://haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Data-Char.html#6
GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> ord 'a'
<interactive>:1:0: Not in scope: `ord'
Prelude>
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我有以下代码:
var doc = new XmlDocument();
XmlDeclaration xmlDeclaration = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
doc.AppendChild(xmlDeclaration);
XmlElement root = doc.CreateElement("myRoot");
doc.AppendChild(root);
root.InnerText = "myInnerText";
StringWriter sw = new StringWriter();
doc.Save(sw);
Console.WriteLine(sw.ToString());
Console.WriteLine();
MemoryStream ms = new MemoryStream();
doc.Save(ms);
Console.WriteLine(Encoding.ASCII.GetString(ms.ToArray()));
Run Code Online (Sandbox Code Playgroud)
这是输出:
<?xml version="1.0" encoding="utf-16"?>
<myRoot>myInnerText</myRoot>
???<?xml version="1.0" encoding="UTF-8"?>
<myRoot>myInnerText</myRoot>
Run Code Online (Sandbox Code Playgroud)
基本上它的作用是创建一个xml文件,并将编码设置为utf8,但是当它将它保存到字符串编写器时,它会忽略我的编码并使用utf16.但是,在使用内存流时,它使用utf8(带有额外的BOM表字符)
为什么是这样?为什么不尊重我对utf-8的显式编码设置?
非常感谢
我把hibernate注释放在哪里?
它是我的实例变量之上的行吗?或者在吸气器之前?或者在二传手之前?或者它真的不重要吗?
非常感谢
我有以下代码,这是基于我在这里找到的一个例子,但是当我运行它时,我得到一个错误.请帮忙,我确定它非常简单:
def listener(port):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('',port))
sock.settimeout(1) # n second(s) timeout
try:
while True:
data, addr = sock.recvfrom(1024)
print data
except socket.timeout:
print 'Finished'
def startListenerThread(port):
threading.Thread(target=listener, args=(port)).start()
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 477, in run
self.__target(*self.__args, **self.__kwargs)
TypeError: listener() argument after * must be a sequence, not int
Run Code Online (Sandbox Code Playgroud) hibernate ×2
java ×2
android ×1
annotations ×1
archive ×1
ascii ×1
autotest ×1
c# ×1
cocoa ×1
collections ×1
foundation ×1
freebsd ×1
haskell ×1
ipa ×1
libev ×1
macos ×1
nanohttpd ×1
nsset ×1
objective-c ×1
python ×1
rspec ×1
ruby ×1
service ×1
sockets ×1
spring ×1
struts ×1
struts2 ×1
xcode4 ×1
xml ×1