- Theme setup
- cursor CLI launcher
- Keybinding as per your previous editor
- create account for enhanced support
- Codebase indexing is the foundation to AI suggestion
- the more cursor knows about you codebase the better it can give you suggestions
- Tab, In-line edit and Agent
- Tab can autocomplete blocks of code
- CMD + K to open in-line edit box where you can ask what to code using natural language
- CMD + I to open agent chat
I hereby claim:
- I am ladwaaditya on github.
- I am adi7ya (https://keybase.io/adi7ya) on keybase.
- I have a public key ASA1clHNjrtj9NeZe_a5iO32Uv-VyAJLt_1OHTHTim4ixwo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ladwa.aditya | |
import io.reactivex.Scheduler | |
import io.reactivex.android.plugins.RxAndroidPlugins | |
import io.reactivex.plugins.RxJavaPlugins | |
import io.reactivex.schedulers.Schedulers | |
import org.junit.jupiter.api.extension.AfterEachCallback | |
import org.junit.jupiter.api.extension.BeforeEachCallback | |
import org.junit.jupiter.api.extension.ExtensionContext | |
import java.util.concurrent.Callable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val okhttpClientBuilder = OkHttpClient.Builder() | |
val networkInterceptor = NetworkInterceptor(context) | |
okhttpClientBuilder.addInterceptor(networkInterceptor) | |
val okhttpClient = okhttpClientBuilder.build() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewModel.login() | |
.subscribeWith(new DisposableSingleObserver<Result>() { | |
@Override | |
public void onSuccess(Result result) { | |
//Handle Success | |
} | |
@Override | |
public void onError(Throwable e) { | |
if (e instanceof NetworkInterceptor.NoNetworkException) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetworkInterceptor(context: Context) : Interceptor { | |
private val mApplicationContext: Context = context.applicationContext | |
private val isConnected: Boolean | |
get() { | |
val cm = mApplicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager | |
val activeNetwork = cm.activeNetworkInfo | |
return activeNetwork != null && activeNetwork.isConnectedOrConnecting | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply from: 'deps.gradle' | |
// ... | |
dependencies { | |
compile supportLibs | |
compile rxJavaLibs | |
compile retrofitLibs | |
compile okHttpLibs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onClickReference(User user) { | |
Toast.makeText(this.context, "Clicked Listener method " + user.getFirstName() + user.getLastName(), Toast.LENGTH_SHORT).show(); | |
user.setClicked(user.isClicked()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User extends BaseObservable { | |
private boolean clicked; | |
@Bindable public boolean isClicked() { | |
return clicked; | |
} | |
public void setClicked(boolean clicked) { | |
this.clicked = !clicked; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User user = new User("Aditya", "Ladwa", 22, true); |
NewerOlder