Create an endpoint to split a bill evenly among a group of users.
- Endpoint:
/split-evenly
- Method:
POST
- Input: List of user IDs and total bill amount.
- Output: Amount each user needs to pay.
Inventory Management System:
Social Media Analytics:
FizzBuzz - Write a program that prints the numbers from 1 to n, replacing multiples of 3 with the string "Fizz" and multiples of 5 with the string "Buzz".
Palindrome - Write a program to check if a given string is a palindrome.
Reverse a string - Write a program to reverse a given string.
Two Sum - Write a function that takes in an array and a target number and returns the indices of two numbers that add up to the target.
Toggle Button: Create a toggle button component that switches between "On" and "Off" states when clicked.
Timer: Create a timer component that displays a running timer in the format "MM:SS" and starts at 00:00.
Image Carousel: Create an image carousel component that displays a series of images and allows users to navigate through them using previous and next buttons.
Dark Mode Toggle: Create a dark mode toggle component that switches between light and dark themes for your application when clicked.
[ | |
{ "province": "KPK", "city": "Abbottabad", "area": ["Abbottabad"] }, | |
{ "province": "KPK", "city": "Adezai", "area": ["Adezai"] }, | |
{ "province": "Punjab", "city": "Ahmedpur East", "area": ["Ahmedpur East"] }, | |
{ "province": "Sindh", "city": "Ali Bandar", "area": ["Ali Bandar"] }, | |
{ "province": "Punjab", "city": "Ali Pur", "area": ["Ali Pur"] }, | |
{ "province": "Balochistan", "city": "Amir Chah", "area": ["Amir Chah"] }, | |
{ "province": "Punjab", "city": "Arifwala", "area": ["Arifwala"] }, | |
{ "province": "Gilgit & Baltistan", "city": "Astor", "area": ["Astor"] }, | |
{ "province": "Punjab", "city": "Attock", "area": ["Attock"] }, |
[ | |
{ | |
"name":"Askari 1" | |
}, | |
{ | |
"name":"Askari 2" | |
}, | |
{ | |
"name":"Askari 3" | |
}, |
import morgan from "morgan"; | |
import e from "express"; | |
const loggerTemplate = ( | |
tokens: morgan.TokenIndexer, | |
req: e.Request, | |
res: e.Response | |
) => | |
[ | |
tokens.method(req, res), |
import { Directive, HostListener } from '@angular/core'; | |
@Directive({ | |
selector: '[CopyPasteBlock]' | |
}) | |
export class CopyPasteBlockDirective { | |
constructor() { } | |
@HostListener('paste', ['$event']) blockPaste(e: KeyboardEvent) { |
<!-- #scrollMe [scrollTop]="scrollMe.scrollHeight" remove this for normal scroll --> | |
<div class="comment-list" #scrollMe [scrollTop]="scrollMe.scrollHeight" infiniteScroll scrollPerecnt="20" | |
[immediateCallback]="true" [scrollCallback]="scrollCallback"> | |