Search Results

Search found 1008 results on 41 pages for 'kevin cupp'.

Page 28/41 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • How can you prevent both jumpiness, and interrupting tweens with animated Flash buttons?

    - by Kevin Suttle
    This is something I've never been able to figure out. You've got a button offscreen you want to animate in. We'll call it 'btn.' You've got a hit area that serves as the proximity sensor to trigger btn's animation. We'll call it 'hitZone' (as to not cause confusion with the hitArea property of display objects). Both btn and hitZone are MovieClips. The listeners go something like this. import com.greensock.*; import com.greensock.easing.*; import flash.events.MouseEvent; var endPoint:Number = 31; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); hitZone.addEventListener(MouseEvent.CLICK, onHitZoneClick); btn.addEventListener(MouseEvent.ROLL_OVER, onBtnOver); btn.addEventListener(MouseEvent.ROLL_OUT, onBtnOut); btn.addEventListener(MouseEvent.CLICK, onBtnClick); btn.mouseChildren = false; function onHitZoneOver(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:endPoint, ease:Expo.easeOut}); trace("over hitZone"); } function onHitZoneOut(e:MouseEvent):void { TweenLite.to(btn, 0.75, {x:-1, ease:Expo.easeOut}); trace("out hitZone"); } function onBtnOver(e:MouseEvent):void { hitZone.mouseEnabled = false; hitZone.removeEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.removeEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("over BTN"); // This line is the only thing keeping the btn animation from being fired continuously // causing jumpiness. However, calling this allows the animation to be interrupted // at any point. TweenLite.killTweensOf(btn); } function onBtnOut(e:MouseEvent):void { hitZone.mouseEnabled = true; hitZone.addEventListener(MouseEvent.ROLL_OVER, onHitZoneOver); hitZone.addEventListener(MouseEvent.ROLL_OUT, onHitZoneOut); trace("out BTN"); } function onBtnClick(e:MouseEvent):void { trace("click BTN"); } function onHitZoneClick(e:MouseEvent):void { trace("click hitZone"); } The issue is when your mouse is over both the hitZone and btn. The button continuously jumps unless you call TweenLite.killAllTweensOf(). This fixes the jumpiness, but it introduces a new problem. Now, it's very easy to interrupt the animation of the btn at any point, stopping it before it's totally visible on the stage. I've seen similar posts, but even they suffer from the same issue. Perhaps it's a problem with how Flash detects edges, because I've never once seen a workaround for this.

    Read the article

  • Question about mysql indexes on low to medium cardinality columns

    - by Kevin J
    I have a general question about the way that database indexing works, particularly in mysql. Let's say I have a table with a million rows with a column "ClientID" that is distributed relatively equally among 30 values. Thus, this column is very low cardinality (30) relative to the primary key (1 million). Now, I understand that you shouldn't create indexes on low cardinality fields. However, in this case, queries are only ever done with one of the 30 clientIDs. Thus, wouldn't creating an index on ClientID be helpful, as the search space is automatically reduced to 1/30th what it normally would be? Or is my understanding of how the index works flawed? Thanks

    Read the article

  • How to verify StructureMap is disposing of objects properly

    - by Kevin Pang
    I'm currently using StructureMap to inject instances of NHibernate ISessions using the following code: ObjectFactory.Initialize(x => { x.ForRequestedType<ISession>() .CacheBy(InstanceScope.PerRequest) .TheDefault.Is.ConstructedBy(y => NHibernateSessionManager.Instance.GetSession()); }); I'm assuming that the CacheBy(InstanceScope.PerRequest) will properly dispose of the ISession it creates, but I'd like to make sure. What's the easiest way to test this?

    Read the article

  • x86 assembly question

    - by kevin
    This is my assembly program which is just a function to swap *x *y. So first argument from main is address of x which is in 8(%ebp) and second one is address of y is in 12(%ebp). The program does swap x and y. I need 7 lines for doing this. can you make it 6 lines and there is a condition you can use only %eax, %ecx, and %edx 3 registers. I think about it so much, but I can't make it 6 lines. There must be a way, isn't it? This might be not a big deal, but if there is a way to get it in 6lines I want to know. movl 8(%ebp), %eax movl (%eax), %ecx movl 12(%ebp), %edx movl (%edx), %eax movl %ecx, (%edx) movl 8(%ebp), %ecx movl %eax, (%ecx)

    Read the article

  • Using mod-rewrite to conditionally select existing file in a subdirectory based on Host header?

    - by Kevin Hakanson
    I'm working through a problem where I want to select a different static content file based on the incoming Host header. The simple example is a mapping from URLs to files like this: www.example.com/images/logo.gif - \images\logo.gif skin2.example.com/images/logo.gif - \images\skin2\logo.gif skin3.example.com/images/logo.gif - \images\skin3logo.gif I have this working with the following RewriteRules, but I don't like how I have to repeat myself so much. Each host has the same set of rules, and each RewriteCond and RewriteRule has the same path. I'd like to use the RewriteMap, but I don't know how to use it to map the %{HTTP_HOST} to the path. <VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" ServerName www.example.com ServerAlias skin2.example.com ServerAlias skin3.example.com RewriteEngine On RewriteCond %{HTTP_HOST} skin2.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin2/$2 -f RewriteRule ^(.*)/(.*) $1/skin2/$2 [L] RewriteCond %{HTTP_HOST} skin3.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin3/$2 -f RewriteRule ^(.*)/(.*) $1/skin3/$2 [L] </VirtualHost> The concept behind the rules is if the same filename exists in a subdirectory for that host, use it instead of the direct targeted file. This uses host based subdirectories at the lowest level, and not a top level subdirectory to separate content.

    Read the article

  • PayPal Payments Pro Sandbox requires membership?

    - by Kevin
    Do I need to pay the $30 just to play around in the sandbox for Website Payments Pro? I'm trying to get Active Merchant working in Rails, and it's giving me an error "invalid merchant configuration"... after digging around a bit it says I need to "accept the billing agreement" and/or sign up for the Payments Pro first. So, do I need to pay the $30 just to test in sandbox? Or is there another workaround for this error?

    Read the article

  • Store CSPC and UPC Codes in Rails

    - by Kevin Sylvestre
    What the best way to store CSPC and UPC codes are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to support SQLite, MySQL and PostgreSQL). Thanks.

    Read the article

  • how to install ipv4 via a cmd windows xp

    - by Kevin Babb
    I need to script a way to install IPV4 on windows xp the reason is i have many pc with a corrupt win sock registry so the fix Microsoft has is to delete the reg keys hklm/system/currentcontolset/services/winsock and winsock2 and then to run a netsch ip reset which creates the winsock2 part of the registry then the part i need to script is go to network adapter properties goto tcpip and install a new protocol and select tcp/ip and install it which uses the file c:\windows\inf\nettcpip.inf and then this creates the winsock part is there a way to script this part?? i have looked and cant find anything

    Read the article

  • How to setup Mercurial and hgwebdir on IIS?

    - by Kevin Berridge
    I've been looking all over for decent instructions on how to get hgwebdir working on IIS but I haven't found much of worth. There's this "step by step" on the Mercurial wiki, but it's not very good. There's also this and this, but again, I can't find good steps to lead up to where those get started.

    Read the article

  • Problem convert column values from VARCHAR(n) to DECIMAL

    - by Kevin Babcock
    I have a SQL Server 2000 database with a column of type VARCHAR(255). All the data is either NULL, or numeric data with up to two points of precision (e.g. '11.85'). I tried to run the following T-SQL query but received the error 'Error converting data type varchar to numeric' SELECT CAST([MyColumn] AS DECIMAL) FROM [MyTable]; I tried a more specific cast, which also failed. SELECT CAST([MyColumn] AS DECIMAL(6,2)) FROM [MyTable]; I also tried the following to see if any data is non-numeric, and the only values returned were NULL. SELECT ISNUMERIC([MyColumn]), [MyColumn] FROM [MyTable] WHERE ISNUMERIC([MyColumn]) = 0; I tried to convert to other data types, such as FLOAT and MONEY, but only MONEY was successful. So I tried the following: SELECT CAST(CAST([MyColumn] AS MONEY) AS DECIMAL) FROM [MyTable]; ...which worked just fine. Any ideas why the original query failed? Will there be a problem if I first convert to MONEY and then to DECIMAL? Thanks!

    Read the article

  • Why does my javascript file sometimes compressed while sometimes not?(IIS Gzip problem)

    - by Kevin Yang
    i enable gzip for javascript file in my iis settings, here 's the corresponding config section. <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="10" dynamicCompressionLevel="8" /> <dynamicTypes> <add mimeType="text/*" enabled="true" /> <add mimeType="message/*" enabled="true" /> <add mimeType="application/soap+msbin1" enabled="true" /> <add mimeType="*/*" enabled="false" /> </dynamicTypes> <staticTypes> <add mimeType="text/*" enabled="true" /> <add mimeType="message/*" enabled="true" /> <add mimeType="application/javascript" enabled="true" /> <add mimeType="application/x-javascript" enabled="true" /> <add mimeType="*/*" enabled="false" /> </staticTypes> </httpCompression> currently, when i download my js file, it seems that sometimes server return the gzip one, and sometimes not. i dont know why, and how to debug that. If a file is already gzipped, it should be cached in local disk, and next time someone visit that file again, iis kernel should return the cache gzip file directly without compressing it again. Is that right?

    Read the article

  • help me reason about F# threads

    - by Kevin Cantu
    In goofing around with some F# (via MonoDevelop), I have written a routine which lists files in a directory with one thread: let rec loop (path:string) = Array.append ( path |> Directory.GetFiles ) ( path |> Directory.GetDirectories |> Array.map loop |> Array.concat ) And then an asynchronous version of it: let rec loopPar (path:string) = Array.append ( path |> Directory.GetFiles ) ( let paths = path |> Directory.GetDirectories if paths <> [||] then [| for p in paths -> async { return (loopPar p) } |] |> Async.Parallel |> Async.RunSynchronously |> Array.concat else [||] ) On small directories, the asynchronous version works fine. On bigger directories (e.g. many thousands of directories and files), the asynchronous version seems to hang. What am I missing? I know that creating thousands of threads is never going to be the most efficient solution -- I only have 8 CPUs -- but I am baffled that for larger directories the asynchronous function just doesn't respond (even after a half hour). It doesn't visibly fail, though, which baffles me. Is there a thread pool which is exhausted? How do these threads actually work?

    Read the article

  • EF4 Code-First CTP5 Many-to-one

    - by Kevin McKelvin
    I've been trying to get EF4 CTP5 to play nice with an existing database, but struggling with some basic mapping issues. I have two model classes so far: public class Job { [Key, Column(Order = 0)] public int JobNumber { get; set; } [Key, Column(Order = 1)] public int VersionNumber { get; set; } public virtual User OwnedBy { get; set; } } and [Table("Usernames")] public class User { [Key] public string Username { get; set; } public string EmailAddress { get; set; } public bool IsAdministrator { get; set; } } And I have my DbContext class exposing those as IDbSet I can query my users, but as soon as I added the OwnedBy field to the Job class I began getting this error in all my tests for the Jobs: Invalid column name 'UserUsername'. I want this to behave like NHibernate's many-to-one, whereas I think EF4 is treating it as a complex type. How should this be done?

    Read the article

  • sendmessage mouseevent not working

    - by kevin
    I have this code: Private Const MOUSEEVENTF_LEFTDOWN = &H2 Private Const MOUSEEVENTF_LEFTUP = &H4 Dim WindowHandle As Long = FindWindow(vbNullString, "Ultima Online") SendMessage(WindowHandle, MOUSEEVENTF_LEFTDOWN, 0, 0) SendMessage(WindowHandle, MOUSEEVENTF_LEFTUP, 0, 0) I know it is getting the windowhandle fine, because I made a conditional statment that pops up a messagebox if windowhandle = 0 The problem is that it is not sending the mouse click to the window.

    Read the article

  • Highcharts removing elements

    - by Kevin Jolan
    I'm working on a new website using highchart. But i have a little issue with how it looks / is setup. I'm wondering if its possible to remove the "Tokyo, New York, Berlin, London" on the right side of the image? I would like to add a discription my self, and remove the exsisting one. Any Suggestions on how i can remove them? (But i want to keep the lines in the graph) is there any way i can modify or hide this? (it also take up unnecessary space on the website)

    Read the article

  • What are "web services"?

    - by Kevin
    I'm reading a book about programming ASP.NET in C#. The book makes the following comment: Previous editions of this book tackled web services, a feature that allows you to create code routines that can be called by other applications over the Internet.Web services are more interesting when considering rich client development (because they allow you to give web features to ordinary desktop applications),and they’re in the process of being replaced by a new technology known as WCF (Windows Communication Foundation). For those reasons, web services aren’t covered in this book.However,if you want to branch out and explore the web service world,you can download the web service chapters from the previous edition of this book from the book’s download page.The information in these chapters still applies to ASP.NET 3.5,because the web service feature hasn’t changed. Can someone offer, in "layman's terms" what exactly a web service is and if, indeed, they are being replaced, at least in .Net, with WCF? What would be a practical example of a web service? Are they stand alone programs that run on a web server and are invoked by a client or clients?

    Read the article

  • Codeigniter: Library function--I'm stuck

    - by Kevin Brown
    I have a library function that sets up my forms, and submits data. They're long, and they work, so I'll spare you reading my code. :) I simply need a way for my functions to determine how to handle the data. Until now, the function did one thing: Submit a report for the current user. NOW, the client has requested that an administrator also be able to complete a form--this means that the form would be filled out, and it would CREATE a user at the same time, whereas the current function EDITS and is accessed by an EXISTING user. Do I need a separate function to do essentially the same thing? How do I make one function perform two tasks? One to update a user, and if there is no user, create one. Current controller: function survey() { $id = $this->session->userdata('id'); $data['member'] = $this->home_model->getUser($id); //Convert the db Object to a row array $data['manager'] = $data['member']->row(); $manager_id = $data['manager']->manager_id; $data['manager'] = $this->home_model->getUser($manager_id); $data['manager'] = $data['manager']->row(); $data['header'] = "Home"; $this->survey_form_processing->survey_form($this->_container,$data, $method); } Current Library: function survey_form($container) { //Lots of validation stuff $this->CI->validation->set_rules($rules); if ( $this->CI->validation->run() === FALSE ) { // Output any errors $this->CI->validation->output_errors(); } else { // Submit form $this->_submit(); } $this->CI->load->view($container,$data); The submit function is huge too. Basically says, "Update table with data where user_id=current user" I hope this wasn't too confusing. I'll create two functions if need be, but I'd like to keep redundancy down! }

    Read the article

  • Is it worth investing time in learning low level Java?

    - by Kevin Rave
    Low level Java, I mean, bits, bytes, bit masking, GC internals, JVM stuff, etc in the following contexts: - When you are building an enterprise app using frameworks like Spring, Hybernate, etc. - Interviews for a Sr Java Developer position where you are expected work on a existing Enterprise App that was built using some frameworks (Spring, EJB, Hybernate,etc) - Architects (Java) I understand knowing the very low level is "good". But how often do you think / use of these in the real-world, unless you are developing something from the ground-up keeping performance in mind?

    Read the article

  • Form.cs not being updated by changes to Form.cs[Design]

    - by Kevin
    I am new to Visual Studio and I am just messing around with the controls to see how things work. I made one form that had a single button that, when pushed, simply printed "Hello World" to the screen. To try something more complicated I deleted that button and added various other tools to the Form. However the code in the Form.cs file was not updated to reflect these changes to the design and I can find no way to update it manually. Any advice is appreciated. Regards.

    Read the article

  • JVM GC demote object to eden space?

    - by Kevin
    I'm guessing this isn't possible...but here goes. My understanding is that eden space is cheaper to collect than old gen space, especially when you start getting into very large heaps. Large heaps tend to come up with long running applications (server apps) and server apps a lot of the time want to use some kind of caches. Caches with some kind of eviction (LRU) tend to defeat some assumptions that GC makes (temporary objects die quickly). So cache evictions end up filling up old gen faster than you'd like and you end up with a more costly old gen collection. Now, it seems like this sort of thing could be avoided if java provided a way to mark a reference as about to die (delete keyword)? The difference between this and c++ is that the use is optional. And calling delete does not actually delete the object, but rather is a hint to the GC that it should demote the object back to Eden space (where it will be more easily collected). I'm guessing this feature doesn't exist, but, why not (is there a reason it's a bad idea)?

    Read the article

  • Enumerating computers in NT4 domain using WNetEnumResourceW (C++) or DirectoryEntry (C#)

    - by Kevin Davis
    I'm trying to enumerate computers in NT4 domains (not Active Directory) and support Unicode NetBIOS names. According to MSDN, WNetEnumResourceW is the Unicode counterpart of WNetEnumResource which to me would imply that using this would do the trick. However, I have not been able to get Unicode NetBIOS names properly using WNetEnumResourceW. I've also tried the C# rough equivalent DirectoryEntry using the WinNT: provider with no luck on Unicode names either. If I use DirectoryEntry on Active Directory (using the LDAP: provider) I do get Unicode names back. I noticed that during some debugging my code using DirectoryEntry and the WinNT: provider, the exceptions I saw were of type System.Runtime.InteropServices.COMException which tends to make me believe that this is just calling WNetEnumResourceW via COM. This web page implies that for some Net APIs the MS documentation is incomplete and possibly inaccurate which further confuses things. Additionally I've found that using the C# method which certainly results in cleaner, more understandable code also yields incomplete results in enumerating computers in domains\workgroups. Does anyone have any insight on this? Is it possible that computer acting as the WINS server is mangling the name? How would I determine this? Thanks

    Read the article

  • How should I write this string-prefix check so that it's idiomatic Python?

    - by Kevin Stargel
    I have a couple of lists of items: specials = ['apple', 'banana', 'cherry', ...] smoothies = ['banana-apple', 'mocha mango', ...] I want to make a new list, special_smoothies, consisting of elements in smoothies that start with the elements in specials. However, if specials is blank, special_smoothies should be identical to smoothies. What's the most Pythonic way to do this? Is there a way to do this without a separate conditional check on whether specials is blank?

    Read the article

  • changing img src with JQuery but leave pathing info intact?

    - by Kevin Won
    I'm using JQuery to switch out an image src thusly: $("#myImg").attr("src", "../../new.gif"); notice the relative pathing on the new src. Unfortunately, this isn't portable when I deploy my app. In my MVC app I'm using a ResolveUrl() method that will fix the pathing problem for me so it's portable, but now my JQuery image src swapper doesn't work right since it now switches the correctly resolved path to a broken relative one. <img id="myImg" src="<%=ResolveUrl("~/Images/transparent.gif")%>" /> What I want is for JQuery to just flip the actual filename and leave the path untouched. My first thought would be to // pseudocode javascript jquery on my thought on how to approach this prob var oldFullPath = $('#myImg").GetTheImgSrc; var newFileNameWithPathIntact = someRegexAddNewFileNameWithOldPath $("#myImg").attr("src", newFileNameWithPathIntact); but that seems rather gross and un-JQuery to me. Anyone got a better way?

    Read the article

  • Rails: Converting from MySQL to PostGres breaks Geokit Distance Calculations???

    - by Kevin
    I recently switched my database from MySQL to PostGres. I also use GeoKit. When I started my app up with the new database already seeded, I get the following error: PGError: ERROR: function radians(character varying) does not exist LINE 1: ...COS(0.661045389762993)*COS(-2.12957994527573)*COS(RADIANS(ti... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Anyone know why this is breaking now? I know GeoKit still works because it's still performing the geocoding in the model per ticket when the database is seeded, it just won't do the distance calculations correctly.

    Read the article

  • XML::XML2JSON "0" Element

    - by Kevin C
    I'm using XML::XML2JSON in Perl to convert JSON data to XML, I am passing through the following data (snippet): {"question":{"isrequired":{"$t":"0"}}} and when I use the XML:XML2JSON-json2xml function to convert the JSON data into XML, I get the following (snippet): <isrequired/> I need to retain the "0" element in the "isrequired" tag, because at times, I will have empty JSON elements, and need the empty XML tag. I think the documentation is a bit vague (either that, or I don't understand it), but is this possible to do with this module? I would appreciate the help. Thanks.

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >