w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How to stop the pin to move along with map in MapKit
This is not the idea of a map annotation. Annotaions have geographical coordinates, and therefore move with the map. What you want is a custom view (which looks like a pin) which you add to the viewController as subView. Your custom view is then parallel to the mkMapKit in view Hierarchy, then such a view always stays on its screen coordinates. Examples are: Cross hairs in the middle of the screen, ruler views, coordinates display, etc.

Categories : Iphone

MapKit, Dropping pin on one location with button
While I think this is discussed in some detail in the Adding Annotations to a Map section of the Location Awareness Programming Guide, I have a few observations: You ask "do I need to use MKAnnotation?" Yes and no. Yes, all annotations should conform to the MKAnnotation protocol. As that guide describes, if you can create your own annotation subclass, you'd want it explicitly declare it to conform to the MKAnnotation protocol. But, no, you don't have to always create your own annotation class that conforms to the MKAnnotation protocol. You can also use a predefined annotation class, MKPointAnnotation (which, itself, already conforms to the MKAnnotation protocol), such as: MKPointAnnotation *annotation = [[MKPointAnnotation alloc] init]; annotation.coordinate = CLLocationCoordinate2DMak

Categories : IOS

Move Redirected User Documents to a new folder location at a different folder level
According to your description this should work: $csv = 'C:scriptsusernames.csv' $log = 'C:scriptsHomeDir_robocopy.log' Import-Csv $csv | % { $_.username } | % { $src = "\server1Users$_" $dst = "\server2Users$_My Documents" robocopy "$src" "$dst" /e /copyall /r:1 /w:5 /log+:"$log" }

Categories : Powershell

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

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

How to move form box to a new location
To position forms using the Properties window In the Properties window, choose the form from the drop-down. Set the form's StartPosition property to Manual. Type the values for the Location property, separated by a comma, to position the form, where the first number (X) is the distance from the left border of the display area and second number (Y) is the distance from the upper border of the display area. Note Expand the Location property to enter the X and Y subproperty values individually. Reference MSDN

Categories : C#

I can't seem to move the location of a Picture box in c#
You have to recreate new Location: private void Form1_KeyDown(object sender, KeyEventArgs e) { Point l; if(e.KeyCode == Keys.Up) { l = new Point(ImgGuy.Location.X, ImgGuy.Location.Y - 1); } else if (e.KeyCode == Keys.Down) { l = new Point(ImgGuy.Location.X, ImgGuy.Location.Y + 1); } else if (e.KeyCode == Keys.Left) { l = new Point(ImgGuy.Location.X - 1, ImgGuy.Location.Y); } else if (e.KeyCode == Keys.Right) { l = new Point(ImgGuy.Location.X + 1, ImgGuy.Location.Y); } ImgGuy.Location = l; }

Categories : C#

Offline map using osmdroid does not move to location
ZoomToSpan seems not to be working in Osmdroid use the following code may be it will help you. mapControl = mapView.getController(); mapControl.setZoom(15); mapControl.setCenter(new GeoPoint((maxLatitude + minLatitude) / 2, (maxLongitude + minLongitude) / 2));

Categories : Android

Is it possible to move a ui element from one location to the other using fading?
Yes something along these lines: [UIView animateWithDuration:0.25 animations:^{ self.viewA.frame = CGRectMake... // middle point self.viewA.alpha = 0.0f; }completion:^ (BOOL finished) { [UIView animateWithDuration:0.25 animations:^{ self.viewA.frame = CGRectMake... // final point self.viewA.alpha = 1.0f; }]; }];

Categories : IOS

How do I fix this click function to move to a particular location slowly?
you have syntax error $(document).ready(function() {//<<< here where having an extra `)` $('a').click(function(){ var a = $(this).offset().top;// please replace `this` with the selector of the element you want to scroll to $('html, body').animate({'scrollTop' : a}// set the correct offset , 100000); return false; }) });

Categories : Javascript

How do I animate a button to shrink and move to a different location?
I'm not at my Macbook right now but I think this might be what you're looking for to make it move [UIView animateWithDuration:2.0 options: UIViewAnimationCurveLinear animations:^{ self.bigButton.center = CGMakePoint(XCOORD, YCOORD); self.bigButton.frame = CGRectMake(STARTX,STARTY,WIDTH,HEIGHT) } completion:^(BOOL finished){ self.bigButton.hidden = YES; self.littleButton.hidden = NO; }]; where it will move to the point XCOORD, YCOORD and the size of the button will have the bo

Categories : IOS

Move an object to a target location in a straight path
You are going need something more complicated than this function. What this does is simply "approach" the destination. It does not follow a straight path. To accomplish what you want to do, you need to do a few things: Find the your position. Find the position of the destination. Calculate the horizontal distance from the start pos to end pos. Same, except for vertical. Now if you were to add this to your starting object, you would immediately be at the destination. How can we make it move slowly? Simply divide the vertical and horizontal distance by a "speed" variable. This is the rate that the object would move in one frame. For each frame, update the object by adding the x and y component you just found. Check if you have reached the destination. Repeat step 6 if necessary. (OR: kee

Categories : Lua

How do I use JQuery in coordination with an anchor tag to move the screen to a location?
Just add id's on your div with the section name: <div id='about' class="section2"> About </div> Then use this code: $('.link').click(function(){ $('html, body').animate({'scrollTop' : $($(this).attr('href')).offset().top}) //Will maybe be $(window) instead of html,body. return false; }) Fiddle : http://jsfiddle.net/Hw4L6/

Categories : Javascript

How do you move controls in VB during runtime and save the location data?
For example: Create a New Setting: Project menu-> Properties -> Settings ->create a setting as below Name Type Scope Value myLoc System.Drawing.Point User 2;2 Applied to app Read Settings when Form_Load Button1.Location = My.Settings.myLoc Change and save Settings My.Settings.myLoc = Button1.Location My.Settings.Save()

Categories : Dotnet

in gamequery; how would I move an object "slowly" from its "dropped" location to where it needs to go?
What you could do is to use jQuery to animate something else than a CSS property, like explained there: https://coderwall.com/p/fn2ysa In your case to make your sprite move from currentX to destinationX in one second you code would look like: var from = {x: currentX}; var to = {x: destinationX}; $(from).animate(to,{duration: 1000, step: function(step){ $(mySprite).x(step); }});

Categories : Javascript

Finding the change needed in location to move around the circumference of a circle#2
I see you are using int a lot, be very careful since you may get stuck depending on angle. I did a quick rewrite to simplify your repetition and use the radian logic that was recommended. (Untested). I also converted your locations to double to avoid odd integer arithmetic problems. (Your midx/midy calculations were in int math) After finishing I realized you were rotating around (0,0) rather than the midpoint, and your mid variables were confusingly named. //I would do double inline with the initialization, but left here in case you had another reason double x1,y1, x2,y2, r, midx,midy, newAngle; x1 = a.center[0]; y1 = a.center[1]; x2 = a.target.center[0]; y1 = a.target.center[1]; r = getDistance(a, a.target)/2; midx = x1 + (x2 - x1)/2; midy = y1 + (y2 - y1)/2; newAngle = Math.toRad

Categories : Java

Move entire directory and its contents to another location on the same server using Net::FTP in Ruby
Well, I found the solution and it's quite simple. Files (& Directories) can be moved using the rename() method of the Net::FTP Class. Example: ftp = Net::FTP.new("ftp.myserver.com","myusername","mypassword") ftp.binary = true ftp.passive = true path1 = "/original/dir/path/" # Dir to move path2 = "/new/path/" # New path of Dir ftp.rename(path1, path2) And that's it! This causes all files to move from one path to another on the same FTP Server.

Categories : Ruby

How to move objects (grid + contents) smoothly to a different location on the page
you can use storyboard in which you can define a what time interval you want to move your grid and you can also Select the type of transition while moving... it is very smooth.... and then you can start that storyboard whenever you want to move your grid ...

Categories : C#

Finding the change needed in location to move around the circumference of a circle
One problem is that you are using degrees while the math functions such as cos etc... use radians.

Categories : Java

which registers is changed when we move from user mode to kernel mode ?! and what is the reason to move to kernel mode?
From your questions i found that you are very poor in operating system concepts. Ok let me explain,(I am assuming you are using linux not windows). "which registers is changed when we move from user mode to kernel mode ?" For knowing answer for this question you need to learn about process management. But i can simply say, linux uses system call interface for changing from user space to kernel space. system call interface uses some registers (Based on your processor) to pass system call number and arguments for system call.

Categories : C++

Allow a user to move a borderless window
Introduce a Boolean variable which holds the state if the form is currently dragged and variables which hold the starting point of the drag. Then OnMove move the form accordingly. As this has already been answered elsewhere, I just copy&paste it here. Class Form1 Private IsFormBeingDragged As Boolean = False Private MouseDownX As Integer Private MouseDownY As Integer Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown If e.Button = MouseButtons.Left Then IsFormBeingDragged = True MouseDownX = e.X MouseDownY = e.Y End If End Sub Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseUp If e.Button = MouseBu

Categories : Vb.Net

How can I make my CSS move as the user types?
to manipulate css in real time as the user types, you need to use JavaScript. a good simple library for javascript is jQuery. which is basically ajvascript simplified. what you need is this method: http://api.jquery.com/keypress/ good luck

Categories : HTML

IOS Track User Location Map kit
Allow your application to run in background In background, start your get geolocation thread active to get current location (on timely basis, after each 10 secs) If the results gets approx. equal value (for ex.: 2 km. radius) to your location, then throw a local notification from that app. To do all this, you will surely find documentation over web, topics are: Allow your app to run in background Fetch user's current location (Start this thread in background delegate method) Match location Fire local notification These are the base flow points, hope this will help you for initial start up.

Categories : Objective C

Getting user's location Android
My suggestion is first one. com.google.android.gms.location.LocationListener abstracts fiding location from your code. For sample code look at here please. It works fine for me with cell network or wifi.

Categories : Android

iOS Get User Location as NSString
I've found a really nice and simple to follow tutorial on this topic - http://www.appcoda.com/how-to-get-current-location-iphone-user/ Hope it will be helpful to others!

Categories : IOS

Get User Location in appDelegate
You can use CLLocationManager to get your current position , and after that you can do reverse geocoding to get the address from the coordinates. In that address, if it's accurate you'll find the word 'London' to match your needs. Do this in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions : CLLocationManager *manager = [[CLLocationManager alloc] init]; manager.delegate = self; //Here you set the Distance Filter that you need manager.distanceFilter = kCLDistanceFilterNone; // Here you set the Accuracy manager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; [manager startUpdatingLocation]; And in the delegate function: -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation

Categories : Iphone

iOS: User location turns into pin
Be sure to avoid providing an annotation view for the built in user location marker. - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation { //check annotation is not user location if([annotation isEqual:[mapView userLocation]]) { //bail return nil; } static NSString *annotationViewReuseIdentifer = @"map_view_annotation"; //dequeue annotation view MKPinAnnotationView *annotationView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:annotationViewReuseIdentifer]; if(!annotationView) { annotationView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:annotationViewReuseIdentifer]; } //set annotation view properties

Categories : IOS

JS - Can't find user location
The result that you are getting is not city id + city name, its a JSON. Read more about JSON. Suppose your result is: var result = FB.api('/me?fields=location'); then you can acces the city name with - var city_name = result.location.name;

Categories : Javascript

Get user location LAT LNG using GPS and network
Have you enable both NETWORK-LOCATION and GPS-LOCATION in Settings yet? As far as I know for Android ICS (4.x) and newer, due to the Security issue, you can't enable/disable location access programmatically. Try to test it on Android 2.x. Hope this helps.

Categories : Android

Get user's current location using GPS
Try this, LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); Criteria criteria = new Criteria(); String provider = locationManager.getBestProvider(criteria, true); Location location = locationManager .getLastKnownLocation(provider); if (location != null) { onLocationChanged(location); } // updates location 30seconds once locationManager .requestLocationUpdates(provider, 30000, 0, this);

Categories : Android

Can't add user location button on an iOS 6 map
That button on maps is toggling the userTrackingMode property on the mapView, so set it to one of these: MKUserTrackingModeNone //nothing, normal map view MKUserTrackingModeFollow //user is highlighted and stays centered on map when you move MKUserTrackingModeFollowWithHeading //you get the heading as well, so your direction is up on the map

Categories : Iphone

Updating user's location
Update your onLocationChanged method by this @Override public void onLocationChanged(Location location) { latitude_user = location.getLatitude(); longitude_user = location.getLongitude(); if (latitude_user != null && longitude_user != null) { if(marker != null) marker.remove(); koordinate_user = new LatLng(latitude_user, longitude_user); marker = supportMap.addMarker(new MarkerOptions() .position(koordinate_user)); } } Hope this is what you wanted.

Categories : Android

Hide iOS Keyboard, but allow user to move cursor around
If your don't want to show keyboard and cursor then just return NO, at end of - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { /// Your stuff; return NO; } Another Option: UIView* dummyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)]; myTextField.inputView = dummyView; Add UIView (dummyView) to your UITextField's inputView. This will not return KeyBoard but also display blinking cursor.

Categories : IOS

How to track user location in background?
You can set up monitoring location stuff in you VC as below in viewDidLoad method do as below CLLocationManager locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.distanceFilter = kCLDistanceFilterNone; locationManager.desiredAccuracy = kCLLocationAccuracyBest;(Accuracy according to your need) [locationManager startUpdatingLocation]; than you have to overrite below two optional delegate methods of CLLocationManagerDelegate protocol for iOS6+ - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{} and for iOS 2 to 6 - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation in these methods you will get updated lo

Categories : IOS

Get the continent/country or location of user in php?
You can acquire a geo location database based on the user's IP address in $_SERVER["REMOTE_ADDR"] and determine the city / country from there. MaxMind provides a free city/country database here: http://dev.maxmind.com/geoip/geoip2/geolite2/

Categories : PHP

Get User Location Information using EKTRON API
I don't have v8.7 running right now, but I do have v9, and here's what I found: I ran the following code: var location = Ektron.Cms.UserContext.GetLocationInfo("74.125.225.113"); Response.Write("<pre>" + Ektron.Cms.UserContext.IP + "</pre>"); Response.Write("<pre>" + string.Format("{0}, {1} ({2} / {3})", location.City, location.Region, location.Longitude, location.Latitude) + "</pre>"); Here's what was displayed on the screen: ::1 Mountain View, CA (-122.057403564453 / 37.4192047119141) I'm running the site locally on my dev machine, so I'm browsing to http://localhost/test.aspx - no real surprise that Ektron.Cms.UserContext.IP is returning "::1" for me. I didn't have access to a server, so I pinged www.google.com and got an IP address of 74.125.225.113. U

Categories : Api

Check whether or not user is in Location boundaries
I don't think there's a built in method for this. You just check whether the location's latitude is less than the maximum boundary latitude and more than the minimum. Then the same with longitude. If you convert them to MKMapPoint and MKMapRect, you can use MKMapRectContainsPoint() to check.

Categories : Iphone

user location GPS coordinates when no internet
The Basics of How Location Services Determines Your Location Apple iOS uses a three-stage algorithm in order to determine your location: Assisted Global Positioning System (A-GPS) Crowdsourced Wi-Fi Cellular network search These three stages are used in descending order of priority. In other words, iOS first attempts to fix your location by using a GPS satellite link. If it is unable to acquire a satellite, iOS fails over to Wi-Fi. If you are not connected to a Wi-Fi local area network (WLAN), then iOS uses cell tower data. If all of the above fail, then you receive an error message such as what you see in the following figure. Assisted GPS (A-GPS) shortens the time that it typically takes for a GPS client device to acquire a connection to a satellite. For instance, my morning runs ar

Categories : Iphone

LocationManager and LocationClient together to get user location
LocationClient.getLastLocation() only returns null if a location fix is impossible to determine. getLastLocation() is no worse than getLastKnownLocation(), and is usually much better. I don't think it's worth "falling back" to getLastKnownLocation() as you do. You can't get into trouble using both, but it's overkill. Of course, you have to remember that LocationClient is part of Google Play Services, so it's only available on devices whose platform includes Google Play Store. Some devices may be using a non-standard version of Android, and you won't have access to LocationClient. The documentation for Google Play Services discusses this in more detail.

Categories : Android

Show User's current location on map
You're using a CLLocationManager and setting it's delegate, but your delegate methods are all methods of MKMapViewDelegate. You can either set the mapview's delegate, or use the locationManager:didUpdateLocations: CLLocationManagerDelegate method.

Categories : IOS



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