I-Jetty或Jetty(I-Jetty or Jetty)
我有一个Web应用程序托管在Android设备上。 我目前正在使用android sdk提供的模拟器。 我的应用程序将同时提供静态数据和动态数据。 我目前使用jetty版本6.1.22。 我想问问什么是更好的选择。 1.剥离代码的Jetty web服务器。 2. I-Jetty。
我的应用程序使用以下功能
- ResourceHandler为静态资源提供服务。
- 用于提供同步数据请求的通用servlet。
- CometServlet用于提供异步数据请求的扩展。
我期待遵循以下标准进行比较。
- 应用大小。 apk的大小将包含代码。
- 在30个请求/秒的最大负载下内存和CPU使用率。 这些是在应用程序生命周期中发生很少次的短阵阵。 平均负载约为5个请求/秒。
- 易于维护。 包括Jetty在应用程序中的重要升级。
- 我可能错过了任何其他副作用。
I have a web application to be hosted on android device. I am currently using the emulator available with android sdk. My application will serve both static as well as dynamic data. I am currently using jetty version 6.1.22. I wanted to ask what will be a better option to be used. 1. Jetty webserver with stripped off code. 2. I-Jetty.
My application uses following features-
- ResourceHandler to serve static resources.
- A Generic servlet to serve synchronous data requests.
- An extension to CometServlet to serve asynchronous data requests.
I am looking forward to following criteria for comparison.
- Application size. Size of apk which will contain the code.
- Memory and CPU usage under a maximum load of 30 requests/sec. These are short bursts which occur very few times in app-life cycle. The average load would be approximately 5 requests/sec.
- Ease of maintenance. Including important upgrades of Jetty in application.
- Any other side-effects which I probably am missing out at.
原文:https://stackoverflow.com/questions/3391019
最满意答案
你可以将
glob()
和exe
与这样的东西结合起来:let dirname = 'c:/ruby_scripts' for script in split(glob(dirname . '/*.rb')) " Get the script name let scriptname = fnamemodify(script, ':t:r') let scriptfile = fnamemodify(script, ':p') " Add the item to the menu exe 'amenu Ruby.' . scriptname . ' :%!ruby ' . scriptfile . '<cr><cr>' endfor
有关更多信息,请参阅:
:help glob() :help split() :help fnamemodify() :help expand() :help :exe
You can combine
glob()
andexe
with something like this:let dirname = 'c:/ruby_scripts' for script in split(glob(dirname . '/*.rb')) " Get the script name let scriptname = fnamemodify(script, ':t:r') let scriptfile = fnamemodify(script, ':p') " Add the item to the menu exe 'amenu Ruby.' . scriptname . ' :%!ruby ' . scriptfile . '<cr><cr>' endfor
For more information, see:
:help glob() :help split() :help fnamemodify() :help expand() :help :exe
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
是。 我确信有一个模块可以做到这一点,但你也可以创建自己的模块。 有两种方法可以解决这个问题。 你可以使用hook_menu()来查询你想要的项目并返回正确的菜单结构。 您还需要确保使用hook_nodeapi()在节点上重建菜单缓存。 请参阅下面的henricks评论,说明为什么这是一个糟糕的主意 或者,您可以使用hook_nodeapi()来添加带有menu_link_save()的自定义菜单项。 编辑 hook_menu应该返回一组菜单项,通常这些都是非常静态的,但是这些数组被动态生成并没有错。 因此 ...
-
目前,NuGet不支持将软件包资源安装在默认位置以外。 有一个现有的NuGet工作项将覆盖此功能: #1914 - 允许包资源文件夹可配置 。 At the moment, NuGet doesn't support installing packages resources elsewhere than the default location. There's an existing NuGet work item that would cover this feature : #1914 - Allo ...
-
给这个
- 元素:
-
你的HTML必须是这样的
- Babyboek ...
-
您应该将自定义CSS代码包装在媒体查询中。 @media (min-width: 992px)将仅影响桌面屏幕大小的元素。 了解有关Grid系统的更多信息 html, body { margin: 0; padding: 0; width: 100%; } .container { margin: 0; padding: 0; } @media (min-width: 992px) { .center.navbar .nav, .center.navbar ...
-
VIM:自动为特定目录中的脚本添加菜单项(VIM: Automatically adding menu-items for scripts from a particular directory)[2023-05-04]
你可以将glob()和exe与这样的东西结合起来: let dirname = 'c:/ruby_scripts' for script in split(glob(dirname . '/*.rb')) " Get the script name let scriptname = fnamemodify(script, ':t:r') let scriptfile = fnamemodify(script, ':p') " Add the item to the menu ... -
WordPress的:如何防止顶级菜单项成为一个链接?(WordPress: How to prevent toplevel menu-items to be a link?)[2023-12-10]
如果您想要顶级导航项目作为下拉菜单的触发器,但实际上并未链接到任何位置,请在WordPress菜单系统中执行此操作: 插入带有标签和任何链接地址的自定义链接 点击编辑菜单项链接(三角形) 删除网址字段中的链接地址 添加嵌套的子菜单项 保存 If you want a top-level navigation item to act as a trigger for a drop down menu, but not actually link anywhere, here’s how to do it in ... -
发生这种情况是因为您尝试在会话中存储的对象不可序列化。 您可以使用 import json json.dumps(MenuItem(1, "hi", "some_link")) 这使 MenuItem object at ... is not JSON serializable 您可以做的一件事是编写自己的函数来序列化对象。 这是接近它的一种方法: class MenuItem(object): def __init__(self, id, name, link, items=None): ...
-
快速搜索提供了几个选项,包括看起来像答案的内容 。 是的 - 模板功能100%专为此类设计。 :) 编辑 - 没问题,但你的答案实际上在RichTheGeek的评论中。 他链接了新的D7函数,在评论主题中,这是一个根据标题向菜单项添加类的示例。 这不是一个很好的例子,因为使用preg_replace是一种“沉重”的方式,但我不明白为什么这不起作用。 我所做的就是在第11行换掉“class”作为“id”。 不要忘记将“yourtheme”替换为您正在使用的主题的实际系统名称。 function yourt ...