Search Results

Search found 30749 results on 1230 pages for 'google api'.

Page 17/1230 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Random strange behaviour on Google Maps v2

    - by fesja
    hi, I'm having a particular fight with Google Maps v2 on Chrome. The map is shown well on all browsers except Chrome, that without any particular reason, it does any of these things as you can see on the image: Moving the center to the south Showing the markers to the right, but if i move the map, they moved too to the next section of the map. Perfect I have the following javascript: if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); var bounds = new GLatLngBounds(); map.enableScrollWheelZoom(); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.removeMapType(G_HYBRID_MAP); var zoomout = 1; var pcenter_0 = new GLatLng(40.420300, -3.705770); var marker_0 = new GMarker(pcenter_0, {draggable: false}); map.addOverlay(marker_0); marker_0.bindInfoWindowHtml('info', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_0.getPoint()); var pcenter_1 = new GLatLng(41.385719, 2.170050); var marker_1 = new GMarker(pcenter_1, {draggable: false}); map.addOverlay(marker_1); marker_1.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_1.getPoint()); var pcenter_2 = new GLatLng(48.856918, 2.341210); var marker_2 = new GMarker(pcenter_2, {draggable: false}); map.addOverlay(marker_2); marker_2.bindInfoWindowHtml('info', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_2.getPoint()); var pcenter_3 = new GLatLng(37.779160, -122.420052); var marker_3 = new GMarker(pcenter_3, {draggable: false}); map.addOverlay(marker_3); marker_3.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_3.getPoint()); var pcenter_4 = new GLatLng(48.202541, 16.368799); var marker_4 = new GMarker(pcenter_4, {draggable: false}); map.addOverlay(marker_4); marker_4.bindInfoWindowHtml('', {pixelOffset:new GSize(32,5), maxWidth:200} ); bounds.extend(marker_4.getPoint()); zoomToBounds(zoomout); } function zoomToBounds(zoomout) { map.setCenter(bounds.getCenter()); var zoom = map.getBoundsZoomLevel(bounds)-zoomout; if(zoom < 1) zoom = 1; map.setZoom(zoom); map.checkResizeAndCenter(); } Do you have any idea or clue of what can be happening? It's very annoying to have this random javascript errors.. If you need more info, please ask! thanks! Update to add html code (before javascript) <div id="index_map"> <div id="map"></div> </div> I've aldo updated the markers code

    Read the article

  • A stupid question regarding google gadgets. How to host a google gadget? How it works?

    - by sintaloo
    Hi, I spent 5 hours by checking google gadgets websites and FAQs. maybe I am really stupid. I have no idea how to host a gadget. What I knew from reading the google website: 1, I can write gadget with xml, javascript etc.. 2, gadget can be added to igoogle etc.. 3, google can host the gadget for you. 4, gadget can be hosted at anywhere??? All of the above information doesn't answer my question. For instance, with jQuery or Dojo Toolkit, I can download the javascript framework and use it. With google gadget, I can not find a download link for the framework. Why? Does google provide its framework? If no, why does google website say it can be hosted anywhere? I am totally confused. A download link is nowhere in google-gadget website. A brief explanation or some helpful links are very welcome!! Thanks a lot!!! Please don't blame me if you think this question is too silly.

    Read the article

  • php script google maps points from mysql (google example)

    - by user1637477
    I have recently added style information to my maps script, and it stopped working. Have I done something wrong? Guess you can tell I'm very new to this. Any help appreciated. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Google Maps AJAX + mySQL/PHP Example</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ ( *******************I INSERTED HERE ) var styles = [ { stylers: [ { hue: "#00ffe6" }, { saturation: -20 } ] },{ featureType: "road", elementType: "geometry", stylers: [ { lightness: 100 }, { visibility: "simplified" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "off" } ] } ];**( ******************************** THROUGH TO HERE ) map.setOptions({styles: styles}); var customIcons = { restaurant: { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' }, bar: { icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' } }; function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(-37.7735, 175.1418), zoom: 10, mapTypeId: 'roadmap' }); var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP fileBHBHBHBHBHBHBHBBBBBBBBBBBBBBBBBBBBBBBBBBB downloadUrl("mywebsite-no i did this just a minute ago", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "<b>" + name + "</b> <br/>" + address; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon, shadow: icon.shadow }); bindInfoWindow(marker, map, infoWindow, html); } }); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); } function downloadUrl(url, callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest; request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request, request.status); } }; request.open('GET', url, true); request.send(null); } function doNothing() {} //]]> </script><!--Adobe Edge Runtime--> <script type="text/javascript" charset="utf-8" src="map500x1000_edgePreload.js"></script> <style> .edgeLoad-EDGE-12956064 { visibility:hidden; } </style> <!--Adobe Edge Runtime End--> </head> <body onload="load()"> <div id="map" style="width: 1000px; height: 1000px;" class="edgeLoad-EDGE-12956064"></div> </body></html>

    Read the article

  • How to handle business rules with a REST API?

    - by Ciprio
    I have a REST API to manage a booking system I'm searching how to manage this situation : A customer can book a time slot : A TimeSlot resource is created and linked to a Person resource. In order to create the link between a time lot and a person, the REST client send a POST request on the TimeSlot resource But if too many people booked the same slot (let's say the limit is 5 links), it must be impossible to create more associations. How can I handle this business restriction ? Can I return a 404 status code with a JSON response detailing the error with a status code ? Is it a RESTFul approach ? EDIT : Like suggested below I used status 409 Conflict in addition to a JSON response detailing the error

    Read the article

  • Google I/O 2011: 3D Graphics on Android: Lessons learned from Google Body

    Google I/O 2011: 3D Graphics on Android: Lessons learned from Google Body Nico Weber Google originally built Google Body, a 3D application that renders the human body in incredible detail, for WebGL-capable browsers running on high-end bPCs. To bring the app to Android at a high resolution and frame rate, Nico Weber and Won Chun had a close encounter with Android's graphics stack. In this session Nico will present their findings as best practices for high-end 3D graphics using OpenGL ES 2.0 on Android. The covered topics range from getting accelerated pixels on the screen to fast resource loading, performance guidelines, texture compression, mipmapping, recommended vertex attribute formats, and shader handling. The talk also touches on related topics such as SDK vs NDK, picking, and resource loading. From: GoogleDevelopers Views: 6077 29 ratings Time: 56:09 More in Science & Technology

    Read the article

  • Google I/O 2012 - Beyond Paper: Google Cloud Print and the Future of Printing

    Google I/O 2012 - Beyond Paper: Google Cloud Print and the Future of Printing Akshay Kannan Use Google Cloud Print's API to send documents to a printer (or anywhere else) quickly and easily. We're currently integrated with Chrome, ChromeOS, mobile Gmail/Docs, and most new printers, and that's just the start. We provide a configurable JavaScript API, an Android Intent, as well as HTTP and XMPP interfaces for sending documents and receiving them in virtually any format. Come learn how to enable printing from your web and mobile apps on any device to any printer in the world, with just a few lines of code! For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 41 1 ratings Time: 01:06:43 More in Science & Technology

    Read the article

  • Google I/O 2012 - Empower Local Shopping Through Google Shopping

    Google I/O 2012 - Empower Local Shopping Through Google Shopping Thomas Kotzmann, Claudia Ciorascu More and more of consumers research online first before going to a local store to purchase a product and we can expect this trend to continue to rise. How can merchants and retailers take advantage of this trend? Local shopping enables merchants to declare product price and availability per local store. In this session, we will show you how to set up and manage local shopping accounts in the Google Merchant Center and how to use the Content API to upload local products and do live inventory updates. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 100 1 ratings Time: 49:01 More in Science & Technology

    Read the article

  • Google I/O 2011: Optimizing Android Apps with Google Analytics

    Google I/O 2011: Optimizing Android Apps with Google Analytics Nick Mihailovski, Philip Mui, Jim Cotugno Thousands of apps have taken advantage of Google Analytics' native Android tracking capabilities to improve the adoption and usability of Andriod Apps. This session covers best practices for tracking apps on mobile, TV and other devices. We'll also show you how to gain actionable insights from new tracking and reporting capabilities. From: GoogleDevelopers Views: 6819 34 ratings Time: 47:40 More in Science & Technology

    Read the article

  • Google I/O 2012 - Google Play: Marketing 101 for Developers

    Google I/O 2012 - Google Play: Marketing 101 for Developers Patrick Mork, Kushagra Shrivastava As soon as you hit the "Publish" button on your app, you become (partly) a marketer; you might as well try to be a good one. We'll share everything we know about promoting apps on Google play: building a strategic marketing framework, making good use of media channels, taking advantage of the assets we've built for developers, and convincing the Play team to feature your app. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1522 15 ratings Time: 56:13 More in Science & Technology

    Read the article

  • RESTful API design - should a PUT return related data?

    - by alexmcroberts
    I have an API which allows a user to update their system status; and a separate call to retrieve system status updates from other users. Would it make sense to unify them under a PUT request where a user would request a PUT update with their own status update, and they would receive the status updates of other users? My solution would allow the PUT request to call the GET request method internally. The reason behind this is that when a user updates their system status they should be informed of other users status immediately, and I don't feel that having 2 seperate requests is necessary - and should be optional. I intend to keep the GET request for other users status as a status update for a user is not necessarily required in order to retrieve other users status', but once they update their own status is it vital that they get information about other users.

    Read the article

  • Google I/O 2012 - Deep Dive into the Next Version of the Google Drive API

    Google I/O 2012 - Deep Dive into the Next Version of the Google Drive API Ali Afshar, Ivan Lee This session discusses a number of best practices with the new Google Drive API. We'll cover how to properly sync files, how to manage sharing, and how to make your applications faster and more efficient than ever before. We'll go through an entire working application that exposes best practices. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 17 0 ratings Time: 45:50 More in Science & Technology

    Read the article

  • Google I/O 2012 - Writing Polished Apps that have Deep Integration into the Google Drive UI

    Google I/O 2012 - Writing Polished Apps that have Deep Integration into the Google Drive UI Mike Procopio, Steve Bazyl We'll go through how to implement complete Drive apps. This is not an introduction to Drive apps, but rather how to build your product into Google Drive, and ensure that the experience is seamless for a user. We will also discuss how to effectively distribute your app in the Chrome Web Store. The example app built in this talk will demonstrate an example use case, but otherwise be production-ready. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 829 5 ratings Time: 50:59 More in Science & Technology

    Read the article

  • Google I/O 2012 - Optimizing Your Code Using Features of Google APIs

    Google I/O 2012 - Optimizing Your Code Using Features of Google APIs Sven Mawson Google APIs support a variety of features designed to enable state of the art development. In this session, you will learn how to create applications that use performance enhancing features to make your code run faster and use fewer resources. Some features we'll describe include batching, requests for partial response, and efficient ways to handle media. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 0 0 ratings Time: 44:50 More in Science & Technology

    Read the article

  • Google.com and clients1.google.com/generate_204

    - by David Murdoch
    I was looking into google.com's Net activity in firebug just because I was curious and noticed a request was returning "204 No Content." It turns out that a 204 No Content "is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent's active view." Whatever. I've looked into the JS source code and saw that "generate_204" is requested like this: (new Image).src="http://clients1.google.com/generate_204" No variable declaration/assignment at all. My first idea is that it was being used to track if Javascript is enabled. But the "(new Image).src='...'" call is called from a dynamically loaded external JS file anyway, so that would be pointless. Anyone have any ideas as to what the point could be? UPDATE "/generate_204" appears to be available on many google services/servers (e.g., maps.google.com/generate_204, maps.gstatic.com/generate_204, etc...). You can take advantage of this by pre-fetching the generate_204 pages for each google-owned service your web app may use. Like This: window.onload = function(){ var two_o_fours = [ // google maps domain ... "http://maps.google.com/generate_204", // google maps images domains ... "http://mt0.google.com/generate_204", "http://mt1.google.com/generate_204", "http://mt2.google.com/generate_204", "http://mt3.google.com/generate_204", // you can add your own 204 page for your subdomains too! "http://sub.domain.com/generate_204" ]; for(var i = 0, l = two_o_fours.length; i < l; ++i){ (new Image).src = two_o_fours[i]; } };

    Read the article

  • Unable to understand a line in Google CodePreview's README

    - by Masi
    The README is in Google's codepreview which uses Google-appengine. To run the app locally (e.g. for testing), download the Google App Engine SDK from http://code.google.com/appengine/downloads.html. You can then run the server using make serve I run make serve in my terminal after moving Google-appengine.app to my Application -folder in OS X Leopard. I get make: *** No rule to make target `serve'. Stop. How can you run the make serve to run the server for Google AppEngine?

    Read the article

  • Set preferred language in Chrome and other Google services

    - by Super Chicken
    Whenever I'm abroad and access Google's search (via Chrome browser, on my own laptop) or other Google services, they are presented to me in the local language. How can I get Google services displayed in English and instruct Chrome to use google.com (instead of the country-specific site)? My language setting in Windows is English, so Chrome should already use this by default, and I've also set my language preference in iGoogle to English (U.S.), yet if I'm in France, for example, my searches take place on google.fr and sites like the Google News are in French. Chrome tries to be helpful by suggesting to translate these pages for me, but it would be far better to direct to the original English version of these sites in the first place. How do I fix this?

    Read the article

  • Google App Engine: TypeError problem with Models

    - by Rosarch
    I'm running Google App Engine on the dev server. Here is my models file: from google.appengine.ext import db import pickle import re re_dept_code = re.compile(r'[A-Z]{2,}') re_course_number = re.compile(r'[0-9]{4}') class DependencyArcHead(db.Model): sink = db.ReferenceProperty() tails = db.ListProperty() class DependencyArcTail(db.Model): courses = db.ListProperty() It gives this error: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3192, in _HandleRequest self._Dispatch(dispatcher, self.rfile, outfile, env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3135, in _Dispatch base_env_dict=env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 516, in Dispatch base_env_dict=base_env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2394, in Dispatch self._module_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2304, in ExecuteCGI reset_modules = exec_script(handler_path, cgi_path, hook) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2200, in ExecuteOrImportScript exec module_code in script_module.__dict__ File "main.py", line 19, in <module> from src.Models import Course, findCourse, validateCourse, dictForJSON, clearAndBuildDependencyGraph File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1929, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1831, in FindAndLoadModule description) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1279, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1782, in LoadModuleRestricted description) File "src\Models.py", line 14, in <module> class DependencyArcHead(db.Model): File "src\Models.py", line 17, in DependencyArcHead tails = db.ListProperty() TypeError: __init__() takes at least 2 arguments (1 given) What am I doing wrong?

    Read the article

  • Extensions disappear when I close and open Google Chrome

    - by PavanM
    I am running the latest version of Google Chrome 23.0.1271.97 (Official Build 171054) m on Windows 7. Any new extension I install simply disappears(not disabled, total disappearance) once I close and re-start google chrome. This is not happening to one of my old extension. It stays there across chrome re-starts. I tried everything google help suggested- I created new user profile by renaming the Defaults folder I checked for any permission change that the extensions might have undergone. This is not the case. I am not running in developer mode. This happens when I close ALL instances of google chrome. Even if one instance of chrome is running, this doesn't happen. But I cant have an instance of Google Chrome always running :( I even reported the issue to Google Chrome team to no avail and new.crbug.com is offline. And I skimmed through many threads opened for the same issue only to find souls like me. SE is my last resort :)

    Read the article

  • Removing the XML Formatter from ASP.NET Web API Applications

    - by Rick Strahl
    ASP.NET Web API's default output format is supposed to be JSON, but when I access my Web APIs using the browser address bar I'm always seeing an XML result instead. When working on AJAX application I like to test many of my AJAX APIs with the browser while working on them. While I can't debug all requests this way, GET requests are easy to test in the browser especially if you have JSON viewing options set up in your various browsers. If I preview a Web API request in most browsers I get an XML response like this: Why is that? Web API checks the HTTP Accept headers of a request to determine what type of output it should return by looking for content typed that it has formatters registered for. This automatic negotiation is one of the great features of Web API because it makes it easy and transparent to request different kinds of output from the server. In the case of browsers it turns out that most send Accept headers that look like this (Chrome in this case): Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Web API inspects the entire list of headers from left to right (plus the quality/priority flag q=) and tries to find a media type that matches its list of supported media types in the list of formatters registered. In this case it matches application/xml to the Xml formatter and so that's what gets returned and displayed. To verify that Web API indeed defaults to JSON output by default you can open the request in Fiddler and pop it into the Request Composer, remove the application/xml header and see that the output returned comes back in JSON instead. An accept header like this: Accept: text/html,application/xhtml+xml,*/*;q=0.9 or leaving the Accept header out altogether should give you a JSON response. Interestingly enough Internet Explorer 9 also displays JSON because it doesn't include an application/xml Accept header: Accept: text/html, application/xhtml+xml, */* which for once actually seems more sensible. Removing the XML Formatter We can't easily change the browser Accept headers (actually you can by delving into the config but it's a bit of a hassle), so can we change the behavior on the server? When working on AJAX applications I tend to not be interested in XML results and I always want to see JSON results at least during development. Web API uses a collection of formatters and you can go through this list and remove the ones you don't want to use - in this case the XmlMediaTypeFormatter. To do this you can work with the HttpConfiguration object and the static GlobalConfiguration object used to configure it: protected void Application_Start(object sender, EventArgs e) { // Action based routing (used for RPC calls) RouteTable.Routes.MapHttpRoute( name: "StockApi", routeTemplate: "stocks/{action}/{symbol}", defaults: new { symbol = RouteParameter.Optional, controller = "StockApi" } ); // WebApi Configuration to hook up formatters and message handlers RegisterApis(GlobalConfiguration.Configuration); } public static void RegisterApis(HttpConfiguration config) { // remove default Xml handler var matches = config.Formatters .Where(f = f.SupportedMediaTypes .Where(m = m.MediaType.ToString() == "application/xml" || m.MediaType.ToString() == "text/xml") .Count() 0) .ToList() ; foreach (var match in matches) config.Formatters.Remove(match); } } That LINQ code is quite a mouthful of nested collections, but it does the trick to remove the formatter based on the content type. You can also look for the specific formatter (XmlMediatTypeFormatter) by its type name which is simpler, but it's better to search for the supported types as this will work even if there are other custom formatters added. Once removed, now the browser request results in a JSON response: It's a simple solution to a small debugging task that's made my life easier. Maybe you find it useful too…© Rick Strahl, West Wind Technologies, 2005-2012Posted in Web Api  ASP.NET   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • Apple pourrait refuser d'intégrer l'application Google Maps dans l'AppStore d'après Google, qui se dit « peu optimiste »

    Apple pourrait refuser d'intégrer l'application Google Maps dans l'AppStore D'après Google, qui se dit « peu optimiste » Selon The Guardian, ce n'est de sitôt que l'application Google Maps fera son retour sur iOS. C'est en tout cas ce qu'aurait laissé entendre une source du journal britannique, un employé de Google proche de la division qui travaille sur ce projet. Cette source affirme que Google n'est « pas optimiste » sur l'attitude que va avoir Apple lors de la prochaine soumission de l'application sur l'AppStore. Pour mémoire, une des « nouveautés » d'iOS 6 a été de r...

    Read the article

  • Google Docs not importing CSVs consistently

    - by nick
    Hey everyone, I'm trying to import some csv data into google docs spreadsheet. The data I am entering is all made up of 16 digit integers. About 90% of them are imported perfectly but 10% are rewritten automatically into scientific notation. How do I turn this feature of. I just want all the numbers kept in their standard form. Kind Regards Nick

    Read the article

  • Google Chrome Extension

    - by Jamie
    How do I open a link in a new tab in the extension HTML. E.g. clicks on icon sees Google chrome window which has the window.html inside there are two links, one link to open a link in a new tab, other in the original tab. I used window.location, doesn't work like that.

    Read the article

  • Google Chrome Extension

    - by Jamie
    Is there a way to replace inside the DOM of a page using the replace() in javascript In the source code I want to replace: <div class="topbar">Bookmark Us</div> to <div class="topbar"><span class="larger-font">Bookmark Us</span></div> When a Google Chrome extenstion is on the matched website of a URL and it will do the above. Any page that matches: http://www.domain.com/support.php Thanks.

    Read the article

  • google maps marker draggable doesn't work

    - by ArmenGrigoryan
    I try all methods but in my google map on the marker doesn't work events, I try enable events and write (clickable: true), but it did not help, in test server working good, but on phpfox marker not clickable, help me please correct it go to it http://iguansystems.com/phpfoxdev/index.php?do=/pages/24/quickstart/step2/ link login - [email protected], and pass- tryuser in center frontend right at "Primary Venue" have "Can't find venue? Add New" click on "Add New" and window with a map open

    Read the article

  • Dependency Injection in ASP.NET Web API using Autofac

    - by shiju
    In this post, I will demonstrate how to use Dependency Injection in ASP.NET Web API using Autofac in an ASP.NET MVC 4 app. The new ASP.NET Web API is a great framework for building HTTP services. The Autofac IoC container provides the better integration with ASP.NET Web API for applying dependency injection. The NuGet package Autofac.WebApi provides the  Dependency Injection support for ASP.NET Web API services. Using Autofac in ASP.NET Web API The following command in the Package Manager console will install Autofac.WebApi package into your ASP.NET Web API application. PM > Install-Package Autofac.WebApi The following code block imports the necessary namespaces for using Autofact.WebApi using Autofac; using Autofac.Integration.WebApi; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The following code in the Bootstrapper class configures the Autofac. 1: public static class Bootstrapper 2: { 3: public static void Run() 4: { 5: SetAutofacWebAPI(); 6: } 7: private static void SetAutofacWebAPI() 8: { 9: var configuration = GlobalConfiguration.Configuration; 10: var builder = new ContainerBuilder(); 11: // Configure the container 12: builder.ConfigureWebApi(configuration); 13: // Register API controllers using assembly scanning. 14: builder.RegisterApiControllers(Assembly.GetExecutingAssembly()); 15: builder.RegisterType<DefaultCommandBus>().As<ICommandBus>() 16: .InstancePerApiRequest(); 17: builder.RegisterType<UnitOfWork>().As<IUnitOfWork>() 18: .InstancePerApiRequest(); 19: builder.RegisterType<DatabaseFactory>().As<IDatabaseFactory>() 20: .InstancePerApiRequest(); 21: builder.RegisterAssemblyTypes(typeof(CategoryRepository) 22: .Assembly).Where(t => t.Name.EndsWith("Repository")) 23: .AsImplementedInterfaces().InstancePerApiRequest(); 24: var services = Assembly.Load("EFMVC.Domain"); 25: builder.RegisterAssemblyTypes(services) 26: .AsClosedTypesOf(typeof(ICommandHandler<>)) 27: .InstancePerApiRequest(); 28: builder.RegisterAssemblyTypes(services) 29: .AsClosedTypesOf(typeof(IValidationHandler<>)) 30: .InstancePerApiRequest(); 31: var container = builder.Build(); 32: // Set the WebApi dependency resolver. 33: var resolver = new AutofacWebApiDependencyResolver(container); 34: configuration.ServiceResolver.SetResolver(resolver); 35: } 36: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The RegisterApiControllers method will scan the given assembly and register the all ApiController classes. This method will look for types that derive from IHttpController with name convention end with “Controller”. The InstancePerApiRequest method specifies the life time of the component for once per API controller invocation. The GlobalConfiguration.Configuration provides a ServiceResolver class which can be use set dependency resolver for ASP.NET Web API. In our example, we are using AutofacWebApiDependencyResolver class provided by Autofac.WebApi to set the dependency resolver. The Run method of Bootstrapper class is calling from Application_Start method of Global.asax.cs. 1: protected void Application_Start() 2: { 3: AreaRegistration.RegisterAllAreas(); 4: RegisterGlobalFilters(GlobalFilters.Filters); 5: RegisterRoutes(RouteTable.Routes); 6: BundleTable.Bundles.RegisterTemplateBundles(); 7: //Call Autofac DI configurations 8: Bootstrapper.Run(); 9: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Autofac.Mvc4 The Autofac framework’s integration with ASP.NET MVC has updated for ASP.NET MVC 4. The NuGet package Autofac.Mvc4 provides the dependency injection support for ASP.NET MVC 4. There is not any syntax change between Autofac.Mvc3 and Autofac.Mvc4 Source Code I have updated my EFMVC app with Autofac.WebApi for applying dependency injection for it’s ASP.NET Web API services. EFMVC app also updated to Autofac.Mvc4 for it’s ASP.NET MVC 4 web app. The above code sample is taken from the EFMVC app. You can download the source code of EFMVC app from http://efmvc.codeplex.com/

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >