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
NB. Some utilities written by me were loaded at started to make this program work. Will upload definitions later as definitions.ijs | |
load'csv' | |
load'jd' | |
jdadmin'Leap' | |
NB.Nouns | |
P =. 'C:\Users\Ivann\Documents\FIU\Fall 2016\Security IoT\Leap\file.csv' | |
P1 =. 'C:\Users\Ivann\Documents\Visual Studio 2015\Projects\Leap\Leap\'c | |
TABLE=. readcsv p |
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
NB. Additional Helper Verbs | |
jdw1 =. (i(0 0 f) i (1 0 f) jd o ('reads count w1 from make where w1 = "'c , ] , '"'c)) | |
space =. (>o[,' 'c,>o])/ | |
getCSV =. i readcsv H,'/CSV/'c,],'.csv'c | |
shape20 =. (],(' 'c)#~(20 c)-$o]) | |
isVerb =. 4!:0&bo | |
s =.(]$~1:,#) | |
NB.All Header Operations | |
removeTrashHdrs =.(}.o],~(1:,#o{.o])$(]-.(a. c)-.'-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'c) e o {.) | |
replaceHdrs =. (}.o],~(1:,#o{.o])$(('null'c)`(rtb"1 o (1 0 f) o jd o ('reads new from headers where old = "'c,],'"'c))@.((0 0 f) o (1 0 f) o (jd o ('reads count old from headers where old = "'c , ] , '"'c))))e o {.) |
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
dot =. (+/ . *) | |
ma =.%: @: (+/ @: *:) | |
ca =. (([:-/ @: *: (ma x) , ([:ma [-]) , ma y ) % (2: * (ma x) * (ma y))) |
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 PopularMoviesActivity : BaseActivity(), PopularMoviesContract.View { | |
private val tvMainText: TextView by bindView(R.id.mainText) | |
private val btnMainButton: Button by bindView(R.id.mainButton) | |
lateinit var presenter: PopularMoviesPresenter | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) |
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 PresentationApp : DaggerApplication() { | |
override fun applicationInjector() = DaggerAppComponent.builder().application(this).build() | |
} |
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
@Component( | |
modules = [ | |
ApiModule::class, | |
ContractModule::class, | |
ActivityBindingModule::class, | |
AndroidSupportInjectionModule::class | |
] | |
) | |
@Singleton | |
interface AppComponent : AndroidInjector<PresentationApp> { |
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
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' | |
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' | |
implementation 'com.squareup.retrofit2:converter-gson:2.5.0' | |
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' | |
implementation "com.google.dagger:dagger:2.23.2" | |
implementation "com.google.dagger:dagger-android-support:2.22.1" | |
kapt "com.google.dagger:dagger-compiler:2.22.1" | |
kapt "com.google.dagger:dagger-android-processor:2.22.1" |
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
@Module | |
abstract class PopularMoviesActivityModule { | |
@Binds | |
abstract fun bindBaseActivity(activity: PopularMoviesActivity) : BaseActivity | |
} |
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
@Module | |
abstract class ActivityBindingModule { | |
/* | |
Binds PopularMoviesActivity in another module as a BaseActivity so that BaseActivity can be injected | |
with the objects that its subclasses will use. | |
Such as the AutoDisposable | |
*/ | |
@ContributesAndroidInjector(modules = [MovieActivityModule::class]) | |
abstract fun bindMovieActivity(): PopularMoviesActivity | |
} |
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
@Module | |
abstract class ContractModule { | |
// This module allows our presenters to be injected | |
@Binds | |
abstract fun providesPresenter(presenter: PopularMoviesPresenter): PopularMoviesContract.Presenter | |
} |
OlderNewer