Skip to content

Instantly share code, notes, and snippets.

Take-Home Project: Dynamic Form Builder
Problem Description:
You are tasked with building a DynamicForm component and a useFormBuilder custom hook. The DynamicForm component should render a dynamic form based on a configuration object, and the useFormBuilder hook should handle the form state and validation logic.
This project will test the candidate's ability to work with advanced TypeScript types to enforce strong typings across dynamic form fields, state, and validation logic.
Requirements:
Create a FieldConfig Type: Each form field should be defined using a FieldConfig type. It must include:
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'kchmck/vim-coffee-script'
Plugin 'othree/yajs.vim'
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'kchmck/vim-coffee-script'
Plugin 'othree/yajs.vim'
[
97.25,
30.15,
{
"id":"15",
"atarSubjectListName":null,
"subject":{
"id":"15",
"name":"testing",
"units":"2",
[
{
"course":"15",
"mark":"98.2",
"scale":"47.78",
"percentile":"100.0",
"lock":false,
"button":"unlock.png",
"units":"2",
"defaultunits":"2",
@KamaKAzii
KamaKAzii / Transaction migration - Analysis piece.md
Last active April 5, 2018 01:05
Transaction migration - Analysis piece

UI based scenarios and the transactions they make

  • New enrolment
  • Manually applied Enrolment Fee (i.e. fees)
  • Manually applied refunds
  • Manually applied credits
  • Disenrolments
  • Direct Debit run credits
class DirectDebitSummary < ApplicationRecord
attr_accessor :unbatched_recovered_val
belongs_to :term
after_initialize :init
def init
self.batched_approved_data ||= []
class Sup
attr_accessor :foo
def foo
self[:foo] ||= calc_foo
end
private
import { Component, OnInit, OnDestroy } from "@angular/core";
import { Store } from "@ngrx/store";
import { AppState } from "../store/app-state";
import { Subscription } from "rxjs/Subscription";
import { xxxStore } from "../store/xxx";
import { xxx } from "../models/xxx";
@Component({
selector: 'xxx',
templateUrl: './xxx.pug',
class TransactionManager
attr_accessor :transation_type,
:payment_type,
:description,
:amount,
:transaction_date,
:payment_processor,
:payment_gateway