defined

jquery(primefaces) is not included after redirect

牧云@^-^@ 提交于 2019-12-06 08:25:34
I'm new to primefaces and try to realize a simple web-app with jsf. In this app I have a login.xhtml where a user can enter a name and his password. If login is successfull, my LoginBean class redirects him to another page called index.xhtml in the folder basicSites. While on login.xhtml everything works fine, on index.xhtml occured an error. After the redirect to this site i only see a white site, and the browser console told me that there was a reference error, because jQuery is not defined. I researched through many other articles that have had a similar problem, but my problem isnt still

Is there any way to check to see if a VBScript function is defined?

為{幸葍}努か 提交于 2019-12-05 12:48:28
问题 This is probably just wishful thinking... Is there any way to check to see if an ASP/VBScript function is defined before calling it? 回答1: It's a slightly hacky way to do it as it relies on having set "On Error Resume Next", but you could do something like this: On Error Resume Next Dim objRef1, objRef2 Set objRef1 = GetRef("DoStuff1") If objRef1 Is Nothing Then Call objRef1 Else MsgBox "DoStuff1 is not defined!" End If Set objRef2 = GetRef("DoStuff2") If objRef2 Is Nothing Then MsgBox

How to judge whether a method has defined in a class?

心已入冬 提交于 2019-12-05 03:54:18
class C1 unless method_defined? :hello # Certainly, it's not correct. I am asking to find something to do this work. def_method(:hello) do puts 'Hi Everyone' end end end So, how to judge whether a method has defined or not? Jörg W Mittag The code you posted works just fine for checking whether the method is defined or not. Module#method_defined? is exactly the right choice. (There's also the variants Module#public_method_defined? , Module#protected_method_defined? and Module#private_method_defined? .) The problem is with your call to def_method , which doesn't exist. (It's called Module#define

CXF - Wsdl2java - the XX property is already defined

不想你离开。 提交于 2019-12-03 03:51:05
I use CXF to generate client class to access web service server. The web service are based on WCF (.NET). When I call wsdl2java, I have the following error : The id property is already defined. use <jaxb:property> to resolve this conflict. The following location matches the above error : http://*****/WcfDemandService.svc?xsd=xsd2 [0,0] This error does not appear if I ask xmlbeans databinding (use "db xmlbeans" option). Is there any way to generate classes with JAXB databinding? This type of problem often occurs when a type has an attribute and element with the same name. schema.xsd <?xml

why does variable 'name' doesnt need to be initialized after first use [Javascript] [duplicate]

僤鯓⒐⒋嵵緔 提交于 2019-12-02 11:42:02
问题 This question already has answers here : Why is window.name cached? (2 answers) Closed 3 years ago . Whenever i initialize a variable called 'name' it keeps its value through pages. Like this: page1.html <html> <script> var name = prompt("What's your name?"); alert(name); </script> <a href='page2.html'> Page2</a> </html> page2.html <html> <script> alert(name); </script> </html> So in both pages the variable name keeps the value of what it has been given in the prompt of the first page, the

c++学习总结:define的小细节

耗尽温柔 提交于 2019-12-02 00:24:27
在iOS开发中,我们可以使用#ifdef或者#ifndef来进行一些判断,这在我之前的博客中已经有所说明。今天我无意中又发现了一个小细节,总结起来就是预编译判断的两种方式,特在此与大家分享。 (1)第一种方式使用#ifdef 我们可以这样使用#ifdef,如下代码所示, #define DebugEnable #ifdef Debug_Enable NSLog(@"Debug Enable"); #else NSLog(@"Debug Unable"); #endif 这时候如果我们定义了Debug_Enable宏,则编译上面的代码;反之编译下面的代码。 (2)第二种方式使用#if defined(...),如下代码所示 #if defined(__APPLE__) NSLog(@"Apple Platform"); #else if defined(__linux__) NSLog(@"linux Platform"); #endif 这段代码是在真机运行的时候,判断是在什么平台上面,比如__APPLE__表示在苹果的OS X或者iOS平台,而__linux__宏表示在linux平台。 有人会问为什么要写这些宏判断语句呢?我也是刚刚想通的,我公司的项目不仅在iOS平台,在linux平台也在同步开发,底层使用的框架在两个平台都能使用,但是两个平台的东西也并不完全一样

Why is my python function not defined, when it exists in the same file?

若如初见. 提交于 2019-11-29 14:25:56
I have a simple function, which I shall call myFunction . It takes two parameters, performs some calculations on them, and returns the result. I also have a class, MyClass , which has a constructor that has a header like this: __init__(self, bar, fun=myFunction): When I try to run anything in this class, I get the following error: MyClass def __init__(self, bar, fun=myFunction): NameError: name 'myFunction' is not defined If I remove this class, I can use myFun in the Python Shell, so what's the deal? You haven't shown the actual code so it's hard to be sure, but I bet myFunction is defined

How do I check if a class is defined?

守給你的承諾、 提交于 2019-11-28 17:21:53
How do I turn a string into a class name, but only if that class already exists? If Amber is already a class, I can get from a string to the class via: Object.const_get("Amber") or (in Rails) "Amber".constantize But either of these will fail with NameError: uninitialized constant Amber if Amber is not already a class. My first thought is to use the defined? method, but it doesn't discriminate between classes that already exist and those that don't: >> defined?("Object".constantize) => "method" >> defined?("AClassNameThatCouldNotPossiblyExist".constantize) => "method" So how do I test if a

Gradle error: “Attribute ”rippleColor“ has already been defined” in android studio

被刻印的时光 ゝ 提交于 2019-11-27 16:00:16
So I was trying out the material design support library and when I added the dependency, compiled, and I got this error. I looked at similar problems and tried their solutions but it would not get fixed so I hope you can help me. Here's my logcat: C:\Users\Jan\AndroidStudioProjects\SwagCalculator3\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.0\res\values\values.xml Error:(1) Attribute "rippleColor" has already been defined and here is my build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig {

用tomcat搭建https

喜你入骨 提交于 2019-11-27 05:37:22
HTTPS,安全的http连接,并且苹果也宣布,在将来他们将不在支持http,所有的链接均走https。这里借助jdk的工具和tomcat服务器,搭建一个HTTPS的服务器 1、进入java jdk的bin目录,运行keytool工具 keytool有如下参数 可以运行以下命令 keytool -genkey -alias tomcat -keyalg RSA -keystore D:tmp\tomcat 【解释:生成的文件名为 tomcat,https利用的非对称加密算法为RSA,把文件生成在D:tmp/目录下】 逐步按照提示填写相关信息 然后在我的D盘中生成了一个文件 tomcat 至此,证书已经生成完毕,接下来配置tomcat,使之支持https,本次测试中用的tomcat版本为tomcat7 2、配置tomcat 路径:apache-tomcat-7.0.54\conf\server.xml文件 修改Connector 8443的相关配置 原始文件为 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> 修改为: <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"