w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
why my echo doesn't work before a header function header(location:home.php);
Actually thy echo is working. but we cant see the message because at the same time the page redirects to the home.php page. If you want to alert to display the alert message use jquery post. or php session variable

Categories : PHP

Problem to plot 3D surface with R‏
Try this to see why I don't think this data is well suited for wireframe: cloud(Z~X+Y, data=FI02, xlab="X", ylab="Y", main="Surface elevation", type="l", screen=list(z=-60, x=-60))

Categories : R

Header Location with variable
codeigniter provides redirect, like: redirect( base_url() . 'action/task/' . $this->index() );

Categories : Codeigniter

$variable = header location
Header returns type of void. You can not expect $error to be anything besides null. If you are getting a 500 error, it is caused by something else (syntax error?).

Categories : PHP

Ajax/php header:Location
You should use javascript to rewrite the document.location instead of sending a HTTP header. It will give the user the same basic experience as a traditional redirect response from a full page request.

Categories : PHP

Using header(Location) and filling select box
header(Location) only works if there has nothing else been printed. EDIT: You could add following line to your <head>-section: <meta http-equiv="refresh" content="5; URL=http://your_url.com/">

Categories : PHP

PHP header location to current page
This is a complete shot in the dark. This will infinitely redirect to itself forever and cause the browser to error. header('Location: ' . $_SERVER['REQUEST_URI']); Try this if(!isset($_GET['r'])) header('Location: ' . $_SERVER['REQUEST_URI'] . '?r=1'); This will redirect but with a parameter, this r parameter can then be checked to ensure the redirect does not occur again and again.

Categories : PHP

ZF2 redirect() not working while header location does
Do you have a return statement in front of it? return $this->redirect()->to route('foo/bar'); /edit: Ok, now I know you haven't, here an explanation. The framework has a concept called short-circuiting. This means that whenever you return a response during route or dispatch, this response will be send to the client immediately. This is done without rendering view scripts, etc, to speed things up a little bit. The Redirect plugin creates a Response object where the status code is set (to either 301 or 302) and a Location header injected. This location header includes the new url you want to redirect to. If you do not place return in front of this call, a Response object is created but never given back to short circuit. It just remains somewhere hidden inside the framework. Based

Categories : PHP

Header location doesn't work
you have white-space between the following lines. remove it so it will potentially work <?php error_reporting(E_ALL); ini_set('display_errors', 'On'); ?> <?php

Categories : PHP

header location not working but stuck in page
Try this, header('Location: lembur_add.php'); exit; OR header('Location: http://localhost/hrm2.1/lembur_add.php'); exit;

Categories : PHP

Sending to header location even though previous form incorrect
Added this additional conditional statement , to check the email input value is enter or not if($_POST['registersubmit'] && (isset($_POST['email']) && !isempty($_POST['email']) )) { // do you stuff here }

Categories : PHP

Redirecting issue using header("Location: url.php") or form action
This is apparently a known bug when using JQM. There apparently is a workaround of calling out data-ajax to be false: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" data-ajax="false"> Bug here - https://github.com/jquery/jquery-mobile/issues/2836 Stack overflow question - Symfony 2 and jQuery mobile 1.1.1

Categories : PHP

Header location redirect makes PHP command execute twice
This is refreshing success.html <meta http-equiv="refresh" content="0; url=http://site.com/index.html"> EDITED have you tried removing <meta http-equiv="refresh" content="0; url=http://site.com/index.html">? Also try changing header('Location: ../success.html'); to header('Location: ../index.html');

Categories : PHP

kruskal.test shows "All group levels must be finite" error. What is the problem?
It should work if you run data$Grp <- as.factor(data$Grp) Then (as before): kruskal.test(data$Val, data$Grp) This is because Grp is a character not a factor and is.finite applied to an object of character class is always false (see ?is.finite).

Categories : R

Header location doesn't work after post mail form
Try to add this line on the top of your php script: error_reporting(E_ALL); //it will show all errors Then you will see on the screen or in the php error log what is wrong. I bet that you will see: Warning: Cannot modify header information - headers already sent by ... etc. If it is your problem, read this to correct the problem: Headers already sent by PHP In the other case, please post the error message to better analyze your problem. T. B.

Categories : PHP

Header location issues while porting Qt code from Windows to Ubuntu
It looks like the original Qt code uses Qt5, QtWidgets/QApplication rings the bell from me [1] and you are pointing to Qt4 in Ubuntu. You should try to install Qt5 in Ubuntu. [1] http://qt-project.org/doc/qt-5.0/qtwidgets/qtwidgets-index.html

Categories : C++

PHP Header Location with parameter. Delete and back to previous list
Checkout the parse_url and parse_str functions. http://www.php.net/manual/en/function.parse-url.php http://php.net/manual/en/function.parse-str.php

Categories : PHP

How to include or insert hash (#) on PHP location header or direct/link to an id of a webpage
I'm absolutly not sure this is your (main/only) problem, but according to RFC2616 sec 14 Location response-header field MUST provide an absolute URI: Location = "Location" ":" absoluteURI Still as per RFC2616, "absolute URIs always begin with a scheme name followed by a colon." -- i.e.: http://hostname/path/to/ressource

Categories : PHP

Retrieve id of Jenkins build started with the API using the "location" information in header (new feature of jenkins 1.529)
You need to add a header to your request: Accept: application/json And then it should work. Believe it or not, I had to read the source to figure this out... you can read the relevant snippet here. EDIT: Apparently, though this does return the information for the project, it doesn't return the job that has just been queued! It's a known issue. The bug is #13546.

Categories : Python

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

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

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

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

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

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

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

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

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

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#

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

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

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

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

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

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

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

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



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