This file contains 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
sv_cheats 1 | |
sv_infinite_ammo 1 | |
sv_showimpacts 1 | |
sv_grenade_trajectory 1 | |
mp_roundtime 60 | |
mp_roundtime_defuse 60 | |
mp_roundtime_deployment 60 | |
mp_roundtime_hostage 60 | |
mp_round_restart_delay 1 | |
mp_maxmoney 60000 |
This file contains 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.gabrielfv.desafioconcrete.api | |
import com.gabrielfv.desafioconcrete.api.models.ApiResponse | |
import com.gabrielfv.desafioconcrete.api.models.Pull | |
import com.gabrielfv.desafioconcrete.api.models.Repo | |
import io.reactivex.Observable | |
import io.reactivex.observers.TestObserver | |
import org.junit.Before | |
import org.junit.Test | |
import org.mockito.Mockito.`when` |
This file contains 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
(ns katas.diamond) | |
(require '[clojure.string :as string] | |
'[clojure.test :refer [is]]) | |
(defn alphabet-pos [c] | |
(- (int c) (int \A))) | |
(defn anagram? [s] | |
(if (>= 1 (count s)) | |
true |
This file contains 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private var count: Int = 0 | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
textView.text = "$count" | |
button.setOnClickListener { | |
count++ | |
textView.text = "$count" |
This file contains 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private var count: Int = 0 | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
savedInstanceState?.let { state -> | |
count = state.getInt("COUNT", 0) | |
} |
This file contains 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private val viewModel = GenericProvider.provide { MainViewModel() } | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
textView.text = "${viewModel.count}" | |
button.setOnClickListener { | |
viewModel.inc() |
This file contains 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 static ViewModelProvider of(@NonNull FragmentActivity activity, | |
@Nullable Factory factory) { | |
Application application = checkApplication(activity); | |
if (factory == null) { | |
factory = ViewModelProvider.AndroidViewModelFactory.getInstance(application); | |
} | |
return new ViewModelProvider(activity.getViewModelStore(), factory); | |
} |
This file contains 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private lateinit var viewModel: MainViewModel | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
viewModel = ViewModelProvider(viewModelStore, ViewModelProvider.NewInstanceFactory()) | |
.get(MainViewModel::class.java) |
This file contains 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 MainActivity : ComponentActivity(R.layout.activity_main) { | |
private lateinit var viewModel: MainViewModel | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
viewModel = provideViewModel(MainViewModel::class.java) | |
textView.text = "${viewModel.count}" |
This file contains 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.gabrielfv.sandbox6 | |
import android.app.Activity | |
import android.app.Application | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.Toast | |
import dagger.* | |
import javax.inject.Inject |