Search Results

Search found 578 results on 24 pages for 'luke evans'.

Page 7/24 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How can I debug a PHP CLI script with xdebug?

    - by Laran Evans
    I haven't quite figured this out. EVERY piece of documentation I've found covers how to use xdebug to debug scripts running in Apache. I need to debug a php CLI script. So, for instance, how do I pass the XDEBUG_SESSION_START variable in to get xdebug to kick on? I'm specifically trying to debug a CakePHP shell. So if anyone has any additional insight into that I'd be very appreciative. Thanks.

    Read the article

  • Using DataTypeAttribute to validate a date

    - by Andy Evans
    I'm having some difficulty understanding how to validate a date (DOB) using MVC2. What I want to do is 1. Is the date entered a valid date and, 2. Is the date at lease 13 years in the past. For example, to validate an email I use the following code: [Required(ErrorMessage = "Email address is required.")] [StringLength(320, ErrorMessage = "Email must be less than 320 characters.")] [Email(ErrorMessage = "This email address is invalid.")] public string email { get; set; } To validate the email I use: public class EmailAttribute : RegularExpressionAttribute { public EmailAttribute() : base("insert long regex expression here") { } } Any assistance would be greatly appreciated, thanks!

    Read the article

  • SQL Server 2008 GUID column is all 0's

    - by Andy Evans
    I'm hoping this is a simple goof I did on my end ... I have a table in my database set up like so: column name: widget_guid data type: uniqueidentifier allow nulls: false default value: newid() identity: false row guid: true When records are created (via LINQ to SQL) that the values in this field are formatted as a GUID but contain all 0's My assumption was that when a new record was created, that a guid would be autogenerated for that column, much like an auto-incrementing row id. Is this not true? Any help would be greatly appreciated. Thanks.

    Read the article

  • How do I compile and build the taf2-curb Ruby gem on Windows XP with MinGW?

    - by Laran Evans
    How do I compile and build the taf2-curb Ruby gem on Windows XP with MinGW? I tried this, but I'm kinda fishing, unsuccessfully. C:\Documents and Settings\Megem install taf2-curb -- --with-curl-include=C:/curl-7.19.5-devel-mingw32/include --with-curl-dir=C:/curl-7.19.5 --with-curl-lib=C:/curl-7.19.5-devel-mingw32/lib --prefix=C:/MinGW --with-curllib Bulk updating Gem source index for: http://gems.rubyforge.org Updating metadata for 73 gems from http://gems.rubyonrails.org ......................................................................... complete Bulk updating Gem source index for: http://gems.github.com Building native extensions. This could take a while... ERROR: Error installing taf2-curb: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb install taf2-curb -- --with-curl-include=C:/curl-7.19.5-devel-mingw32/include --with-cur l-dir=C:/curl-7.19.5 --with-curl-lib=C:/curl-7.19.5-devel-mingw32/lib --prefix=C:/MinGW --with-curllib checking for curl-config... no checking for main() in true.lib... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --srcdir=. --curdir --ruby=C:/Ruby/bin/ruby --with-curl-dir --with-curl-include=${curl-dir}/include --with-curl-lib=${curl-dir}/lib --with-curllib extconf.rb:9: Can't find libcurl or curl/curl.h (RuntimeError) Try passing --with-curl-dir or --with-curl-lib and --with-curl-include options to extconf. Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/taf2-curb-0.4.8.0 for inspection. Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/taf2-curb-0.4.8.0/ext/gem_make.out C:\Documents and Settings\Me I've installed curl-7.19.5 and curl-7.19.5-devel-mingw from this url: http://curl.haxx.se/download.html Help! And thanks!

    Read the article

  • Security / Protecting code in JavaScript

    - by Evans
    With all the recent hype about JavaScript and HTML5 replacing Flash, I wanted to know - How would it be possible to protect client-side js code? Of course, it is possible to obfuscate it, but that would only make it a little harder. Also, for games which submit high scores to the server, wouldn't it be incredibly easy to modify those scores before they are sent to the server? I know even Flash files can be decompiled, but they can be obfuscated and flash decompilation is not as easy as modifying data in JS - could be done easily using a plugin such as Firebug. I'd like to know everyone's views on this.

    Read the article

  • Unit testing code which uses Umbraco v4 API

    - by Jason Evans
    I'm trying to write a suite of integration tests, where I have custom code which uses the Umbraco API. The Umbraco database lives in a SQL Server CE 4.0 database (*.sdf file) and I've managed to get that association working fine. My problem looks to be dependancies in the Umbraco code. For example, I would like to create a new user for my tests, so I try: var user = User.MakeNew("developer", "developer", "mypassword", "[email protected]", adminUserType); Now as you can see, I have pass a user type which is an object. I've tried two separate ways to create the user type, both of which fail due to a null object exception: var adminUserType = UserType.GetUserType(1); var adminUserType2 = new UserType(1); The problem is that in each case the UserType code calls it's Cache method which uses the HttpRuntime class, which naturally is null. My question is this: Can someone suggest a way of writing integration tests against Umbraco code? Will I have to end up using a mocking framework such as TypeMock or JustMock?

    Read the article

  • Expose C++ object to Javascript in Qt

    - by Evans
    Is there any way I can expose a C++ object/function to JavaScript running inside the QtWebKit browser in Qt? It's possible to expose ActionScript objects to JS code running inside the WebKit browser in Adobe AIR - I'm looking for similar functionality in Qt.

    Read the article

  • How To Update EF 4 Entity In ASP.NET MVC 3?

    - by Jason Evans
    Hi there. I have 2 projects - a class library containing an EDM Entity Framework model and a seperate ASP.NET MVC project. I'm having problems with how your suppose to edit and save changes to an entity using MVC. In my controller I have: public class UserController : Controller { public ActionResult Edit(int id) { var rep = new UserRepository(); var user = rep.GetById(id); return View(user); } [HttpPost] public ActionResult Edit(User user) { var rep = new UserRepository(); rep.Update(user); return View(user); } } My UserRepository has an Update method like this: public void Update(User user) { using (var context = new PDS_FMPEntities()) { context.Users.Attach(testUser); context.ObjectStateManager.ChangeObjectState(testUser, EntityState.Modified); context.SaveChanges(); } } Now, when I click 'Save' on the edit user page, the parameter user only contains two values populated: Id, and FirstName. I take it that is due to the fact that I'm only displaying those two properties in the view. My question is this, if I'm updating the user's firstname, and then want to save it, what am I suppose to do about the other User properties which were not shown on the view, since they now contain 0 or NULL values in the user object? I've been reading a lot about using stub entities, but I'm getting nowhere fast, in that none of the examples I've seen actually work. i.e. I keep getting EntityKey related exceptions. Can someone point me to a good tutorial/example of how to update EF 4 entities using a repository class, called by an MVC front-end? Cheers. Jas.

    Read the article

  • Using both RolesAllowed and Transactional in beans

    - by Laran Evans
    I have some beans which contain methods which are annotated with both @RolesAllowed and @Transactional. I have one Spring config file which utilizes a BeanNameAutoProxyCreator for Security related beans and another Spring config file which utilizes a BeanNameAutoProxyCreator for Transactional related beans. The problem is that some beans contain both security as well as transactional-related beans. So Spring creates proxies for one set of beans. It then tries to create proxies for the other set of beans. When it does, it tries to create proxies of the proxies and bombs out. Has anyone tried to configure both security and transactionality in the same beans via Spring? What's the trick? Thanks.

    Read the article

  • Delete System Files containing string

    - by Fuzz Evans
    I am trying to write a batch file that will examine a given directory, read each file for a given string "Example" and then delete any files that contain the string. The files are also System Files so I don't know what the exact extension is or if that matters (maybe you can just omit a file type filter and have it read all files?). Some of the files will be locked from reading as well so it needs to handle access denial errors if that occurs, not sure how batch files handle that.

    Read the article

  • ASP.NET URL Re-writing; Is this possible?

    - by James Evans
    My app is currently written to accept vendor and product information like this. http://www.mydomain.com/foo.aspx?v=1&p=100 could this be re-written like this? http://www.mydomain.com/1/100/foo Since the values in the original query string are database IDs, how would I express newly created IDs as segments of the "path" in the re-written version of the URL? My goal would be to create more of an automated solution that would accomplish this. EDIT: The app is written using ASP.NET webforms, .NET 4.0 and IIS 7

    Read the article

  • SQL 2008 GUID column is all 0's

    - by Andy Evans
    I'm hoping this is a simple goof I did on my end ... I have a table in my database set up like so: column name: widget_guid data type: uniqueidentifier allow nulls: false default value: newid() identity: false row guid: true When records are created (via LINQ to SQL) that the values in this field are formatted as a GUID but contain all 0's My assumption was that when a new record was created, that a guid would be autogenerated for that column, much like an auto-incrementing row id. Is this not true? Any help would be greatly appreciated. Thanks.

    Read the article

  • Rails form helpers: how to add an element to a collection?

    - by Laran Evans
    I have a keychain object. keychain has_many credentials. I'm trying to write the view code to add a new credential to a keychain. This is the code I have: <% form_for(@keychain) do |f| % <tr <td<%= f.select "credentials[]", current_account.services.collect{ |s| [s.friendly_name, s.id] } %</td <td<%= f.text_field 'credentials', :username %</td <td<%= f.password_field 'credentials', :password %</td </tr <% end % But it fails with this message: NoMethodError in Keychains#new Showing app/views/keychains/_keychain_form.html.erb where line #32 raised: undefined method `credentials[]' for # What am I doing wrong?

    Read the article

  • C# Express 2010 Multi-Threading

    - by Chris Evans
    Hi, I have a windows app that I have been running in c# Express 2008 for a year and have been trying to convert it over the last few days to 2010. The problem I am having is it is a multi-threaded application that has to run a series of code every second. What it does is have a main thread, that calls 3 worker threads, waits for them to finish then does some additional processing, sleeps till 1 second and runs again. The problem is part of the code can call a web service that takes 8 seconds to respond, so this bit of code gets called using ThreadPool.QueueUserWorkItem. The problem is when running in 2010 when this part of the code gets called the main thread continues to run but when it awakens the sub threads it hangs until the Threadpool method finishes running. This never happens in 2008. Any suggestions? So far I put that bit of code in it's own thread rather than using Threadpool but same issue.

    Read the article

  • Have Microsoft changed how ASP.NET MVC deals with duplicate action method names?

    - by Jason Evans
    I might be missing something here, but in ASP.NET MVC 4, I can't get the following to work. Given the following controller: public class HomeController : Controller { public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(string order1, string order2) { return null; } } and it's view: @{ ViewBag.Title = "Home"; } @using (Html.BeginForm()) { @Html.TextBox("order1")<br /> @Html.TextBox("order2") <input type="submit" value="Save"/> } When start the app, all I get is this: The current request for action 'Index' on controller type 'HomeController' is ambiguous between the following action methods: System.Web.Mvc.ActionResult Index() on type ViewData.Controllers.HomeController System.Web.Mvc.ActionResult Index(System.String, System.String) on type ViewData.Controllers.HomeController Now, in ASP.NET MVC 3 the above works fine, I just tried it, so what's changed in ASP.NET MVC 4 to break this? OK there could be a chance that I'm doing something silly here, and not noticing it. EDIT: I notice that in the MVC 4 app, the Global.asax.cs file did not contain this: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } which the MVC 3 app does, by default. So I added the above to the MVC 4 app but it fails with the same error. Note that the MVC 3 app does work fine with the above route. I'm passing the "order" data via the Request.Form. EDIT: In the file RouteConfig.cs I can see RegisterRoutes is executed, with the following default route: routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }); I still get the original error, regards ambiguity between which Index() method to call.

    Read the article

  • Downloading and Reading

    - by Jan Evans
    First I am a complete novice and need answers in plain and simple terms. I am trying to get the users manual for my Samsung galaxy s4 phone. Samsung "help" sent me a link to click but when I received it it was in Spanish tho the doc I'd said "english". The Samsung support line timed me out because I couldn't type fast enough when I told them I received it in Spanish. I explored the translator and didn't see how to translate a doc. Asked Google how to get the manual they gave a different doc I'd and sent it to clipboards. How can I read it? Now what? Tried to send this message and asking me for a tag and I have no idea what that means so I just clicked one. That's why I need the manual so desperately. It would be so much easier for me to get a paper copy of it but they want

    Read the article

  • Sort string array by analysing date details in those strings

    - by Jason Evans
    I have a requirement for the project I'm working on right now which is proving a bit tricky for me. Basically I have to sort an array of items based on the Text property of those items: Here are my items: var answers = [], answer1 = { Id: 1, Text: '3-4 weeks ago' }, answer2 = { Id: 2, Text: '1-2 weeks ago' }, answer3 = { Id: 3, Text: '7-8 weeks ago' }, answer4 = { Id: 4, Text: '5-6 weeks ago' }, answer5 = { Id: 5, Text: '1-2 days ago' }, answer6 = { Id: 6, Text: 'More than 1 month ago' }; answers.push(answer1); answers.push(answer2); answers.push(answer3); answers.push(answer4); answers.push(answer5); answers.push(answer6); I need to analyse the Text property of each item so that, after the sorting, the array looks like this: answers[0] = { Id: 6, Text: 'More than 1 month ago' } answers[1] = { Id: 3, Text: '7-8 weeks ago' } answers[2] = { Id: 4, Text: '5-6 weeks ago' } answers[3] = { Id: 1, Text: '3-4 weeks ago' } answers[4] = { Id: 2, Text: '1-2 weeks ago' } answers[5] = { Id: 5, Text: '1-2 days ago' } The logic is that, the furthest away the date, the more high priority it is, so it should appear first in the array. So "1-2 days" is less of a priority then "7-8 weeks". So the logic is that, I need to extract the number values, and then the units (e.g. days, weeks) and somehow sort the array based on those details. Quite honestly I'm finding it very difficult to come up with a solution, and I'd appreciate any help.

    Read the article

  • Disable local delivery in Sendmail

    - by Luke P M
    I am using Sendmail on a Centos server to send email for PHP scripts, but the problem is that mail is delivered to a local mailbox on the machine rather than what is specified in the MX records for the domain - which actually point to another machine I use for email. I would like sendmail to not try and locally deliver mail for the domain the machine is setup for, is there a simple way to disable local delivery? The domain is not in the local-host-names file. I've already done lots of googling and I have looked at: http://serverfault.com/questions/26934/sendmail-configuration-to-not-deliver-mail-to-local-machine http://serverfault.com/questions/65365/disable-local-delivery-in-sendmail But either there is no answer or it is not suitable. I don't want to relay to another server, i just want it to send mail regardless of domain. To provide an example: I have two servers, one is the mail server at mail.example.com and a web server which is example.com, when I use the smtp service on the web server it currently routes mail to a local mailbox on example.com, but it should be going to mailboxes on mail.example.com Output of sendmail -bt returns: ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter 3,0 [email protected] canonify input: info @ example . com Canonify2 input: info Canonify2 returns: info canonify returns: info parse input: info Parse0 input: info Parse0 returns: info ParseLocal input: info ParseLocal returns: info Parse1 input: info Parse1 returns: $# local $: info parse returns: $# local $: info

    Read the article

  • Hardware firewall vs VMWare firewall appliance

    - by Luke
    We have a debate in our office going on whether it's necessary to get a hardware firewall or set up a virtual one on our VMWare cluster. Our environment consists of 3 server nodes (16 cores w/ 64 GB RAM each) over 2x 1 GB switches w/ an iSCSI shared storage array. Assuming that we would be dedicating resources to the VMWare appliances, would we have any benefit of choosing a hardware firewall over a virtual one? If we choose to use a hardware firewall, how would a dedicated server firewall w/ something like ClearOS compare to a Cisco firewall?

    Read the article

  • Meaning of directories on Unix and Unix like systems

    - by Luke
    I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for or var? Where does the opt name come from? And while we're on the topic anyway. Can someone give a clear explanation of what directory is best used for what. I sometimes get confused where certain software is installed or what the most appropriate directory is to install software into.

    Read the article

  • IIS 7 Using Domain Account for Application pool identity Invalid Password

    - by Luke Van Diest
    I have an asp.net website containing a WCF service that I am developing on a Windows 7 machine hosted with IIS 7. I am needing to connect to an instance of Reporting Services 2005 with the service, and have been getting 401 errors when trying to execute reports. So, I assume that I need to be running the IIS Application pool under a domain account. The problem is that when I try to change the identity to a domain account, I get the error message "The specified password is invalid. Type a new password." I've rechecked the password multiple times to make sure it is correct. The account I'm using has admin rights on the machine. I saw elsewhere to try running this command: aspnet_regiis.exe -GA domain\username which I did but it didn't help. What else do I need to do?

    Read the article

  • Bind DHCP Server to Network Bridge

    - by Luke
    My wireless router died, so I decided to route everything through my server. So I installed a second NIC and a wireless card to be my new network: 1 NIC to the Modem, 1 NIC to the switch, and the Wireless to... Well, wireless. Anyways, I got far enough to get DHCP to work on just ONE adapter when I used Internet Connection Sharing (I couldn't get RRAS set up for the life of me), then I decided to try bridging the wireless and second NIC. Now, the DHCP server won't bind to the bridge, but I can enter manual IP's in my clients and it'll connect to the Internet. I also tried changing my wireless adapter's IP to 192.168.0.2, and to 192.168.1.1 to try to set up a separate scope, but to no avail. Running Windows Server 2003

    Read the article

  • Excel 2003 opening files on network

    - by Luke
    The network is laid out with an XP Pro computer as the server hosting files, then 3 XP computers connecting to it for filesharing, all on it's own router. One computer can open .xls files no problem, and she runs Office XP. The other two computers run Office 2003, and cannot open any shared files by double-clicking them, or by selecting File-Open in Excel. If the file gets copied to the local computer, it opens instantly. I have tried disabling the AV on all computers, disabling the Windows firewall, and doublechecking permissions on the server. I have also tried disabling DDE, but that doesn't help at all, just like Tools-Options-unticking Ignore other applications. Any ideas? This apparently started a couple days ago

    Read the article

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