Search Results

Search found 6 results on 1 pages for 'carillonator'.

Page 1/1 | 1 

  • bash/sed/awk/etc remove every other newline

    - by carillonator
    a bash commands outputs this: Runtime Name: vmhba2:C0:T3:L14 Group State: active Runtime Name: vmhba3:C0:T0:L14 Group State: active unoptimized Runtime Name: vmhba2:C0:T1:L14 Group State: active unoptimized Runtime Name: vmhba3:C0:T3:L14 Group State: active Runtime Name: vmhba2:C0:T2:L14 Group State: active I'd like to pipe it to something to make it look like this: Runtime Name: vmhba2:C0:T1:L14 Group State: active Runtime Name: vmhba3:C0:T3:L14 Group State: active unoptimized Runtime Name: vmhba2:C0:T2:L14 Group State: active [...] i.e. remove every other newline I tried ... |tr "\nGroup" " " but it removed all newlines and ate up some other letters as well. thanks

    Read the article

  • Changing <img src="XXX" />, js event when new image has finished loading?

    - by carillonator
    I have a photo gallery web page where a single <img src="XXX" /> element's src is changed (on a click) with javascript to show the next image—a poor man's ajax I guess. Works great on faster connections when the new image appears almost immediately. Even if it takes a few seconds to load, every browser I've tested it on keeps the old image in place until the new one is completely loaded. It's a little confusing waiting those few seconds on a slow connection, though, and I'm wondering if there's some javascript event that fires when the new image is done loading, allowing me to put a little working... animated gif or something up in the meantime. I know I could use AJAX for real (I'm using jQuery already), but this is such a nice and simple solution. Besides this lag, is there any other reason I should stay away from this approach to changing images? thanks.

    Read the article

  • jCarousel Lite - center images horizontally and vertically

    - by carillonator
    I have jCarousel Lite going in Drupal with images of various sizes/aspect ratios. I'm not having much luck trying to center the images vertically and horizontally (i.e. evenly-spaced). The plugin requires that the images be in a <ul><li><img ... /></li></ul>. I've tried display:inline-block, marginTop:50% among other things, most of which just screw up the carousel. The carousel is posted at: http://carillontech.org/drupal/ thanks!!

    Read the article

  • Best ways to reuse Java methods

    - by carillonator
    I'm learning Java and OOP, and have been doing the problems at Project Euler for practice (awesome site btw). I find myself doing many of the same things over and over, like: checking if an integer is prime/generating primes generating the Fibonacci series checking if a number is a palindrome What is the best way to store and call these methods? Should I write a utility class and then import it? If so, do I import a .class file or the .java source? I'm working from a plain text editor and the Mac terminal. Thanks!

    Read the article

  • jQuery: Scroll the window then addClass() - how to callback

    - by carillonator
    Inside a jQuery event handler, I would like to scroll the window and then add a class to something. This is my code: $('#foo').click(function() { window.scrollTo(y); $('#bar').addClass('active'); }); $(window).scroll(function() { $('#bar').removeClass('active'); }); Notice I have another handler to remove that same class whenever the window is scrolled. The scrolling part works fine, but seems to run asynchronously, so removeClass() happens after addClass() but before the scrolling is finished. I don't know how to do this in plain javascript. I know there is a jQuery scrollTop() function that does the same thing (but seems to have cross-browser issues), but it doesn't accept a callback. What I really need is a callback to add the class after the scrolling is finished. thanks!

    Read the article

  • Java SWT - dissolve (fade) from one image to the next.

    - by carillonator
    I'm pretty new to Java and SWT, hoping to have one image dissolve into the next. I have one image now in a Label (relevant code): Device dev = shell.getDisplay(); try { Image photo = new Image(dev, "photo.jpg"); } catch(Exception e) { } Label label = new Label(shell, SWT.IMAGE_JPEG); label.setImage(photo); Now I'd like photo to fade into a different image at a speed that I specify. Is this possible as set up here, or do I need to delve more into the org.eclipse.swt.graphics api? Also, this will be a slide show that may contain hundreds of photos, only ever moving forward (never back to a previous image)---considering this, is there something I explicitly need to do in order to remove the old images from memory? Thanks!!

    Read the article

1