Search Results

Search found 1849 results on 74 pages for 'steve temple'.

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

  • Is C# WebAPI worth it? Can I use standart MVC4 to create my API?

    - by Steve
    I need to build a massive API and I'm trying out WebAPI instead of default MVC4 projects and it seems that it just makes things more difficult. Can have only 4 methods in controller Get, Post, Put, Delete, if I want more I need to modify route for that particular method FluentValidation won't work with WebAPI so I need to use DataAnnotations which I really don't want to. Can't use dynamic return data-types My question is: Would it really be that bad if I would use MVC4 project and use default ActionResults that return Json? What are real advantages of using WebAPI, why did they even made them in the first place if you can easily convert your project to API?

    Read the article

  • PDF Viewer Showing Last Page...

    - by steve
    I have a asp.net app that writes a pdf to file. Then, later that file is opened into a window (standard acrobat reader) for viewing. No problems there. The weird part... The entire document loads as it should, but the Reader initially shows the last page in the document on the screen. The user must then scroll up to the first page. It doesn't happen all the time (about 50%) and occurs across several test computers. Is there a switch in the code I'm suppose to use in creating the file or displaying the file to tell the reader to "start displaying the document on the first page?" Environment particulars: asp.net 3.5 vb, websupergoo's abcpdf.net pro 7 (assembly that creates the pdf file), Windows 2008 Server, IIS7 Thanks

    Read the article

  • GWT application not displaying data on Windows 7 Starter Edition

    - by Steve Buikhuizen
    I have a GWT application that works great on all platforms/browsers etc. Then we tried Windows 7 Starter Edition. For all browsers (Chrome, IE, Firefox) none of the dynamically displayed data appears in the application. We know that the machine is ok because Google Wave works fine and its also a GWT application. I'm at a loss. What could cause this to happen? I'd be grateful if you have a suggestion as to how to debug this. If so find the solution I'll post it.

    Read the article

  • Sanitising user input using Python

    - by Steve
    What's the best way to sanitise user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to ensure that an XSS or SQL injection attack isn't possible?

    Read the article

  • Silverlight Watermarked AutoComplete Box

    - by Steve Brouillard
    Can someone direct me to an example or explanation that will help me either: Extend the SilverLight AutoComplete Box to allow watermarks. Extend the Watermark TextBox to allow AutoComplete functionality. It strikes me that option 1 would be easiest, but I'm open. Thanks in advance.

    Read the article

  • Is there a way to undo Mocha stubbing of any_instance?

    - by Steve Weet
    Within my controller specs I am stubbing out valid? for some routing tests, (based on Ryan Bates nifty_scaffold) as follows :- it "create action should render new template when model is invalid" do Company.any_instance.stubs(:valid?).returns(false) post :create response.should render_template(:new) end This is fine when I test the controllers in isolation. I also have the following in my model spec it "is valid with valid attributes" do @company.should be_valid end Again this works fine when tested in isolation. The problem comes if I run spec for both models and controllers. The model test always fails as the valid? method has been stubbed out. Is there a way for me to remove the stubbing of any_instance when the controller test is torn down. I have got around the problem by running the tests in reverse alphabetic sequence to ensure the model tests run before the controllers but I really don't like my tests being sequence dependant.

    Read the article

  • Cant insert a object into a silverlight databound combo box

    - by Steve
    Hi Until recently I had a combo box that was bound to a Linq queried IEnumerable of a DataService.Obj type in the bind method, and all worked fine private IEnumerable<DataService.Obj> _GeneralList; private IEnumerable<DataService.Obj> _QueriedList; private void Bind() { _GeneralList = SharedLists.GeneralList; _QueriedList = _GeneralList.Where(q =>q.ID >1000); cmbobox.ItemsSource = _QueriedList; } Then I had to change the method to insert a new obj and set that object as the default obj and now I get a "System.NullReferenceException: Object reference not set to an instance of an object" exception. I know this has to do with inserting into a linq queried ienumerable but I cant fix it. Any help will be gratefully received. private IEnumerable<DataService.Obj> _GeneralList; private IEnumerable<DataService.Obj> _QueriedList; private void Bind() { _GeneralList = SharedLists.GeneralList; _QueriedList = _GeneralList.Where(q =>q.ID >1000); cmbobox.ItemsSource = _QueriedList; DataService.Obj info = new DataService.Obj(); info.ID = "0"; (cmbobox.ItemsSource as ObservableCollection<DataService.Obj>).Insert(0,info); cmbobox.SelectedIndex = 0; } Thanks in advance

    Read the article

  • Entity Framework 4.0 Unit Testing

    - by Steve Ward
    Hi, I've implemented unit testing along the lines of this article with a fake object context and IObjectSet with POCO in EF4. http://blogs.msdn.com/adonet/archive/2009/12/17/test-driven-development-walkthrough-with-the-entity-framework-4-0.aspx But I'm unsure how to implement a couple of methods on my fake object context for testing. I have CreateQuery and ExecuteFunction methods on my object context interface so that I can execute ESQL and Stored Procedures but I cant (easily) implement them in my fake object context. An alternative would be to use a test double of my repository instead of a double of my object context as suggested here: http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/c4921443-e8a3-4414-92dd-eba1480a07ad/ But this would mean my real repository isnt being tested and would seem to just bypass the issue. Can anyone offer any recommendations?

    Read the article

  • CSS: Horizontal UL: Getting it centered

    - by Steve
    I'm trying to make a horizontal menu/list. It has a mix of independent buttons and buttons that are wrapped in their own individual forms. With much hacking I got all of the buttons, in forms and not in forms to align horizontally. I haven't been able to get the whole thing to center on the page though. Could someone point out to me what I am not seeing? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link rel="shortcut icon" href="http://localhost:7001/nsd/images/favicon.ico"> <link rel="StyleSheet" href="veci_files/nsd.css" type="text/css"> <style type = "text/css"> #horizontal_li_menu_container ul { margin-left: auto; margin-right:auto; text-align:center; border: 1px solid green; width:1000px; } #horizontal_li_menu_container_ul { list-style-type: none; text-decoration: none; border: 1px solid red; } #horizontal_li_menu_container li { display: inline;float:left; } </style> </head> <body> <div id = "horizontal_li_menu_container"> <ul id = "horizontal_li_menu_container_ul"> <li> <input value="Update" onclick="location.href='#'" name="button" type="button"/> </li> <li> <form name="formExportVECI" method="post" action="exportveci"> <input name="person_id" value="661774" type="hidden"> <input name="submitExport" value="Export To Microsoft Excel" type="submit"> </form> </li> <li> <form id="ufdh" name="formImportVECI" action="importveci" method="post" enctype="multipart/form-data"> <input name="person_id" value="661774" type="hidden"> <input value="Import From Microsoft Excel" path="Upload" type="submit"> <input id="fileData" name="fileData" value="" type="file"> </form> </li> <li> <input value="Search/Home" onclick="location.href='search'" name="buttonHome" type="button"/> </li> </ul> </div> </body></html>

    Read the article

  • WordPress: Using a Where Clause With A Custom Field

    - by Steve Wilkison
    I have a bunch of events that are listed on a particular page. Each event is a post. I need them to display in the order in which they occur, NOT the order of the posting date. So, I've created a custom field called TheDate and enter in the date in this format for each one: 20110306. Then, I wrote my query like this: query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); Works perfectly and displays the events in the correct order. However, I also want it to ONLY display dates from today onward. I don't want it to display dates which have passed. It seems the way to do this is with a "filter." I tried this, but it doesn't work. $todaysdate = date('Ymd'); query_posts( array ( 'cat' => '4', 'posts_per_page' => -1, 'orderby' => 'meta_value_num', 'meta_key' => 'TheDate', 'order' => 'ASC' ) ); function filter_where( $where = '' ) { $where .= "meta_value_num >= $todaysdate"; return $where; } add_filter( 'posts_where', 'filter_where' ); I figure it's just a matter of where I'm using this filter, I probably have it in the wrong place. Or maybe the filter itself is bad. Any help or guidance would be greatly appreciated. Thanks!

    Read the article

  • C#.NET: FTP Several Files

    - by Steve Kiss
    Hi, I have what would seem like a common problem, but I cannot find an appropriate solution on any forums. I need to FTP an entire directory structure using .NET. I have found several code examples all of which show how you can FTP a single file by creating an FtpWebRequest object. Unfortunately, there is no information on how to deal with several files. Do I simply create a FtpWebRequest object for every single file? Any help would be appreciated. Thanks

    Read the article

  • Clicking MDI children form doesn't bring it to front

    - by Steve
    This is a winform question in .net. In a MDI form, if I open several children forms, for some forms, if they are not activated (if you overlap them with the activate one, they are not up to front. Only the activate form is up to front.), clicking them don't bring them to front. This is even true if I click controls on them, such as a textbox. The textbox gets focus and you can intput things, but that form is still not activated. Interestingly enough, this is not the case for all the children forms I created. Some forms behave correctly but others don't. Did I do something wrong? I think the correct behavior is that, everytime I click a form, bring it up to front. Thank you for any suggestion.

    Read the article

  • ActionController::RoutingError

    - by Steve
    Hi All, I am just learning Rails. I had encountered a routing error, though I think I have specified the correct rules in the routing.rb. I have attached the code. Please help routing.rb map.connect ':controller/:action' map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' Controller class EntriesController < ApplicationController def sign_in @name = params[:visitor_name] end end View <html> <head><title>Hello <%=h @name %></title></head> <body> <%=h @name %> <% form_tag :action => 'sign_in' do %> <p>Enter your name: <%= text_field_tag 'visitor_name', @name %></p> <%= submit_tag 'Sign in' %> <% end %> </body> </html> Thanks

    Read the article

  • Understanding EXE Internals

    - by Steve
    I was attempting to install an exe that requires a serial number before the install, which the vendor has not provided to us yet. This got my wheels turning about whether there is any information that can be gained from viewing an exe using a hex editor/VI/etc? Using VI to view an exe, I can see some sections of plain text, but it is difficult to determine what it refers to without any context around it. Is it possible to determine any information by reading an exe? Thanks

    Read the article

  • sqlalchemy: what is the difference between declaring the cascade within the foreign key vs relation?

    - by steve
    what is the difference between declaring the cascade within a foreign key vs relations? class Contact(Base): __tablename__ = 'contacts' id = Column(Integer, primary_key=True) addresses = relation("Address", backref="contact") class Address(Base): __tablename__ = 'addresses' id = Column(Integer, primary_key=True) contact_id = Column(Integer, ForeignKey('contact.id', onupdate="CASCADE", ondelete="CASCADE"))) vs class Contact(Base): __tablename__ = 'contacts' id = Column(Integer, primary_key=True) addresses = relation("Address", backref="contact", cascade="all, delete-orphan") class Address(Base): __tablename__ = 'addresses' id = Column(Integer, primary_key=True) contact_id = Column(Integer, ForeignKey('contact.id')) with the foreign key declaration, it seems like the cascade is enforced at the database level. how does the relations approach work? thanks!

    Read the article

  • onClose and datepick with jQuery

    - by Steve
    I have the following code: $('#popupDatepickerWeekly').datepick({ maxDate:'1Y', mandatory:true, highlightWeek:true, onClose: closedDate }); My closedDate function looks like this: function closedDate(value, date, inst) { document.signUpForm.repeatUntil.value = value; } But when I pick a date using the datepicker, the repeatUntil hidden value is not set. The hidden form field looks like this: I don't get an error or anything, but it always comes back as an empty string.

    Read the article

  • Is there a way to combine streaming data retrieval with hibernate?

    - by Steve B.
    For the purposes of handling very large collections (and by very large I just mean "likely to throw OutOfMemory exception"), it seems problematic to use Hibernate because normally collection retrieval is done in a block, i.e. List values=session.createQuery("from X").list(), where you monolithically grab all N-million values and then process them. What I'd prefer to do is to retrieve the values as an iterator so that I grab 1000 or so (or whatever's a reasonable page size) at a time. Apart from writing my own iteration (which seems like it's likely to be re-inventing the wheel) is there a hibernate-native way to handle this?

    Read the article

  • Kohana Auth Library Deployment

    - by Steve
    My Kohana app runs perfectly on my local machine. When I deployed my app to a server (and adjust the config files appropriately), I can no longer log into the app. I've traced through the app login routine on both my local version and the server version and they both agree with each other all the way through until you get to the auth.php controller logged_in() routine where suddenly, at line 140 - the is_object($this-user) test - the $user object no longer exists!?!?!? The login() function call that calls the logged_in() function successfully passes the following test, which causes a redirect to the logged_in() function. if(Auth::instance()->login($user, $post['password'])) Yes, the password and hash, etc all work perfectly. Here is the offending code: public function logged_in() { if ( ! is_object($this->user)) { // No user is currently logged in url::redirect('auth/login'); } etc... } As the code is the same between my local installation and the server, I reckon it must be some server setting that is messing with me. FYI: All the rest of the code works because I have a temporary backdoor available that allows me to use the application (view pages of tables, etc) without being logged in. Any ideas?

    Read the article

  • Fluent NHibernate - How to map the foreign key column as a property

    - by Steve
    I am sure this is a straightforward question but consider the following: I have a reference between company and sector as follows: public class Company { public Guid ID { get; set; } public Sector Sector { get; set; } public Guid SectorID { get; set; } } public class Sector { public Guid ID { get; set; } public string Name { get; set; } } Ok. What I want is the SectorID of the Company object to be populated after I go: (new Company()).Sector = new Sector() { Name="asdf" } and do a flush. The mapping I am using kindly creates an additional column in the database called Sector_Id in the Company table, but this is not available as a property on Company. I want the SectorID property to be filled. The mapping i am currently using in the CompanyMap is References(c = c.Sector).Cascade.All(); Does anyone have any ideas?

    Read the article

  • Printing All Entries in A PHP Table

    - by mgunawan
    I'm trying to insert a php excerpt with SQL (I understand this is outdated, but am trying to grasp the syntax first) into my HTML page, and I've got the following table: ID Name Element1 Element2 0 John John's 1st John's 2nd 1 Bill Bill's 1st Bill's 2nd 2 Steve Steven's 1st Steve's 2nd I'm trying to get the for loop that will essentially print out the following in my html page Name: Name where ID=0 Element1: Element1 where ID=0 Element2: Element2 where ID=0 Name: Name where ID=1 Element1: Element1 where ID=1 Element2: Element2 where ID=1 and so forth. Basically, I am trying to make this process automated so that whenever a new record is added into the table, the HTML page will automatically update with a new "profile". Thank you for your help!

    Read the article

  • Adding methods to an Objective C class interface is optional?

    - by Steve the Plant
    Coming from a C++ background, one thing that confuses me about Objective C is the fact that you can add a method to a class without actually specifying it in the class interface. So I had a barrage of questions: Why would someone choose to not add the method in the class interface? Is it simply because of visibility? Methods without a declaration in the interface are private? Is declaring methods in a class interface just optional? Is it different for overriding a base class' method?

    Read the article

  • IQueryable Where fails to work

    - by Steve
    I am using N-Hibernate and have a class/table called Boxers I also have a prospect table which tells use if the boxer is a prospect. (this table is one column of just the boxersID) So i Want to get all boxers that are prospects (meaning all boxers that have there id in the prospects table) Public static IQueryable<Boxer> IsProspect(this IQueryable<Boxer> query) { return query.Where(x => x.Prospect != null); } this doesnt trim down my list of boxers to the boxers that are prospect... yet if i debug and look at any boxer it will have True or false next to each one correctly... Why isnt the where clause correctly trimming down the list?

    Read the article

  • WCF - call same service from client and server side

    - by Steve
    I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding. I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying to implement it by way of these instructions. But if I make the changes to get the client side call working, I have to add the decoration below which I think will break what works on the server side and also change the system.serviceModel section in web.config. [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, RequestFormat= WebMessageFormat.Json) ] How do I have a WCF service that can be called both from the server-side and client side (jQuery/ajax)?

    Read the article

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