w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
On setting iOS simulator default location from Edit Scheme, does it affect the device location update?
Yes, its affecting the device location as well, i verified with https://developer.apple.com/library/ios/samplecode/LocateMe/Introduction/Intro.html when i simulator it on the device it still give the same location which is configured by Scheme > Edit Scheme > Options > Allow Location Simulation not the actual location of device.

Categories : IOS

How can I move the detail disclosure of a cell from the default location to another location?
Create a custom cell by overriding UITableViewCell, you haven't done this yet, and poste the method below in your implementation file. -(void)layoutSubviews { [super layoutSubviews]; for (UIView *subview in self.subviews) { if ([NSStringFromClass([subview class]) isEqualToString:@"UIButton"]) { //Just an example, change the frame by your wish here. CGRect newFrame = subview.frame; newFrame.origin.y -= 15; subview.frame = newFrame; } } } This approach can be used to edit any default components of TableViewCell, like the disclosure, the delete button when editing, etc. And will not mess with the views that you put inside your cell, because all your manual added views are really inside the contentView propert

Categories : Iphone

PowerShell script to copy two files from a static location to a location with two variables in the in path
First of all create CSV with structure like below (users.csv): Name,Sip login1,login1@gmail.com The run following statement: Import-Csv C:PATH_TO_CSVusers.csv | foreach{cp C:YOUR_PATHYOUR_FILE ("C:Users"+$_.Name+"AppDataLocalMicrosoftCommunicator"+$_.Sip)} Update Script for run for current user: $userName = [Environment]::UserName; $domain = [Environment]::UserDomainName; # Look for a user $Rech = new-object System.DirectoryServices.DirectorySearcher $rc = $Rech.filter = "((sAMAccountName=$userName))" $rc = $Rech.SearchScope = "subtree" $rc = $Rech.PropertiesToLoad.Add("mail"); $rc = $Rech.PropertiesToLoad.Add("msRTCSIP-PrimaryUserAddress"); $theUser = $Rech.FindOne() Write-host "Username is" $userName Write-host "Domain is" $domain if ($theUser -ne $null) { Write-Host "Mail is"

Categories : Powershell

Android Google Maps location without GPS vs location retrieved from LocationManager with network provider
i found an article from google for this topic. It supplies at least some indication how they do it. https://developers.google.com/maps/articles/geolocation

Categories : Android

Google location service updates ignoring location listener (android)
Typically right before I call and use GoogleMap I instantiate the supportfragmentmanager then use this to instantiate the map. Like below I hope this helps. lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); SupportMapFragment mf= (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); map = mf.getMap(); //map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); ll = new SecondPointLocationListener(); As far as your method for printing the location use this instead... @Override public void onConnected(Bundle arg0) { Toast.makeText(context, "GPS connected", Toast.LENGTH_SHORT).show(); connector = new Connector(); connector.execute("clues", null, null); listener = new LocationListener()

Categories : Android

Why is "Your location approximate location (network-based)" being added as a permission even though I havent declared it in the manifest?
as stated in the questions comments, here is the solution: see http://swarmconnect.com/admin/docs/faq -> that's the cause for your permissions. for the merging problem, look up your .project.properties in eclipse, if manifestmerger.enabled=true is set, that could be the cause of the merge (like mentioned here: Library Project does the manifest file merge?

Categories : Android

Status: 302 Found Location:
Put the redirect header before you start the HTML. First print $q->redirect, then afterwards any message body content such as $q->start_html. Learn what a HTTP message looks like, and how its header and body parts work. If you put the redirect into the body, it cannot work.

Categories : Perl

Zoom to users location after showing a specific location MKMapkit?
If you want to perform some action after a certain amount of time, you can use the GCD dispatch_after: double delayInSeconds = 0.5; dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ [_mapView setRegion:viewRegion animated:YES]; });

Categories : IOS

How to gracefully redirect ember hash location to history location
I would recommend doing this client-side. Add something like this to your app: App = Ember.Application.create({ ready: function() { if (location.hash) { //map known hash values to urls, redirect as needed... } } });

Categories : Ruby On Rails

What is proper way to get ETA (estimated time arrival) from any location to my current location
I know this post is a bit old but in case someone is looking at the answer since iOS 7 Apple provide an API in MapKit in order to calculate all these info. Here is a snippet of how to use this API MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init]; [request setSource:[MKMapItem mapItemForCurrentLocation]]; [request setDestination:destination]; [request setTransportType:MKDirectionsTransportTypeAutomobile]; [request setRequestsAlternateRoutes:NO]; MKDirections *directions = [[MKDirections alloc] initWithRequest:request]; [directions calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse *response, NSError *error) { if ( ! error && [response routes] > 0) { MKRoute *route = [[response routes] objectAtIndex:0]

Categories : IOS

Application doesn't launch with location key after a significant location change
I have the same problem in my app, when the app was terminated by user from app switcher. But it does launch with location key if it was terminated by OS for low memory or other reason. It is the expected result from iOS7 unfortunately. An official apple response I got from one of their evangelists: If a user swipes up in the app switcher then the OS will not launch the app unless explicitly told to do so by the user. So no, SLC will not be launching the app, nor will silent notifications. The only thing that will launch the app at that point is the user tapping the icon. The intention here is that the user has expressed their choice of not having that app running any more for any reason, so we honor that. In this situation, there's really nothing that you can do. The

Categories : Iphone

Methods for giving best estimate of Location from three Android location providers
//declare constants // The minimum distance to change Updates in meters private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 20; // 10 meters // The minimum time between updates in milliseconds private static final long MIN_TIME_BW_UPDATES = 2000 * 60 * 1; // 1 minute public void getlocation() { locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); // Define the criteria how to select the locatioin provider Criteria criteria = new Criteria(); provider = locationManager.getBestProvider(criteria, false); locationManager.requestLocationUpdates(provider, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, this); if (locationManager != null) { Location location = locationManager.getLastKnownLocatio

Categories : Java

Different GPS Location Reading Of Same Physical Location on Windows Phone GeoCoordinateWatcher
This shows a really bad GPS device. You get a jump of 570m, this should never be the case for GPS signals. Make sure that the location was got only from GPS (on android and ios if you do not care, positions may also come from cell Tower of wifi location service). Check also the timestamp of the first location, and compare it with system time, just to make sure it is not an old location which was cached. It is normal for GPS when you are standing that coordinates move up to 30m. Therfore some smartphone manufacteres enables a "stand still" filter. It seems that you have to write your own "stand still" filter. Simplest is to read the location.getSpeed(): if it is more then 5km/h take the position, otherwise ignore it. (This works well for vehicles but not for walking) And also important,

Categories : C#

Google location API: request location updates with pending intent?
You can either register Broardcast Reciever or Activity through pending intent.Sample Example for registering boardcast reciever: String proximitys = "ACTION"; IntentFilter filter = new IntentFilter(proximitys); registerReceiver(mybroadcast, filter); Intent intent = new Intent(proximitys); PendingIntent proximityIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); locationManager.requestLocationUpdates(provider, mintime, mindistance, proximityIntent); Your Broardcast Reciever: public class ProximityIntentReceiver extends BroadcastReceiver { @SuppressWarnings("deprecation") @Override public void onReceive(Context arg0, Intent intent) { //action to be performed }

Categories : Android

Default FileSystem location
Not sure if this is what you are looking for... For JFileChooser, the default directory is typically the "My Documents" folder on Windows, and the user's home directory on Unix. Source. If you want the working directory's path, then CurrentClass.class.getProtectionDomain().getCodeSource().getLocation().getPath().

Categories : Java

Android Location not returning Location from Custom Class
I'm not sure what is your problem but this is my code which is under load and fully functional. Since this class extends from Fragment then it can act as parent of your fragment. There is a listener that your class can get new location after each interval. public class LocationFinderFragment extends Fragment implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener { public interface OnNewLocationFoundListener { public void OnNewLocationFound(Location location); } private static final String TAG = "LocationFinderFragment"; private static final long DEFAULT_UPDATE_LOCATION_INTERVAL = 30 * 1000; // update every 30 seconds private static final long DEFAULT_TERMINATE_SAT_FINDING = 1 * 60 * 60 * 1

Categories : Java

Check if Location is unavailable in Android Location Client
AFAIK, there is no method to check availability. Possible Reason: LocationClient uses fused API which gives location with appropriate combination of GPS,WiFi,Cell,Sensors (according to the Priority you have set for retrieving location). Reference: Fused API - Beyond the blue dot Alternate Solution: You already know it.you can check availability of provider by using location system service and LocationManager

Categories : Android

point a windows 8 app towards a certain location relative to the tablet's location
Here is the link for the geolocation sample in Windows 8: Windows 8 Geolocation Sample You can check the samples in C#, JavaScript, and C++. Below is the specific part where it shows the latitude and longitude in JavaScript. You can find the corresponding in C++/C# by browsing through the code samples: JavaScript function getPositionHandler(pos) { document.getElementById('latitude').innerHTML = pos.coordinate.latitude; document.getElementById('longitude').innerHTML = pos.coordinate.longitude; document.getElementById('accuracy').innerHTML = pos.coordinate.accuracy; document.getElementById('geolocatorStatus').innerHTML = getStatusString(loc.locationStatus); } Regarding location of Trafalgar Square, I'm sure Bing Maps API or Google Maps API, or any Maps API will h

Categories : Javascript

three.js Object3D local location, versus global location
From the API, the lookAt() method for Camera objects is defined to use world position, as you've discovered. This seems to be relatively common way to handle things. I'm not that familiar with the three.js API in particular, but it appears that if you want to get the global position of ball, you can use the following: var targetPos = ball.position.clone(); ball.localToWorld(targetPos); Hopefully that gets you closer to your goal. Unfortunately, the fiddle you have seems to be (very) non-deterministic, so I can't quickly get a 100% solution for you.

Categories : Javascript

Find location source using Fused Location Provider
No, Fused location provider: The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs. It may use combo of that data.

Categories : Android

Cant compare current location to database location android
Do not use == to compare String instead use .equal or .match Something like this : if(arlist.get(i)==Double.toString(location.getLongitude()) && arlistlat.get(i).equal(Double.toString(location.getLatitude()))){

Categories : Android

Output jbehave report to a different location other than code location
Try using the CodeLocations class to generate the URL; .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromPath("D:\abc")) ... I also replaced the slash with a backslash in the path.

Categories : Java

How do I track user's location just long enough to grab the location?
LocationManager could be stopped after location information of user has been retrieved . CLLocationManager* locationManager = [ [ CLLocationManager alloc] init]; locationManager.delegate = self; //we must implement the protocol locationManager.distanceFilter = kCLDistanceFilterNone; locationManager.headingFilter = kCLHeadingFilterNone; locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers; //To turn on gps (if it isn't on already) [locationManager startUpdatingLocation]; //To turn gps off (if no other apps are listening) [locationManager stopUpdatingLocation];

Categories : IOS

Update location every 30 seconds using Network Location Provider?
Option 1 If you need to call onLocationChanged dont use requestLocationUpdates, since the API is completely unreliable on custom android phones (Samsung). Its better you use a AlarmManager and call getLastKnownLocation, and call onLocationChanged yourself. Also note that getLastKnowLocation is buggy on Samsung phones, so you need to trigger the api to update behind scene's before you can expect it to return a good location. Call this just before getLastKnownLocation, its a hack. Note : that this does nothing to your app, just triggers the backend cache to have a good Last Known Location. HomeScreen.getLocationManager().requestLocationUpdates( LocationManager.NETWORK_PROVIDER, 0, 0, new LocationListener() { @Override public void onStatusChanged(String provider, int

Categories : Android

Prevent fake location on iPhone : Location spoofing
I'm working on this too, where the phone sends the lonlat to a server, and I want to prevent people just POSTing any lonlat they choose (e.g. via curl). One idea is to also submit the available Wifi SSIDs along with the location, and if someone claims a location with an SSID list that differs substantially from others', flag that submission for review. Unfortunately iOS doesn't give you a way to obtain the list of available SSIDs. . . .

Categories : Iphone

How to know the source Provider from Location using Google Location Services
The Google Play Location API does not provide a way to determine the source provider as it functions as a Fused Location Provider: The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs. The location returned may be a combination of cellular, WiFi, GPS, and/or sensor data.

Categories : Android

How to get location names nearby my current location using api v2 in android
REQUEST_DENIED means you are using wrong key. Enable Places API and then try. Also you can use Browser Key after you enable Places API

Categories : Android

No Location Bearing when using Google Play Location Services?
This code is functional it is just not the correct way to get compass bearing data. After taking the app outdoors and getting a GPS fix I was able to get new readings. I have since re-read the documentation and have realised the bearing on location is not a compass bearing (i.e. north is not 0.0) but the horizontal direction of travel.

Categories : Android

How to Reconnect the location client(Fused location) in onActivityResult
You have to invoke : if (!mLocationClient.isConnected()) { mLocationClient.connect(); } and then wait connection is done in : @Override public void onConnected(Bundle connectionHint) { startPeriodicUpdates(); }

Categories : Android

how to get direction from my gps location to one location from many given locations as destination using intent
Try this code, private boolean gps_enabled = false; private boolean network_enabled = false; private LocationListener locListener = new MyLocationListener(); LocationManager locManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); try { gps_enabled = locManager.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch (Exception ex) { } try { network_enabled = locManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); } catch (Exception ex) { } // don't start listeners if no provider is enabled if (!gps_enabled && !network_enabled) { } if (gps_enabled) { locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 10, locListener); } if (network_enabled) { locManage

Categories : Android

ClassCastException class extends android.location.Location
Change parameter of the constructor of ExtendedLocation to Location and remove class casting from calling this: currentGpsLocation = new ExtendedLocation(location);

Categories : Android

Location not found with Google Maps API
This is a Places API result, not from the geocoder. Looks like the zip code is confusing the geocoder, if I remove the zip code, it returns a result: http://www.geocodezip.com/v3_example_geo2.asp?addr1=1606%20ULSTER%20AVE,%20LAKE%20KATRINE,%20NY&geocode=1

Categories : Google Maps

Location of C++ function default parameters
If you put the default parameters into the method definition, then only those who see the definition would be able to use the default parameters. The only problem would be if you tried something like this: public: Point(int i = 0, int j = 0); (...) Point::Point(int i = 0, int j = 0) { ... } Then you would get a build-time error. // EDIT: But I'm curious what Mark B. will find as mentioned in a comment under your question. // EDIT2: And also apparently clang compiler doesn't like Case B.

Categories : C++

how to redirect inside of iframe location to another location?
Give an id to your iframe <iframe scrolling="no" src="http://www.example.com/login" id ="myframe"> </iframe> then on your button click var frame = document.getElementById('myframe'); frame.src = "your new src";

Categories : Javascript

How to distinguish between no location update and no location fix in Android?
Try using LocationClient.getLastLocation. You can store this location and check against it later.

Categories : Android

Nginx location behave with and without location regex
I'd suggest excluding the assets from the rewrite, you can do that by adding a new location, something like this location /(css|js|images) { root /var/www/www.my-project.com/web; try_files $uri =404; } And for the location issue, you can match exact locations using = location = /www.my-project.com {

Categories : Nginx

Android location update on location change
@Override public void onLocationChanged(final Location location) { // it Returns the name of the provider that generated this fix. String locationProvider = location.getProvider() }

Categories : Android

change the default location on google maps iOS sdk
First get the point of user's tap. Then, get coordinate value for that CGPoint and set it as mapView's center. -(void)handlePan:(UIPanGestureRecognizer *)recognizer { // Get tap point CGPoint tapPoint = [recognizer locationInView:[recognizer superView]]; // Convert CGPoint to CLLocationCoordinate2D CLLocationCoordinate2D center = [self.mapView.projection coordinateForPoint:tapPoint]; // Set camera of mapView GMSCameraPosition * camera = [GMSCameraPosition cameraWithLatitude:center.latitude longitude:center.longitude zoom:self.mapView.camera.zoom]; [self.mapView setCamera:camera]; }

Categories : IOS

azure vm location default using command line?
azure vm start is going to start a virtual machine that you've already created, within a specific region. To do that, you'd first need to call azure vm create. You would first create your vm from an image in the gallery (and within a dns name, xxxxx.cloudapp.net). To see the images available to you, try running azure vm image list. Also: don't forget to add --ssh or --rdp so you can have remote access, when calling azure vm create. Jeff Wilcox blogged about this in more detail, here.

Categories : Azure

Is there any way to set default time zone for location basis..?
You have to use JS to solve this problem. http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/ how to set using JS http://onlineaspect.com/examples/timezone/index.html shows ur timezone. should do the trick

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.