Search Results

Search found 21 results on 1 pages for 'jedierikb'.

Page 1/1 | 1 

  • Text Editor that hilights all instances of selection for Mac

    - by jedierikb
    On Windows, I use Notepad++ which has the great feature of when I select a word, all instances of that word are also highlighted in the same document. I have found it very helpful for finding patterns in giant log files. I am wondering if there is a similar feature in a text editor on the Mac. I have looked into the documentation for TextWrangler and TextMate to no avail. Hopefully there is a way to do this so I can be more productive when working on a Mac. -- Note: in Notepad++ you do not have to do a keyboard shortcut to make this work... you just select some text and it does the highlighting for you automatically.

    Read the article

  • converting a png with an ICC profile?

    - by jedierikb
    I can convert a jpg from one ICC to another ICC. convert rgb_image.jpg -profile USCoat.icm cmyk_image.jpg Or I can convert a jpg with no ICC to another ICC. convert rgb_image.jpg +profile icm \ -profile sRGB.icc -profile USCoat.icm cmyk_image.jpg But how do I convert a png's pixels into the gamut described by an ICC profile? I understand I cannot embed the profile into the image file, but would at least like to convert the colors. When I reuse the above commands, the colors come out wrong... (different from the colors in the JPG when converted). This is the source image: http://alumni.media.mit.edu/~erikb/tmp/RED_JPG.jpg And here is what I am trying: convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_PNG.png and this is what I am getting: http://alumni.media.mit.edu/~erikb/tmp/CMYK_PNG.png I was hoping to get an image with the same colors as a JPEG run through the same command: convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_JPG.jpg resulting in: http://alumni.media.mit.edu/~erikb/tmp/CMYK_JPG.jpg *this image, CMYK_JPG.jpg, is what I am trying to reproduce pixel by pixel in a PNG file.* Any suggestions? Original (unanswered) post here.

    Read the article

  • how to embed pure as3 bitmap assets with flex4 (worked with flex3)

    - by jedierikb
    In Flex3, I could compile pure as3 code and use "embed" tags to load in images. This was done by Flex making a BitmapAsset class. I can still do this in Flex4. However, there was a trick to fakeout flex3 and use my own mx.core.BitmapAsset class to remove some of the extraneous stuff Flex's BitmapAsset brings in with it. This is described here: http://www.ultrashock.com/forums/flex/embed-flex-assets-without-using-flex-123405.html Unfortunately, I cannot get these tricks to work with Flex4 and get smaller file sizes. I end up with the error "VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found." This error leads me to this forum, and a solution as described there: http://tech.groups.yahoo.com/group/flexcoders/message/148762 Following this advice, I add -static-link-runtime-shared-libraries=true, and my swf loads without an error... but this means I am loading in the pieces of the flex framework I wanted to omit (and the file size says so too). Is there a better way to fake out flex4 when it comes to using Embed?

    Read the article

  • flash blocking javascript events

    - by jedierikb
    this is an edit of the original post now that I better understand the problem. now with source code! In IE, if body (or another html div has focus), then you keypress & click on flash at the same time, then release... a keyup event is never fired. It is not fired in javascript or in flash. Where is this keyup event? This is the order of event firing you get instead: javascriptKeyEvent:bodyDn ** currentFocuedElement: body javascriptKeyEvent:docDn ** currentFocuedElement: body actionScriptEvent::activate ** currentFocuedElement: [object] actionScriptEvent::mouseDown ** currentFocuedElement: [object] actionScriptEvent::mouseUp ** currentFocuedElement: [object] Subsequent keyup and keydown events are captured by flash, but that initial keyUp is never fired.. anywhere. And I need that keyup! Here is the html/javascript: <html> <head> <script type="text/javascript" src="p.js"></script> <script type="text/javascript" src="swfobject.js"></script> <script> function ic( evt ) { Event.observe( $("f1"), 'keyup', onKeyHandler.bindAsEventListener( this, "f1Up" ) ); Event.observe( $("f2"), 'keyup', onKeyHandler.bindAsEventListener( this, "f2Up" ) ); Event.observe( document, 'keyup', onKeyHandler.bindAsEventListener( this, "docUp" ) ); Event.observe( $("body"), 'keyup', onKeyHandler.bindAsEventListener( this, "bodyUp" ) ); Event.observe( window, 'keyup', onKeyHandler.bindAsEventListener( this, "windowUp" ) ); Event.observe( $("f1"), 'keydown', onKeyHandler.bindAsEventListener( this, "f1Dn" ) ); Event.observe( $("f2"), 'keydown', onKeyHandler.bindAsEventListener( this, "f2Dn" ) ); Event.observe( document, 'keydown', onKeyHandler.bindAsEventListener( this, "docDn" ) ); Event.observe( $("body"), 'keydown', onKeyHandler.bindAsEventListener( this, "bodyDn" ) ); Event.observe( window, 'keydown', onKeyHandler.bindAsEventListener( this, "windowDn" ) ); Event.observe( "clr", "mousedown", clearHandler.bindAsEventListener( this ) ); swfobject.embedSWF( "tmp.swf", "f2", "100%", "20px", "9.0.0.0", null, {}, {}, {} ); } function clearHandler( evt ) { clear( ); } function clear( ) { $("log").innerHTML = ""; } function onKeyHandler( evt, dn ) { logIt( "javascriptKeyEvent:"+dn ); } function AS2JS( wha ) { logIt( "actionScriptEvent::" + wha ); } function logIt( k ) { var id = document.activeElement; if (id.identify) { id = id.identify(); } $("log").innerHTML = k + " ** focuedElement: " + id + "<br>" + $("log").innerHTML; } Event.observe( window, 'load', ic.bindAsEventListener(this) ); </script> </head> <body id="body"> <div id="f1"><div id="f2" style="width:100%;height:20px; position:absolute; bottom:0px;"></div></div> <div id="clr" style="color:blue;">clear</div> <div id="log" style="overflow:auto;height:200px;width:500px;"></div> </body> </html> Here is the as3 code: package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.Event; import flash.external.ExternalInterface; public class tmpa extends Sprite { public function tmpa( ):void { extInt("flashInit"); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener( KeyboardEvent.KEY_DOWN, keyDnCb, false, 0, true ); stage.addEventListener( KeyboardEvent.KEY_UP, keyUpCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_DOWN, mDownCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_UP, mUpCb, false, 0, true ); addEventListener( Event.ACTIVATE, activateCb, false, 0, true ); addEventListener( Event.DEACTIVATE, dectivateCb, false, 0, true ); } private function activateCb( evt:Event ):void { extInt("activate"); } private function dectivateCb( evt:Event ):void { extInt("deactivate"); } private function mDownCb( evt:MouseEvent ):void { extInt("mouseDown"); } private function mUpCb( evt:MouseEvent ):void { extInt("mouseUp"); } private function keyDnCb( evt:KeyboardEvent ):void { extInt( "keyDn" ); } private function keyUpCb( evt:KeyboardEvent ):void { extInt( "keyUp" ); } private function extInt( wha:String ):void { try { ExternalInterface.call( "AS2JS", wha ); } catch (ex:Error) { trace('ex: ' + ex); } } } }

    Read the article

  • computationally expensive flash blocking javascript events

    - by jedierikb
    When I have a computationally expensive flash animation running in my page, sometimes javascript keyUp listeners on a textfield are not being fired. Keydown events are not lost. This only happens in IE8 (and IE7 in compatibility mode). I need those keyup listeners! How can I solve / workaround this problem? Ideas: query the textfield myself (without the broken listener) if the key is down or up? can I do this?

    Read the article

  • do I use document.activeElement to detect focus changes?

    - by jedierikb
    After looking at the answers here: http://stackoverflow.com/questions/497094/how-do-i-find-out-which-javascript-element-has-focus http://stackoverflow.com/questions/483741/how-to-determine-which-html-page-element-has-focus I can see that using document.activeElement is a great way to know which element has focus. But how do I use document.activeElement to detect changes to focus (or maybe I don't and I need to research a better way. Want to know if I am barking up the wrong tree).

    Read the article

  • determine if javascript blur/focusout event is from selecting flash or leaving browser

    - by jedierikb
    In IE when I select flash, document.onfocusout is fired. When this event is fired, I would like to distinguish between selecting flash and leaving the browser. When I handle the callback, document.activeElement is the previous html element with focus (what I just left), so this is not helpful for solving this problem. Clearly there has been a change in focus to warrant calling the blur method -- is this information available somewhere? Or is there a better way to do this?

    Read the article

  • using PixelBender to double the size of a bitmap

    - by jedierikb
    I have a performance question about pixel bender. I want to enlarge many BitmapData (double their size into new BitmapData). I was doing this with as3, but wanted to use pixel bender to get better performance. On my machines, I get great comparative performance out of many pixel bender demonstrations. To my surprise (or bad coding / understanding), I am getting much worse performance out of pixel bender -- 2 seconds to do 3000 scalings vs .5 seconds! I expected to get at least the same performance as as3. What am I doing wrong? I got the straightforward pixel bender code here (and it is included below for easy reference). package { import aCore.aUtil.timingUtils; import flash.display.BitmapData; import flash.display.Shader; import flash.display.ShaderJob; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.geom.Matrix; public class flashFlash extends Sprite { [Embed ( source="pixelbender/bilinearresample.pbj", mimeType="application/octet-stream" ) ] private static var BilinearScaling:Class; public function flashFlash( ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; addEventListener( Event.ENTER_FRAME, efCb, false, 0, true ); } private function efCb( evt:Event ):void { removeEventListener( Event.ENTER_FRAME, efCb, false ); traceTime( "init" ); var srcBmd:BitmapData = new BitmapData( 80, 120, false, 0 ); var destBmd:BitmapData = new BitmapData( 160, 240, false, 0 ); var mx:Matrix = new Matrix( ); mx.scale( 2, 2 ); for (var i:uint = 0; i < 3000; i++) { destBmd.draw( srcBmd, mx ); } traceTime( "scaled with as3" ); // create and configure a Shader object var shader:Shader = new Shader( ); shader.byteCode = new BilinearScaling( ); shader.data.scale.value = [2]; shader.data.src.input = srcBmd; for (var j:uint = 0; j < 3000; j++) { var shaderJob:ShaderJob = new ShaderJob( ); shaderJob.shader = shader; shaderJob.target = destBmd; shaderJob.start( true ); } traceTime( "scaled with pixel bender bilinearresample.pbj" ); } private static var _lastTraceTime:Number = new Date().getTime(); public static function traceTime( note:String ):Number { var nowTime:Number = new Date().getTime(); var diff:Number = (nowTime-_lastTraceTime); trace( "[t" + diff + "] " + note ); _lastTraceTime = nowTime; return diff; } } } And the pixel bender code: <languageVersion : 1.0;> kernel BilinearResample < namespace : "com.brooksandrus.pixelbender"; vendor : "Brooks Andrus"; version : 1; description : "Resizes an image using bilinear resampling. Constrains aspect ratio - divide Math.max( input.width / output.width, input.height / output.height ) and pass in to the scale parameter"; > { parameter float scale < minValue: 0.0; maxValue: 1000.0; defaultValue: 1.0; >; input image4 src; output pixel4 dst; void evaluatePixel() { // scale should be Math.max( src.width / output.width, src.height / output.height ) dst = sampleLinear( src, outCoord() * scale ); // bilinear scaling } }

    Read the article

  • detect focus on browser address bar?

    - by jedierikb
    Is there a way to detect when focus has been put onto the address-bar or the browser-search-bar? I ask because I am trying to keep focus on one element in my document, but adding a blur() listener to that element works too well in safari mac -- you can't put focus on the address-bar!

    Read the article

  • pure as3 benefits to compiling with flex4 instead of flex3?

    - by jedierikb
    If I have a pure as3 project that I have been compiling with flex3 from mxmlc, is there any reason to switch to using the mxmlc with flex4? I can use all of the flash 10 language features like Vector, 3D, etc., so that is not a reason to switch (or is there something I can't do?). But maybe there is a performance boost? Or is the exact same compiling tool and the flex code base is the only difference?

    Read the article

  • tool for adding parentheses to equations?

    - by jedierikb
    Is there an online tool for adding parentheses to simple math equations? For example, a + b * c into a + (b * c) Those who paid more attention in math class might be able to tackle order of operations for huge equations in their head, but I could often use some help (and verification of my thinking). I often encounter other people's libraries having equations and functions I need for my code, and this would be kind of helpful for debugging and understanding. I was hoping Wolfram Alpha would do this, but the output is not easy to plug back into most programming languages e.g. a + (bc)

    Read the article

  • Rendering of graphics different depending on DisplayObject position

    - by jedierikb
    When drawing vertical lines with a non-integer x-value (e.g., 1.75) to a sprite, the lines are drawn differently based on the non-integer x-value of the sprite. In the picture below are two pairs of very close together vertical lines. As you can see, they look very different. This is frustrating, especially when animating the sprite. Any ideas how ensure that sprites-with-non-integer-positions' graphics will visually display the same way regardless of the sprite position? package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; public class tmp extends Sprite { private var _sp1:Sprite; private var _sp2:Sprite; public function tmp( ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _sp1 = new Sprite( ); drawButt( _sp1 ); _sp1.x = 100; _sp1.y = 100; _sp2 = new Sprite( ); drawButt( _sp2 ); _sp2.x = 100; _sp2.y = 200; addChild( _sp1 ); addChild( _sp2 ); addEventListener( Event.ENTER_FRAME, efCb, false, 0, true ); } private function efCb( evt:Event ):void { var nx:Number = _sp2.x + .1; if (nx > 400) { nx = 100; } _sp2.x = nx; } private function drawButt( sp:Sprite ):void { sp.graphics.clear( ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( 1, 1 ); sp.graphics.lineTo( 1, 100 ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( 1.75, 1 ); sp.graphics.lineTo( 1.75, 100 ); } } }

    Read the article

  • preventing window blur/focusOut when selecting copy/paste menu

    - by jedierikb
    I am trying to determine when the user has moved focus out of the browser to: select copy/paste (but not to the google search box). Ffox handles this nicely. selecting another window/tab/external widget (e.g., the google search box). focusOut and blur listeners on window and document cannot seem to disambiguate between these two types of focus changes. Can IE do this? I want this distinction so that I can better support usability in my web app without losing focus.

    Read the article

  • setting actionscript 3 superclass variables

    - by jedierikb
    In AS3, if I have a class such: public class dude { //default value for a dude protected var _strength:Number = 1; public function dude( ):void { super( ); //todo... calculate abilities of a dude based on his strength. } } and a subclass public class superDude extends dude { public function superDude( ):void { _strength = 100; super( ); trace( "strength of superDude: " + _strength ); } } This will trace strength of superDude is 1. I expected the variable I set in the subclass (prior to calling the superclass constructor) to remain. Is there a way to assign class variables in subclass constructors which are not over-written by the superclass construtor? Or should I pass them up as constructor variables?

    Read the article

  • Rendering of graphics different depending on position

    - by jedierikb
    When drawing parallel vertical lines with a fixed distance between them (1.75 pixels) with a non-integer x-value-offset to both lines, the lines are drawn differently based on the offset. In the picture below are two pairs of very close together vertical lines. As you can see, they look very different. This is frustrating, especially when animating the sprite. Any ideas how ensure that sprites-with-non-integer-positions' graphics will visually display the same? package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; public class tmpa extends Sprite { private var _sp1:Sprite; private var _sp2:Sprite; private var _num:Number; public function tmpa( ):void { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; _sp1 = new Sprite( ); drawButt( _sp1, 0 ); _sp1.x = 100; _sp1.y = 100; _num = 0; _sp2 = new Sprite( ); drawButt( _sp2, _num ); _sp2.x = 100; _sp2.y = 200; addChild( _sp1 ); addChild( _sp2 ); addEventListener( Event.ENTER_FRAME, efCb, false, 0, true ); } private function efCb( evt:Event ):void { _num += .1; if (_num > 400) { _num = 0; } drawButt( _sp2, _num ); } private function drawButt( sp:Sprite, offset:Number ):void { var px1:Number = 1 + offset; var px2:Number = 2.75 + offset; sp.graphics.clear( ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( px1, 1 ); sp.graphics.lineTo( px1, 100 ); sp.graphics.lineStyle( 1, 0, 1, true ); sp.graphics.moveTo( px2, 1 ); sp.graphics.lineTo( px2, 100 ); } } } edit from original post which thought the problem was tied to the x-position of the sprite.

    Read the article

  • change elements' css immediately on scroll event

    - by jedierikb
    I want to change the background color of in-viewport elements (using overflow: scroll) So here was my first attempt: http://jsfiddle.net/2YeZG/ As you see, there is a brief flicker of the previous color before the new color is painted. Others have had similar problems. Following the HTML5 rocks instructions, I tried to introduce requestAnimationFrame to fix this problem to no avail: http://jsfiddle.net/RETbF/ What am I doing wrong here?

    Read the article

  • SQL to return the rownum of a specific row? (using Oracle db)

    - by jedierikb
    In Oracle 10g, I have this SQL: select dog.id as dogId from CANINES dog order by dog.codename asc which returns: id -- 204 203 206 923 I want to extend this query to determine the oracle rownum of a dog.id in this resultset. I have tried select rownum from (select dog.id as dogId from CANINES dog order by dog.codename asc) where dog.id=206 But this does not work out very well (it returns 1 no matter which dog.id I match on). I was expecting to get back 3. Thanks for your help! Notes http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html I am pretty sure I do not need to use rowid

    Read the article

1