Search Results

Search found 10428 results on 418 pages for 'places bar'.

Page 2/418 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to fetch and populate backbone model for Google Places JS API?

    - by code-gijoe
    I'm implementing a system that require access to Google Places JS API. I've been using rails for most of the project, but now I want to inject a bit of AJAX in one of my views. Basically it is a view that displays places near your location. For this, I'm using the JS API of Google places. A quick workflow would be: 1- The user inputs a text query and hits enter. 2- There is an AJAX call to request data from Google Places API. 3- The successful result is presented to the user. The problem is primarily in step 2. I want to use backbone for this but when I create a backbone model, it requests to the 'rootURL'. This wouldn't be a problem if the requests to Places was done from the server but it is not. A place call is done like this: service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); Passing a callback function: function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { var place = results[i]; createMarker(results[i]); } } } Is it possible to override the 'fetch' method in backbone model and populate the model with the successful Places result? Is this a bad idea?

    Read the article

  • Disabling the charms bar

    - by Kelly D
    How do I disable the the charms bar? I am surprised there is no easy way to disable the feature. Here's what I've done so far: 1.) Disabled right edged swipe gesture in my touchpad settings. Part of the problem is solved as this was probably the most common way the charms bar would pop up. But there are still many other ways it can pop up. 2.) Used regedit and added the key "EdgeUI" with "DisableCharmsHint" set to 1 in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\ This stopped it from popping up whenever I moved the cursor to the top right or bottom right of the screen. I mean who ever needs to move his/her mouse there? (sarcasm) But there's ANOTHER WAY it pops up: when I move the cursor to the top right of the screen followed by moving it downwards OR when I move the cursor to the bottom right of the screen followed by moving it upwards! How do I disable this method of invoking the charm bar?

    Read the article

  • D3 fisheye on width on bar chart

    - by Dexter Tan
    i have been trying to create a vertical bar chart with a d3 fisheye cartesian distortion with only the x-axis being distorted. I have succeeded in distorting the x position of the vertical bars on mouseover with the following code: var maxMag = d3.max(dataset, function(d) { return d.value[10]; }); var minDate = d3.min(dataset, function(d) { return new Date(d.value[1], d.value[2]-1, d.value[3]).getTime(); }); var maxDate = d3.max(dataset, function(d) { return new Date(d.value[1], d.value[2]-1, d.value[3]).getTime(); }); var yScale = d3.scale.linear().domain([0, maxMag]).range([0, h]); var xScale = d3.fisheye.scale(d3.scale.linear).domain([minDate, maxDate]).range([0, w]).focus(w/2); var bar = svg.append("g") .attr("class", "bars") .selectAll(".bar") .data(dataset) .enter().append("rect") .attr("class", "bar") .attr("y", function(d) { return h - yScale(d.value[10]); }) .attr("width", w/dataset.length) .attr("height", function(d) { return yScale(d.value[10]); }) .attr("fill", function(d) { return (d.value[10] <= 6? "yellow" : "orange" ); }) .call(position); // Positions the bars based on data. function position(bar) { bar.attr("x", function(d) { var date = null; if (d.date != null) { date = d.date; } else { date = new Date(d.value[1],0,1); if (d.value[2] != null) date.setMonth(d.value[2]-1); if (d.value[3] != null) date.setMonth(d.value[3]); d.date = date; } return xScale(date.getTime()); }); } svg.on("mousemove", function() { var mouse = d3.mouse(this); xScale.distortion(2.5).focus(mouse[0]); bar.call(position); }); However at this point, applying fisheye on the width remains a mystery to me. I have tried several methods like using a fisheye scale for width however it does not work as expected. What i wish to do is to have the width of a bar expand on mouseover, the same way a single vertical bar is singled out on mouseover with the cartesian distortion. Any clues or help will be much appreciated! edit: http://dexter.xumx.me to view the visualisation i am talking about for easier understanding!

    Read the article

  • Address bar in Finder?

    - by wag2639
    I'm used to knowing where all my files are (and I'm anal about it -- I don't need Mr Jobs thinking he knows best about where my files should go). Is there a way to get an address bar to show up in Finder in OSX (10.5+) like in Explorer in Windows or Nautilus in Gnome. Edit: I also want to be able to copy the address bar. Perhaps the workflow is different on a Mac, but I'm use to throughly sorting my files under many layers of folders and then when I need to upload or download something, or access a file in command line or etc, I can copy and paste that directly into the file dialog. To clarify, my goal is to have an experience like in Windows: press Ctrl + D (CMD + L) and Ctrl + C.

    Read the article

  • Clean way to use mutable implementation of Immutable interfaces for encapsulation

    - by dsollen
    My code is working on some compost relationship which creates a tree structure, class A has many children of type B, which has many children of type C etc. The lowest level class, call it bar, also points to a connected bar class. This effectively makes nearly every object in my domain inter-connected. Immutable objects would be problematic due to the expense of rebuilding almost all of my domain to make a single change to one class. I chose to go with an interface approach. Every object has an Immutable interface which only publishes the getter methods. I have controller objects which constructs the domain objects and thus has reference to the full objects, thus capable of calling the setter methods; but only ever publishes the immutable interface. Any change requested will go through the controller. So something like this: public interface ImmutableFoo{ public Bar getBar(); public Location getLocation(); } public class Foo implements ImmutableFoo{ private Bar bar; private Location location; @Override public Bar getBar(){ return Bar; } public void setBar(Bar bar){ this.bar=bar; } @Override public Location getLocation(){ return Location; } } public class Controller{ Private Map<Location, Foo> fooMap; public ImmutableFoo addBar(Bar bar){ Foo foo=fooMap.get(bar.getLocation()); if(foo!=null) foo.addBar(bar); return foo; } } I felt the basic approach seems sensible, however, when I speak to others they always seem to have trouble envisioning what I'm describing, which leaves me concerned that I may have a larger design issue then I'm aware of. Is it problematic to have domain objects so tightly coupled, or to use the quasi-mutable approach to modifying them? Assuming that the design approach itself isn't inherently flawed the particular discussion which left me wondering about my approach had to do with the presence of business logic in the domain objects. Currently I have my setter methods in the mutable objects do error checking and all other logic required to verify and make a change to the object. It was suggested that this should be pulled out into a service class, which applies all the business logic, to simplify my domain objects. I understand the advantage in mocking/testing and general separation of logic into two classes. However, with a service method/object It seems I loose some of the advantage of polymorphism, I can't override a base class to add in new error checking or business logic. It seems, if my polymorphic classes were complicated enough, I would end up with a service method that has to check a dozen flags to decide what error checking and business logic applies. So, for example, if I wanted to have a childFoo which also had a size field which should be compared to bar before adding par my current approach would look something like this. public class Foo implements ImmutableFoo{ public void addBar(Bar bar){ if(!getLocation().equals(bar.getLocation()) throw new LocationException(); this.bar=bar; } } public interface ImmutableChildFoo extends ImmutableFoo{ public int getSize(); } public ChildFoo extends Foo implements ImmutableChildFoo{ private int size; @Override public int getSize(){ return size; } @Override public void addBar(Bar bar){ if(getSize()<bar.getSize()){ throw new LocationException(); super.addBar(bar); } My colleague was suggesting instead having a service object that looks something like this (over simplified, the 'service' object would likely be more complex). public interface ImmutableFoo{ ///original interface, presumably used in other methods public Location getLocation(); public boolean isChildFoo(); } public interface ImmutableSizedFoo implements ImmutableFoo{ public int getSize(); } public class Foo implements ImmutableSizedFoo{ public Bar bar; @Override public void addBar(Bar bar){ this.bar=bar; } @Override public int getSize(){ //default size if no size is known return 0; } @Override public boolean isChildFoo return false; } } public ChildFoo extends Foo{ private int size; @Override public int getSize(){ return size; } @Override public boolean isChildFoo(); return true; } } public class Controller{ Private Map<Location, Foo> fooMap; public ImmutableSizedFoo addBar(Bar bar){ Foo foo=fooMap.get(bar.getLocation()); service.addBarToFoo(foo, bar); returned foo; } public class Service{ public static void addBarToFoo(Foo foo, Bar bar){ if(foo==null) return; if(!foo.getLocation().equals(bar.getLocation())) throw new LocationException(); if(foo.isChildFoo() && foo.getSize()<bar.getSize()) throw new LocationException(); foo.setBar(bar); } } } Is the recommended approach of using services and inversion of control inherently superior, or superior in certain cases, to overriding methods directly? If so is there a good way to go with the service approach while not loosing the power of polymorphism to override some of the behavior?

    Read the article

  • Places to share my new blog entry? [closed]

    - by TomasAlabes
    I started yesterday a tech blog called devhike and as my first entry I explained a palette behaviour made with RaphaelJS. I wanted to share the entry the tech people around the world, to see if they like it, find it useful, etc. I submitted the link to my post in dzone.com and hackernews which are the places from where I like to read tech articles, but I feel there should be other places where I could post my blog or entry too. If not, I feel my blog will never be read. Do you know any places or ways to be read?

    Read the article

  • custom icon in "Places" menu

    - by Gurnarok
    Hi, I'm pretty new to Ubuntu, but I know the basics. I read the "How do I change the folder icons in the “Places” menu?" but it didn't help, did the option #2 since I want to specify it for a single directory (for now). So what should I do? I have the folder image as SVG in: /usr/share/icons/hicolor/scalable/apps/ /usr/share/icons/hicolor/scalable/places/ The image I want to use: and where I want it:

    Read the article

  • Why is my Quicktime plugin transport bar black?

    - by TheDeeno
    For some reason when watching quicktime moves in firefox the transport bar is completely black. I can still use it to fast forward and rewind but I can't actually see any of the buttons. Any clue how to fix this? I've updated to the latest version of quicktime but it didn't help. I've also verified that this behavior is the same in both firefox and chrome.

    Read the article

  • Chrome Equivalent of %s address bar trick in Firefox

    - by notbrain
    I was curious if there was an equivalent technique in Chrome to do address bar param string replacement like you can do in Firefox. If you create a bookmark and put a %s in the bookmark URL/address part, and set a keyword for the bookmark, you can do things like URL: http://php.net/%s Keyword: php Type in browser: php fopen End up at: http://php.net/fopen Is this making its way into Chrome or is there a way to do it?

    Read the article

  • Copying unicode symbols from Firefox address bar as is

    - by sindikat
    Let's say I open a webpage with some Unicode characters, say, Cyrillic, in the address like this: http://ru.wikipedia.org/wiki/??????????????_?????????????? When I try to copy it from the address bar somewhere else, it becomes unreadable rubbish: http://ru.wikipedia.org/wiki/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D0%B7%D0%B0%D0%BA%D1%80%D0%B5%D0%BF%D0%BB%D1%91%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D1%8C I guess this is for compatibility. However for readability I want to copy it straight away with proper Unicode characters. What and how should I tweak to make that possible?

    Read the article

  • Adding a navigation bar to a web view in a tab bar app

    - by Henrik Erlandsson
    I've built the tab bar application in IB, with three tabs. The third tab happily displays a UIWebview where you can browse. The only thing missing is a back button, as not all web pages supply such a link. I need a navigation bar hooked up properly to the correct classes. I'm still a bit unsure about exactly how the hierarchy should look in interface builder and how to hook it up properly. Currently, the third tab is hooked up to a referencing outlet called 'webnews' in the class 'thirdviewcontroller', and the UIWebView (under a normal IUView in the hierarchy, which in turn is under the third tab bar controller) is connected to the webnews outlet. How do I make the navbar control the webview, and do I add code to the thirdviewcontroller.m that lets the navbar on the view control the webview 'back' function? What do I hook up as the delegate for it? Currently I have an app delegate, but that's hooked up to the tab bar. I'm not really after specific code as much as a general 'how it works' clue :) (Unless I can just add the navbar dynamically to the functioning app... but I don't think addSubView on viewWillAppear {} in thirdviewcontroller.m will create the proper functionality?) If I were to guess at the simplest solution, I'd guess create a navbarcontroller.h/.m, slap a navbar on the view in IB, connect the third tab to navbarcontroller, connect the navbar to the webview (?) and move the webnews outlet to navbarcontroller.h, and connect the webview to it. But I don't quite have the nerve to try, better to ask advice first.

    Read the article

  • Why is the top menu-bar not accessable when previewing open windows of an application?

    - by coversnail
    If I have more than one window of the same application running then clicking its icon in the launcher displays a preview of that application's open windows, When this preview is activated I can't click on any of the icons in the Ubuntu menu-bar/panel/top bar (although hovering over them does highlight the icons). It seems odd that you can highlight the icons but pressing them has no effect. Is this behaviour normal, a bug, or a slight design flaw? I only noticed because I wanted to shut down when previewing the open windows and couldn't click on the panel power icon.

    Read the article

  • SSRS- Bar Chart with single bar needs to display Percentage data

    - by Mac
    Hi All, I have a requirement to show percentages in bar chart on a single bar using SSRS. For example, I want to show a employees by Age in a percentage in an SSRS report. 1.How many % employees between age 20 and 30? 2.How many % employees between age 30 and 40? 3.How many % employees between age 40 and 50? All this on a chart which has only single bar chart in percentage? Is it possible? Thanks

    Read the article

  • IE to show Full URL path in the Title bar as in Status Bar

    - by Slavin
    Windows XP and IE8. Tabbed Browsing is OFF. So every single web page has its own title. I want to see in the title the same as I see in the Status bar i.e. I want the full URL of the web page I am viewing to be displayed in the Title bar, and so in the Task bar button too. How to achieve this? Thanks for all the answers in advance. Looks like this is rare case.

    Read the article

  • Python: Run a progess bar and work simultaneously?

    - by DanielTA
    I want to know how to run a progress bar and some other work simultaneously, then when the work is done, stop the progress bar in Python (2.7.x) import sys, time def progress_bar(): while True: for c in ['-','\\','|','/']: sys.stdout.write('\r' + "Working " + c) sys.stdout.flush() time.sleep(0.2) def work(): *doing hard work* How would I be able to do something like: progress_bar() #run in background? work() *stop progress bar* print "\nThe work is done!"

    Read the article

  • Google I/O 2010 - Connecting users w/ places

    Google I/O 2010 - Connecting users w/ places Google I/O 2010 - Where you at? Connecting your users with the places around them Geo 201 Marcelo Camelo, Chris Lambert, Dave Wang (Booyah) With the proliferation of GPS-enabled mobile devices, the locations of your users are now readily accessible to applications. This session will illustrate how to manage this location data and exploit the rich local information that Google offers to place your users in the context of their surroundings. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 65 0 ratings Time: 01:01:55 More in Science & Technology

    Read the article

  • Google Places référence les services de proximité, visites virtuelles des magasins et géo-localisati

    Google Places lance le référencement des services de proximité Et intègre la visite virtuelle des magasins et la géo-localisation des clients à Google Maps Le service local Business Center fait peau neuve est tout cela commence par un changement de nom : Google Places. Surfant sur la vague de l'optimisation du référencement des services géo-localisés en fonction de la position de l'internaute, Google innove en ajoutant des options à son service. Les nouvelles fonctionnalités annoncées : ? De nouvelles informations sur votre page ? Des outils de suivis comme Analytics afin que vous puissiez connaitre par quel moyen ou quel pa...

    Read the article

  • Use tab bar inconjuction with navigation bar?

    - by bipolarpants
    Hello, I'm brand new to Objective C programing for the Iphone. I was wondering if it is possible to use a tab bar, and in one of the tabs have a navigation bar so that I could drill down? I tried to look for tutorials and found this one http://www.devx.com/wireless/Article/45161/1954, I got it to work as written but I couldn't figure out to display the data I wanted. Does anyone know how? or does anyone know a tutorial for complete beginners?

    Read the article

  • Add a Message Bar or Info Bar to Word using interop or vsto

    - by Aaron
    I have VS 2010 and Word 2010. In Word 2010 there is sometimes a message/warning bar that pops up under the ribbon but above the body of the document that allows the user to do an action. It looks something like this... Can I programmatically though VSTO or Interop create a custom bar that allows the user to click a button and then it executes some code. If not, is there an alternative popup or dialog box that will do something like this? Thanks, A

    Read the article

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