Search Results

Search found 11897 results on 476 pages for 'dean rather'.

Page 9/476 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Why use Nusoap rather than PHP SOAP ? Any benifits ?

    - by WarDoGG
    As far as i have scourged the web, i can see an abundance of articles on how to setup Nusoap and use it to setup a soap server/client in PHP. However, none of them seem to point to any advantages of using it than PHP's own native SOAP library. Can anyone tell me what are the pros/cons between : Nusoap PHP SOAP PEAR::SOAP Zend SOAP

    Read the article

  • When should I stub out a type by manually creating a "stub" version, rather than using a mocking fra

    - by Ben Aston
    Are there any circumstances where it is favourable to manually create a stub type, as opposed to using a mocking framework (such as Rhino Mocks) at the point of test. We take both these approaches in our projects. My gut feel when I look at the long list of stub versions of objects is that it will add maintenance overhead, and moves the implementation of the stub away from the point of test.

    Read the article

  • How much more complex is it to draw simple curves, lines and circles in OpenGL ES rather than in Qua

    - by mystify
    Is OpenGL ES really so much faster? Why? And is it really so horrible complicated to draw such simple things in OpenGL ES compared to drawing these in Quartz 2D? For example, I have a UIView subclass with -drawRect: implemented, where I draw some lines, curves and circles. Just simple paths, with some shadow. What would I do in OpenGL ES? Isn't there this nice EAGLView layer thing? One thing that comes to mind is how do touch events go into OpenGL ES? Maybe that's the complex thing about it? Are there tutorials on basic drawing operations in OpenGL ES?

    Read the article

  • Can I specify the files to commit in subversion in a file rather than on the command line?

    - by René Nyffenegger
    I have renamed (with svn move) a lot of files in a subversion project. Now, I am trying to commit these on Window's cmd.exe. It seems that I hit a limit (probably by cmd.exe) in that the number of files is too long for the command line to swallow. Now, I thought and hoped that I could list the files to commit in a seperate file that I could specify with the commit command (something like svn ci --files-to-commit=renamed-files.txt -m "Renamed a lot of files" Yet, either such an option does not exist or I am unable to find this. Unfortunately, I cannot do a svn ci . as I have done other changes in the project as well. Neither can I do a svn ci *pattern-of-renamed-files* since this would only check in the added files, not the deleted ones. Before I start checking in the files with smaller chunks of files to check in (and thus increase the revision number uneccesserily without giving a hint as to the 'atomicity' of the operation) I thought I ask if this is indeed impossible to do.

    Read the article

  • Should I commit WEB-INF into version control, or rather construct it with ant?

    - by webwesen
    ant "war" task does just that - creates WEB-INF along with META-INF, depending on task attributes. what is considered a best practice? keeping all my libs elsewhere for re-use, like log4j and then build them with "war" task or have everything (including jars) checked-in under WEB-INF? I have multiple apps that could re-use same libs, images, htmls, etc. Our developers use RAD7/Eclipse. I'd appreciate any examples with opensource Java Web Apps repo layouts. thanks!

    Read the article

  • Why might the Large Object Heap grow rather than throw an exception?

    - by Unsliced
    In a previous question I asked possible programatic ways of maximising the largest block allocatable on the LOH. I'm still seeing the problems, but now I'm trying to get my head around why the LOH seems to grow and shrink in size, yet I'm still seeing OutOfMemoryExceptions that tally with what others have reported as being due to LOH fragmentation. Why might one call to, for example, StringBuilder.EnsureCapacity throw an OutOfMemoryException for me, but another call from somewhere else result in the LOH expanding in size (according to the performance counters, it is growing and shrinking)?

    Read the article

  • Animation issue caused by C# parameters passed by reference rather than value, but where?

    - by Jordan Roher
    I'm having trouble with sprite animation in XNA that appears to be caused by a struct passed as a reference value. But I'm not using the ref keyword anywhere. I am, admittedly, a C# noob, so there may be some shallow bonehead error in here, but I can't see it. I'm creating 10 ants or bees and animating them as they move across the screen. I have an array of animation structs, and each time I create an ant or bee, I send it the animation array value it requires (just [0] or [1] at this time). Deep inside the animation struct is a timer that is used to change frames. The ant/bee class stores the animation struct as a private variable. What I'm seeing is that each ant or bee uses the same animation struct, the one I thought I was passing in and copying by value. So during Update(), when I advance the animation timer for each ant/bee, the next ant/bee has its animation timer advanced by that small amount. If there's 1 ant on screen, it animates properly. 2 ants, it runs twice as fast, and so on. Obviously, not what I want. Here's an abridged version of the code. How is BerryPicking's ActorAnimationGroupData[] getting shared between the BerryCreatures? class BerryPicking { private ActorAnimationGroupData[] animations; private BerryCreature[] creatures; private Dictionary<string, Texture2D> creatureTextures; private const int maxCreatures = 5; public BerryPickingExample() { this.creatures = new BerryCreature[maxCreatures]; this.creatureTextures = new Dictionary<string, Texture2D>(); } public void LoadContent() { // Returns data from an XML file Reader reader = new Reader(); animations = reader.LoadAnimations(); CreateCreatures(); } // This is called from another function I'm not including because it's not relevant to the problem. // In it, I remove any creature that passes outside the viewport by setting its creatures[] spot to null. // Hence the if(creatures[i] == null) test is used to recreate "dead" creatures. Inelegant, I know. private void CreateCreatures() { for (int i = 0; i < creatures.Length; i++) { if (creatures[i] == null) { // In reality, the name selection is randomized creatures[i] = new BerryCreature("ant"); // Load content and texture (which I create elsewhere) creatures[i].LoadContent( FindAnimation(creatures[i].Name), creatureTextures[creatures[i].Name]); } } } private ActorAnimationGroupData FindAnimation(string animationName) { int yourAnimation = -1; for (int i = 0; i < animations.Length; i++) { if (animations[i].name == animationName) { yourAnimation = i; break; } } return animations[yourAnimation]; } public void Update(GameTime gameTime) { for (int i = 0; i < creatures.Length; i++) { creatures[i].Update(gameTime); } } } class Reader { public ActorAnimationGroupData[] LoadAnimations() { ActorAnimationGroupData[] animationGroup; XmlReader file = new XmlTextReader(filename); // Do loading... // Then later file.Close(); return animationGroup; } } class BerryCreature { private ActorAnimation animation; private string name; public BerryCreature(string name) { this.name = name; } public void LoadContent(ActorAnimationGroupData animationData, Texture2D sprite) { animation = new ActorAnimation(animationData); animation.LoadContent(sprite); } public void Update(GameTime gameTime) { animation.Update(gameTime); } } class ActorAnimation { private ActorAnimationGroupData animation; public ActorAnimation(ActorAnimationGroupData animation) { this.animation = animation; } public void LoadContent(Texture2D sprite) { this.sprite = sprite; } public void Update(GameTime gameTime) { animation.Update(gameTime); } } struct ActorAnimationGroupData { // There are lots of other members of this struct, but the timer is the only one I'm worried about. // TimerData is another struct private TimerData timer; public ActorAnimationGroupData() { timer = new TimerData(2); } public void Update(GameTime gameTime) { timer.Update(gameTime); } } struct TimerData { public float currentTime; public float maxTime; public TimerData(float maxTime) { this.currentTime = 0; this.maxTime = maxTime; } public void Update(GameTime gameTime) { currentTime += (float)gameTime.ElapsedGameTime.TotalSeconds; if (currentTime >= maxTime) { currentTime = maxTime; } } }

    Read the article

  • Want to show <embed> and <object> tags from YUI editor as a text rather then a video.

    - by user208678
    I am using YUI rich text editor on my website (php/mysql), so that a user may enter textual matter/articles through it. But if a user copies and paste some embed code in the textarea, from any video sites like youtube, it should get saved as a text block and not as a playing video when showing the text content on the browser. Now YUI automatically converts the characters into html entities which ever is needed. Please note that if I put a new line in the yui editor (by pressing "Enter" key), it will be converted into a "<br>" tag in the background and this will not get html entity encoded when passing the value to my backend PHP script. But If I copy and paste any embed tag or for that reason any valid html tags in the textarea, it will be html entity encoded by YUI. Now to support UTF-8 characters, I am using a function (DBVarConv) in my php script before saving it into my database. The code for the function is given below function DBVarConv($var,$isEncoded = false) { if($isEncoded) return addslashes(htmlentities($var, ENT_QUOTES, 'UTF-8', false)); else return htmlentities ($var, ENT_QUOTES, 'UTF-8', false); } $myeditorData = DBVarConv($myeditorData, true); // Save $myeditorData in database. While showing the data in the browser, I am using another function called "smart_html_entity_decode". The code is given below. function smart_html_entity_decode($text, $isAddslashesUsed = false) { if($isAddslashesUsed) $tmp = stripslashes(html_entity_decode($text, ENT_QUOTES, 'UTF-8')); else $tmp = html_entity_decode($text, ENT_QUOTES, 'UTF-8'); if ($tmp == $text) return $tmp; return smart_html_entity_decode($tmp, $isAddslashesUsed); } // Get $myData from database $myData=smart_html_entity_decode($myData, true); echo $myData; The problem is that in doing so, it is also decoding the embed and object tags from their html encoded entities and as a result my obejct tags are shown as a video and not as a simple text. Try using the text editor at tumblr.com. If you paste an embed code in the editor, it will be shown as a text block not as a video. I am trying to build the same functionality on my website with UTF-8 support. Any help will be highly appreciated.

    Read the article

  • iPhone SDK:How do you play video inside a view? Rather than fullscreen.

    - by Jessica
    Hi, I am trying to play video inside a UIView, so my first step was to add a class for that view and start playing a movie in it using this code: - (IBAction)movie:(id)sender{ NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; theMovie.scalingMode = MPMovieScalingModeAspectFill; [theMovie play]; } But this just crashes the app when using this method inside it's own class, but is fine elsewhere. Does anyone know how to play video inside a view? and avoid it being full screen?

    Read the article

  • How can I get jQuery to perform a synchronous, rather than asynchronous, AJAX request?

    - by Artem Tikhomirov
    Hello. I have a javascript widget witch provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created. I've added an AJAX call into this function using jQuery: beforecreate: function(node,targetNode,type,to) { jQuery.get('http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value), function(result) { if(result.isOk == false) alert(result.message); }); } But I want to prevent my widget from creating the item, so I should return false in the mother-function, not in the callback. Is there any way to perform a synchronized AJAX request using jQuery or any other API? Thanks.

    Read the article

  • Is it possible to do A/B testing by page rather than by individual?

    - by mojones
    Lets say I have a simple ecommerce site that sells 100 different t-shirt designs. I want to do some a/b testing to optimise my sales. Let's say I want to test two different "buy" buttons. Normally, I would use AB testing to randomly assign each visitor to see button A or button B (and try to ensure that that the user experience is consistent by storing that assignment in session, cookies etc). Would it be possible to take a different approach and instead, randomly assign each of my 100 designs to use button A or B, and measure the conversion rate as (number of sales of design n) / (pageviews of design n) This approach would seem to have some advantages; I would not have to worry about keeping the user experience consistent - a given page (e.g. www.example.com/viewdesign?id=6) would always return the same html. If I were to test different prices, it would be far less distressing to the user to see different prices for different designs than different prices for the same design on different computers. I also wonder whether it might be better for SEO - my suspicion is that Google would "prefer" that it always sees the same html when crawling a page. Obviously this approach would only be suitable for a limited number of sites; I was just wondering if anyone has tried it?

    Read the article

  • How to make msbuild ItemGroup items be separated with a space rather than semi-colon?

    - by mark
    Dear ladies and sirs. Observe the following piece of an msbuild script: <ItemGroup> <R Include="-Microsoft.Design#CA1000" /> <R Include="-Microsoft.Design#CA1002" /> </ItemGroup> I want to convert it to /ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002 Now, the best I came up with is @(R -> '/ruleid:%(Identity)'), but this only yields /ruleid:-Microsoft.Design#CA1000;/ruleid:-Microsoft.Design#CA1002 Note the semi-colon separating the two rules, instead of a space. This is bad, it is not recognized by the fxcop - I need a space there. Now, this is a simple example, so I could just declare something like this: <PropertyGroup> <R>/ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002</R </PropertyGroup> But, I do not like this, because in reality I have many rules I wish to disable and listing all of them like this is something I wish to avoid.

    Read the article

  • Isn't it better to create the subview hierarchy in -viewDidLoad rather than in -loadView?

    - by dontWatchMyProfile
    The docs say that the whole subview hierarchy can be created in -loadView. But there's also this -viewDidLoad method which sounds nice to ovewrite for actually building the hierarchy, when the view loaded. I guess it's a matter of taste only. But maybe doing so in -viewDidLoad hast the advantage that the view controller already adjusted the frame of the view correctly to accomodate for the status bar or any other kind of bar like tab bar or tool bar?

    Read the article

  • Possible to distribute an MPI (C++) program accross the internet rather than within a LAN cluster?

    - by Ben
    Hi there, I've written some MPI code which works flawlessly on large clusters. Each node in the cluster has the same cpu architecture and has access to a networked (i.e. 'common') file system (so that each node can excecute the actual binary). But consider this scenario: I have a machine in my office with a dual core processor (intel). I have a machine at home with a dual core processor (amd). Both machines run linux, and both machines can successfully compile and run the MPI code locally (i.e. using 2 cores). Now, is it possible to link the two machines together via MPI, so that I can utilise all 4 cores, bearing in mind the different architectures, and bearing in mind the fact that there are no shared (networked) filesystems? If so, how? Thanks, Ben.

    Read the article

  • Is there any benefit to my rather quirky character sizing convention?

    - by Paul Alan Taylor
    I love things that are a power of 2. I celebrated my 32nd birthday knowing it was the last time in 32 years I'd be able to claim that my age was a power of 2. I'm obsessed. It's like being some Z-list Batman villain, except without the colourful adventures and a face full of batarangs. I ensure that all my enum values are powers of 2, if only for future bitwise operations, and I'm reasonably assured that there is some purpose (even if latent) for doing it. Where I'm less sure, is in how I define the lengths of database fields. Again, I can't help it. Everything ends up being a power of 2. CREATE TABLE Person ( PersonID int IDENTITY PRIMARY KEY ,Firstname varchar(64) ,Surname varchar(128) ) Can any SQL super-boffins who know about the internals of how stuff is stored and retrieved tell me whether there is any benefit to my inexplicable obsession? Is it more efficient to size character fields this way? Can anyone pop in with an "actually, what you're doing works because ....."? I suspect I'm just getting crazier in my older age, but it'd be nice to know that there is some method to my madness.

    Read the article

  • Rather than sending in numbers, having code passed to an individual in genetic programming? ECJ

    - by sieve411
    I'm using ECJ with Java. I have an army of individuals who I all want to have the same brain. Basically, I'd like to evolve the brains using GP. I want things like "if-on-enemy-territory" and "if-sense-target" for if statements and "go-home" or "move-randomly" or "shoot" for terminals. However, these statements need to be full executable Java code. How can I do this with ECJ?

    Read the article

  • In Bloomberg API how do you specify to get FX forwards as a spread rather than absolute values?

    - by Nick Fortescue
    How do you explicitly request fx forwards as outrights using the bloomberg API? In the Bloomberg terminal you can choose whether to get FX Forwards as absolute rates (outrights) or as offsets from Spots (Points) by doing XDF, hitting 7, then the option is about half way down. 0 means outrights, and 1 means offfsets. With most defaults you can explicitly set them in the API, so your code gives the same result whichever computer you run on. How do you set this one in a V3 API query?

    Read the article

  • How can I find out how many rows of a matrix satisfy a rather complicated criterion (in R)?

    - by Brani
    As an example, here is a way to get a matrix of all possible outcomes of rolling 4 (fair) dice. z <- as.matrix(expand.grid(c(1:6),c(1:6),c(1:6),c(1:6))) As you may already have understood, I'm trying to work out a question that was closed, though, in my opinion, it's a challenging one. I used counting techniques to solve it (I mean by hand) and I finaly arrived to a number of outcomes, with a sum of subset being 5, equal to 1083 out of 1296. That result is consistent with the answers provided to that question, before it was closed. I was wondering how could that subset of outcomes (say z1, where dim(z1) = [1083,4] ) be generated using R. Do you have any ideas? Thank you.

    Read the article

  • Is it reasonable to start using Google Maps for Flash rather than Javascript version?

    - by Vafello
    I am planning to build a web application highly based on Google Maps API. I am considering either using the Javascript version, or the Flash version. I would like to create an interface which will be quite rich. Should I go for JS version of the API or Flash one? Also I do not plan to purchase the Flash, so ideally I would like to use some free Flex SDK that supports ActionScript. What would you recommend? Is it more reasonable to use JS or maybe better use the Flash Version. What are the limitations, pros and cons?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >