Skip to content

Instantly share code, notes, and snippets.

@thecodecafe
thecodecafe / Encryption.util.ts
Created January 15, 2023 16:58
AES, Base64, and MD5 Encryption with CryptoJS
import CryptoJS, {AES, MD5} from 'crypto-js';
import {ENC_KEY} from '../configs/app.config';
/**
* Encrypts any given data
* @param {any} data
* @return string | null
*/
export const encrypto = async (
data: any,
@thecodecafe
thecodecafe / SendSolidModule.java
Created October 21, 2022 17:21
VGConnetct With React Native Android
package com.sendsolid;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableNativeMap;
import com.facebook.react.bridge.WritableMap;
@thecodecafe
thecodecafe / App.tsx
Last active September 22, 2022 05:15
Async Storage Exercise
import React, {useCallback, useEffect, useState} from 'react';
import {
ActivityIndicator,
Alert,
Button,
StyleSheet,
Text,
View,
} from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';

Inventory Manager

Bluemoon Solutions is a software company tasked with working on an inventory management system, this system allows the users to list, add, edit, and delete inventory items. Your task is to create a react native app that utilises the async storage to store, update, retrieve, and delete data.

Notes

  • Design is not a requirement but can give extra points.
  • Use React Navigation 5 for the navigation.
  • Initialise a fresh react native project setup for Typescript.
  • Use the Async Sotrage as a data store for the items.

45 minutes sprint

Algorithm

Question

Given the triangle of consecutive odd numbers:

             1
          3     5
 7 9 11