« first day (1668 days earlier)      last day (2449 days later) » 

10:03 AM
func fetchCountryAndCity(location: CLLocation, completion: @escaping (String, String) -> ()) {
CLGeocoder().reverseGeocodeLocation(location) { placemarks, error in
if let error = error {
print(error)
} else if let country = placemarks?.first?.country,
let city = placemarks?.first?.locality {
completion(country, city)
}
}
}
let location = CLLocation(latitude: latitudeCurrent, longitude: longitudeCurrent)
print("Location in view did load\(location)")
fetchCountryAndCity(location: location) { country, city in
print("country:", country)
print("city:", city)

self.txtPlaceSearch.text = "\(city),\(country)"
}
 
10:30 AM
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    let loadingNotification = MBProgressHUD.showAdded(to: self.view, animated: true)
    loadingNotification?.hide(true,afterDelay: 3.0)

    let location = CLLocation(latitude: latitudeCurrent, longitude: longitudeCurrent)
    fetchCountryAndCity(location: location) { country, city in
        print("country:", country)
        print("city:", city)

        self.txtPlaceSearch.text = "\(city),\(country)"
    }
}
if location != nil {

fetchCountryAndCity(location: location) { country, city in
print("country:", country)
print("city:", city)

self.txtPlaceSearch.text = "\(city),\(country)"
}
}
else{

self.txtPlaceSearch.text = ""
}
 
11:23 AM
@FelixPalmen that's not what you said. You said if the programmer does not know anything about the data then picking the first pivot is as good, which is wrong, qsort is notoriously slow with worst-case input. If you randomize, then you're guaranteed to get worst case inputs only in a fraction of cases, even if a) feeding in worst case input by accident twice, b) being attacked by a malicious party. — Antti Haapala 13 secs ago
1 message moved from Python
 
 
1 hour later…
1:41 PM
Typo.
0
Q: Error in split == TRUE : comparison (1) is possible only for atomic and list types

Space MonkThis is the line of code that is generating the said error. The variable 'y' contains values '0' or '1'. There are about a dozen different variables in the dataframe. I'm using R version 3.4.1. set.seed(201) library(caTools) spl = sample.split(bank$y, 0.7) training <- subset(bank, split == TRUE)

 
componentWillMount() {
const script = document.createElement("script");

script.src = "https://ubibirdwordpress-teamarmentum.c9users.io/cometchat/js.php?type=core&name=embedcode";
script.async = true;

document.body.appendChild(script);
},
 
1 message moved from JavaScript
 
 
1 hour later…
 
4 hours later…
7:55 PM
5 messages moved from GMTs
 
 
3 hours later…
10:38 PM
/**
* the function gets the ID of the video from the url (the hashID is the refId of the video)
* */
function getParameterByName(hashId) {
var url = window.location.href;

hashId = hashId.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + hashId + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
 
1 message moved from JavaScript
 

« first day (1668 days earlier)      last day (2449 days later) »