Search Results

Search found 1712 results on 69 pages for 'respond with'.

Page 13/69 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • (Weak) ETags and Last-Modified

    - by Kai Moritz
    As far as I understand the specs, the ETag, which was introduced in RFC 2616 (HTTP/1.1) is a predecessor of the Last-Modified-Header, which is proposet to give the software-architect more controll over the cache-revalidating process. If both Cache-Validation-Headers (If-None-Match and If-Modified-Since) are present, according to RFC 2616, the client (i.e. the browser) should use the ETag when checking, if a resource has changed. According to section 14.26 of RFC 2616, the server MUST NOT respond with a 304 Not Modified, if the ETag presented in a If-None-Match-Header has changed, and the server has to ignore an additional If-Modified-Since-Header, if present. If the presented ETag matches, he MUST NOT perform the request, unless the Date in the Last-Modified-Header says so. (If the presented ETag matches, the server should respond with a 304 Not Modified in case of a GET- or HEAD-request...) This section leaves room for some speculations: A strong ETag is supposed to change ''everytime'', the resource changes. So, having to responde with something else as 304 Not Modified to a request with an unchanged ETag and an If-Modified-Since-Header, which dose not match is a bit of a contradiction, because the strong ETag says, that the resource was not modified. (Though, this is not that fatal, because the server can send the same unchanged resource again.) ... ... o.k. While I was writing this, the question was boiling down to this answer: The (small) contradiction stated above, was made because of Weak ETags. A resource marked with a Weak ETag may have changed, although the ETag has not. So, in case of a Weak ETag it would be wrong, to answer with 304 Not Modified, when the ETag has not changed, but the date presented in the If-Modified-Since does not match, right?

    Read the article

  • trouble connecting to MySql DB (PHP)

    - by user332817
    Hi I have the following PHP code to connect to my db. <?php ob_start(); $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); ?> however I get the following error: Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files (x86)\EasyPHP-5.3.2i\www\checklogin.php on line 11 Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files (x86)\EasyPHP-5.3.2i\www\checklogin.php on line 11 Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\EasyPHP-5.3.2i\www\checklogin.php on line 11 I am able to add a db/tables via phpmyadmin but I cant connect using php. here is a screenshot of my phpmyadmin page: http://img294.imageshack.us/img294/1589/sqls.jpg any help would be appreciated, thanks in advance.

    Read the article

  • Updated to Android 2.2 and now my apps input-lines don't show well, do I need to update my SDK?

    - by Allan
    My Android app has a couple input-lines made to receive numbers, it's a calc app. I just updated my Nexus One to Android 2.2 and now my apps input-lines don't respond like the way they should. When I touch the input-line, the Android keyboard used to pop-up just enough to kind of 'lift' the input-line above the keyboard - into the users view. Then when I scrolled down to the next input-line, that input-line used to 'lift-up' into view also. Now, after I updated my N1 to Android 2.2 - the input-lines are not lifting into view all the way. Also, when I scroll down to the next input-line and type in numbers - they don't appear, but when I scroll left...there they are. It's hard to describe my problem but things have definitely changed in the way my apps input-lines respond since the 2.2 update I did. If I try to update my SDk stuff in Eclipse and then recompile my app, might that fix it? Whenever there's an Android update - developers don't always have to recompile all of their apps do they?

    Read the article

  • Internal Java code best practice for dealing with invalid REST API parameters

    - by user326389
    My colleague wrote the following stackoverflow question: other stack overflow question on this topic The question seems to have been misinterpreted and I want to find out the answer, so I'm starting this new question... hopefully a little more clear. Basically, we have a REST API. Users of our API call our methods with parameters. But sometimes users call them with the wrong parameters!! Maybe a mistake in their code, maybe they're just trying to play with us, maybe they're trying to see how we respond, who knows! We respond with HTTP status error codes and maybe a detailed description of the invalid parameter in the XML response. All is well. But internally we deal with these invalid parameters by throwing exceptions. For example, if someone looks up a Person object by giving us their profile id, but the profile id doesn't exist... we throw a PersonInvalidException when looking them up. Then we catch this exception in our API controller and send back an HTTP 400 status error code. Our question is... is this the best practice, throwing exceptions internally for this kind of user error? These exceptions never get propogated back to the user, this is a REST API. They only make our code cleaner. Otherwise we could have a validation method in each of our API controllers to make sure the parameters all make sense, but that seems inefficient. We have to look up things in our database potentially twice. Or we could return nulls and check for them, but that sucks... What are your thoughts?

    Read the article

  • Dom Traversal to Automate Keyboard Focus - Spatial Navigation

    - by Steve
    I'm going to start with a little background that will hopefully help my question make more sense. I am developing an application for a television. The concept is simple and basically works by overlaying a browser over the video plane of the TV. Now being a TV, there is no mouse or additional pointing device. All interaction is done through a remote control. Therefore, the user needs to be able to visually tell which element they are currently focused upon. To indicate that an element is focused, I currently append a colored transparent image over the element to indicate focus. Now, when a user hits the arrow keys, I need to respond by focusing on the correct elements according to the key pressed. So, if the down arrow is pressed I need to focus on the next focusable element in the DOM tree (which may be a child or sibling), and if they hit the up arrow, I need to respond to the previous element. This would essentially simulate spatial navigation within a browser. I am currently setting an attribute (focusable=true) on any DOM elements that should be able to receive focus. What I would like to do is determine the previous or next focusable element (i.e. attribute focusable=true) and apply focus to the element. I was hoping to traverse the DOM tree to determine the next and previously focusable elements, but I am not sure how to perform this in JQuery, or in general. I was leaning towards trying to use the JQuery tree travesal methods like next(), prev(), etc. What approach would you take to solve this type of issue? Thanks

    Read the article

  • Error with custom Class definition in protocol

    - by Greg
    I'm trying to set up a custom delegate protocol and am getting a strange error that I don't understand. I wonder if someone could point out what I'm doing wrong here (I'm still new to Ob-C and protocol use)... The situation is that I've built my own URLLoader class to manage loading and parsing data from the internet. I'm now trying to set up a protocol for delegates to implement that will respond to the URLLoader's events. So, below is my protocol... #import <UIKit/UIKit.h> #import "URLLoader.h" /** * Protocol for delegates that will respond to a load. */ @protocol URLLoadResponder <NSObject> - (void)loadDidComplete:(URLLoader *)loader; - (void)loadDidFail:(URLLoader *)loader withError:(NSString *)error; @end However, I'm getting the following error for both method signatures: Expected ')' before 'URLLoader' I feel like I must be overlooking something small and silly. Any help folks could offer would be greatly appreciated! Whoops ... it was pointed out that I should include URLLoader.h. Here it is: #import <Foundation/Foundation.h> #import "URLLoadResponder.h" /** * URLLoader inferface. */ @interface URLLoader : NSObject { NSString *name; NSString *loadedData; NSMutableData *responseData; NSObject *delegate; BOOL _isLoaded; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *loadedData; @property (nonatomic, retain) NSObject *delegate; - (void)loadFromURL:(NSString *)url; - (void)addCompleteListener:(id)observer selector:(SEL)sel; - (void)removeCompleteListener:(id)observer; - (void)parseLoadedData:(NSString *)data; - (void)complete; - (void)close; - (BOOL)isLoaded; + (NSURL *)makeUrlWithString:(NSString *)url; + (URLLoader *)initWithName:(NSString *)name; @end

    Read the article

  • Rails - Dynamic name routes namespace

    - by Kuro
    Hi, Using Rails 2.3, I'm trying to configure my routes but I uncounter some difficulties. I would like to have something like : http:// mydomain.com/mycontroller/myaction/myid That should respond with controllers in :front namespace http:// mydomain.com/aname/mycontroller/myaction/mydi That should respond with controllers in :custom namespace I try something like this, but I'm totaly wrong : map.namespace :front, :path_prefix => "" do |f| f.root :controller => :home, :action => :index f.resources :home ... end map.namespace :custom, :path_prefix => "" do |m| m.root :controller => :home, :action => :index m.resources :home ... m.match ':sub_url/site/:controller/:action/:id' m.match ':sub_url/site/:controller/:action/:id' m.match ':sub_url/site/:controller/:action/:id.:format' m.match ':sub_url/site/:controller/:action.:format' end I put matching instruction in custom namespace but I'm not sure it's the right place for it. I think I really don't get the way to customize fields in url matching and I don't know how to find documentation about Rails 2.3, most of my research drove me to Rails 3 doc about the topic... Somebody to help me ?

    Read the article

  • Why is my rspec test failing?

    - by Justin Meltzer
    Here's the test: describe "admin attribute" do before(:each) do @user = User.create!(@attr) end it "should respond to admin" do @user.should respond_to(:admin) end it "should not be an admin by default" do @user.should_not be_admin end it "should be convertible to an admin" do @user.toggle!(:admin) @user.should be_admin end end Here's the error: 1) User password encryption admin attribute should respond to admin Failure/Error: @user = User.create!(@attr) ActiveRecord::RecordInvalid: Validation failed: Email has already been taken # ./spec/models/user_spec.rb:128 I'm thinking the error might be somewhere in my data populator code: require 'faker' namespace :db do desc "Fill database with sample data" task :populate => :environment do Rake::Task['db:reset'].invoke admin = User.create!(:name => "Example User", :email => "[email protected]", :password => "foobar", :password_confirmation => "foobar") admin.toggle!(:admin) 99.times do |n| name = Faker::Name.name email = "example-#{n+1}@railstutorial.org" password = "password" User.create!(:name => name, :email => email, :password => password, :password_confirmation => password) end end end Please let me know if I should reproduce any more of my code. UPDATE: Here's where @attr is defined, at the top of the user_spec.rb file: require 'spec_helper' describe User do before(:each) do @attr = { :name => "Example User", :email => "[email protected]", :password => "foobar", :password_confirmation => "foobar" } end

    Read the article

  • Emulate Mouse Wheel with Synaptics Touchpad

    - by chris
    Is it possible to make the Synaptics Touchpad driver emulate a mouse wheel when scrolling? I can use the touch pad to scroll in Windows Explorer just fine but VMware does not support it. The mouse cursor changes to indicate that scrolling is active but the VMware guest will not respond to it. Since VMware supports the scroll wheel I am looking for a workaround. VMware Workstation 7.0.1 Host/Guest OS: Windows 7 Synaptics Driver 15.0.9.0

    Read the article

  • Outlook meetings and auto accept/reply

    - by Morten
    First, I'm not sure if this question should be here or superuser, but here it comes. Im trying to set up a room to auto accept meetings and so far its good but i was wondering if it's possible to change it to "do not send respond" when it accepts and sends some reply when it's the same time as another existing meeting, so it declined. And a little extra question: is it possible to chance that auto reply it sends, since it's in English, and I would like to chance it to Danish and some text I choose myself?

    Read the article

  • Does pointing *.[int].mydomain.com to 192.168.1.[int] constitute a security threat

    - by Dave
    For testing purposes, I've found it's really useful to point whatever.machineIP.mydomain.com to 192.168.1.machineIP : that way we can test each other's code without fidgetting with hosts files. I'm aware that this identifies our local IP addresses to the outside world, but if someone could access the network, it'd be trivial to sniff which of the local IP addresses respond to port 80 anyway. Is there anything I'm not seeing? Credit for the idea: http://news.ycombinator.com/item?id=1168896

    Read the article

  • F3-F5 keys incorrectly behaving as audio keys

    - by obvio171
    I don't know if this is a configuration issue or a hardware issue, but I have a Kinesis Advantage USB keyboard and for some reason the F3-F5 keys aren't responding as they used to. They don't respond to anything and, when I tried using F5 on Emacs, it said <XF86AudioNext> is undefined, so I guess it's a weird mapping problem. Any idea how I could remap them to the original meaning?

    Read the article

  • Linux (Ubuntu 12.04) two gateways one nic

    - by David
    I have Ubuntu 12.04 Server edition Two gateways, both on 192.168.0. network, let's make them 192.168.0.1 and 192.168.0.2 I've read you should be able to add second gateway into /etc/network/interfaces, that it will build out all the routing automatically, but I get "duplicate option" error. So if I have one default gateway, let's say 0.1, and a connection comes through from the 0.2 gateway, my understanding is that it still tries to respond through 0.1 gateway. Can we change this behavior?

    Read the article

  • Can a Barracuda Spam Filter 300 reject mail based on DNS?

    - by user84104
    Can a Barracuda SF 300 reject mail based on DNS? Specifically can it respond with a 4XX code for mail claiming to be from a domain without a valid MX or A record (similar to postfix's smtpd_sender_restrictions = reject_unknown_sender_domain). If so, how do I set it? (I realize it's probably something simple I've overlooked.) The barracuda can resolve using its configured name servers. The name servers can correctly resolve external domains.

    Read the article

  • Problem with my unicorn

    - by Johnny W
    I'd love to get some help with my unicorn, the damned thing just won't respond to my commands. It's a standard white unicorn with with a white mane. I've tried giving it hay, carrots and sugar cubes, but it's still refusing to do what I ask. I've read on other sites that I may need to reshoe her, but I'd rather not if I don't have to. Thanks for any help.

    Read the article

  • internet connection occasionally stops, but can still ping .com sites

    - by rj
    hi, every half hour or so, for 1-2 minutes my browser will stop navigating to sites, "waiting for ... to respond.." within 2 minutes i will be able to connect to sites and browse like normal again. weird thing is, while i cannot connect to sites, i get ping replies from any .com i type in. this happens on my home wireless network, using FF and IE on a win7 desktop AND FF on an ubuntu laptop the network is wpa2 secured, these are the only connections.

    Read the article

  • Ubuntu Keyboard response speed problem.

    - by Asaf
    Hello, I have Ubuntu Lucid Lynx installed, Using Gnome 2.30.0 I'm using a Laptop, HP Pavilion dv9000 I've stumbled on responsiveness issues with my keyboard, Sometimes it's really obvious - the keyboard doesn't respond fast enough to my typing. Checked sticky keys and all that, it's all disabled of course. Now, I also checked on Windows to see if the problem is Hardware or something, and there are no responsiveness issues there... I'm thinking it's Gnome (or the X). Thanks.

    Read the article

  • Any suggestions for email delivery vendor?

    - by aXqd
    We are going to use email for registration and some other purpose of a website and we do not want to maintain our own email sending machine. That email delivery system need to respond in nealy real-time and be quite stable. Any suggestions?

    Read the article

  • Linux distro for notebooks

    - by Nrew
    What might be the most compatible linux distro for notebooks. Mine is an compaq b1200. With windows 7 installed and I want to dual boot it with a linux distro. I already tried ubuntu 10.04 notebook edition but no luck because the graphics is so slow. When you try to point on an option it takes about 30 seconds for it to respond. Please recommend a distro that is most likely compatible with most notebooks.

    Read the article

  • Use lineout on Mac for audio processing

    - by eltufto
    Does anyone know of a way to set the linein on a Mac to route from the lineout? I want to essentially work with the music played on my Mac. An alternative solution I suppose would be to set the Linein as the output from iTunes/other music player. For context: My specific use-case is audio processing in Processing with the minim library, calling getLineIn. Trying to create some visuals that respond to the music being played.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >