Quantcast
Channel: User Walter Rumsby - Stack Overflow
Browsing latest articles
Browse All 39 View Live
↧

Comment by Walter Rumsby on getting boolean properties from objects in jsp el

I think it depends on the version of JSP you're running against. Older versions may need getIsXxxx() while newer versions support isXxxx().

View Article


Comment by Walter Rumsby on Remove unwanted jQuery functions

If you come up with a sensible caching strategy then you could serve the whole jQuery file locally, but cache it so that you won't have to worry about the cost of the download/additional HTTP request....

View Article


Comment by Walter Rumsby on YUI Autocomplete: search after pasting?

You could also use YAHOO.lang.later instead of window.setTimeout.

View Article

Comment by Walter Rumsby on jRuby called in Ant can't find gems, what am I...

Initial hunch is it's something to do with specifying more than one -r param.

View Article

Comment by Walter Rumsby on jRuby called in Ant can't find gems, what am I...

I also decided to use a <script> block instead of <java> calling jRuby, but the core problem was with an incorrectly packaged .jar.

View Article


Comment by Walter Rumsby on Highlight label if checkbox is checked

The accepted solution uses the adjacent sibling selector which is actually a feature of CSS 2.1.

View Article

Comment by Walter Rumsby on What is DOCTYPE?

These days I favour the HTML5 DOCTYPE: <!DOCTYPE html> it works in all modern browsers, including IE6.

View Article

Comment by Walter Rumsby on Java ImageIO: Can I convert a PNG-24 file to PNG-8?

ubuntuforums.org/showthread.php?t=1060128 discusses using Java ImageIO to convert a PNG to a GIF.

View Article


Comment by Walter Rumsby on Getting file not found error running Sass and...

This part of your path looks like it's problematic: C:\Users\aliu\workspace\ui/src/main/webapp/apps/resources/sa‌​ss Note the mix of \ and /.

View Article


Comment by Walter Rumsby on Custom event library for JavaScript. Are there...

YUI 3's Event Target is really nice.

View Article

Comment by Walter Rumsby on Using jQuery validation, is there a way I can...

BTW, you can remove multiple pieces of data with a single call to removeData - either pass an array of strings or a space-delimited string, e.g. $('form').removeData(['validator',...

View Article

Comment by Walter Rumsby on IE9 fails to parse CSS file having more than ~...

Here's a JS Fiddle demonstrating the above - jsfiddle.net/wrumsby/S8kVC - n.b. you need to run this in IE9, not IE10 emulating IE9 to see the problem.

View Article

Comment by Walter Rumsby on Polymer: Registering Elements in External Scripts

AFAICT if I do this then index.html will not document attributes, events, etc. Is there a way to use an external script? Thinking about this more, this is just how core-component-page works, it would...

View Article


Answer by Walter Rumsby for this === window in firebug

So if this in firebug means the firebug object, how can I reference the normal this?In your sample code this will be the window object because that is the Global Object when running in a browser. In...

View Article

Answer by Walter Rumsby for Don't submit form unless JavaScript is enabled

Hiding the submit button won't work because the browser will try to submit the form if you press enter in an input type="text".What you might want to try is adding the form element via JavaScript (i.e....

View Article


Answer by Walter Rumsby for Is it possible to do live events in YUI, similar...

YUI 2's Event Utility also supports a delegate method.

View Article

When should I change the tlib-version of my tag library?

I'm after guidelines on when I should change the tlib-version in the .tld of a tag library that I author.Specifically I'm wondering if I should bump the version number if I add new tags to the library...

View Article


Answer by Walter Rumsby for html doctype adds whitespace?

The first DOCTYPE will render your page in almost standards mode:"Almost standards" mode rendering matches "standards" mode in all details except for one. The layout of images inside table cells is...

View Article

Answer by Walter Rumsby for Compact Java syntax for conditional arguments?

If enemy_composition can only be nature.MATTER or nature.ANTIMATTER then you could use a ternery operator:DeathRay mynewWpn = new DeathRay(enemy_composition == nature.MATTER ? particle.anti-proton :...

View Article

Answer by Walter Rumsby for How to get posts' content as HTML from a...

Take a look at Yahoo! Pipes.

View Article

Answer by Walter Rumsby for Calling JS functions from links in IE?

You don't need the javascript: protocol.<a href="#" onclick="foo(); return false">Run Foo</a>is all you need.

View Article


Answer by Walter Rumsby for How can I normalise a JavaScript object to a DOM...

To support the same signature as YAHOO.util.Dom.get you could do something like this:var getNode = function(el) { return Y.one('#'+ el) || new Y.Node(el);};Here's an example of the function above in use.

View Article


How to test on IE while developing with OS X?

I'm trying to get my head around how I can test that web apps work on Internet Explorer while developing with OS X.The following criteria are all important:I need to be able test IE6, 7, 8 and 9Cost (I...

View Article

Answer by Walter Rumsby for Add characters to a string in Javascript

It sounds like you want to use join, e.g.:var text = list.join();

View Article

Answer by Walter Rumsby for Function is defined, but Error says.. Function is...

If the only place you need to call the mark function from is your timeout try:setTimeout(function() { alert("This is a test box..");}, 5000);

View Article


Answer by Walter Rumsby for How do I fix my css floats on IE 6 & 7? Or how...

What about this?HTML structure: <ul><li class="task"><div class="line"><span class="task-date">Date Created</span><span class="task-title">Task...

View Article

Answer by Walter Rumsby for GWT - Create ListBox throw INVALID_CHARACTER_ERR...

The underlying cause is outlined in Invalid Character DOM Exception in IE9 - essentially IE 9 now follows the W3C DOM Level 1 standard in its implementation of document.createElement.Previously you...

View Article

Answer by Walter Rumsby for Cross-Browser CSS3 Rule

Compass provides Sass mixins for many CSS3 properties meaning you can write something like:.foo { @include border-radius(4px, 4px);}which will generate the following CSS:.foo { -webkit-border-radius:...

View Article

Searching for the Ultimate Resizing Textarea

I'm wanting to provide a resizing textarea control for users. I've given this a go and looked at a number of other implementations, but I can't seem to find one that meets all my requirements....

View Article



Answer by Walter Rumsby for Highlight label if checkbox is checked

I like Andrew's suggestion, and in fact the CSS rule only needs to be::checked + label { font-weight: bold;}I like to rely on implicit association of the label and the input element, so I'd do...

View Article

How to Use Different META-INF/context.xml Files For Development and...

In Tomcat (and some other servlet containers) I can store information about my JDBC DataSource in META-INF/context.xml. This is very useful.However, the settings for my JDBC DataSource can be different...

View Article

Understanding Firebug profiler output

I've been trying to use Firebug's profiler to better understand the source of some JavaScript performance issues we are seeing, but I'm a little confused by the output.When I profile some code the...

View Article

Servlet Filters and the OSGi HttpService

I'm working on an OSGi-based application that uses org.osgi.service.http.HttpService which does not support the use of Servlet Filters.Before I realised that I wouldn't be able to use Servlet Filters I...

View Article


Answer by Walter Rumsby for Difference between (function(){})(); and...

Peter Michaux discusses the difference in An Important Pair of Parens.Basically the parentheses are a convention to denote that an immediately invoked function expression is following, not a plain...

View Article

Polymer: Registering Elements in External Scripts

In most of the examples I've seen for creating elements the script that registers the element is defined in the component's HTML file, e.g.<link rel="import"...

View Article

Does PHP Have an Equivalent of Java's RequestDispatcher.forward?

In Java I can write a really basic JSP index.jsp like so:<% request.getRequestDispatcher("/home.action").forward(request, response); %>The effect of this is that a user requesting index.jsp (or...

View Article


Answer by Walter Rumsby for TypeScript: What's the "right" `target` for node 11?

Based on Node-Target Mapping on the TypeScript wiki "es2018" is the right mapping for Node 10, "es2019" is the right mapping for Node 12. It seems that non-LTS versions of Node aren't documented, but...

View Article


Answer by Walter Rumsby for How to force browsers to reload cached CSS and JS...

Say you have a file available at:/styles/screen.cssYou can either append a query parameter with version information onto the URI, e.g.:/styles/screen.css?v=1234Or you can prepend version information,...

View Article

Is it possible to sandbox JavaScript running in the browser?

I'm wondering if it's possible to sandbox JavaScript running in the browser to prevent access to features that are normally available to JavaScript code running in an HTML page.For example, let's say I...

View Article
Browsing latest articles
Browse All 39 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>