如何在用户右键单击Mac上cocoa app的dock-icon时创建菜单?
非常感谢你提前!
马克斯
我需要Java中的字节缓冲类来实现单线程使用.缓冲区应该在它满时调整大小,而不是抛出异常或其他东西.对我来说非常重要的问题是表现.
你会推荐什么?
添加:在我使用ByteBuffer但它无法调整大小.我需要一个可以调整大小的.
我在独立的Java应用程序中使用Spring IoC.应用程序启动时,它会创建一个包含启动信息的日志.我不明白的一些消息,请帮助我理解它们并解释如果必须修复它们如何修复它们?我也很好奇:由于这些消息,我的应用程序稳定性是否有任何危险?
吓唬我的消息以单词"Unable"开头.目前该应用程序运行良好.
INFO - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@52cc95d: startup date [Thu Jun 02 16:02:12 MSD 2011]; root of context hierarchy
INFO - Loading XML bean definitions from class path resource [application-config.xml]
DEBUG - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG - Loading schema mappings from [META-INF/spring.schemas]
DEBUG - Loaded schema mappings: {http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd}
DEBUG - Loading bean definitions
DEBUG - Loaded 3 bean definitions from location pattern [application-config.xml]
DEBUG - Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@52cc95d: org.springframework.beans.factory.support.DefaultListableBeanFactory@33aae94f: defining beans [propertyPlaceholderConfigurer,dbWorker,connectionPool]; root of factory …Run Code Online (Sandbox Code Playgroud) 当我在MXML组件中定义自定义属性时,我还想定义一组可能的属性值,以便在调用代码完成函数时使Flex Builder显示(自定义属性的可能值).
知道如何做到这一点?
我开发了我认为会有很多用户的系统.每个用户都有一个在应用程序内表示的配置文件作为记录.为了存储用户的配置文件,我执行以下操作base64:encode_to_string(term_to_binary(Profile)),因此基本上配置文件存储在序列化的maner中.
到目前为止一切都很好.现在问题是:
我不时会计划通过添加和删除其中的某些字段来扩展配置文件功能.我的问题是在代码中处理这些变化的最佳策略是什么?
我现在看到的方法是做这样的事情:
Profile = get_profile(UserName),
case is_record(Profile, #profile1) of
true ->
% do stuff with Profile#profile1
ok;
_ ->
next
end,
case is_record(Profile, #profile2) of
true ->
% do stuff with Profile#profile2
ok;
_ ->
next
end,
Run Code Online (Sandbox Code Playgroud)
我想知道我的任务是否有更好的解决方案?
附加信息:我使用的是简单的KV存储.它不能存储Erlang类型这就是我使用的原因State#state.player#player.chips#chips.br
有没有人知道Erlang的好的和生产就绪的序列化库?
我尝试过erlang_protobuffs - 但它的测试失败了.我不需要公开方法或类似的东西,我只需要编码/解码消息.
还有什么值得尝试的吗?
我试着用机器人来强调测试ejabberd.机器人正在向对方发送消息.当负载达到30 MB/s时,似乎某些东西限制了流量.
我禁用所有整形器和大多数ejabberd插件,但它没有帮助.运行测试的服务器有很多可用资源(CPU,RAM,带宽等).
有没有人知道如何正确调整它运行的ejabberd没有这样的限制?
ps也许有人可以建议类似于XMPP传输,可以处理高负载(高达1 Gbit)和许多连接(每个功能强大的服务器高达250 000)?
我的Erlang应用程序将创建高达1'000'000个进程.每个进程都是gen_server.每个进程都会不时得到一些消息.
我正在为我的Erlang应用程序寻找一个强大的进程管理器.有什么想法可以满足我的需求吗?
附加信息:
在这里阅读为什么内置进程注册表不适合像我这样的任务:https://github.com/uwiger/gproc/blob/master/doc/erlang07-wiger.pdf
我可以在MySQL中为存储过程使用命名参数吗?我需要调用这样的存储过程:
CALL stored_procedure(@param1 = "foo1", @param2 = "foo2");
Run Code Online (Sandbox Code Playgroud)
答案是
CALL stored_procedure(@param1 := "foo1", @param2 := "foo2");
Run Code Online (Sandbox Code Playgroud)
感谢Pentium10.
erlang ×3
java ×2
apache-flex ×1
cocoa ×1
ejabberd ×1
erlang-otp ×1
log4j ×1
messages ×1
mysql ×1
networking ×1
objective-c ×1
performance ×1
spring ×1
spring-jdbc ×1