Skip to content

Instantly share code, notes, and snippets.

View anoopmaddasseri's full-sized avatar
💪
Nothing great ever came that easy.!!

Anoop Maddasseri anoopmaddasseri

💪
Nothing great ever came that easy.!!
View GitHub Profile
@anoopmaddasseri
anoopmaddasseri / react_vs_ionic2.csv
Last active October 24, 2017 10:31
React Native vs Ionic 2 framework: Side-by-Side Comparison
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
ELEMENT,REACT NATIVE,IONIC 2
Powered By,"Based on React backed on Facebook","Based on Angular 2 backed by Google"
The Language stack,"React Native is based on the Javascript framework React and, thus, uses Javascript code that resembles HTML but essentially isn’t—they call it. JSX( is a preprocessor step that adds XML syntax to JavaScript). With that, the display logic is blended in with the business logic.","HTML5, SASS, Angularjs , Cordova & TypeScript( A strict syntactical superset of JavaScript ). Ionic is a framework based on Angularjs, a Javascript framework. It uses HTML templates for its views. It is in line with the Model-View-Controller pattern as views and logic are clearly separated."
Boot up time,"Boot up time is as fast as native apps","Boot up time is as fast as native apps"
Memory Usage,"When it comes to memory usage, Ionic framework uses more than react native apps. can feel a little clunky but this can be mitigated with good design practises.","React native is a memory saver as it supports t
@anoopmaddasseri
anoopmaddasseri / Places Autocomplete Picker
Last active July 3, 2019 09:32
Places autocomplete picker helper using the new Places SDK client
package xxx.xxx.xxx
/*
* @author Anoop M <[email protected]>
* @version 1
* @since 03 July 2019
*
*/
import android.app.Activity
val getContent = registerForActivityResult(GetContent()) { uri: Uri? ->
// Handle the returned Uri
}
override fun onCreate(savedInstanceState: Bundle?) {
// ...
val selectButton = findViewById<Button>(R.id.select_button)
selectButton.setOnClickListener {
@anoopmaddasseri
anoopmaddasseri / Generic StartActivityForResult contract - JAVA
Last active December 5, 2022 22:13
Generic StartActivityForResult contract - JAVA & Kotlin
ActivityResultLauncher<Intent> mStartForResult = registerForActivityResult(new StartActivityForResult(),
new ActivityResultCallback<ActivityResult>() {
@Override
public void onActivityResult(ActivityResult result) {
if (result.getResultCode() == Activity.RESULT_OK) {
Intent intent = result.getIntent();
// Handle the Intent
}
}
});
implementation 'androidx.activity:activity:1.2.0-alpha05'
implementation 'androidx.activity:activity-ktx:1.2.0-alpha05'
//You must use fragment 1.3.0-alpha02 or later
implementation 'androidx.fragment:fragment:1.3.0-alpha05'
implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha05'
@anoopmaddasseri
anoopmaddasseri / readme.md
Created June 11, 2020 09:11 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@anoopmaddasseri
anoopmaddasseri / KT_EXT_PROPERTY_LIST
Last active October 4, 2020 05:59
Kotlin: Transform collection elements to elements of either property
Option 1 -
==========
inline fun <reified T, Y> MutableList<T>.listOfField(property: KMutableProperty1<T, Y?>): MutableList<Y> {
val yy = ArrayList<Y>()
this.forEach { t: T ->
yy.add(property.get(t) as Y)
}
return yy
}
@anoopmaddasseri
anoopmaddasseri / KT_COLLECTION_SUM
Created October 4, 2020 06:25
Kotlin: Find sum of all values produced by the selector function applied to each element in the collection
val sumByDouble =
data.sumByDouble { serviceGroup: PackageDetails.ServiceGroup -> serviceGroup.serviceItems.price }
++++++++++++++++++++++++++++++++++++++++++
val nums = listOf(10, 20, 30)
println(nums.sum())
val totalQuantity: Int = products.map { it.quantity }.sum()
Offering Description
TVOD Transactional video on demand is where consumers purchase content on a pay-per-view basis.
SVOD Subscription video on demand is similar to traditional TV packages, allowing users to consume as much content as they desire at a flat rate per month.
AVOD Advertising-based video on demand Shows ads to users to generate revenue. Unlike SVOD and TVOD services, AVOD is free to consumers. However, much like broadcast television, consumers need to sit through advertisements
Capability Comments
DRM Supports Widevine, Fairplay, Playready
Streaming Protocols Supports DASH, HLS
Thumbnail Seek Requires Sprite images for Frames in WebVTT or JSON format.
Analytics Wrapper Supports integration with 3rd party Analytics & QoE Services
Multi Audio Support Tracks to be part of DASH & HLS Manifest
Quality Control Configurable limits per platform via App CMS
Live/Catchup/Startover Supports Live with seeking support along with Startover & Catchup capabilities