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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> |
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
// Example program | |
#include <iostream> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
// Data Structures | |
typedef struct{ | |
string title; |
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
1 3.6 79 | |
2 1.8 54 | |
3 3.333 74 | |
4 2.283 62 | |
5 4.533 85 | |
6 2.883 55 | |
7 4.7 88 | |
8 3.6 85 | |
9 1.95 51 | |
10 4.35 85 |
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
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <iomanip> | |
using namespace std; | |
// | |
typedef struct{ | |
double bmiValue; |
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
{ | |
"version": 2, | |
"clips": [ | |
{ | |
"value": "app", | |
"createdAt": 1591673877303, | |
"copyCount": 1, | |
"useCount": 0, | |
"language": "typescript", | |
"createdLocation": { |
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
let days = [ | |
{ s: 'Sun', l: 'Sunday' }, | |
{ s: 'Mon', l: "Monday" }, | |
{ s: 'Tue', l: 'Tuesday' }, | |
{ s: 'Wed', l: 'Wednesday' }, | |
{ s: 'Thu', l: 'Thursday' }, | |
{ s: 'Fri', l: 'Friday' }, | |
{ s: 'Sat', l: 'Saturday' } | |
]; |
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
let data: Record<string, any> = { initial: "something" } | |
let key = "root.field.subField" | |
const setNestedValue = (obj: Record<string, any>, path: string, value) => { | |
return path.split(".") | |
.reduce((acc, cur, index, arr) => index === arr.length - 1 ? acc[cur] = value : acc[cur] = {}, obj) | |
} | |
const getNestedValue = (obj: Record<string, any>, path: string, defaultValue?: any) => |
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
interface IForm { | |
id: string | |
sections: any[] | |
classNames?: string | |
store?: any | |
validator?: any | |
} | |
export type FieldType = "text" | "email" | "password" | "tel" | "date" | "time" | "number" | |
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
function getSupervisorName(enteredId: string | null) { | |
let employee, supervisor; | |
if (null != enteredId && | |
null != (employee = repository.findById(parseInt(enteredId))) && | |
null != employee.supervisorId && | |
null != (supervisor = repository.findById(employee.supervisorId))) | |
return supervisor.name; | |
} |
OlderNewer