Search Results

Search found 4252 results on 171 pages for 'david 85'.

Page 100/171 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Class for move, scale and rotate, of a uiimageview

    - by David
    Hi Everyone, I'm creating a subclass of UIImageView that detects touches, and will move, rotate and scale the image based on the touches. However, I really feel like I'm reinventing the wheel here, and it's driving me nuts. Shouldn't this already exist somewhere? Does anyone have any examples, or links to a class that is already doing this? Or if you have a class you've written, that'd be helpful too. Thanks a lot in advance.

    Read the article

  • [symfony] sfGuardDoctrine plugin and form messages

    - by David
    I'm using the sfGuardDoctrine plugin, and I would like to customize the form validation messages. How could I acomplish this? I can't find anything in the documentation. The only way I have found is to copy sfGuardValidatorUser.class into /apps/frontend/lib/validator, but I would like to know if there is some way to just override the error message, not override the entire validator...

    Read the article

  • php parse without replacing

    - by David
    i have seen some parsing code, thats really long, but it doesn't involve replacing stuff inside an opened file using file_get_contents() for example. im talking about say parsing a .doc into .html format, they read the file then output it in html. i have tried this using arrays and preg_replace but it just doesn't seem as clean as other code. anyone know the basic concept of parsing? thanks, tell me if im not clear

    Read the article

  • C# Joins/Where with Linq and Lambda

    - by David
    Hello, I'm having trouble with a query written in Linq and Lambda. So far, I'm getting allot of errors here's my code: int id = 1; var query = database.Posts.Join(database.Post_Metas, post => database.Posts.Where(x => x.ID == id), meta => database.Post_Metas.Where(x => x.Post_ID == id), (post, meta) => new { Post = post, Meta = meta }); I'm new to using Linq, so I'm not sure if this query is correct.

    Read the article

  • sorting advance datagrid columns in flex

    - by david
    Having four columns in advance datagrid like company,contact_person,product and date. In this, first i want to sort by product followed by company and followed by date. how can i do it in Advance datagrid. Anybody knows please reply me asap. Advance thanks to u.

    Read the article

  • Defining functions and if statement problems

    - by David Fairbairn
    I'm having a problem with two functions and an if statement. I'm being told the functions go and postcodeChange are not defined. I'm also being told flag is an unexpected identifier at if flag == 1. Any idea where I am going wrong? Thank you. function postcodeChange(){ document.getElementById("goButton").onclick = distanceCheck; } function distanceCheck(){ var distance = document.getElementById("distance").value var patt1=new RegExp("^[0-9]+(\.[0-9]{1})?$"); var out = patt1.exec(distance); if (out == null) { //distance is not a valid number document.getElementById("distanceFlag").value = 1 } else { //distance is valid number document.getElementById("distanceFlag").value = 0 } function go(){ var flag = document.getElementById("distanceFlag").value if flag == 1 { alert("Distance is not valid- enter a number with no more than one decimal point"); } else{ popSubmit('#fa Care Provider Search Go','','0'); } }

    Read the article

  • Add XSLT 2 schema to Visual Studio 2010 for intellisense

    - by David Merrilees
    I'd like to add the XSLT 2 schema to Visual Studio 2010 to provide intellisense. I've added the schema to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas (removing the XSLT 1 schema), but to no avail. The schema seems to have been parsed by Visual Studio, as I can hover my cursor over the namespace declaration in the stylesheet (xmlns:xsl="http://www.w3.org/1999/XSL/Transform") and see the comments from the new schema, however, intellisense still refers to the XSLT 1 implementation. For example the element has a warning that 'xsl:function is not yet available'. Do I need to register the schema in some way? Any suggestions welcome.

    Read the article

  • Screen capture doesn't work on MFC application in Vista

    - by David Thornley
    We've got some in-house applications built in MFC, with OpenGL drawing routines. They all use the same code to draw on the screen and either print the screen or save it to a JPEG file. Everything's been working fine in Windows XP, and I need to find a way to make them work on Vista. In three of our applications, everything works. In the remaining one, I can get the window border, title bar, menus, and task bar, but the interior never shows up. As I said, these applications use the exact same code to write to the screen and capture the window image, and the only difference I see that looks like it might be relevant is that the problem application uses the MFC multiple document interface, while the ones that work use the single document interface. Either the answer isn't on the net, or I'm worse at Googling than I thought. I asked on the MSDN forums, and the only practical suggestion I got was to use GDI+ rather than GDI, and that did nothing different. I have tried different things with every part of the code that captures and prints or save, given a pointer to the window, so apparently it's a matter of the window itself. I haven't rebuilt the offending application using SDI yet, and I really don't have any other ideas. Has anybody seen anything like this?

    Read the article

  • Is there a way to synchronize sections of different Word documents? Alternatives?

    - by David Hodgson
    Hi, I'm working on how my company does documentation (especially programming documentation). I'd like to be able to synchronize sections of different Word documents, such that if a section in one document changes, the change is reflected in the other document, and vice versa. Is there a way to do this with Word, and if not, is there some word processing program that is good at this?

    Read the article

  • Multiple WCF windows services on the same box - endpoint configuration

    - by David Belanger
    Hi, I have 2 windows services installed on a machine with different service names, they install and start fine. What's happening is that they're both listening to the same endpoints and thus competing for messages. I've tried to change the baseAddress to be different for both services without success. Here's my service host config: <configuration> <appSettings> <add key="ServiceName" value="Service - Service Host 1"/> </appSettings> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="NoSecurityBinding"> <security mode="None"> <message establishSecurityContext="false"/> <transport clientCredentialType="None"/> </security> </binding> </wsHttpBinding> <basicHttpBinding> <binding name="NoSecurityBinding"> <security mode="None"> <transport clientCredentialType="None"/> </security> </binding> </basicHttpBinding> </bindings> <services> <service name="Lib.Interface.Service" behaviorConfiguration="Lib.Interface.ServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://localhost:8000/Service"/> </baseAddresses> </host> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NoSecurityBinding" contract="Lib.Interface.IService"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Lib.Interface.ServiceBehavior"> <serviceMetadata httpGetEnabled="True" policyVersion="Policy12"/> <serviceDebug includeExceptionDetailInFaults="False"/> </behavior> </serviceBehaviors> </behaviors> Any idea how I could set up the services (other than unique service names) so they're not conflicting with one another? Thanks.

    Read the article

  • Kohanav3 ORM: calling where->find_all twice

    - by David Lawson
    When I do something like the following: $site = ORM::factory('site')->where('name', '=', 'Test Site')->find(); $users = $site->users; $deletedusers = $users->where('deleted', '=', '1')->find_all(); $nondeletedusers = $users->where('deleted', '=', '0')->find_all(); The contents of $deletedusers is correct, but the $nondeletedusers contains every non-deleted user, not just the ones in the loaded $site. What am I doing wrong?

    Read the article

  • Good portfolio projects

    - by David
    Hi, I am a recent graduate and am looking to start a career in web development. Its kind of a catch 22 at the moment as I have a fair bit of programming experience from university but not really in web development and to get a job in web development a portfolio is typically required. So, I am looking to start a building a few application in order to have something to show potential employers. Im more into the backend stuff although am just as comfortable with front end development. Does anyone have any thoughts on some potential projects that would be both relatively quick (as i need to get a job soon!) to build but show off enough programming knowlege / skills to be impressive to employers. At the moment i am also learning to use the zend framework and I would hope to find work using such a framework (mvc). My initial thoughts would be things like a webmail app or maybe a custom CMS. Any ideas would be greatley appreciated.

    Read the article

  • trying to use ActiveRecord with Sinatra, Migration fails question

    - by David Lazar
    Hi, running Sinatra 1.0, I wanted to add a database table to my program. In my Rakefile I have a task task :environment do ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.yml'))["development"]) end I have a migration task in my namespace that calls the migration code: namespace :related_products do desc "run any migrations we may have in db/migrate" task :migrate => :environment do ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil ) end My console pukes out an error when the call to ActiveRecord::MIgrator.migrate() is made. rake aborted! undefined method `info' for nil:NilClass The migration code itself is pretty simple... and presents me with no clues as to what this missing info class is. class CreateStores < ActiveRecord::Migration def self.up create_table :stores do |t| t.string :name t.string :access_url t.timestamps end end def self.down drop_table :stores end end I am a little mystified here and am looking for some clues as to what might be wrong. Thanks!

    Read the article

  • Code-Golf: Friendly Number Abbreviator

    - by David Murdoch
    Based on this question: Is there a way to round numbers into a friendly format? THE CHALLENGE - UPDATED! (removed hundreds abbreviation from spec) The shortest code by character count that will abbreviate an integer (no decimals). Code should include the full program. Relevant range is from 0 - 9,223,372,036,854,775,807 (the upper limit for signed 64 bit integer). The number of decimal places for abbreviation will be positive. You will not need to calculate the following: 920535 abbreviated -1 place (which would be something like 0.920535M). Numbers in the tens and hundreds place (0-999) should never be abbreviated (the abbreviation for the number 57 to 1+ decimal places is 5.7dk - it is unneccessary and not friendly). Remember to round half away from zero (23.5 gets rounded to 24). Banker's rounding is verboten. Here are the relevant number abbreviations: h = hundred (102) k = thousand (103) M = million (106) G = billion (109) T = trillion (1012) P = quadrillion (1015) E = quintillion (1018) SAMPLE INPUTS/OUTPUTS (inputs can be passed as separate arguments): First argument will be the integer to abbreviate. The second is the number of decimal places. 12 1 => 12 // tens and hundreds places are never rounded 1500 2 => 1.5k 1500 0 => 2k // look, ma! I round UP at .5 0 2 => 0 1234 0 => 1k 34567 2 => 34.57k 918395 1 => 918.4k 2134124 2 => 2.13M 47475782130 2 => 47.48G 9223372036854775807 3 => 9.223E // ect... . . . Original answer from related question (javascript, does not follow spec): function abbrNum(number, decPlaces) { // 2 decimal places => 100, 3 => 1000, etc decPlaces = Math.pow(10,decPlaces); // Enumerate number abbreviations var abbrev = [ "k", "m", "b", "t" ]; // Go through the array backwards, so we do the largest first for (var i=abbrev.length-1; i>=0; i--) { // Convert array index to "1000", "1000000", etc var size = Math.pow(10,(i+1)*3); // If the number is bigger or equal do the abbreviation if(size <= number) { // Here, we multiply by decPlaces, round, and then divide by decPlaces. // This gives us nice rounding to a particular decimal place. number = Math.round(number*decPlaces/size)/decPlaces; // Add the letter for the abbreviation number += abbrev[i]; // We are done... stop break; } } return number; }

    Read the article

  • Using c# System.DateTime like c++ time_t

    - by David Boland
    In C++ I am able to get the current time when my application starts I can use time_t appStartTime = time(null); then to find the difference in seconds from when it started I can just do the same thing, then find the difference. It looks like I should be using "System.DateTime" in C# net, but the MSDN is confusing in its explanation. How can I use System.DateTime to find the difference in time (in seconds) between when my application starts, and the current time?

    Read the article

  • C++/msvc6 application crashes due to heap corruption, any hints?

    - by David Alfonso
    Hello all, let me say first that I'm writing this question after months of trying to find out the root of a crash happening in our application. I'll try to detail as much as possible what I've already found out about it. About the application It runs on Windows XP Professional SP2. It's built with Microsoft Visual C++ 6.0 with Service Pack 6. It's MFC based. It uses several external dlls (e.g. Xerces, ZLib or ACE). It has high performance requirements. It does a lot of network and hard disk I/O, but it's also cpu intensive. It has an exception handling mechanism which generates a minidump when an unhandled exception occurs. Facts about the crash It only happens on multiprocessor/multicore machines and under heavy loads of work. It happens at random (neither we nor our client have found a pattern yet). We cannot reproduce the crash on our testing lab. It only happens on some production systems (but always in multicore machines) It always ends up crashing at the same point, although the complete stack is not always the same. Let me add the stack of the crashing thread (obtained using WinDbg, sorry we don't have symbols) ChildEBP RetAddr Args to Child WARNING: Stack unwind information not available. Following frames may be wrong. 030af6c8 7c9206eb 77bfc3c9 01a80000 00224bc3 MyApplication+0x2a85b9 030af960 7c91e9c0 7c92901b 00000ab4 00000000 ntdll!RtlAllocateHeap+0xeac (FPO: [Non-Fpo]) 030af98c 7c9205c8 00000001 00000000 00000000 ntdll!ZwWaitForSingleObject+0xc (FPO: [3,0,0]) 030af9c0 7c920551 01a80898 7c92056d 313adfb0 ntdll!RtlpFreeToHeapLookaside+0x22 (FPO: [2,0,4]) 030afa8c 4ba3ae96 000307da 00130005 00040012 ntdll!RtlFreeHeap+0x1e9 (FPO: [Non-Fpo]) 030afacc 77bfc2e3 0214e384 3087c8d8 02151030 0x4ba3ae96 030afb00 7c91e306 7c80bfc1 00000948 00000001 msvcrt!free+0xc8 (FPO: [Non-Fpo]) 030afb20 0042965b 030afcc0 0214d780 02151218 ntdll!ZwReleaseSemaphore+0xc (FPO: [3,0,0]) 030afb7c 7c9206eb 02e6c471 02ea0000 00000008 MyApplication+0x2965b 030afe60 7c9205c8 02151248 030aff38 7c920551 ntdll!RtlAllocateHeap+0xeac (FPO: [Non-Fpo]) 030afe74 7c92056d 0210bfb8 02151250 02151250 ntdll!RtlpFreeToHeapLookaside+0x22 (FPO: [2,0,4]) 030aff38 77bfc2de 01a80000 00000000 77bfc2e3 ntdll!RtlFreeHeap+0x647 (FPO: [Non-Fpo]) 7c92056d c5ffffff ce7c94be ff7c94be 00ffffff msvcrt!free+0xc3 (FPO: [Non-Fpo]) 7c920575 ff7c94be 00ffffff 12000000 907c94be 0xc5ffffff 7c920579 00ffffff 12000000 907c94be 90909090 0xff7c94be *** WARNING: Unable to verify checksum for xerces-c_2_7.dll *** ERROR: Symbol file could not be found. Defaulted to export symbols for xerces-c_2_7.dll - 7c92057d 12000000 907c94be 90909090 8b55ff8b MyApplication+0xbfffff 7c920581 907c94be 90909090 8b55ff8b 08458bec xerces_c_2_7 7c920585 90909090 8b55ff8b 08458bec 04408b66 0x907c94be 7c920589 8b55ff8b 08458bec 04408b66 0004c25d 0x90909090 7c92058d 08458bec 04408b66 0004c25d 90909090 0x8b55ff8b The address MyApplication+0x2a85b9 corresponds to a call to erase() of a std::list. What I have tried so far Reviewing all the code related to the point where the crash ends happening. Trying to enable pageheap on our testing lab though nothing useful has been found by now. We have substituted the std::list for a C array and then it crashes in other part of the code (although it is related code, it's not in the code where the old list resided). Coincidentally, now it crashes in another erase, though this time of a std::multiset. Let me copy the stack contained in the dump: ntdll.dll!_RtlpCoalesceFreeBlocks@16() + 0x124e bytes ntdll.dll!_RtlFreeHeap@12() + 0x91f bytes msvcrt.dll!_free() + 0xc3 bytes MyApplication.exe!006a4fda() [Frames below may be incorrect and/or missing, no symbols loaded for MyApplication.exe] MyApplication.exe!0069f305() ntdll.dll!_NtFreeVirtualMemory@16() + 0xc bytes ntdll.dll!_RtlpSecMemFreeVirtualMemory@16() + 0x1b bytes ntdll.dll!_ZwWaitForSingleObject@12() + 0xc bytes ntdll.dll!_RtlpFreeToHeapLookaside@8() + 0x26 bytes ntdll.dll!_RtlFreeHeap@12() + 0x114 bytes msvcrt.dll!_free() + 0xc3 bytes c5ffffff() Possible solutions (that I'm aware of) which cannot be applied "Migrate the application to a newer compiler": We are working on this but It's not a solution at the moment. "Enable pageheap (normal or full)": We can't enable pageheap on production machines as this affects performance heavily. I think that's all I remember now, if I have forgotten something I'll add it asap. If you can give me some hint or propose some possible solution, don't hesitate to answer! Thank you in advance for your time and advice.

    Read the article

  • Event handling for keyboard strokes

    - by david
    Hey, I'm trying to get familiar with the whole keyboard event detection thing. Here's my sample code. <fx:Script> <![CDATA[ import flash.events.KeyboardEvent; import mx.controls.Alert; private function init():void{ addEventListener(KeyboardEvent.KEY_DOWN,reportKeyDown); } private function reportKeyDown(event:KeyboardEvent):void { Alert.show("a key was pressed"); } ]]> </fx:Script> As you can see, I'm at stage 0 of playing around with it, but it won't work. Anyone has any idea what I should be doing instead? Thanks

    Read the article

  • ASP.NET MVC WAP, SharePoint Designer and SVN

    - by David Lively
    All, I'm starting a new ASP.NET MVC project which requires some content management capabilities. The people who will be managing the content prefer to use SharePoint Designer (successor to FrontPage) to modify content. I'd like to allow them to keep doing that. The issues are: Since I'd like this to be a WAP, not a website project, how can I allow them to see their changes in action without requiring them to have Visual Studio on their local machines? Can I specify a "default" action for a controller so that given a url like /products/new_view_here Can I let them save pages (views) and see them in the browser without having to go through the check-in/build/deploy process? I'd like their changes to be stored in SVN; SharePoint designer seems to only support Visual SourceSafe (ugh) directly. The ideas I've come up with so far are Write an HTTP handler that implements the FrontPage Server Extensions protocol. This sounds time consuming, but I haven't yet looked at the protocol spec. However, it would allow me to perform whatever operations I want on the server side, including checking files into SVN. Ditch the WAP in favor of a website project. I do not like having the source present on the server, however. Also, will MVC work in a website project? Surely someone has tackled this problem before?

    Read the article

  • Beginner having a problem with classes

    - by David
    I'm working through O'Reilly's "Learning Python" and having a problem with classes. I think I understand the concept, but in practice have stumbled upon this problem. Fron page 88-89: >>> class Worker: def __innit__(self, name, pay): self.name=name self.pay=pay def lastName(self): return self.name.split()[-1] def giveRaise(self, percent): self.pay*=(1.0+percent) Then the book says "Calling the class like a function generates instances of a new type ...etc" and gives this example. bob = Worker('Bob Smith', 50000) This gives me this error: TypeError: this constructor takes no arguments. And then I start muttering profanities. So what am I doing wrong here? Thanks for the help.

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >