Search Results

Search found 1121 results on 45 pages for 'driving'.

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

  • Rubygems on netbeans driving me crazy!

    - by Knights22
    I cant understand why Gems fetching failed, it was always working fine, i can't figure out how to solve this, hopefully somebody can help. Its driving me Crazy. Error: See troubleshooting section in http://wiki.netbeans,org/RubyGems for hep. Follows output of the gem tool: Error: while executing gem.....(Gem::RemoteFetcher::FetchError) bad response Forbidden 403 (http://production.s3.rubygems.org/quick/Marshal.4.8/yard-defaultreturn-1.0.0.gemspec.rz)

    Read the article

  • REST API for driving distance?

    - by Mark
    Is there a service that will give me the driving distance between two addresses? Apparently Google Maps API requires you to display a map, which I don't want to do (on that particular page), and I'd like to just snag the data and save it to my DB after a user submits a form, rather than waiting for JS to do it's thing. If it's relevant, this is going into a Django app. I discovered that CloudMade offers a Python API, which is nice, except their latest dev release has a bug in it (can't use the API object), but more importantly, it's support for Canada is awful/worthless (couldn't find directions from any major city around here!).

    Read the article

  • Android show driving direction route between two geopoints

    - by kendrelaxman
    I have googled for 2-3 days now, but I am not able to get the perfect solution for my problem. I need to show the route between two geo points (Not a straight line but need to show driving direction kind of route) but I am not able to find any solution to this. I had come across the solution in this question. But I guess the solution also not working. If you can help me out that will be great. I found the solution Look for answer bellow...

    Read the article

  • HttpUtility.HtmlDecode driving me crazy!!!!

    - by Savvas Sopiadis
    Hi everybody! This situation is driving me crazy!!: the following snippet does not work (as i should) ... string preResult = doc.DocumentNode.SelectSingleNode("//textarea[@name='utrans']").InnerText return HttpUtility.HtmlDecode(preResult); ... The first line assigns a value (e.g.) "&lt;b&gt; Dummy value: &lt;/ b&gt; into preResult (that's expected). BUT the next line gives AGAIN the same value!!! But it should return "<b> Dummy value: </ b>". Debugging these lines i thought to copy and paste the value directly into HttpUtility.HtmlDecode() and guess what...it worked!!! I got the expected value! Of course this is useless, but it proves something weird is going on...what?!! Has anybody faced the same situation again? (dev.env. VS2008,.NET3.5SP1) Thanks in advance

    Read the article

  • Driving me INSANE: Unable to Retrieve Metadata for

    - by Loren
    I've been spending the past 3 days trying to fix this problem I'm encountering - it's driving me insane... I'm not quite sure what is causing this bug - here are the details: MVC4 + Entity Framework 4.4 + MySql + POCO/Code First I'm setting up the above configuration .. here are my classes: namespace BTD.DataContext { public class BTDContext : DbContext { public BTDContext() : base("name=BTDContext") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); //modelBuilder.Conventions.Remove<System.Data.Entity.Infrastructure.IncludeMetadataConvention>(); } public DbSet<Product> Products { get; set; } public DbSet<ProductImage> ProductImages { get; set; } } } namespace BTD.Data { [Table("Product")] public class Product { [Key] public long ProductId { get; set; } [DisplayName("Manufacturer")] public int? ManufacturerId { get; set; } [Required] [StringLength(150)] public string Name { get; set; } [Required] [DataType(DataType.MultilineText)] public string Description { get; set; } [Required] [StringLength(120)] public string URL { get; set; } [Required] [StringLength(75)] [DisplayName("Meta Title")] public string MetaTitle { get; set; } [DataType(DataType.MultilineText)] [DisplayName("Meta Description")] public string MetaDescription { get; set; } [Required] [StringLength(25)] public string Status { get; set; } [DisplayName("Create Date/Time")] public DateTime CreateDateTime { get; set; } [DisplayName("Edit Date/Time")] public DateTime EditDateTime { get; set; } } [Table("ProductImage")] public class ProductImage { [Key] public long ProductImageId { get; set; } public long ProductId { get; set; } public long? ProductVariantId { get; set; } [Required] public byte[] Image { get; set; } public bool PrimaryImage { get; set; } public DateTime CreateDateTime { get; set; } public DateTime EditDateTime { get; set; } } } Here is my web.config setup... <connectionStrings> <add name="BTDContext" connectionString="Server=localhost;Port=3306;Database=btd;User Id=root;Password=mypassword;" providerName="MySql.Data.MySqlClient" /> </connectionStrings> The database AND tables already exist... I'm still pretty new with mvc but was using this tutorial The application builds fine.. however when I try to add a controller using Product (BTD.Data) as my model class and BTDContext (BTD.DataContext) as my data context class I receive the following error: Unable to retrieve metadata for BTD.Data.Product using the same DbCompiledModel to create context against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used. I am at a complete loss - I've scoured google with almost every different variation of that error message above I can think of but to no avail. Here are the things i can verify... MySql is working properly I'm using MySql Connector version 6.5.4 and have created other ASP.net web forms + entity framework applications with ZERO problems I have also tried including/removing this in my web.config: <system.data> <DbProviderFactories> <remove invariant="MySql.Data.MySqlClient"/> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> </DbProviderFactories> I've literally been working on this bug for days - I'm to the point now that I would be willing to pay someone to solve it.. no joke... I'd really love to use MVC 4 and Razor - I was so excited to get started on this, but now i'm pretty discouraged - I truly appreciate any help/guidance on this! Also note - i'm using Entityframework from Nuget... Another Note I was using the default visual studio template that creates your MVC project with the account pages and other stuff. I JUST removed all references to the added files because they were trying to use the "DefaultConnection" which didn't exist - so i thought those files may be what was causing the error - however still no luck after removing them - I just wanted to let everyone know i'm using the visual studio MVC project template which pre-creates a bunch of files. I will be trying to recreate this all from a blank MVC project which doesn't have those files - i will update this once i test that Other References It appears someone else is having the same issues I am - the only difference is they are using sql server - I tried tweaking all my code to follow the suggestions on this stackoverflow question/answer here but still to no avail

    Read the article

  • Javascript - jquery ajax post error driving me mad

    - by Exception Duck
    Can't seem to figure this one out. I have a web service defined as (c#,.net) [WebMethod] public string SubmitOrder(string sessionid, string lang,int invoiceno,string email,string emailcc) { //do stuff. return stuff; } Which works fine, when I test it from the autogenerated test thingy in Vstudio. But when I call it from jquery as $j.ajax({ type: "POST", url: "/wservice/baby.asmx/SubmitOrder", data: "{'sessionid' : '"+sessionid+"',"+ "'lang': '"+usersettings.Currlang+"',"+ "'invoiceno': '"+invoicenr+"',"+ "'email':'"+$j(orderids.txtOIEMAIL).val()+"',"+ "'emailcc':'"+$j(orderids.txtOICC).val()+"'}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (msg) { submitordercallback(msg); }, error: AjaxFailed }); I get this fun error: responseText: System.InvalidOperationException: Missing parameter: sessionid. at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection) at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request) at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() data evaluates to: {'sessionid' : 'f61f8da737c046fea5633e7ec1f706dd','lang': 'SE','invoiceno': '11867','email':'[email protected]','emailcc':''} Ok, fair enough, but this function from jquery communicates fine with another webservice. Defined: c#: [WebMethod] public string CheckoutClicked(string sessionid,string lang) { //*snip* //jquery: var divCheckoutClicked = function() { $j.ajax({ type: "POST", url: "/wservice/baby.asmx/CheckoutClicked", data: "{'sessionid': '"+sessionid+"','lang': '"+usersettings.Currlang+"'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { divCheckoutClickedCallback(msg); }, error: AjaxFailed }); }

    Read the article

  • Apache mod_rewrite driving me mad

    - by WishCow
    The scenario I have a webhost that is shared among multiple sites, the directory layout looks like this: siteA/ - css/ - js/ - index.php siteB/ - css/ - js/ - index.php siteC/ . . . The DocumentRoot is at the top level, so, to access siteA, you type http://webhost/siteA in your browser, to access siteB, you type http://webhost/siteB, and so on. Now I have to deploy my own site, which was designed with having 3 VirtualHosts in mind, so my structure looks like this: siteD/ - sites/sitename.com/ - log/ - htdocs/ - index.php - sites/static.sitename.com - log/ - htdocs/ - css - js - sites/admin.sitename.com - log/ - htdocs/ - index.php As you see, the problem is that my index.php files are not at the top level directory, unlike the already existing sites on the webhost. Each VirtualHost should point to the corresponding htdocs/ folder: http://siteD.com -> siteD/sites/sitename.com/htdocs http://static.siteD.com -> siteD/sites/static.sitename.com/htdocs http://admin.siteD.com -> siteD/sites/admin.sitename.com/htdocs The problem I cannot have VirtualHosts on this host, so I have to emulate it somehow, possibly with mod_rewrite. The idea Have some predefined parts in all of the links on the site, that I can identify, and route accordingly to the correct file, with mod_rewrite. Examples: http://webhost/siteD/static/js/something.js -> siteD/sites/static.sitename.com/htdocs/js/something.js http://webhost/siteD/static/css/something.css -> siteD/sites/static.sitename.com/htdocs/css/something.css http://webhost/siteD/admin/something -> siteD/sites/admin.sitename.com/htdocs/index.php http://webhost/siteD/admin/sub/something -> siteD/sites/admin.sitename.com/htdocs/index.php http://webhost/siteD/something -> siteD/sites/sitename.com/htdocs/index.php http://webhost/siteD/sub/something -> siteD/sites/sitename.com/htdocs/index.php Anything that starts with http://url/sitename/admin/(.*) will get rewritten, to point to siteD/sites/admin.sitename.com/htdocs/index.php Anything that starts with http://url/sitename/static/(.*) will get rewritten, to point to siteD/sites/static.sitename.com/htdocs/$1 Anything that starts with http://url/sitename/(.*) AND did not have a match already from above, will get rewritten to point to siteD/sites/sitename.com/htdocs/index.php The solution Here is the .htaccess file that I've come up with: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/siteD/static/(.*)$ [NC] RewriteRule ^siteD/static/(.*)$ siteD/sites/static/htdocs/$1 [L] RewriteCond %{REQUEST_URI} ^/siteD/admin/(.*)$ [NC] RewriteRule ^siteD/(.*)$ siteD/sites/admin/htdocs/index.php [L,QSA] So far, so good. It's all working. Now to add the last rule: RewriteCond %{REQUEST_URI} ^/siteD/(.*)$ [NC] RewriteRule ^siteD/(.*)$ siteD/sites/public/htdocs/index.php [L,QSA] And it's broken. The last rule catches everything, even the ones that have static/ or admin/ in them. Why? Shouldn't the [L] flag stop the rewriting process in the first two cases? Why is the third case evaluated? Is there a better way of solving this? I'm not sticking to rewritemod, anything is fine as long as it does not need access to server-level config. I don't have access to RewriteLog, or anything like that. Please help :(

    Read the article

  • Can't get SplitLayoutPanel working - GWT + UIBinder are driving me crazy

    - by Matt H
    ... <g:VerticalPanel styleName="{style.mainVerticalPanel}"> <g:SplitLayoutPanel> <g:north size="700"> <g:VerticalPanel> <g:ScrollPanel styleName="{style.conversationPanelContainer}"> <g:FlexTable ui:field="conversationPanel" styleName="{style.conversationPanel}"></g:FlexTable> </g:ScrollPanel> <g:HorizontalPanel styleName="{style.messageTextAndSendPanel}"> <g:TextBox ui:field="messageText" styleName="{style.messageText}"></g:TextBox><g:Button ui:field="sendButton">Send</g:Button> </g:HorizontalPanel> </g:VerticalPanel> </g:north> <g:south size="300"> <g:button>TestButton</g:button> </g:south> </g:SplitLayoutPanel> </g:VerticalPanel> ... Anything look wrong with this? All I'm trying to do is make a simple split panel but whenever I run this all I get is a blank page. Without any of the SplitPanel stuff, it works fine. The same happens with DockLayoutPanel.

    Read the article

  • Hibernate SetParameter driving me nuts.

    - by cbmeeks
    This works hql = "from State where StateCode like 'T%'"; Query query = session.createQuery(hql); This does not hql = "from State where StateCode like :StateCode"; Query query = session.createQuery(hql); query.setParameter("StateCode", "T%"); I get this 1568 [main] DEBUG org.hibernate.hql.ast.ErrorCounter - throwQueryException() : no errors 1596 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker - select << begin [level=1, statement=select] 1608 [main] DEBUG org.hibernate.hql.ast.tree.FromElement - FromClause{level=1} : com.kencogroup.kkms.models.State (no alias) -> state0_ 1610 [main] DEBUG org.hibernate.hql.ast.tree.FromReferenceNode - Resolved : {synthetic-alias} -> {synthetic-alias} 1611 [main] DEBUG org.hibernate.hql.ast.tree.DotNode - getDataType() : StateCode -> org.hibernate.type.StringType@a39137 1611 [main] DEBUG org.hibernate.hql.ast.tree.FromReferenceNode - Resolved : {synthetic-alias}.StateCode -> state0_.StateCode SELECT Exception: java.lang.reflect.UndeclaredThrowableException Notice the UndeclaredThrowableException exception. What am I doing wrong? The database is SQL Server 2008 if that helps. But like I said, other queries work just fine. Thanks

    Read the article

  • Ajax.BeginForm driving me crazy

    - by Fabio Milheiro
    ASP.NET MVC3 I have a partial view that is initially rendered inside a div. The following is the partial code: @model Venue.Models.Validation.CustomerRequestModel <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <script type="text/javascript" src="/Scripts/MicrosoftAjax.js"></script> <script type="text/javascript" src="/Scripts/MicrosoftMvcAjax.js"></script> <script type="text/javascript" src="/Scripts/MicrosoftMvcValidation.js"></script> @{ Html.RenderPartial("Message"); } @Html.ValidationSummary() @using (Ajax.BeginForm( "Customer", "Service", null, new AjaxOptions() { HttpMethod = "post", InsertionMode = InsertionMode.Replace, LoadingElementDuration = 100, LoadingElementId = "loading-customer", OnBegin = "hideSubmitButton", OnSuccess = "hideForm", OnComplete = "showSubmitButton", OnFailure = "showErrorMessage", UpdateTargetId = "formclientes", }, new { id = "customer-form" })) { // Fields are all type="text" although some are numbers. <input type="text" name="Address" class="clientes_form" /> } The action: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Customer(CustomerRequestModel customer) { // ... } In the immediate window, this is what I get: this.Request.IsAjaxRequest() false Why?!

    Read the article

  • Java - getClassLoader().getResource() driving me bonkers

    - by Click Upvote
    I have this test app: import java.applet.*; import java.awt.*; import java.net.URL; public class Test extends Applet { public void init() { URL some=Test.class.getClass().getClassLoader().getResource("/assets/pacman.png"); System.out.println(some.toString()); System.out.println(some.getFile()); System.out.println(some.getPath()); } } When I run it from Eclipse, I get the error: java.lang.NullPointerException at Test.init(Test.java:9) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Classpath (from .CLASSPATH file) <classpathentry kind="src" path="src"/> In my c:\project\src folder, I have only the Test.java file and the 'assets' directory which contains pacman.png. What am I doing wrong and how to resolve it?

    Read the article

  • NSFetchedResultsController is driving me crazy

    - by user267980
    Hi everyone. i've been building an app since 1 month using NSFetchedResultsController and i was testing the app on the 3.1.2 SDK. The poblem is that i've been using NSFetchedResultsController everywhere in my app and was working on the 3.1.2 version of the SDK, now my client say that i should make it compatible with the 3.0 version and the deadline is almost there. But is crashing everytime i change an object handled by the contoller, the application is crashing with very weird errors. The problem occure when removing the last object in a section and when a change make an object love to another section. I've been using a sample code from "More iPhone 3 Development Tackling iPhone SDK 3" by Dave Mark and Jeff LaMarche. I've also included some changes from link text Here is a sample output of the console when the application is crashing. * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections. The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in the table view before the update (2), plus or minus the number of sections inserted or deleted (2 inserted, 0 deleted).' 2010-03-14 16:23:29.758 Instaproofs[5879:207] Stack: ( 807902715, 7364425, 807986683, 811271572, 815059090, 815007323, 211023, 4363331, 810589786, 807635429, 810579728, 3620573, 3620227, 3614682, 3609719, 27337, 810595174, 807686849, 807683624, 839142449, 839142646, 814752238 ) If i knew that NSFetchedResultsController is so buggy, i would never used it. So basicaly i need the my NSFetchedResultsControllerDelegate to work fine on the 3.0 and above SDKs. It would be life saver if someone help me figure out what i'm doing wrong.

    Read the article

  • ASP Menu driving me insane

    - by simplesimon
    Hi there, I am trying to create a menu using ASP (I have never used ASP before, im a PHP man) using values stored in a database. basically the html layout i want is as such: <ul> <li> <ul class="sub-menu"> <li class="sub-menu-li">Test</li> </ul> </li> </ul> I need to loop around the root menu items rs("AD_Level") which is equal to 0 for root objects, then inside that loop, lop around anything that has the same parent id eg if the current record is AD_Level =0 and AD_Parent=5 then loop around all items with AD_Parent 5 and AD_Level != 0 and insert the values into html and so on and so forth. Please help! I am struggling with a new language and cannot see a way to do this without losing sanity Edit (Extracted from Comment by OP) while not rsAdmin.eof sPar = rsAdmin("ad_parent" if rsAdmin("AD_Level")=0 then while not rsAdmin2.eof if rsAdmin2("AD_Level")<>0 and rsAdmin2("ad_parent")=sPar and rsAdmin2("AD_Sec_Level")=>2 then response.write rsAdmin("AD_Menu") end if rsAdmin2.movenext wend end if '' # if not rsAdmin.eof then sPar=rsAdmin("AD_parent") rsAdmin.movenext wend that is my code

    Read the article

  • CSS selector driving me nuts!!!

    - by YsoL8
    Apoologies in advance for the slightly long winded code in this question @charset "UTF-8"; /* CSS Document */ * { margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; } #wrapper { width:900px; margin:0 auto 0 auto; } #header { background-color:#800080; width:894px; min-height:60px; padding-top:6px; padding-left:6px; } #header img { margin-left:200px; margin-top:10px; } #headerleft { float:left; } #header h2 { font-family:Arial Black, Arial, Helvetica, sans-serif; color:#ffff00; font-size:36px; /*float:left;*/ } #header h3 { font-family:Arial Black, Arial, Helvetica, sans-serif; color:#ffff00; font-size:14px; } #nav { background-color:#800080; width:100%; min-height:30px; } #nav ul { padding-left:7px; padding-right:7px; } #nav li { list-style:none; display:inline; padding:5px 44px 5px 44px; } #nav li a { color:#FFF; text-decoration:none; } #nav li a:hover { color:#ffff00; } #leftcol { background-color:#800080; width:125px; min-height:30px; float:left; } #leftcol img { margin-left:20px; margin-bottom:20px; } .content { padding:20px 10px 10px 20px; float:left; } <!-- admin classes --> .pageselect p { color:#C90; } #rightcol { /*background-color:#800080;*/ width:160px; min-height:330px; float:right; } .righthead { margin-top:7px; background-image:url(../images/rightcol-head.png); color:#FFF; padding: 5px 20px 5px 20px; font-size:14px; } .rightmid { background-image:url(../images/right-mid.jpg); padding: 5px 10px 5px 10px; font-size:14px; } .rightfoot { background-image:url(../images/right-foot.jpg); background-repeat:no-repeat; } .clear { clear:both; } #footer { background-color:#800080; width:880px; min-height:30px; margin-top:-20px; padding-top:30px; padding-left:20px; padding-bottom:10px; } #footer p { color:#ffff00; } #footer p a { color:#ffff00; text-decoration:none; } #footer p a:hover { font-weight:bold; } .error { color:#C30; } I have the above stylesheet. I am attempting to style the following element (taken from firefox web developer tools): html > body > div#wrapper > div#leftright > div.content > div.pageselect To my mind .pageselect should be the selector to do that, but I seem to be powerless to influence the style, and its just about sending me wacko! Why won't this work?

    Read the article

  • ImportError and Django driving me crazy

    - by John Peebles
    OK, I have the following directory structure (it's a django project): - project -- app and within the app folder, there is a scraper.py file which needs to reference a class defined within models.py I'm trying to do the following: import urllib2 import os import sys import time import datetime import re import BeautifulSoup sys.path.append('/home/userspace/Development/') os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' from project.app.models import ClassName and this code just isn't working. I get an error of: Traceback (most recent call last): File "scraper.py", line 14, in from project.app.models import ClassName ImportError: No module named project.app.models This code above used to work, but broke somewhere along the line and I'm extremely confused as to why I'm having problems. On SnowLeopard using python2.5.

    Read the article

  • finding distance between two UK addresses

    - by effkay
    Hello; I need to write an application which is to calculate the estimated driving distance between two UK addresses; I think I can use Google as following: http://maps.google.com/maps/nav?q=from:London%20to:Dover However, anyone knows what is the daily/monthly limit of querying the database from a single IP address? I need to implement in a commercial application (freight services), is there any reliable alternative? Development language/platform: C#, .NET Regards,

    Read the article

  • Register Now, Free Webinar! Driving Self-Service Learning with UPK Knowledge Center

    - by Kathryn Lustenberger
    UPK Proficiency Forum  Driving Self-Service Learning with UPK Knowledge Center July 16, at 11 am Pacific Join Oracle University for the next UPK Proficiency Forum on July 16, at 11 am Pacific. Beth Renstrom and Kathryn Lustenberger from UPK Product Management at Oracle will present an exciting session on "Driving Self-Service Learning with UPK Knowledge Center. Knowledge Center is a powerful, web-based knowledge repository that delivers an out-of-the-box deployment method for UPK content, enables extensive tracking and reporting, and can serve as content repository for UPK and non-UPK content. Hear how your organization can use Knowledge Center to centralize both UPK and non-UPK assets to provide self-service, role-based, curriculum-style learning. Understand how Knowledge Center can be used to deploy a collaborative user and expert environment where users can turn knowledge into productivity, ensure on-going user competency, and measure organizational readiness across your organization. You will walk away from this session with a better understanding of Oracle’s User Productivity Professional; Knowledge Center and all the benefits it has to offer your organization. You won’t want to miss this Free seminar! Attendance is limited. Register Now!

    Read the article

  • how to use method in AsyncTask in android?

    - by J.R.P
    In my application use JASON webservice to get data from Google Navigarion api. I use the Code is below. i got Exception android.os.NetworkOnMainThreadException. how to use AsyncTask? here is my code. Thanks.`public class MainActivity extends MapActivity { MapView mapView ; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); System.out.println("*************1**************1"); setContentView(R.layout.activity_main); System.out.println("*************2**************"); mapView = (MapView) findViewById(R.id.mapv); System.out.println("*************3**************"); Route route = directions(new GeoPoint((int)(26.2*1E6),(int)(50.6*1E6)), new GeoPoint((int)(26.3*1E6),(int)(50.7*1E6))); RouteOverlay routeOverlay = new RouteOverlay(route, Color.BLUE); mapView.getOverlays().add(routeOverlay); mapView.invalidate(); System.out.println("*************4**************"); } @SuppressLint("ParserError") private Route directions(final GeoPoint start, final GeoPoint dest) { //https://developers.google.com/maps/documentation/directions/#JSON <- get api String jsonURL = "http://maps.googleapis.com/maps/api/directions/json?"; final StringBuffer sBuf = new StringBuffer(jsonURL); sBuf.append("origin="); sBuf.append(start.getLatitudeE6()/1E6); sBuf.append(','); sBuf.append(start.getLongitudeE6()/1E6); sBuf.append("&destination="); sBuf.append(dest.getLatitudeE6()/1E6); sBuf.append(','); sBuf.append(dest.getLongitudeE6()/1E6); sBuf.append("&sensor=true&mode=driving"); Parser parser = new GoogleParser(sBuf.toString()); Route r = parser.parse(); System.out.println("********r in thread*****" +r); return r; } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } } `

    Read the article

  • How to get markers after calling drive directions in Google Maps API?

    - by Ivan Rocha
    Hi all, I just started working using Google Maps API yesterday, and trying to set up drive directions to my map. My problem is: when I call the function load, [...] gdir = new GDirections(map, directionsPanel); [...] gdir.load("from: " + fromAddress + " to: " + toAddress); it returns a map whose markers are not draggable. So, I need to make them draggable in order to recalculate the directions, but I can't get the markers objects. Someone knows how can I do it? Thanks, Ivan.

    Read the article

  • What are the design principles that promote testable code? (designing testable code vs driving design through tests)

    - by bot
    Most of the projects that I work on consider development and unit testing in isolation which makes writing unit tests at a later instance a nightmare. My objective is to keep testing in mind during the high level and low level design phases itself. I want to know if there are any well defined design principles that promote testable code. One such principle that I have come to understand recently is Dependency Inversion through Dependency injection and Inversion of Control. I have read that there is something known as SOLID. I want to understand if following the SOLID principles indirectly results in code that is easily testable? If not, are there any well-defined design principles that promote testable code? I am aware that there is something known as Test Driven Development. Although, I am more interested in designing code with testing in mind during the design phase itself rather than driving design through tests. I hope this makes sense. One more question related to this topic is whether it's alright to re-factor an existing product/project and make changes to code and design for the purpose of being able to write a unit test case for each module?

    Read the article

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