Search Results

Search found 11924 results on 477 pages for 'openoffice org'.

Page 149/477 | < Previous Page | 145 146 147 148 149 150 151 152 153 154 155 156  | Next Page >

  • XMLHttpRequest fails in observer method

    - by Michael
    I'm developing a Firefox extension and this code belongs to javascript module. var ajax = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); ajax.open('GET', "http://www.google.com", true); ajax.onload = function () { Reader.log("Got News"); }; ajax.onerror = function () { Reader.log("Got Error"); }; ajax.send(null); This small code always fails (onerror) if calling from observe method invoked by preference "@mozilla.org/preferences-service;1" Anyone knows how to make this work in observe method?

    Read the article

  • Resources on wordpress theme-development

    - by Espenhh
    What are the best resources for Wordpress theme-development? I am currently in the phase of starting my own blog, and don't want to use one of the many free themes. I already have a theme for my website, so I want to read about best-practices. Any advice on how to get started would be very welcome :) I have now created my theme (wohoo!), and thought I should summarize the best resources I found. Lets see.. Resources: ThemeTation's three-part guide to create a wordpress-theme from scratch Nettuts.com's guide: How to Create a Wordpress Theme from Scratch (And Part 2) Didn't actually use this, it's a quite new article, but anyway - it's great. It will get a follow-up in the next few days too.. Wordpress.org's own guide on templates Definatly a must-read for everyone new to wordpress-designing.. "The loop" Essential knowledge, also a must-read Directory of all the template tags Used by wordpress to actually output blog-content.. Inspiration: Smashing Magazine's lists: first, one more, yet another one Wordpress.org's theme-directory

    Read the article

  • Empty namespace using Linq Xml

    - by porum
    I'm trying to create a sitemap using Linq to Xml, but am getting an empty namespace attribute, which I would like to get rid of. e.g. XNamespace ns = "http://www.sitemaps.org/schemas/sitemap/0.9"; XDocument xdoc = new XDocument(new XDeclaration("1.0", "utf-8", "true"), new XElement(ns + "urlset", new XElement("url", new XElement("loc", "http://www.example.com/page"), new XElement("lastmod", "2008-09-14")))); The result is ... <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url xmlns=""> <loc>http://www.example.com/page</loc> <lastmod>2008-09-14</lastmod> </url> </urlset> I would rather not have the xmlns="" on the url element. I can strip it out using Replace on the final xdoc.ToString(), but is there a more correct way?

    Read the article

  • Cannot instantiate abstract class or interface : problem while persisting

    - by sammy
    i have a class campaign that maintains a list of AdGroupInterfaces. im going to persist its implementation @Entity @Table(name = "campaigns") public class Campaign implements Serializable,Comparable<Object>,CampaignInterface { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @OneToMany ( cascade = {CascadeType.ALL}, fetch = FetchType.EAGER, targetEntity=AdGroupInterface.class ) @org.hibernate.annotations.Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN ) @org.hibernate.annotations.IndexColumn(name = "CHOICE_POSITION") private List<AdGroupInterface> AdGroup; public Campaign() { super(); } public List<AdGroupInterface> getAdGroup() { return AdGroup; } public void setAdGroup(List<AdGroupInterface> adGroup) { AdGroup = adGroup; } public void set1AdGroup(AdGroupInterface adGroup) { if(AdGroup==null) AdGroup=new LinkedList<AdGroupInterface>(); AdGroup.add(adGroup); } } AdGroupInterface's implementation is AdGroups. when i add an adgroup to the list in campaign, campaign c; c.getAdGroupList().add(new AdGroups()), etc and save campaign it says"Cannot instantiate abstract class or interface :" AdGroupInterface its not recognizing the implementation just before persisting... Whereas Persisting adGroups separately works. when it is a member of another entity, it doesnt get persisted. import java.io.Serializable; import java.util.List; import javax.persistence.*; @Entity @DiscriminatorValue("1") @Table(name = "AdGroups") public class AdGroups implements Serializable,Comparable,AdGroupInterface{ /** * */ private static final long serialVersionUID = 1L; private Long Id; private String Name; private CampaignInterface Campaign; private MonetaryValue DefaultBid; public AdGroups(){ super(); } public AdGroups( String name, CampaignInterface campaign) { super(); this.Campaign=new Campaign(); Name = name; this.Campaign = campaign; DefaultBid = defaultBid; AdList=adList; } @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="AdGroup_Id") public Long getId() { return Id; } public void setId(Long id) { Id = id; } @Column(name="AdGroup_Name") public String getName() { return Name; } public void setName(String name) { Name = name; } @ManyToOne @JoinColumn (name="Cam_ID", nullable = true,insertable = false) public CampaignInterface getCampaign() { return Campaign; } public void setCampaign(CampaignInterface campaign) { this.Campaign = campaign; } } what am i missing?? please look into it ...

    Read the article

  • appending <a href> to keywords in rails

    - by kim
    Basically, there are some keywords that i want to pick out and assign a link to them dynamically. How should i go about in doing this? Let's say i have something like this; <p>ruby, rails, php, python, django and sinatra</p> and i would like to assign links to keywords like ruby and python, so the end results should look like this; <p><a href="http://www.ruby-lang.org">ruby</a>, rails, php, <a href="http://www.python.org">python</a>, django and sinatra</p> Any help or suggestion would be much appreciated!

    Read the article

  • How to repeat a particular execution multiple times

    - by Joshua
    The following snippet generates create / drop sql for a particular database, whenever there is a modification to JPA entity classes. How do I perform something equivalent of a 'for' operation where-in the following code can be used to generate sql for all supported databases (e.g. H2, MySQL, Postgres) Currently I have to modify db.groupId, db.artifactId, db.driver.version everytime to generate the sql files <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>${hibernate3-maven-plugin.version}</version> <executions> <execution> <id>create schema</id> <phase>process-test-resources</phase> <goals> <goal>hbm2ddl</goal> </goals> <configuration> <componentProperties> <persistenceunit>${app.module}</persistenceunit> <drop>false</drop> <create>true</create> <outputfilename>${app.sql}-create.sql</outputfilename> </componentProperties> </configuration> </execution> <execution> <id>drop schema</id> <phase>process-test-resources</phase> <goals> <goal>hbm2ddl</goal> </goals> <configuration> <componentProperties> <persistenceunit>${app.module}</persistenceunit> <drop>true</drop> <create>false</create> <outputfilename>${app.sql}-drop.sql</outputfilename> </componentProperties> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate-core.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>${slf4j-nop.version}</version> </dependency> <dependency> <groupId>${db.groupId}</groupId> <artifactId>${db.artifactId}</artifactId> <version>${db.driver.version}</version> </dependency> </dependencies> <configuration> <components> <component> <name>hbm2cfgxml</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2dao</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2ddl</name> <implementation>jpaconfiguration</implementation> <outputDirectory>src/main/sql</outputDirectory> </component> <component> <name>hbm2doc</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2hbmxml</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2java</name> <implementation>annotationconfiguration</implementation> </component> <component> <name>hbm2template</name> <implementation>annotationconfiguration</implementation> </component> </components> </configuration> </plugin>

    Read the article

  • How to add target of Nlog to a specific textbox control, so the log messages will be shown in that c

    - by Sachin
    I have used following config of NLog to add the log text to control of specified Name on specified form. <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <targets> <target name="control" xsi:type="FormControl" append="true" controlName="textBox1" formName="Form1"/> </targets> <rules> <logger name="*" minlevel="Debug" writeTo="control"/> </rules> </nlog> I have a form with name Form1 and control on it with the name textBox1. Still nLog cretes a new form in runtime and adds a docked textbox to it and shows the logs in it. Now how to make nLogwrite the logs to MY form and MY Control

    Read the article

  • How to deal with presence or not of xml namespaces using xslt.

    - by Mycol
    I have some XML/TEI documents, and i'm writing an XSLT 2.0 to extract their content. Almost all TEI documents has no namespace, but one has the default namespace (xmlns="http://www.tei-c.org/ns/1.0"). So all documents has the same aspect, with unqulified tags like <TEI> or <teiHeader>, but if I try to extract the content, all works with "non-namespaced-documents", but nothing (of course) is extracted from the namespaced-document. So i used the attribute xpath-default-namespace="http://www.tei-c.org/ns/1.0" and now (of course) the only document working is the namespaced one. I can't edit documents at all, so what I'm asking is if there's a way to change dynamically the xpath-default-namespace in order to make work xpaths like //teiHeader both with namespaced and non-namespaced documents

    Read the article

  • Java Node.cloneNode()

    - by Tom Brito
    Talking about the org.w3c.dom package; When I call Node.cloneNode() method from a Element(extends Node) object, which Document is used to create the new cloned Element? Example: import org.w3c.dom; class MyClass { public static void main(String[] args) throws Exception { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.newDocument(); Element element = doc.createElement("myElement"); Element cloneElement = (Element) element.cloneNode(true); } } Which Document was used to create cloneElement?

    Read the article

  • error when calling the webservice

    - by xrx215
    i am getting a list of pagepack assistant by calling a webservice. I have added the web reference. using org.xerox.xde3.na.sdi.amiller_v_vista; public org.xerox.xde3.na.sdi.amiller_v_vista.DDCControl proxy; in page load method i am calling the web method as follows proxy = new DDCControl(); Guid y = new Guid("45a5b1c2-2fa5-4136-abdd-bc213b694848"); DataList1.DataSource = proxy.GetAllDDCs(this.AccountID, y); DataList1.DataBind(); I am getting the following error: An invalid data source is being used for DataList1. A valid data source must implement either IListSource or IEnumerable Can you please help me with this issue?

    Read the article

  • (Error) GlassFish: publishModule kind= 3 deltaKind=2 1 WebApp

    - by Harry Pham
    I run Eclipse 1.6.0, and Glassfish V3 back end. The program run fine, the console give no error. However the error log always show this weird error. The application name is WebApp GlassFish: publishModule kind= 3 deltaKind=2 1 WebApp An exception stack trace is not available. Here is the Session Data eclipse.buildId=unknown java.version=1.6.0_17 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/KingdomHeart/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86 -product org.eclipse.epp.package.jee.product -keyring /Users/KingdomHeart/.eclipse_keyring -showlocation

    Read the article

  • Consuming an RPC/encoded Web Service in .NET

    - by Timmy O' Tool
    I'm trying to build the proxy class for a web service using the wsdl Executing this command: wsdl [http://WSDL_URL] I'm getting Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault elements. ... Error: Cannot find definition for http://schemas.xmlsoap.org/wsdl/:BouBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing. Parameter name: name The author of the web service told me that the SOAP protocol is RPC/encoded. Is there is any way to generate a proxy class for this?

    Read the article

  • xerces serialization in Java 6

    - by Jim Garrison
    In Java 6, the entire xerces XML parser/serializer implementation is now in the Java runtime (rt.jar). The packages have been moved under the com.sun.* namespace, which places them off-limits for explicit reference within client code. This is not a problem when using the parser, which is instantiated via javax API-defined factories. However, our code also uses xerces serialization (org.apache.xml.serialize.* ). AFAICT, there are no javax.xml API-defined factories for creating instances of Serializer and OutputFormat. This seems to imply that the only way to get one is to explicitly call the com.sun.org.apache.xml.serialize.* APIs. I've found the serialization classes in javax.xml.stream, but they don't seem to provide any output-formatting control like the xerces OutputFormat class. Question: Is there a way to access the xerces serialization functionality (which is in rt.jar) via a javax standard API, without including xerces.jar and also without explicitly instantiating com.sun.* classes? If not, is there an javax API-compliant way to achieve the same effect?

    Read the article

  • XSLT generating attributes if source-Element is in parameterfile

    - by Siegfried
    Hi, i got an xml-file with some elements. For some of these is an aqvivalent in a parameter xml-file along with some other elements. I want to add these other elements from parm-file as parameter to output file if element-names are matching. (the Attributes should only be generated if an element "InvoiceHeader" exists in the source-xml. Here is my code... <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:variable name="rpl" select="document('ParamInvoice.xml')"></xsl:variable> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates></xsl:apply-templates> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:if test="$rpl/StoraInvoice/local-name()"> <xsl:call-template name="AttributeErzeugen"> <xsl:with-param name="attr" select="$rpl/StoraInvoice/local-name()"></xsl:with-param> </xsl:call-template> </xsl:if> <xsl:apply-templates></xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template name="AttributeErzeugen"> <xsl:param name="attr"></xsl:param> <xsl:for-each select="$attr"> <xsl:attribute name="{Attibute/@name}"><xsl:value-of select="."></xsl:value- of></xsl:attribute> </xsl:for-each> </xsl:template> </xsl:stylesheet> and here the param-file <?xml version="1.0" encoding="UTF-8"?> <StoraInvoice> <InvoiceHeader> <Attribute name="Fuehrend">YYY</Attribute> <Attribute name="Feld">FFFF</Attribute> <Attribute name="Format">XYZXYZ</Attribute> </InvoiceHeader> </StoraInvoice> Siegfried

    Read the article

  • eclipse CDT - Cannot open .gcda files

    - by Taani
    I am developing a coverage data tool in eclipse cdt. I used gcov and build and execute my C program to generate .gcda and .gcno files. When double click on .gcda file to see the coverage data, below error message displays. An error has occurred. See error log for more details. org.eclipse.linuxtools.binutils.utils.STSymbolManager.demangle(Lorg/eclipse/cdt/core/IBinaryParser$IBinaryObject;Ljava/lang/String;Lorg/eclipse/core/resources/IProject;)Ljava/lang/String; But I already downloaded and save org.eclipse.linuxtools.binutils_4.0.0.201209191645.jar into plugins directory. Where am I doing wrong?

    Read the article

  • Cannot insert non latin symbols in MySQL

    - by glebreutov
    I'm writing web-app using MySQL version 5.1.45, Tomcat 5.5.28 and Hibernate 3 When I'm trying to save string that contains non-latin characters (for example ??????) error occurs: 1589 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1366, SQLState: HY000 1589 [main] ERROR org.hibernate.util.JDBCExceptionReporter - Incorrect string value: '\xD0\xA3\xD0\xBF\xD1\x8F...' for column 'name' at row 1 Hibernate connection settings <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost/E2012?characterEncoding=UTF8&amp;useUnicode=true</property> <property name="connection.username">***</property> <property name="connection.password">***</property> <property name="hibernate.connection.charSet">UTF8</property> MySQL config My.cnf [client] default-character-set=utf8 [mysqld] default-character-set=utf8 Even query set name utf-8 doesn't resolve problem Thanks for help!

    Read the article

  • hibernate3-maven-plugin: entiries in different maven projects, hbm2ddl fails

    - by Mike
    I'm trying to put an entity in a different maven project. In the current project I have: @Entity public class User { ... private FacebookUser facebookUser; ... public FacebookUser getFacebookUser() { return facebookUser; } ... public void setFacebookUser(FacebookUser facebookUser) { this.facebookUser = facebookUser; } Then FacebookUser (in a different maven project, that's a dependency of a current project) is defined as: @Entity public class FacebookUser { ... @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return id; } Here is my maven hibernate3-maven-plugin configuration: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>hibernate3-maven-plugin</artifactId> <version>2.2</version> <executions> <execution> <phase>process-classes</phase> <goals> <goal>hbm2ddl</goal> </goals> </execution> </executions> <configuration> <components> <component> <name>hbm2ddl</name> <implementation>jpaconfiguration</implementation> </component> </components> <componentProperties> <ejb3>false</ejb3> <persistenceunit>Default</persistenceunit> <outputfilename>schema.ddl</outputfilename> <drop>false</drop> <create>true</create> <export>false</export> <format>true</format> </componentProperties> </configuration> </plugin> Here is the error I'm getting: org.hibernate.MappingException: Could not determine type for: com.xxx.facebook.model.FacebookUser, at table: user, for columns: [org.hibernate.mapping.Column(facebook_user)] I know that FacebookUser is on the classpath because if I make facebook user transient, project compiles fine: @Transient public FacebookUser getFacebookUser() { return facebookUser; }

    Read the article

  • How to query a date in HQL (Hibernate) with Joda Time?

    - by fabien7474
    I am sure that someone familiar with HQL (I am myself a newbie) can easily answer this question. In my Grails application, I have the following domain class. class Book { org.joda.time.DateTime releaseDate //I use the PersistentDateTime for persisting via Hibernate (that use a DATETIME type for MySQL DB) } In my HQL query, I want to retrieve books whose release date is included in range date1..date2 For instance I tried: DateTime date1, date2 ... def queryStr = "select * from Book as b where b.releaseDate > $date1 and b.releaseDate < $date2" def res = Book.executeQuery(queryStr) But I got the exception ...caused by: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: The error token points to date format (for instance 2009-11-27T21:57:18.010+01:00 or Fri Nov 27 22:01:20 CET 2009) I have also tried to convert date1 into a Date class without success So what is the correct HQL code ? Should I convert to a specific format (which one?) using the patternForStyle method or is there another -cleaner- way to do it? Thanks, Fabien.

    Read the article

  • How to search for "R" materials?

    - by James Lavin
    "The Google" is very helpful... unless your language is called "R," in which case it spits out tons of irrelevant stuff. Anyone have any search engine tricks for "R"? There are some specialized websites, like those below, but how can you tell Google you mean "R" the language? If I'm searching for something specific, I'll use an R-specific term, like "cbind." Are there other such tricks? http://rweb.stat.umn.edu/R/doc/html/search/SearchEngine.html www.rseek.org http://search.r-project.org/ www.dangoldstein.com/search_r.html

    Read the article

  • CascadeType problem in One to Many Relation

    - by Milad.KH
    Hi I have two classes which have a Unidirectional One to Many relation with each other. public class Offer{ ... @OneToMany(cascade=CascadeType.ALL) @JoinTable(name = "Offer_Fields", joinColumns = @JoinColumn(name = "OFFER_ID"), inverseJoinColumns = @JoinColumn(name = "FIELDMAPPER_ID")) private Set<FieldMapper> fields = new HashSet<FieldMapper>(); } public class FieldMapper{ ... } I want to store an Offer with a set of FieldMapper to database. When I Use CascadeType.ALL in my OneToMany, I got this error: org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions and when I change CascadeType to something else I got this error: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.RCSTT.library.FieldMapper Thanks for your help.

    Read the article

  • How to Canonicalize a Stax XML object.

    - by Enrique San Martín
    Hello, i want to Canonicalize a Stax object, the program it's doing it with DOM, but dom can't manage big XML documents (like 1GB), so STAX it's the solution. The Code that i have it's: File file=new File("big-1gb.xml"); org.apache.xml.security.Init.init(); DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dfactory.newDocumentBuilder(); Document doc = documentBuilder.parse(file); Canonicalizer c14n = Canonicalizer.getInstance("http://www.w3.org/TR/2001/REC-xml-c14n-20010315"); outputBytes = c14n.canonicalizeSubtree(doc.getElementsByTagName("SomeTag").item(0)); The idea it's do the code below with Stax... Thx :)

    Read the article

  • Java bytecode compiler benchmarks

    - by Dave Jarvis
    Q.1. What free compiler produces the fastest executable Java bytecode? Q.2. What free virtual machine executes Java bytecode the fastest (on 64-bit multi-core CPUs)? Q.3. What other (currently active) compiler projects are missing from this list: http://www.ibm.com/developerworks/java/jdk/ http://gcc.gnu.org/java/ http://openjdk.java.net/groups/compiler/ http://java.sun.com/javase/downloads/ http://download.eclipse.org/eclipse/downloads/ Q.4. What performance improvements can compilers do that JITs cannot (or do not)? Q.5. Where are some recent benchmarks, comparisons, or shoot-outs (for Q1 or Q2)? Thank you!

    Read the article

  • Error when trying to use hibernate annotations.

    - by Wilhelm
    The error I'm receiving is listed here. That's my HibernateUtil.java package com.rosejapan; import org.hibernate.SessionFactory; import org.hibernate.cfg.AnnotationConfiguration;; public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from hibernate.cfg.xml sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); } catch(Throwable e) { System.err.println("Initial sessionFactory creation failed. " + e); throw new ExceptionInInitializerError(e); } } public static SessionFactory getSessionFactory() { return sessionFactory; } } Everything looks all right... I've already included log4j-boot.jar in the CLASSPATH, but didn't resolved my problem.

    Read the article

  • How to select the value of the xsi:type attribute in SQL Server?

    - by kralizek
    Considering this xml document: DECLARE @X XML (DOCUMENT search.SearchParameters) = '< parameters xmlns="http://www.educations.com/Search/Parameters.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> < parameter xsi:type="category" categoryID="38" /> < /parameters>'; I'd like to access the value of the attribute "type". According to this blog post, the xsi:type attribute is special and can't be accessed by usal keywords/functions. How can I do it? PS: I tried with WITH XMLNAMESPACES ( 'http://www.educations.com/Search/Parameters.xsd' as p, 'http://www.w3.org/2001/XMLSchema-instance' as xsi ) SELECT @X.value('(/p:parameters/p:parameter/@xsi:type)[1]','nvarchar(max)') but it didn't work.

    Read the article

< Previous Page | 145 146 147 148 149 150 151 152 153 154 155 156  | Next Page >