Skip to content

Instantly share code, notes, and snippets.

View SyedTayyabUlMazhar's full-sized avatar

SyedTayyabUlMazhar

View GitHub Profile
const takeLatest = (patternOrChannel, saga, ...args) => fork(function* ()
{
let lastTask
while (true)
{
const action = yield take(patternOrChannel)
if (lastTask)
{
yield cancel(lastTask) // cancel is no-op if the task has already terminated
}
@SyedTayyabUlMazhar
SyedTayyabUlMazhar / javascript.json
Created August 27, 2021 06:26
React native code snippets Stored in /Users/tayyabulmazhar/Library/Application Support/Code/User/snippets
{
"undefined": {
"body": [
" const styles = StyleSheet.create({",
" ",
" })"
]
},
"react-native Stylesheet create": {
"prefix": "Scre",
FileBriefDescriptionAdapter(Context context, RecyclerView recyclerView, List<FileBriefDescription> data)
{
this.context = context;
this.fileBriefDescriptions = data;
this.recyclerView = recyclerView;
// fileBriefDescriptionsCopy is only read after this and never changed
this.fileBriefDescriptionsCopy.addAll(fileBriefDescriptions);
}
--------------------------------------------------------
-- File created - Saturday-October-26-2019
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table STUDENTS
--------------------------------------------------------
CREATE TABLE "HR"."STUDENTS"
( "ID" NUMBER(*,0),
"FIRST_NAME" VARCHAR2(50),