Search Results

Search found 12558 results on 503 pages for 'publish location'.

Page 22/503 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Nginx: bug using if in location, how do I rectify

    - by Quintin Par
    I am using nginx in reverse proxy mode. In my server section I have this code to set expire and cache control of my static files. location ~* ^.+\.(css|js|png|gif)$ { access_log off; expires max; add_header Cache-Control public; if (!-f $request_filename) { proxy_pass http://localhost:82; } } This is quite obviously creating issues. Can someone help me correct this code to use try_files or rewrite?

    Read the article

  • window.location.href not working in Safari when using onkeypress

    - by insanepaul
    I'm using an asp textbox and a search button. In Safari if I click the search button i get redirected to the search results page using javascript window.location.href. But strangely the same javascript will not redirect to the page if I press return in the textbox. Using the alert function I can see that window.location.href has the the correct url and the location bar at the top changes from the search page(default.aspx) to the search results url however when I click OK to the alert box the url at the top reverts back to the default.aspx page. It works on ie7/8/firefox/chrome but not safari. Here is my javascript,cs and aspx code: function submitSearchOnEnter(e) { var CodeForEnter = 13; var codeEnteredByUser; if (!e) var e = window.event; if (e.keyCode) codeEnteredByUser = e.keyCode; else if (e.which) codeEnteredByUser = e.which; if (codeEnteredByUser == CodeForEnter) RedirectToSearchPage(); } function RedirectToSearchPage() { var searchText = $get('<%=txtHeaderSearch.ClientID%>').value if (searchText.length) { window.location.href = "Search.aspx?searchString=" + searchText; } } protected void Page_Load(object sender, EventArgs e) { txtHeaderSearch.Attributes.Add("onkeypress", "submitSearchOnEnter(event)"); } <asp:Panel ID="pnlSearch" runat="server" DefaultButton="lnkSearch"> <asp:TextBox ID="txtHeaderSearch" runat="server" CssClass="searchBox"></asp:TextBox> <asp:LinkButton ID="lnkSearch" OnClientClick="RedirectToSearchPage(); return false;" CausesValidation="false" runat="server" CssClass="searchButton"> SEARCH </asp:LinkButton> </asp:Panel> I've tried return false; which doesn't allow me to enter any characters in the search box. I've spent ages online trying to find a solution. Maybe it has something to do with setTimeout or setTimeInterval but it didn't work unless i did it wrong.

    Read the article

  • Obtaining touch location for a uiscrollview touch

    - by LOSnively
    I have a uiscrollview as an element of a uiscrollviewcontroller, along with other view objects. The image scrolls and zooms as expected, when the scrollView is the top subview. However, I also need to get the screen location of the touch, in particular when there is no scroll action. (I understand the location may change during a scroll, but that's not important.) I haven't found a way to do that. In the scrollviewcontroller implementation I have customized all of the standard methods that should do this: "touchesShouldBegin...", "touchesBegan:...", "touchesEnded:...", and so on. As far as I can tell, none of these are being called during a touch event when the scrollView is the top subview. I've tried setting the delayContentTouches property to both YES and NO, and that doesn't seem to make a difference. As an alternative, I've tried putting a UIView as the top subview and then tried passing the touches to the now underlying scrollView. In this configuration, the standard methods are called and I can get the touch location, but I haven't found a mechanism for the touches to be passed to the scrollView so scrolling occurs. Doing something like sending the touch messages to the specific scrollView, or to "super" or just sending them to nextResponder doesn't do it. It seems I can make the scroll work or find the location of the touch but not both, depending on what the "top" subview is. I suspect this is trivial, but after two weeks of struggling, it's time to eat my embarrassment for not being able to do this seemingly simplest of things. I've read all of the related questions here on stackoverflow, tried most if not all of the suggestions, and so far, nothing has worked. I've looked through the various links and references suggested by the answers, including Apple's documentation, but none have pointed out the gap in my understanding. Any ideas would be appreciated.

    Read the article

  • Problem with document.location.href

    - by novellino
    Hello, I am new to Javascript and Web development and I have a question regarding the document.location.href. I am using a cookie for storing the language the user prefers and then load the english or the swedish version depending on the language. The default language in the beginning is the same as the browser's language, and my index.jsp is the swedish one. The first time everything works fine. The problem is when the cookie exists already. The basic code is: if (language!=null && language!=""){ if (language=="en-US" || language=="en-us") document.location.href = "en/index.jsp"; } else{ //Explorer if (navigator.userLanguage) language = navigator.userLanguage; //other browsers else language = (navigator.language) ? navigator.language : navigator.userLanguage; if (language!=null && language!=""){ setCookie('language', language, 365, '/', 'onCheck'); if (language=="en-US" || language=="en-us") document.location.href = "en/index.jsp"; else if(language=="sv") document.location.href="index.jsp"; } } When the cookie exists we enter the first "if", and there, if the language is swedish it opens the default blabla/index.jsp page. When the language is set to engish it should open the blabla/en/index.jsp but instead it opens the blabla/en/en/index.jsp which of course is wrong. Does anyone know what I am doing wrong?? Thanks

    Read the article

  • vaadin custom layout setting a text area in a table with the location attribute

    - by user3717298
    I need to set a text area in the html template and use it as a custom component in vaadin the html snippet is as below <table> <tr> <td> JUNK SENTENCE </td> <td> <div location="HEADIN"></div> <div location="Details"></div> <div location="Attachment"></div> </td> <td> <p>School of more than 50 students univer versities.</p> </td> </tr> </table> All the place holders are working and displays data but the "details" holder should be a text area. as the text is a lot over there so I tried the below way but it just turned the place holder to text vaadin could not manipulate / identify the "Details" place holder. I tried the below way i set - in side the text area tag. <textarea rows="4" cols="50"> </textarea> and again i tried this way too which also did not work. <textarea rows="4" cols="50" location="Details"> </textarea> Any guidance would be appreciated to solve this I am setting the needed values from a formfeildfactory and these values are set by implementing the Vaadin Custom field class(in case it helps some more to identify)

    Read the article

  • Button click does not start Service in Android App Widget

    - by Feanor
    I'm having trouble starting a Service to update an AppWidget that I'm creating as an exercise. I'm trying to get the latitude and longitude of spoofed location data from DDMS to display in the widget. The widget uses a service to update the TextView, which may be slightly overkill, but I wanted to follow the template that seems to be common in AppWidgets that do more work (like the Forecast widget or the Wiktionary widget). Right now, I'm not getting any error messages or strange behavior; nothing at all happens when the button is pressed. I'm a bit mystified as to what might be wrong. Could anyone out there point me in the right direction? Additionally, if my logic for location is faulty, I'd love recommendations on that too. I've looked at several blogs, the Google examples, and the documentation, but I feel a little fuzzy on how it works. Here is the current state of the widget: public class Widget extends AppWidgetProvider { static final String TAG = "Widget"; /** * {@inheritDoc} */ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { // Create an intent to launch the service Intent serviceIntent = new Intent(context, UpdateService.class); // PendingIntent is required for the onClickPendingIntent that actually // starts the service from a button click PendingIntent pendingServiceIntent = PendingIntent.getService(context, 0, serviceIntent, 0); // Get the layout for the App Widget and attach a click listener to the // button RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main); views.setOnClickPendingIntent(R.id.address_button, pendingServiceIntent); super.onUpdate(context, appWidgetManager, appWidgetIds); } // To prevent any ANR timeouts, we perform the update in a service; // really should have its own thread too public static class UpdateService extends Service { static final String TAG = "UpdateService"; private LocationManager locationManager; private Location currentLocation; private double latitude; private double longitude; public void onStart(Intent intent, int startId) { // Get a LocationManager from the system services locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // Register for updates from spoofed GPS locationManager.requestLocationUpdates("gps", 30000L, 0.0f, new LocationListener() { @Override public void onLocationChanged(Location location) { currentLocation = location; } @Override public void onProviderDisabled(String provider) {} @Override public void onProviderEnabled(String provider) {} @Override public void onStatusChanged(String provider, int status, Bundle extras) {} }); // Get the last known location from GPS currentLocation = locationManager.getLastKnownLocation("gps"); // Build the widget update RemoteViews updateViews = buildUpdate(this); // Push update for this widget to the home screen ComponentName thisWidget = new ComponentName(this, Widget.class); // AppWidgetManager updates AppWidget state; gets information about // installed AppWidget providers and other AppWidget related state AppWidgetManager manager = AppWidgetManager.getInstance(this); // Updates the views based on the RemoteView returned from the // buildUpdate method (stored in updateViews) manager.updateAppWidget(thisWidget, updateViews); } public RemoteViews buildUpdate(Context context) { latitude = currentLocation.getLatitude(); longitude = currentLocation.getLongitude(); RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.main); updateViews.setTextViewText(R.id.latitude_text, "" + latitude); updateViews.setTextViewText(R.id.longitude_text, "" + longitude); return updateViews; } @Override public IBinder onBind(Intent intent) { // We don't need to bind to this service return null; } } }

    Read the article

  • How to follow user location with MapKit

    - by Bloudermilk
    I'm using MapKit to display the user's location relative to pins around them. I'd like to be able to mimic the functionality that Maps provides via the crosshair button in the lower left-hand corner of the screen. I'm already aware that MapKit provides a CLLocation object with the user's location via MKUserLocation, I just wanted to seek advice on how I should keep focus on that location. My initial inclination was to use an NSTimer to center the map on that coordinate every 500ms or so. Is there a better way to do this? Is there something built in to MapKit that I'm missing that will accomplish this? Thanks so much, Brendan

    Read the article

  • Response.Redirect with a fragment identifier causes unexpected refresh when later using location.has

    - by Matt
    Hi All, I was hoping someone can assist in describing a workaround solution to the following issue I am running into on my ASP.NET website on IE. In the following I will describe the bug and clarify the requirements of the needed solution. Repro Steps: User visits A.aspx A.aspx uses Response.Redirect to bring the user to B.aspx#house On B.aspx#house, the user clicks a button that sets window.location.hash='test' Actual Results: B.aspx is loaded again. The URL now shows B.aspx#test Expected Results: No reload. The URL will just change to B.aspx#test Requirements: Page A must redirect to page B with a fragment identifier in the url Any user action on page B will set the location.hash Setting location.hash must not make page B refresh This must work on IE Notes: Bug only repros on IE (tested on ie6|7|8). Opera, FF, Chrome, Safari all have the expected results of no reload. This error may have nothing to do with ASP.NET, and everything to do with IE For any kind soul willing to have a look at this, I have created a minimal ASP.NET web project to make it easy to repro here

    Read the article

  • Apache </Location> Errors

    - by Eddie
    Hi there! I am having real trouble with this installation - Basically this is the erro that I am getting: apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Syntax error on line 10 of /etc/apache2/conf.d/amberdms-bs.conf: Expected </Location\xc2\xa0/billing_system> but saw </Location> and this is the code that is being used in that modules file: #  # Amberdms Billing System is an open source accounting, service billing and time keeping web application.  #  Alias /billing_system /usr/share/amberdms/billing_system  <Location /billing_system>  Order deny,allow  Allow from all  AllowOverride all    Please help me! I need this software to be installed, but this error has stumped me.

    Read the article

  • "Find nearest location" by Zip/Postal Code?

    - by codemonkey613
    I need a "find nearest location" on our website. Where visitor enters their zip/postal code, then they are redirected to specific webpage for our nearest location. We have forty USA and Canada locations. How can I build something like this? Could I do this with the Google Maps API? I already have a custom map on Google Maps. It's plotted with our locations. It would be nice to send Google Maps a command to say "what's our nearest location at __ zip code". Any suggestions?

    Read the article

  • JavaScript: window.opener.location.href question

    - by vastbeyond
    I need to make a little JS app to scroll automatically through a list of URLs. I've chosen to have the functionality in a pop-up, for various reasons. The syntax to change the opening window's URL is: window.opener.location.href = "http://www.example.com"; This works fine with one URL, but if two statements are called, only one is executed. I experimented with an alert statement between two of the above statements, and the alert event made the second statement function properly: window.opener.location.href = "http://www.example1.com"; alert("hello world"); window.opener.location.href = "http://www.example2.com"; Question is: does anyone know how to get the first and second window.opener statements to work, without the intervening alert();? Also, how can I add a pause between the two statements, so that the second executes a couple of seconds after the first? Thanks so much!

    Read the article

  • Generate canonical / real URL based on base.href or location

    - by blueyed
    Is there a method/function to get the canonical / transformed URL, respecting any base.href setting of the page? I can get the base URL via (in jQuery) using $("base").attr("href") and I could use string methods to parse the URL meant to being made relative to this, but $("base").attr("href") has no host, path etc attributes (like window.location has) manually putting this together is rather tedious E.g., given a base.href of "http://example.com/foo/" and a relative URL "/bar.js", the result should be: "http://example.com/bar.js" If base.href is not present, the URL should be made relative to window.location. This should handle non-existing base.href (using location as base in this case). Is there a standard method available for this already? (I'm looking for this, since jQuery.getScript fails when using a relative URL like "/foo.js" and BASE tag is being used (FF3.6 makes an OPTIONS request, and nginx cannot handle this). When using the full URL (base.href.host + "/foo.js", it works).)

    Read the article

  • Aspnet Redirect using location tag

    - by Learner
    <location path="/home/address?city="jcity" allowOverride="true"> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <httpRedirect enabled="true" httpResponseStatus="Permanent" exactDestination="true" destination="/home/jerseycity" /> </system.webServer> </location> I get an error since location tag can not use "?" tag. What is the best way to do this redirect?

    Read the article

  • Simple question about MKMapView and the iPhone

    - by gravityone
    Basically I want to show the users location plus a list of selected location on a map. It can even have the standard iphone annotations. But, I have no idea of the general steps I would take to achieve this. Would I use MKMapView, or Core Location, or both? Could someone give me a simple outline of steps to take, or a link to a good tutorial or sample code. Thanks

    Read the article

  • Getting "Location" header from NSHTTPURLResponse

    - by aspcartman
    Can't get "Location" header from response at all. Wireshark says that i've got one: Location: http://*/index.html#0;sid=865a84f0212a3a35d8e9d5f68398e535 But NSHTTPURLResponse *hr = (NSHTTPURLResponse*)response; NSDictionary *dict = [hr allHeaderFields]; NSLog(@"HEADERS : %@",[dict description]); Produces this: HEADERS : { Connection = "keep-alive"; "Content-Encoding" = gzip; "Content-Type" = "text/html"; Date = "Thu, 25 Mar 2010 08:12:08 GMT"; "Last-Modified" = "Sat, 29 Nov 2008 15:50:54 GMT"; Server = "nginx/0.7.59"; "Transfer-Encoding" = Identity; } No location anywhere. How to get it? I need this "sid" thing.

    Read the article

  • JavaScript: 2 window.opener.location.href statements with alert() in between not functioning

    - by vastbeyond
    I need to make a little JS app to scroll automatically through a list of URLs. I've chosen to have the functionality in a pop-up, for various reasons. The syntax to change the opening window's URL is: window.opener.location.href = "http://www.example.com"; This works fine with one URL, but if two statements are called, only one is executed. I experimented with an alert statement between two of the above statements, and the alert event made the second statement function properly: window.opener.location.href = "http://www.example1.com"; alert("hello world"); window.opener.location.href = "http://www.example2.com"; Question is: does anyone know how to get the first and second window.opener statements to work, without the intervening alert();? Also, how can I add a pause between the two statements, so that the second executes a couple of seconds after the first? Thanks so much!

    Read the article

  • Management Studio default file save location

    - by jayrdub
    Open a new query window. Write some SQL. Save the script, the Save File As dialog box opens - but always to the same default location in the Profiles directory. Is there any way to set my default file location? ...Like I used to do with apps from the 1980s? Under Tools|Options a default location can be specified for query results. I need the same thing for new queries (the text editor). Tried changing locations in the Registry but SSMS just overwrote my changes. Any suggestions? (I saw this unanswered question at http://www.eggheadcafe.com/software/aspnet/30098335/management-studio-default.aspx and I had same exact question so I just reposted it here)

    Read the article

  • Sort NSFetchedResultsController results by user location

    - by cgp
    I have an application that contains some Locations in Core Data, and I want to show them to the user in order of proximity to the user's location. I am using an NSFetchedResultsController to serve the locations to the Table View. I thought about creating a virtual accessor method that returns the location's distance from the user, that would be calculated using a "global" CoreLocationManager, but it crashes with reason: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath distanceFromCurrentLocation not found in entity < NSSQLEntity Location id=4' I also give the user the option to sort alphabetically, so I would prefer it if I kept the NSFetchedResultsController, if possible. How should I do it? Thanks!

    Read the article

  • Is this application possible with the twitter api?

    - by salva84
    I have to make an application where a "sender" can send a message to a group of people and to a location. So when a member of the group reach this place (using location position with the cell phone), he receives all the messages for this location. I have thought to make the application using the twitter API, but I'm not really sure if that functionality is possible. Thank you!

    Read the article

  • Set the path for the location of media files in program

    - by Zaheer Boovaji
    I have made a Java Swing Desktop application in Netbeans which can play media files I have put the videos in my workspace resources location and in my java program I am calling those media files using an URL which is something like this: C:/users/Dell/My Documents /NetBeansProjects/Media/src/resources/ MediaFiles/ddd.mpg This works well when I run in my IDE and also i have made Jar for this it works well on my computer but the problem is when i copy this jar file on my friends system the interface is coming but when I click a button to play a media file it says: C:/users/Dell/MyDocuments/NetBeansProjects/Media/src/resources/ MediaFiles/ddd.mpg does not exist So, please provide me a solution of how to set the default path so that when I run a jar file on other systems it should play the media file location I am passing as in my program. How to set the path for the location of media files in program? Update The videos are in the jar file.

    Read the article

  • How to email CLLocationCoordinate2D as a link

    - by lucasweb
    I am trying to emulate the Maps 'Share Location' via email functionality. I have the latitude and longitude of my location and am currently using it to display the location on a map via MKMapView. I also have functionality that composes an email from the app and I would like to include the location in it but can not figure out how to construct a link, using the longitude and latitude. I have seen other apps with apps with this functionality so I know it is possible. Any help would be much appreciated. Thanks in advance.

    Read the article

  • predict location of single-line text from a UITextView

    - by William Jockusch
    Is this possible? Specifically, I have a UITextView, and the text is short enough that it will fit on a single line. I want to predict where it will appear, so that (for example) if I wanted to, I could set up a UILabel that rendered the text in exactly the same location. Once I get that figured out, what I really want to do is pick contentInset and/or contentOffset so that the text of the UITextView and the left-justified UILabel will render in the same location. But I figure the above will let me do that. EDIT: In response to a comment, the fundamental problem I am trying to get around is that UITextField does not let you set the location of the cursor. It appears a lot of people have tried to get around this without success. I need to be able to move the cursor -- inserting/deleting text there is not enough. Control cursor position in UITextField Insert string at cursor position of UITextField Moving the cursor to the beginning of UITextField iOS -- dealing with the inability to set the cursor position in a UITextField

    Read the article

  • Setting location based on previous parameter of $routeChangeError with AngularJS

    - by Moo
    I'm listening on events of the type $routeChangeError in a run block of my application. $rootScope.$on("$routeChangeError", function (event, current, previous, rejection) { if (!!previous) { console.log(previous); $location.path(previous.$$route.originalPath); } }); With the help of the previous parameter I would like to set the location to the previous page. This works as long as the "originalPath" of "previous.$$route" does not contain any parameters. If it contains parameters the "originalPath" is not transformed. Logging the previous objects returns the following output: $$route: Object ... originalPath: "/users/:id" regexp: /^\/users\/(?:([^\/]+)?)$/ ... params: Object id: "3" How can I set the location to the previous path including the parameters?

    Read the article

  • How to use window.location.replace javascript?

    - by william
    My URLs http://www.mysite.com/folder1/page1.aspx http://www.mysite.com/folder1/page1.aspx?id=1 http://www.mysite.com/folder1/page1.aspx?id=1&dt=20111128 Redirecting Page http://www.mysite.com/folder1/page2.aspx I want to redirect from page1.aspx to page2.aspx How to write a javascript in page1.aspx? window.location.replace("/page2.aspx"); window.location.replace("../page2.aspx"); window.location.replace("~/page2.aspx"); First 2 gave me this. http://www.mysite.com/page2.aspx Last 1 gave me this. http://www.mysite.com/folder1/~/page2.aspx What is the correct way to use?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >