Search Results

Search found 2460 results on 99 pages for 'dave carpeneto'.

Page 40/99 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Moving multiple objects on a map

    - by Dave
    I have multiple objects on my isometric game, for example, NPC's doing path finding automatically to walk around the map. Now there could be any number of them from 0 to infinity (hypthetical as no PC could handle that). My question is: is simply looping each one individually the smartest way to animate them all? Surely as the number of units increases you will notice a lag occuring on units near the end of loop still "waiting" for their next animation movement. The alternative is a swarm algorithm to move all objects together. Is that a smarter idea or do both situations apply depending on the circumstances of the game?

    Read the article

  • Selecting objects on a 2D map

    - by Dave
    I have a object selection function by checking the mouse click and getting the relevant object. How ever there is a rare situation where if one object is partially behind the other then both objects are in the given area so im wondering how I can make the game know which one was selected, as currently my method does not know. This is my function that works it out: function getobj(e){ mx = e.pageX - curleft; //mouse click x my = e.pageY - curtop; //mouse click y function searchSprites(sprites, x, y) { var matches = [], i = 0, data = null; for (i = 0; i < spritea.length; ++i) { data = spritea[i].data; if (x > data[0] && y > data[1] && x < data[2] && y < data[3]) { var imageData = ctx2.getImageData(x, y, 1, 1); if(imageData.data[3] !== 0){ return [spritea[i].id]; i = spritea.length; } } } } res = searchSprites(spritea, mx, my); bid = res[0]; if(bid === '1'){ alert('You selected the skyscraper in front!'); }else if(bid === '3'){ alert('You selected the skyscraper behind!'); } } Image of the map: It keeps telling me I clicked the skyscraper behind which is not necessarily what the user is trying to do. How can I improve the accuracy of this ?

    Read the article

  • Do I own copyright of program I made in own time?

    - by Dave Mess
    I created a software package that aids electrical engineers with common calculations used on site (substations to be specific). I created the package in my own time, without being asked and without guidance. The package is now widely used within my company and I intend to distribute it nationally. Do I own the copyright? My contract does state that all work produced is theirs, but this was outside of work and outside of my 'scope of work'. My company is mainly a civil and construction company and had no influence in the creation of the program. From comments: This is the paragraph "During the course of your service, you will disclose to the company all information, formulae, processes, inventions or improvements which you have learned, discovered or evolved during the course of your service or in connection with the business of the company and will sign any necessary documents to enable the company to obtain patent protection whether still in the company service or not. " They are taking it seriously and have got their lawyers.

    Read the article

  • Can I dynamicaly size a div based on discreet units and still center? [closed]

    - by Dave
    Here's the problem: I have a website I'm working on that, depending on what the user has selected, will pop up a different number of boxes 80px high and 200px wide and currently set to float:left. These boxes are contained within a div that is basically the whole width of the screen minus some 1% margins. So at the moment they all fill in the box and, depending on screen size, occupy a grid of variable height and width. The problem is, if the screen size makes the containing box, say, 700px wide then you end up with 3 boxes per row and a bloody big margin on the right. What I would like to do is center the grid of boxes inside the containing box so that the margins are equal left and right. I suspect this can't be done since it means the containing box needs to set its size by looking both at the size of the user's window as well as the size of its children. It would be easy to do with javascript but I'd prefer not to if that is an option. If it is truly impossible then I will simply script it and let non-js users see a left-justified set of boxes.

    Read the article

  • Can I share data between two users in an ASP.NET Application?

    - by Dave
    I have an issue with Roles.IsUserInRole function. It take hell amount of time to just check if the logged-in user is in particular role(typ 3-9 sec). I searched to find a solution and arrived on this but I am not sure If I have fully grasped it. What I got from the above, A new derived class is created. Inside that class, there is a list which retrieves all user at once. The next time you check IsUserInRole, you do not use the actual IsUserInRole method but rather use the one you overrode in your class. Is this the correct description? Am I on track? My question is, can data be share between two different users in ASP.NET application? If yes, will the shared data exist only if there is at least one user logged in. If all users logs out, that shared data is destroyed? My point is this data will be created only one time whenever a user logs in. For all subsequent users they can use this data and check their roles against the list? I need a detailed answer. My application has users and different roles. We are using ASP.NET roles.

    Read the article

  • Help with selecting objects on a map

    - by Dave
    I have a object selection function by checking the mouse click and getting the relevant object. How ever there is a rare situation where if one object is partially behind the other then both objects are in the given area so im wondering how i can make the game know which one was selected, as currently my method does not know. This is my function that works it out: function getobj(e){ mx = e.pageX - curleft; //mouse click x my = e.pageY - curtop; //mouse click y function searchSprites(sprites, x, y) { var matches = [], i = 0, data = null; for (i = 0; i < spritea.length; ++i) { data = spritea[i].data; if (x > data[0] && y > data[1] && x < data[2] && y < data[3]) { var imageData = ctx2.getImageData(x, y, 1, 1); if(imageData.data[3] !== 0){ return [spritea[i].id]; i = spritea.length; } } } } res = searchSprites(spritea, mx, my); bid = res[0]; if(bid === '1'){ alert('You selected the skyscraper in front!'); }else if(bid === '3'){ alert('You selected the skyscraper behind!'); } } Image of the map: http://i.imgur.com/qcKij.jpg It keeps telling me i clicked the skyscraper behind which is not necessarily what the user is trying to do... how can i improve the accuracy of this ?

    Read the article

  • Dealing with huge SQL resultset

    - by Dave McClelland
    I am working with a rather large mysql database (several million rows) with a column storing blob images. The application attempts to grab a subset of the images and runs some processing algorithms on them. The problem I'm running into is that, due to the rather large dataset that I have, the dataset that my query is returning is too large to store in memory. For the time being, I have changed the query to not return the images. While iterating over the resultset, I run another select which grabs the individual image that relates to the current record. This works, but the tens of thousands of extra queries have resulted in a performance decrease that is unacceptable. My next idea is to limit the original query to 10,000 results or so, and then keep querying over spans of 10,000 rows. This seems like the middle of the road compromise between the two approaches. I feel that there is probably a better solution that I am not aware of. Is there another way to only have portions of a gigantic resultset in memory at a time? Cheers, Dave McClelland

    Read the article

  • We have multiple app servers running against a single database. How do I ensure that each row in a q

    - by Dave
    We have about 7 app servers running .NET windows services that ping a single sql server 2005 queue table and fetch a fixed amount of records to process at fixed intervals. The amount of records to process and the amount of time between fetches are both configurable and are initially set to 100 and 30 seconds initially. Currently, my queue table has an int status column which can be either "Ready, Processing, Complete, Error". The proc that fetches the records has a sql transaction with the following code inside the transaction: 1) Fetch x number of records into temp table where the status is "Ready". The select uses a holdlock hint 2) Update the status on those records in the Queue table to "Processing" The .NET services do some processing that may take seconds or even minutes per record. Another proc is called per record that simply updates the status to "Complete". The update proc has no transaction as I'm leaning on the implicit transaction as part of the update clause here. I don't know the traffic exceptions for this but figure it will be under 10k records per day. Is this the best way to handle this scenario? If so, are there any details that I've left out, such as a hint here or there? Thanks! Dave

    Read the article

  • Sharing session state between 2 ASP.NET applications using SQL Server

    - by Dave
    Hi I'm working on a site that has a requirement to share session between a cms application and an online store application on the same domain eg. mydomain.com and store.mydomain.com I've made some progress with it and it works on my local build between localhost/cms and localhost/store Basically I have done what is suggested in this article http://blogs.msdn.com/toddca/archive/2007/01/25/sharing-asp-net-session-state-across-applications.aspx and hacked the TempGetAppID Stored Procedure to return the same application id (1). This appears to work as it creates sessions with ids like 'abv5d2urx1asscfwuzw3wp4500000001', which is what I'd expect. My issue is that when I deploy it to our testing environment, it creates a new session when I navigate between the 2 sites. So when I start a session on the cms site, if I navigate to the store, it creates a new session. These are set up as 2 different websites in IIS7. In the web.config files for both sites, the and elements are both the same and are as follows (minus sensitive information) Has anyone got an ideas why this might not be working? I am sharing Forms Authentication across the 2 sites and that works fine. Any help or ideas would be greatly appreciated! Many thanks Dave

    Read the article

  • Creating a UIImage from a rotated UIImageView...

    - by Magic Bullet Dave
    I have a UIImageView with an image in it. I have rotated the image prior to display by setting the transform property of the UIImageView to CGAffineTransformMakeRotation(angle) where angle is the angle in radians. I want to be able to create another UIImage that corresponds to the rotated version that I can see in my view. I am almost there, by rotating the image context I get a rotated image: - (UIImage *) rotatedImageFromImageView: (UIImageView *) imageView { UIImage *rotatedImage; // Get image width, height of the bonuding rectangle CGRect boundingRect = [self getBoundingRectAfterRotation: imageView.bounds byAngle:angle]; // Create a graphics context the size of the boundinf rectangle UIGraphicsBeginImageContext(boundingRect.size); CGContextRef context = UIGraphicsGetCurrentContext(); // Rotate and translate the context CGAffineTransform ourTransform = CGAffineTransformIdentity; ourTransform = CGAffineTransformConcat(ourTransform, CGAffineTransformMakeRotation(angle)); CGContextConcatCTM(context, ourTransform); // Draw the image into the context CGContextDrawImage(context, CGRectMake(0, 0, imageView.image.size.width, imageView.image.size.height), imageView.image.CGImage); // Get an image from the context rotatedImage = [UIImage imageWithCGImage: CGBitmapContextCreateImage(context)]; // Clean up UIGraphicsEndImageContext(); return rotatedImage; } However the image is not rotated about its centre. I have tried all kinds of transforms concatenated with my rotate to get it to rotate around the centre but to no avail. Am I missing a trick? Is this even possible since I am rotating the context not the image? Getting desperate to make this work now, so any help would be appreciated. Dave

    Read the article

  • Why can't I use WCF DataContract and ISerializable on the same class?

    - by Dave
    Hi all, I have a class that I need to be able to serialize to a SQLServer session variable and be available over a WCF Service. I have declared it as follows namespace MyNM { [Serializable] [DataContract(Name = "Foo", Namespace = "http://www.mydomain.co.uk")] public class Foo : IEntity, ISafeCopy<Foo> { [DataMember(Order = 0)] public virtual Guid Id { get; set; } [DataMember(Order = 1)] public virtual string a { get; set; } DataMember(Order = 2)] public virtual Bar c { get; set; } /* ISafeCopy implementation */ } [Serializable] [DataContract(Name = "Bar ", Namespace = "http://www.mydomain.co.uk")] public class Bar : IEntity, ISafeCopy<Bar> { #region Implementation of IEntity DataMember(Order = 0)] public virtual Guid Id { get; set; } [DataMember(Order = 1)] public virtual Baz y { get; set; } #endregion /* ISafeCopy implementation*/ } [Serializable] [DataContract] public enum Baz { [EnumMember(Value = "one")] one, [EnumMember(Value = "two")] two, [EnumMember(Value = "three")] three } But when I try and call this service, I get the following error in the trace log. "System.Runtime.Serialization.InvalidDataContractException: Type 'BarProxybcb100e8617f40ceaa832fe4bb94533c' cannot be ISerializable and have DataContractAttribute attribute." If I take out the Serializable attribute, the WCF service works, but when the object can't be serialized to session. If I remove the DataContract attribute from class Bar, the WCF service fails saying Type 'BarProxy3bb05a31167f4ba492909ec941a54533' with data contract name 'BarProxy3bb05a31167f4ba492909ec941a54533:http://schemas.datacontract.org/2004/07/' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer I've tried adding a KnownType attribute to the foo class [KnownType(typeof(Bar))] But I still get the same error. Can anyone help me out with this? Many thanks Dave

    Read the article

  • Error mounting CloudDrive snapshot in Azure

    - by Dave
    Hi, I've been running a cloud drive snapshot in dev for a while now with no probs. I'm now trying to get this working in Azure. I can't for the life of me get it to work. This is my latest error: Microsoft.WindowsAzure.Storage.CloudDriveException: Unknown Error HRESULT=D000000D ---> Microsoft.Window.CloudDrive.Interop.InteropCloudDriveException: Exception of type 'Microsoft.WindowsAzure.CloudDrive.Interop.InteropCloudDriveException' was thrown. at ThrowIfFailed(UInt32 hr) at Microsoft.WindowsAzure.CloudDrive.Interop.InteropCloudDrive.Mount(String url, SignatureCallBack sign, String mount, Int32 cacheSize, UInt32 flags) at Microsoft.WindowsAzure.StorageClient.CloudDrive.Mount(Int32 cacheSize, DriveMountOptions options) Any idea what is causing this? I'm running both the WorkerRole and Storage in Azure so it's nothing to do with the dev simulation environment disconnect. This is my code to mount the snapshot: CloudDrive.InitializeCache(localPath.TrimEnd('\\'), size); var container = _blobStorage.GetContainerReference(containerName); var blob = container.GetPageBlobReference(driveName); CloudDrive cloudDrive = _cloudStorageAccount.CreateCloudDrive(blob.Uri.AbsoluteUri); string snapshotUri; try { snapshotUri = cloudDrive.Snapshot().AbsoluteUri; Log.Info("CloudDrive Snapshot = '{0}'", snapshotUri); } catch (Exception ex) { throw new InvalidCloudDriveException(string.Format( "An exception has been thrown trying to create the CloudDrive '{0}'. This may be because it doesn't exist.", cloudDrive.Uri.AbsoluteUri), ex); } cloudDrive = _cloudStorageAccount.CreateCloudDrive(snapshotUri); Log.Info("CloudDrive created: {0}", snapshotUri, cloudDrive); string driveLetter = cloudDrive.Mount(size, DriveMountOptions.None); The .Mount() method at the end is what's now failing. Please help as this has me royally stumped! Thanks in advance. Dave

    Read the article

  • TDD test data loading methods

    - by Dave Hanson
    I am a TDD newb and I would like to figure out how to test the following code. I am trying to write my tests first, but I am having trouble for creating a test that touches my DataAccessor. I can't figure out how to fake it. I've done the extend the shipment class and override the Load() method; to continue testing the object. I feel as though I end up unit testing my Mock objects/stubs and not my real objects. I thought in TDD the unit tests were supposed to hit ALL of the methods on the object; however I can never seem to test that Load() code only the overriden Mock Load My tests were write an object that contains a list of orders based off of shipment number. I have an object that loads itself from the database. public class Shipment { //member variables protected List<string> _listOfOrders = new List<string>(); protected string _id = "" //public properties public List<string> ListOrders { get{ return _listOfOrders; } } public Shipment(string id) { _id = id; Load(); } //PROBLEM METHOD // whenever I write code that needs this Shipment object, this method tries // to hit the DB and fubars my tests // the only way to get around is to have all my tests run on a fake Shipment object. protected void Load() { _listOfOrders = DataAccessor.GetOrders(_id); } } I create my fake shipment class to test the rest of the classes methods .I can't ever test the Real load method without having an actual DB connection public class FakeShipment : Shipment { protected new void Load() { _listOfOrders = new List<string>(); } } Any thoughts? Please advise. Dave

    Read the article

  • Including variables inside curly braces in a Zend config ini file on Linux

    - by Dave Morris
    I am trying to include a variable in a .ini file setting by surrounding it with curly braces, and Zend is complaining that it cannot parse it properly on Linux. It works properly on Windows, though: welcome_message = Welcome, {0}. This is the error that is being thrown on Linux: : Uncaught exception 'Zend_Config_Exception' with message 'Error parsing /var/www/html/portal/application/configs/language/messages.ini on line 10 ' in /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php:181 Stack trace: 0 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(201): Zend_Config_Ini-&gt;_parseIniFile('/var/www/html/p...') 1 /usr/local/zend/share/ZendFramework/library/Zend/Config/Ini.php(125): Zend_Config_Ini-&gt;_loadIniFile('/var/www/html/p...') 2 /var/www/html/portal/library/Ingrain/Language/Base.php(49): Zend_Config_Ini-&gt;__construct('/var/www/html/p...', NULL) 3 /var/www/html/portal/library/Ingrain/Language/Base.php(23): Ingrain_Language_Base-&gt;setConfig('messages.ini', NULL, NULL) 4 /var/www/html/portal/library/Ingrain/Language/Messages.php(7): Ingrain_Language_Base-&gt;__construct('messages.ini', NULL, NULL, NULL) 5 /var/www/html/portal/library/Ingrain/Helper/Language.php(38): Ingrain_Language_Messages-&gt;__construct() 6 /usr/local/zend/share/ZendFramework/library/Zend/Contr in We are able to get the error to go away on Linux if we surround the braces with quotes, but that seems like a strange solution: welcome_message = Welcome, "{"0"}". Is there a better way to solve this issue for all platforms? Thanks for your help, Dave

    Read the article

  • .NET RichTextBox: unable to change Rtf property.

    - by Dave
    Hey guys, Perhaps I'm missing something real simple here, but I've been struggling to change the RTF property of my RichTextBox in order to apply some color coding to my text. Probably the most straight-forward example of the problem I'm having is setting the Rtf property to include a color table in its header. The default RTF string returned by the Rtf property: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}\viewkind4\uc1\pard\f0\fs17\par} And the new RTF string I'd like to set with my color table: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}{\colortbl;\red128\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;}}\viewkind4\uc1\pard\f0\fs17\par} And I set this using: RichTextBox richTextBox = new RichTextBox(); richTextBox.Rtf = rtfStr; // My new RTF string, as seen above. However, via debugger, it can be observed the that Rtf property stubbornly refuses to change; no exceptions are thrown, it just refuses to change. Same issue happens when I string.Replace() words to include RTF color tags around them. I've also tried turning off any ReadOnly properties on the text box. Any suggestions would be most helpful, thanks! Dave

    Read the article

  • Website often sticks, but clicking the link again everything loads fine

    - by Dave
    Hi I have a website, which normally is very fast, however in the last week or two we're run into a problem whereby randomly if you click a link the browser will just sit there with the throbber spinning but the page doesn't appear to load If you click the link again it then responds straight away This doesn't seem to be limited to Chrome, Firefox or IE as we've tried all with all having same problems The site is build in ASP and connects to a MySQL database and runs on a dedicated windows 2003 server The firewalls were changed in the data centre recently to pixies but I've not been able to reproduce the problem outside of the office Within the office, we have 11 people (only 7 today and still experiencing problems) connected to a 7MB ADSL connection with Eclipse I have made some changes to the network in the office, namely wiring 4 desks back to the main 24 port switch rather than to small 5 port which then linked on to the 24 port switch... however we were having problems before this was done, and I did this to try and rule out an issue with the switch We have a backup ADSL connection, so I may try switching to that, or switching to a different router, but do you think this is a likely issue? Failing that, what else would you check? Thanks, sorry for length! Dave

    Read the article

  • Add new SVN "repo" in poorly constructed repo/project setup

    - by Dave Masselink
    Unfortunately, the answer to this question isn't quite as simple as it sounds... but I hope it can still be relatively simple. Please read all the way through before telling me that the answer is: "svnadmin create... duh" I'm working for a company that set up their SVN server in an odd way (at least in terms of what I'm used to). We've all been there, right? Rather than giving each project a separate repository... they have a folder on the server called "/var/www/svn/repos/" which is the actual SVN repo (has conf/, db/, README.txt, etc. in it). Then they distinguish their projects by adding top level folders into the ONE repository (ex: Project1, Project2, etc.) I don't like this setup and might one day get around to converting the setup to what I'm used to, where each project is its own repository (with separate logs, dbs, etc.) But my question is this: What is the best way to add a new empty project to the current setup? Is there anyway to add a new top level folder/project to the repo through use of svnadmin? It can/should just be an empty folder that I'll start building a new project in. I know that I could do this by checking out the whole singular repository and then adding a new top level folder into my local checkout, then re-committing. But I'd really prefer not to do this because someone has created folders/projects that are just GBs of log data... and I don't want to wait through the download of this just to add a single empty folder. Let me know if there is any more info you'd need to know. I do have root/sudo access on the server in question. Thanks in advance for your help! Dave

    Read the article

  • jQuery ajax post failing in asp

    - by Dave Kiss
    hey guys, this might be really stupid, but hopefully someone can help. I'm trying to post to an external script using ajax so i can mail the data, but for some reason my data is not making it to the script. $(document).ready(function() { $("#submitContactForm").click(function () { $('#loading').append('<img src="http://www.xxxxxxxx.com/demo/copyshop/images/loading.gif" alt="Currently Loading" id="loadingComment" />'); var name = $('#name').val(); var email = $('#email').val(); var comment = $('#comment').val(); var dataString = 'name='+ name + '&email=' + email + '&comment=' + comment; $.ajax({ url: 'http://www.xxxxx.com/demo/copyshop/php/sendmail.php', type: 'POST', data: '?name=Dave&[email protected]&comment=hiiii', success: function(result) { $('#loading').append('success'); } }); return false; }); }); the php script is simple (for now - just wanted to make sure it worked) <?php $name = $_POST['name']; $email = $_POST['email']; $comment = $_POST['comment']; $to = '[email protected]'; $subject = 'New Contact Inquiry'; $message = $comment; mail($to, $subject, $message); ?> the jquery is embedded in an .aspx page (a language i'm not familiar with) but is posting to a php script. i'm receiving emails properly but there is no data inside. am i missing something? i tried to bypass the variables in this example, but its still not working thanks

    Read the article

  • What is the best approach to 2D collision detection on the iPhone?

    - by Magic Bullet Dave
    Been working on this problem of collision detection and there appears to be 3 main approaches I could take: Sprite and mask approach. (AND the overlap of the sprites and check for a non-zero number in the resulting sprite pixel data). Bounding circles, rectangles or polygons. (Create one or more shapes that enclose the sprites and do the basic maths to check for overlaps). Use an existing sprite library. The first approach, even though it would have been the way I would have done it in the old days of 16x16 sprite blocks, it appears that there just isn’t an easy way of getting at the individual image pixel data and/or alpha channel within Quartz (or OPENGL for that matter). Detecting the overlap of the bounding box is easy, but then creating a 3rd image from the overlap and then testing it for pixels is complicated and my gut feel is that even if we could get it to work would be slow. Am I missing something neat here? The second approach involves dividing up our sprites into several polygons and testing them for overlaps. The more polygons the more accurate the collision detection. The benefit is that it is fast, and can be accurate. The downside is it makes the sprite creation more complicated. i.e., we have to create the polygons for each sprite. For speed the best approach is to create a tree of polygons. The 3rd approach I’m not sure about as it involves buying code (or using an open source licence). I am not sure what the best library to use is or whether this would make life easier or give us a problem integrating this into our app. So in short I am favouring the polygon and tree approach and would appreciate you views on this before I go and write lots of code. Best regards Dave

    Read the article

  • Using the contents of an array to set individual pixels in a Quartz bitmap context

    - by Magic Bullet Dave
    I have an array that contains the RGB colour values for each pixel in a 320 x 180 display. I would like to be able to set individual pixel values in the a bitmap context of the same size offscreen then display the bitmap context in a view. It appears that I have to create 1x1 rects and either put a stroke on them or a line of length 1 at the point in question. Is that correct? I'm looking for a very efficient way of getting the array data onto the graphics context as you can imagine this is going to be an image buffer that cycles at 25 frames per second and drawing in this way seems inefficient. I guess the other question is should I use OPENGL ES instead? Thoughts/best practice would be much appreciated. Regards Dave OK, have come a short way, but can't make the final hurdle and I am not sure why this isn't working: - (void) displayContentsOfArray1UsingBitmap: (CGContextRef)context { long bitmapData[WIDTH * HEIGHT]; // Build bitmap int i, j, h; for (i = 0; i < WIDTH; i++) { for (j = 0; j < HEIGHT; j++) { h = frameBuffer01[i][j]; bitmapData[i * j] = h; } } // Blit the bitmap to the context CGDataProviderRef providerRef = CGDataProviderCreateWithData(NULL, bitmapData,4 * WIDTH * HEIGHT, NULL); CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); CGImageRef imageRef = CGImageCreate(WIDTH, HEIGHT, 8, 32, WIDTH * 4, colorSpaceRef, kCGImageAlphaFirst, providerRef, NULL, YES, kCGRenderingIntentDefault); CGContextDrawImage(context, CGRectMake(0.0, HEIGHT, WIDTH, HEIGHT), imageRef); CGImageRelease(imageRef); CGColorSpaceRelease(colorSpaceRef); CGDataProviderRelease(providerRef); }

    Read the article

  • Jquery.Validate plugin + realPerson plugin

    - by Dave Watts
    I can't figure out how to make it so the form wont fire unless the realPerson captcha is "valid". I can see that when the user types in the correct/valid letters and clicks submit it adds a class of "valid" to the input. So Ive been trying to figure out how to get the jquery.validate plugin to only fire when the class "valid" is present. <script type="text/javascript"> $(document).ready(function(){ $('#defaultReal').realperson(); $('#contact_form2').validate({ submitHandler: function(form) { var str = $("form").serialize(); $.ajax({ type: "POST", url: "contactpage.php", data: str, success: function(){ $('#contact_form2').html("<div id='message'></div>"); $('#message').html("<h2>Contact Form Submitted!</h2>") .append("<p>We will be in touch soon.</p>") .hide() .fadeIn(1500, function() { $('#message').append("<img id='checkmark' src='images/check.png' />"); }); }}); return false; } }); Thank you in advanced! -Dave

    Read the article

  • Ajax post failing in asp

    - by Dave Kiss
    hey guys, this might be really stupid, but hopefully someone can help. I'm trying to post to an external script using ajax so i can mail the data, but for some reason my data is not making it to the script. $(document).ready(function() { $("#submitContactForm").click(function () { $('#loading').append('<img src="http://www.xxxxxxxx.com/demo/copyshop/images/loading.gif" alt="Currently Loading" id="loadingComment" />'); var name = $('#name').val(); var email = $('#email').val(); var comment = $('#comment').val(); var dataString = 'name='+ name + '&email=' + email + '&comment=' + comment; $.ajax({ url: 'http://www.xxxxx.com/demo/copyshop/php/sendmail.php', type: 'POST', data: '?name=Dave&[email protected]&comment=hiiii', success: function(result) { $('#loading').append('success'); } }); return false; }); }); the php script is simple (for now - just wanted to make sure it worked) <?php $name = $_POST['name']; $email = $_POST['email']; $comment = $_POST['comment']; $to = '[email protected]'; $subject = 'New Contact Inquiry'; $message = $comment; mail($to, $subject, $message); ?> the jquery is embedded in an .aspx page (a language i'm not familiar with) but is posting to a php script. i'm receiving emails properly but there is no data inside. am i missing something? i tried to bypass the variables in this example, but its still not working thanks

    Read the article

  • Automated browser testing: How to test JavaScript in web pages?

    - by Dave
    I am trying to write an application that will test a series of web-pages programmatically. The web pages being tested have JavaScript embedded within them which alter the structure of the HTML when they complete execution. It is then the goal to take the final HTML (post-execution of the embedded JavaScript) and compare it against a known output. Essentially, the Input --- Output for the test application is: URL ---[retrieve HTML]--- HTML ---[execute JS, then compare]--- PASS/FAIL Here is the challenge: I have been unable to find a solution that is able to take the HTML I retrieve from the URL and process the JavaScript, as a browser would, and generate the final HTML a user might see from "View Source" on the same page within the browser. It would be very surprising if this sort of approach has not been made before, so I'm hoping someone out there knows of a fitting solution for this application/problem? If at all possible, I'm hoping for a solution that integrates with .NET (I've tried using the WebBrowser, with no luck). However, if there is an existing 3rd party application that can do exactly this, that would be quite acceptable. Thanks in advance for the suggestions! Dave

    Read the article

  • Session Objects not Updating ASP.NET

    - by davemackey
    I set a session object at one juncture in my code: Session("my_name") = "Dave" Later in my code I give the user a chance to update this object: Session("my_name") = TextBox1.Text I reload my page and display a little hello statement like this: Label1.Text = "Hello" & CStr(Session("my_name")) The result is: "Hello Dave" no matter what I change Session("my_name") too.

    Read the article

  • excel change 4 rows / 48 col to 48 rows / 4 col

    - by GoodOlPete
    Hi, I've selected 4 database records of 48 fields into excel as below: FirstName LastName Age Address1 ....................... Andy smith 23 53 high st billy ball 43 23 the avenue charles brown 76 rose cottage dave green 43 station rd I want to display them as firstname andy billy charles dave lastname smith ball brown green age 23 43 76 43 address1.............................. Can anyone suggest how to do this?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >