Search Results

Search found 9771 results on 391 pages for 'equivalence classes'.

Page 168/391 | < Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >

  • jQuery Find element else do nothing ?

    - by Andrew
    Hi Guys, I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like jQuery(".class").css(random_stuff) is not a function Any ideas what I can do to either "find" the elements and do nothing or ?

    Read the article

  • Why do static Create methods exist?

    - by GeReV
    I was wondering, why do static Create methods exist? For instance, why use this code: System.Xml.XmlReader reader = System.Xml.XmlReader.Create(inputUri); over this code: System.Xml.XmlReader reader = new System.Xml.XmlReader(inputUri); I cannot find the rationale for using one over the other, and can't find any relation between classes who use this construct over the other. Can anyone shed some light on this?

    Read the article

  • Tomcat error with Hibernate 3.51 / Java EE 6

    - by DD
    I just upgraded to hibernate 3.51 and I get an error now saying: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval () Z. This only happens with Tomcat not with Jetty. I've checked and I don't have any conflict and this method definitely exists. I have hibernate-jpa-2.0-api-1.0.0.Final.jar on the class path, and dont have any conflicting classes. Any suggestions?

    Read the article

  • Dotnet website - class in one file can't access class in a different file

    - by bmutch
    I've inherited a web site I'm editing in dotnet and it won't compile because the class in one file (say class1.vb) refers to a class in another file (say class2) (like Dim m_c As class2) , but the compiler says "Type Class2 is not defined". when I look in the object browswer the classes are listed separately (i.e. not all grouped under the same namespace) and appear as: Public Class Class1 Inherits System.Object Member of C:...\mywebsite\ Help!, thanks.

    Read the article

  • How to deploy axis2 + MyBatis

    - by henry
    I am trying to do webservice (I am quite new in Webservice under java). I am using netbeans. Axis2 is having problem trying to locate the the xml configuration file for mybatis Anyone can tell me how to successfully deploy mybatis configuration. Should I manually copy the configuration under .netbeans\6.8\apache-tomcat-6.0.20_base\webapps\axis2\WEB-INF\classes or there is any other setting?

    Read the article

  • Can ASM method-visitors be used with interfaces?

    - by Olaf Mertens
    I need to write a tool that lists the classes that call methods of specified interfaces. It will be used as part of the build process of a large java application consisting of many modules. The goal is to automatically document the dependencies between certain java modules. I found several tools for dependency analysis, but they don't work on the method level, just for packages or jars. Finally I found ASM, that seems to do what I need. The following code prints the method dependencies of all class files in a given directory: import java.io.*; import java.util.*; import org.objectweb.asm.ClassReader; public class Test { public static void main(String[] args) throws Exception { File dir = new File(args[0]); List<File> classFiles = new LinkedList<File>(); findClassFiles(classFiles, dir); for (File classFile : classFiles) { InputStream input = new FileInputStream(classFile); new ClassReader(input).accept(new MyClassVisitor(), 0); input.close(); } } private static void findClassFiles(List<File> list, File dir) { for (File file : dir.listFiles()) { if (file.isDirectory()) { findClassFiles(list, file); } else if (file.getName().endsWith(".class")) { list.add(file); } } } } import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.commons.EmptyVisitor; public class MyClassVisitor extends EmptyVisitor { private String className; @Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { this.className = name; } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { System.out.println(className + "." + name); return new MyMethodVisitor(); } } import org.objectweb.asm.commons.EmptyVisitor; public class MyMethodVisitor extends EmptyVisitor { @Override public void visitMethodInsn(int opcode, String owner, String name, String desc) { String key = owner + "." + name; System.out.println(" " + key); } } The Problem: The code works for regular classes only! If the class file contains an interface, visitMethod is called, but not visitMethodInsn. I don't get any info about the callers of interface methods. Any ideas?

    Read the article

  • PEAR/PHPUnit installation on shared hosting

    - by Sergei Morozov
    I’ve installed a local (per-account) PEAR instance on shared web-hosting. After that I’ve installed PHPUnit. It doesn’t work in command-line mode because PHPUnit classes are not under default include_path that is ".:/usr/local/lib/php". The same, I think, would happen with local phing and other command-line tools installed via PEAR. Is there a way to specify per-account include_path value that will contain my local PEAR path "~/pear/php"?

    Read the article

  • Operator Overloading in C

    - by Leif Andersen
    In C++, I can change the operator on a specific class by doing something like this: MyClass::operator==/*Or some other operator such as =, >, etc.*/(Const MyClass rhs) { /* Do Stuff*/; } But with there being no classes (built in by default) in C. So, how could I do operator overloading for just general functions? For example, if I remember correctly, importing stdlib.h gives you the - operator, which is just syntactic sugar for (*strcut_name).struct_element. So how can I do this in C? Thank you.

    Read the article

  • Hibernate HQL with interfaces

    - by Benju
    According to this section of the Hibernate documentation I should be able to query any java class in HQL http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-polymorphism Unfortunately when I run this query... "from Transaction trans where trans.envelopeId=:envelopeId" I get the message "Transaction is not mapped [from Transaction trans where trans.envelopeId=:envelopeId]". Transaction is an interface, I have to entity classes that implement it, I want on HQL query to return a Collection of type Transaction.

    Read the article

  • Built-in precedence in Expression Trees?

    - by jdk
    I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it? Maybe through helper methods or classes? I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

    Read the article

  • Error code while trying to use private variables in a function

    - by Cortopasta
    I get an error that says Parse error: syntax error, unexpected T_PRIVATE in E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php on line 6 while trying to run my script. I'm new to classes in PHP and was wondering if someone could point out my error. Here's the code for that part. <?php class ac { public function authentication() { private $plain_username = $_POST['username']; private $md5_password = md5($_POST['password']); $ac = new ac();

    Read the article

  • Unit testing an iPhone static library with XCode 3

    - by teabot
    I am writing a number of static libraries for the iPhone and wish also to have suites of unit tests. XCode 3 provides templates for both static libraries and unit tests but I am wondering how they should fit together in a static library project? In my static library project I have created a target for unit testing but expect to also create an executable to kick off the unit tests than run against the classes in the static library. What is the procedure for doing this?

    Read the article

  • Are Hibernate named HQL queries (in annotations) optimised?

    - by Graham Lea
    A new colleague has just suggested using named HQL queries in Hibernate with annotations (i.e. @NamedQuery) instead of embedding HQL in our XxxxRepository classes. What I'd like to know is whether using the annotation provides any advantage except for centralising quueries? In particular, is there some performances gain, for instance because the query is only parsed once when the class is loaded rather than every time the Repository method is executed?

    Read the article

  • Binding functions of derived class with luabind

    - by Anamon
    I am currently developing a plugin-based system in C++ which provides a Lua scripting interface, for which I chose to use luabind. I'm using Lua 5 and luabind 0.9, both statically linked and compiled with MSVC++ 8. I am now having trouble binding functions with luabind when they are defined in a derived class, but not its parent class. More specifically, I have an abstract base class called 'IPlugin' from which all plugin classes inherit. When the plugin manager initialises, it registers that class and its functions like this: luabind::open(L); luabind::module(L) [ luabind::class_("IPlugin") .def("start", (void(IPlugin::*)())&IPlugin::start) ]; As it is only known at runtime what effective plugin classes are available, I had to solve loading plugins in a kind of roundabout way. The plugin manager exposes a factory function to Lua, which takes the name of a plugin class and a desired object name. The factory then creates the object, registers the plugin's class as inheriting from the 'IPlugin' base class, and immediately calls a function on the created object that registers itself as a global with the Lua state, like this: void PluginExample::registerLuaObject(lua_State *L, string a_name) { luabind::globals(L)[a_name] = (PluginExample*)this; } I initially did this because I had problems with Lua determining the most derived class of the object, as if I register it from the StreamManager it is only known as a subtype of 'IPlugin' and not the specific subtype. I'm not sure anymore if this is even necessary though, but it works and the created object is subsequently accessible from Lua under 'a_name'. The problem I have, though, is that functions defined in the derived class, which were not declared at all in the parent class, cannot be used. Virtual functions defined in the base class, such as 'start' above, work fine, and calling them from Lua on the new object runs the respective redefined code from the 'PluginExample' class. But if I add a new function to 'PluginExample', here for example a function taking no arguments and returning void, and register it like this: luabind::module(L) [ luabind::class_("PluginExample") .def(luabind::constructor()) .def("func", &PluginExample::func) ]; calling 'func' on the new object yields the following Lua runtime error: No matching overload found, candidates: void func(PluginExample&) I am correctly using the ':' syntax so the 'self' argument is not needed and it seems suddenly Lua cannot determine the derived type of the object anymore. I am sure I am doing something wrong, probably having to do with the two-step binding required by my system architecture, but I can't figure out where. I'd much appreciate some help =)

    Read the article

  • How to define a preprocessor symbol in Xcode

    - by Steph Thirion
    Is it possible to set a symbol for conditional compilation by setting up properties in an Xcode project? My aim is to to create a symbol that is available to all files, without having to use import/include, so that a set of common classes can have a special behavior in some projects. Like the following, but with my own symbols. #if TARGET_IPHONE_SIMULATOR ... #endif

    Read the article

  • FluentNHibernate - ClassMap vs IAutoMappingOverride

    - by Mendy
    In FluentNHibernate when should I use ClassMap and when IAutoMappingOverride<Entity> for my EntityMap classes. public class PostMap : ClassMap<Post> { public PostMap() { ... } } vs public class PostMap : IAutoMappingOverride<Post> { public void Override(AutoMapping<Post> mapping) { ... } }

    Read the article

  • Performing your own runtime analysis of your code in C#

    - by Matt
    I have written a large C# app with many methods in many classes. I'm trying to keep a log of what gets called and how often during my development. (I keep a record in a DB) Every method is padded with the following calls: void myMethod() { log(entering,args[]); log(exiting,args[]); } Since I want to do this for all my methods, is there a better way to do this then having to replicate those lines of code in every method?

    Read the article

  • SOLID Liskov Substitution Principle

    - by Omu
    if i have something like class square : figure {} class triangle : figure {} does that mean that i should never ever use the square and triangle classes but only refer to figure ? like never do like this: var x = new square();

    Read the article

< Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >