我正在尝试在Railo上启动测试MG应用程序,并且遇到了障碍.当我访问MG应用程序时,我得到:
Railo 3.1.0.012 Error (Java.lang.classformaterror)
Message Invalid index 16 in LocalVariableTable in class file
application_cfc$cf
Java Stacktrace
Invalid index 16 in LocalVariableTable in class file application_cfc
$cf
at java.lang.ClassLoader.defineClass1(Native Method):-2
at java.lang.ClassLoader.defineClass(ClassLoader.java:621):621
at java.lang.ClassLoader.defineClass(ClassLoader.java:401):401
at railo.commons.lang.PhysicalClassLoader.loadClass
(PhysicalClassLoader.java:116):116
at railo.runtime.PageSourceImpl.compile(PageSourceImpl.java:225):225
at railo.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:167):
167
at railo.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:102):102
Run Code Online (Sandbox Code Playgroud)
我做了一些测试,发现当Application.cfc中发生以下情况时:
<cfloop from="1" to="#arrayLen(mgInstances)#" index="i">
<cfset mgInstances[i].executeEvent(arguments.eventName, values) />
</cfloop>
Run Code Online (Sandbox Code Playgroud)
我收到了错误.如果我删除这部分,我开始得到:
Message Application context not loaded!
Error Code
org.coldspringframework.webApplicationContextProxy.cantLoadApplicationContext
Run Code Online (Sandbox Code Playgroud)
所以,我猜测在Application.cfc中,行:
<cfset var mgInstances = createObject
("component","ModelGlue.Util.ModelGlueFrameworkLocator").findInScope
(appScope) />
Run Code Online (Sandbox Code Playgroud)
失败了.
还有其他人有这个问题吗?有解决方案吗 谢谢!!!
我有一个结构,只包含我已分配的内存指针.有没有办法以递归方式释放每个指针而不是每个指针都是免费的?
例如,假设我有这样的布局:
typedef struct { ... } vertex;
typedef struct { ... } normal;
typedef struct { ... } texture_coord;
typedef struct
{
vertex* vertices;
normal* normals;
texture_coord* uv_coords;
int* quads;
int* triangles;
} model;
Run Code Online (Sandbox Code Playgroud)
在我的代码中我malloc每个结构创建一个模型:
model* mdl = malloc (...);
mdl->vertices = malloc (...);
mdl->normals = malloc (...);
mdl->uv_coords = malloc (...);
mdl->quads = malloc (...);
mdl->triangles = malloc (...);
Run Code Online (Sandbox Code Playgroud)
可以直接释放每个指针,如下所示:
free (mdl->vertices);
free (mdl->normals);
free (mdl->uv_coords);
free (mdl->quads);
free (mdl->triangles);
free (mdl);
Run Code Online (Sandbox Code Playgroud)
有没有办法可以递归迭代mdl中的指针而不是在每个元素上调用free?
(实际上,为每一个编写free()几乎没有任何工作,但它会减少代码重复并且对于学习有用)
我是jQuery的新手,我已经看到了内置的slideDown()/ slideUp()动画的问题.我正在使用灵活的宽度元素,当我使用该函数时,元素不会返回到它的全宽.我认为这与jQuery找到元素宽度的方式有关.我遇到了Safari 3和Firefox 3.1 for OS X中的错误.以下是该页面的html:
<div id="archive">
<h2 class="first open">May</h2>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="list">
<tr class="first">
<td width="65%"><a href="#">This month</a></td>
<td align="right">Sunday, May 31 <input type="button" value="Edit"/></td>
</tr>
</table>
</div>
Run Code Online (Sandbox Code Playgroud)
和Javascript:
// Enable month names to re-open divs
$("#archive h2").not(":last").wrapInner("<a href='#'></a>").end().find
("a").click(function(event){
event.preventDefault();
var h2 = $(this).parent();
if (h2.hasClass("open")) { // Close
h2.removeClass("open");
h2.next().slideUp("fast");
} else { // Open
h2.addClass("open");
h2.next().slideDown("fast");
}
});
Run Code Online (Sandbox Code Playgroud)
这个问题可以通过包装in来解决,但随后在Firefox中出现一个新的错误,其中slideDown动画跳到最后.
任何帮助,将不胜感激.
谢谢,布兰登
可能重复:
eclipse的最佳GUI设计师?
我正在尝试在java中创建用户界面?你建议我使用什么ui建设者?谢谢.
我希望做这样的事情:
我遇到的问题是用datareader填充数据的对象/对象.我开始使用ArrayList(现在已经阅读了有关使用List的内容),但是虽然我可以取回所有记录(在这种情况下只有2个项目),但我无法访问每个项目中的各个字段(Eric,Boston,等等).
在datareader中输入Plan B:foreach记录,将各个列值添加到数组中,然后将每个数组添加到List中.我认为这会有效,但我不知道如何在不知道需要实例化多少数组的情况下实例化数组.换句话说,我通常会做这个字符串[] myarray = new string [] {"eric","boston","etc"};
但如果我有多个记录,那会是什么样的?填充数组,添加到List,清除原始数组然后重新填充它,将它添加到List等?
任何帮助将不胜感激!此外,我对这样做的替代方式非常开放.
谢谢!
我的页面上的Javascript将客户端UTC偏移量保存到cookie.如何使用此cookie创建TimeZone并将其分配给Time.zone?
我需要这样的东西:
before_filter :set_time_zone
def set_time_zone
Time.zone = ActiveSupport::TimeZone.new('my timezone', cookies[:timezone])
end
Run Code Online (Sandbox Code Playgroud)
除了这个表达式的右边部分不起作用,我不确定我是否在这里正确的方式.无法得到它.
我正在编写一个应用程序,允许用户从Web应用程序(Linux/Apache/CGI :: Application)安排一次性长时间运行的任务.为此,我使用Schedule :: At模块,它是"at"命令的Perl接口.由于计划的任务不重复,我不考虑"cron".我在"at"有两个问题:
我没有固定在"at",如果有的话,我愿意使用其他更强大的调度方法.
感谢您的关注.
我将URL存储在数据库中,我希望能够知道两个URL是否相同.
通常,末尾的尾部斜杠不会更改您从服务器获得的响应.(即http://www.google.com/与http://www.google.com相同)
我是否可以盲目地从任何URL中删除尾部斜杠,而不查看任何内容?
这样安全吗?
我的意思是"不看任何东西"就是我要删除斜杠:http://www.google.com/q? xxx = something &yyy = something
/
我知道Web服务器理论上可以根据需要返回完全不同的东西,而且我知道有时会在不使用斜杠的情况下转到URL,而是重定向到斜杠.我唯一的目的是确定两个URL是否相同.
这种方法安全吗?
我有链接问题.我需要链接一个libfoo.so依赖于read我想在read.c文件中定义自己的函数的共享库.
我编译并链接所有内容,但在运行时我得到错误
/home/bar/src/libfoo.so: undefined symbol: sread.
Run Code Online (Sandbox Code Playgroud)
nm报告符号已定义
$nm baz | grep sread
00000000000022f8 t sread
Run Code Online (Sandbox Code Playgroud)
但ldd报告符号未定义
$ldd -r baz | grep sread
undefined symbol: sread (/home/bar/src/libfoo.so)
Run Code Online (Sandbox Code Playgroud)
是什么赋予了?libfoo.so是一个共享库吗?
我正在研究一些旧的AJAX代码,这些代码是在jQuery之前的黑暗日子里编写的.奇怪的是,它一直运作良好多年,直到今天它突然停止触发回调.这是基本代码:
var xml = new XMLHttpRequest(); // only needs to support Firefox
xml.open("GET", myRequestURL, true);
xml.onreadystatechange = function() { alert ('test'); };
xml.send(null);
Run Code Online (Sandbox Code Playgroud)
检查Firebug控制台,发送请求时无需担心,并且它从请求URL接收到正确的XML,但该onreadystatechange功能根本不起作用.没有javascript错误或系统中发生任何其他奇怪的事情.
我希望我可以使用jQuery重写所有内容,但我现在没有时间.什么可能导致这个问题?
进一步的更新 - 我已经能够在不同的浏览器(FFx 3.0)中测试我的代码并且它在那里工作,所以它一定是我的浏览器的问题.我在Vista上运行Firefox 3.5b4,我现在已经尝试过,所有我的插件都被禁用而没有运气.它仍然真的让我烦恼,因为我昨天在这个网站上工作(使用相同的浏览器设置)并且根本没有问题...
实际上我只是回顾一下我的Addons窗口,看到Firebug仍然启用了.如果我禁用Firebug,它可以完美运行.如果我启用它,它就会崩溃.Firebug版本1.40.a31