Posts

xsd - Cannot resolve the name X to an element declaration component in a recursive xml schema -

i'm beginning working xml schemas. i'm creating simple schema , don't understand why error while trying implement simple recursive element. i'm sure it's totally trivial. here following error: e [xerces] src-resolve: cannot resolve name 'node' a(n) 'element declaration' component. <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" elementformdefault="qualified"> <xs:element name="root"> <xs:complextype> <xs:sequence> <xs:element name="node"> <xs:complextype> <xs:sequence> <xs:element ref="node" /> </xs:sequence> </xs:complextype> </xs:element> </xs:sequence> </xs:...

javascript - REST api GET with jQuery, not working -

here code html: <form name="test" id="test" method="post"> <input type="submit" name="sub" value="hit me" class="page"/> </form> jquery: $.ajax ({ type: "get", url: "https:// url", datatype: 'json', async: false, headers: {"authorization": "bearer xxxx"}, success: function (){ alert('yay!'); } }); result: {"error": "shell form not validate{'html_initial_name': u'initial-js_lib', 'form': <mooshell.forms.shellform object @ 0x260c6d0>, 'html_name': 'js_lib', 'html_initial_id': u'initial-id_js_lib', 'label': u'js lib', 'field': <django.forms.models.modelchoicefield object @ 0x260c7d0>, 'help_text': '', 'name': 'js_lib'}{'html_initial_name': u...

jQuery(window).scrollTop() issue in Firefox? -

i have following code use display hidden footer when scroll down past point on page. jquery(document).scroll(function(){ if(jquery(window).scrolltop() >= jquery('.foot').offset().top + jquery('.foot').height() - window.innerheight) { // add class here } else { // remove class here }); this works fine in chrome , ie. doesn't work in firefox. i've narrowed problem down jquery(window).scrolltop(). i've created test http://jsfiddle.net/captainmorgan/cvsre/1/ open in chrome , scroll down mouse wheel. 100. when same thing in firefox 114, firefox continues display multiple messageboxes , number keeps decreasing. know why firefox this? try: jquery(window).scroll(function(event) { var nextscroll = jquery(this).scrolltop(); if(nextscroll > (jquery('.foot').offset().top + jquery('.foot').height() - window.innerheight)) { //action } });

windows - setup InstallShield Limited Edition 2013 in win8.1 -

i setup installshield limited edition 2013 visualstudio2013 in win8.1. setup packet download http://learn.flexerasoftware.com/content/is-eval-installshield-limited-edition-visual-studio . , progress of setup correctly.but when setup finished,i can't find installshield in vs's new project(just has add-in installshield limited edition). i've tried in win7/win8, it's works,but win8.1 it's may have wrong. can me? thx i've searched answers,but there unuseful: installshield le not working in vs2013 in windows 8.1 install shield limited edition in visual studio 2013 express i've solve question.my system win8.1 enterprise 64bit,i'm not sure problem caused system or vs or both of them. in end, changed system win8.1 pro 64bit , correct. , i've try setup win8.1 enterprise 64bit in visualmachine, problem persists. guess it's error in win8.1 enterprise. guess. have no time find solution in win8.1 enterprise , setup win8.1 pro instead.

java - Issue with addMouseMotionListener getting wrong coordinates -

Image
i borrowed class below make selection area tool project. has issue when try make selection when content not aligned @ top-left, mouse coordinates related scrollpane, draws on image - see ss better understanding: sscce : import java.awt.borderlayout; import java.awt.color; import java.awt.dimension; import java.awt.graphics2d; import java.awt.point; import java.awt.rectangle; import java.awt.robot; import java.awt.toolkit; import java.awt.event.*; import java.awt.image.*; import javax.swing.*; /** getting rectangle of interest on screen. requires motivatedenduser api - sold separately. */ public class screencapturerectangle { rectangle capturerect; screencapturerectangle(final bufferedimage screen) { final bufferedimage screencopy = new bufferedimage(screen.getwidth(), screen.getheight(), screen.gettype()); final jlabel screenlabel = new jlabel(new imageicon(screencopy)); jscrollpane screenscroll = new jscrollpane(screenlabel); screen...

java - W3C module does not exist -

i try y! weather xml parsing sake of learning using bluej. when compiled class, bluej giving me error: package org.w3c not exist here code: import java.net.url; import java.io.inputstream; import javax.xml.parsers.documentbuilderfactory; import javax.xml.parsers.documentbuilder; import org.w3c.*; public class weatherapp { public static void main(string[] args) { url xmlurl = new url("http://weather.yahooapis.com/forecastrss?w=22722924&u=c"); inputstream xml = xmlurl.openstream(); documentbuilderfactory dbf = documentbuilderfactory.newinstance(); documentbuilder db = dbf.newdocumentbuilder(); document doc = db.parse(xml); xml.close(); system.out.println(doc); } } what go possibly wrong here? , how fix it? thanks

ruby on rails - Refactor code to avoid circular logic in controller -

situation : one form allows users select multiple quantities of items they'd request this form posts 2 models, 1 parent: request, , child: items. upon submit, 1 request created, several items created, depending on quantity indicated to handle this, have 2 sets of params, 1 items, 1 requests desired end state : i not want item created without request nor request created without item all errors present in form (whether it's not selecting @ least 1 item, or errors in attributes of request object) shown user once page re-rendered; i.e., error checking together current hacky solution & complication : currently, i'm checking in stages, 1) there quantities in items? if not, regardless of user may have put request attributes, page re-rendered (i.e., attributes request lost, validation errors shown). 2) once first stage passed, model validations kicks in, , if fails, new page re-rendered again i've spent waaaaay long thinking this, , nothing elegant...