How to update / upgrade from Angular 4 to Angular 5+

This specific problem was fixed with Node version update. I had to update Node version, sudo apt-get install nodejs npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest ng new ProjectName node –version ==> 8.9.0 ng –version ==> 1.5.0 “dependencies”: { “@angular/animations”: “^5.0.0”, “@angular/common”: “^5.0.0”, “@angular/compiler”: “^5.0.0”, “@angular/core”: “^5.0.0”, “@angular/forms”: “^5.0.0”, “@angular/http”: “^5.0.0”, … Read more

Android: How to update an UI from AsyncTask if AsyncTask is in a separate class?

AsyncTask is always separate class from Activity, but I suspect you mean it is in different file than your activity class file, so you cannot benefit from being activity’s inner class. Simply pass Activity context as argument to your Async Task (i.e. to its constructor) class MyAsyncTask extends AsyncTask<URL, Integer, Long> { WeakReference<Activity> mWeakActivity; public … Read more

How does it work – requestLocationUpdates() + LocationRequest/Listener

You are implementing LocationListener in your activity MainActivity. The call for concurrent location updates will therefor be like this: mLocationClient.requestLocationUpdates(mLocationRequest, this); Be sure that the LocationListener you’re implementing is from the google api, that is import this: import com.google.android.gms.location.LocationListener; and not this: import android.location.LocationListener; and it should work just fine. It’s also important that the … Read more

How to fix ‘”CheckAttributes” task could not be loaded’-error after installing Visual Studio 2013 Update 4

Well, here’s “my solution”. First the horrific “prompt of death” (plus the same “licensing issue” annoyance) in this post: What I’ve attempted (and result) based on info from the interwebs: Close VS 2013 and rename the folder: C:\Users\[your user name]\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache Result: No effect/errors persist (VS will re-create that folder on startup) Rerun the Visual Studio … Read more

Laravel check if updateOrCreate performed an update

You can figure it out like this: $tourist = Tourist::updateOrCreate([…]); if(!$tourist->wasRecentlyCreated && $tourist->wasChanged()){ // updateOrCreate performed an update } if(!$tourist->wasRecentlyCreated && !$tourist->wasChanged()){ // updateOrCreate performed nothing, row did not change } if($tourist->wasRecentlyCreated){ // updateOrCreate performed create } Remarks From Laravel 5.5 upwards you can check if updates have actually taken place with the wasChanged and … Read more

Why are my Xcode plugins (such as clang format) installed with Alcatraz no longer working after updating to new version of Xcode?

Oftentimes, the following helps: Re-install Alcatraz, restart Xcode, de-install and re-install your plugin. Sometimes it helps to restart Xcode again. This worked for me. If your plugin still does not show up, the problem is probably that the the compatibility key of your new Xcode is not yet included in the list of compatibility keys … Read more

Application’s data folder in Mac

/Users/USERNAME/Library/Application Support/ Edit: This answer has drawn a lot of upvotes despite its minimalistic nature. Therefore, I want to point out the things mentioned in the comments here to make them more visible: There are several other folders being used for application data / configuration, as mentioned in this answer. If writing an application, don’t … Read more

Removing Ignored Android Studio (or Intellij) Update Builds

Update As of the latest version of Android Studio, there is now a Preference in the UI noted in an answer by Yogesh Umesh Vaity Original Answer The simple way to revert a mistaken choice is to close Android Studio then edit other.xml file and remove the myIgnoredBuildNumbers option block: <option name=”myIgnoredBuildNumbers”> <value> <list size=”1″> … Read more