-
1
- Will ask to perform CRUD ops, search functionTimes asked 2Official solution
SimpleSearch: form/query param → ilike filter → results template.
Example
q = request.args.get('q', '').strip() lots = Lot.query.filter(Lot.name.ilike(f'%{q}%')).all()Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
- Vue Lifecycle HooksTimes asked 1Official solution
SimpleLifecycle = component ki zindagi ke stages. API call tab jab DOM ready ho — mounted.
created: instance bani,
thisdata, DOM nahi. mounted/onMounted: page pe aa gaya — fetch, Chart.js, setInterval.
updated: data change ke baad. unmounted: cleanup (clearInterval) warna memory leak.Dashboards onMounted isliye: canvas/API tab valid. created mein $el nahi.
Composition: onMounted(() => {}) setup ke andar.
Example
export default { async mounted() { const r = await fetch('/api/venues') this.venues = await r.json() } }Project example: Venues.vue mounted fetch list. Clock component unmounted pe interval clear.
Viva tipcreated: data setup, DOM nahi. mounted/onMounted: $el mil gaya — fetch yahi. Dashboards isliye onMounted use karti hain.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
3
- Is caching implemented?Times asked 1Official solution
SimpleHaan Redis routes X demo hit miss. Nahi: kaise add karte — decorator + redis + invalidation.
Don't lie. Examiner code dekhega.
Redis in-memory key-value store hai — fridge pe sticky note, poori kitchen (SQL database) har baar mat kholo.
MAD2 mein Redis do kaam: (1) cache — same venues/shows/dashboard JSON baar-baar DB se nahi (2) Celery broker — Flask task queue mein daalta hai, worker uthata hai.
Flow: cache.get(key) → hit pe return, miss pe SQLAlchemy + SET with timeout. Admin write ke baad cache.delete, warna stale list.
Source of truth database hi hai. Redis crash/band = cache miss (app chalni chahiye) + queue ruk sakti hai. Important bookings sirf Redis mein mat rakho.
Alag: Redis ≠ Memcached (Celery broker nahi). Redis ≠ localStorage (woh browser).
redis-cli ping→ PONG viva proof.Project example: If yes open decorator. If no 4-step plan.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
- Explain cascading in databaseTimes asked 2Official solution
SimpleCode explain formula: input kya aaya → auth/validation → DB change → response/UI.
Viva tipFunction signature + 3-4 important lines + edge case.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
5
---------- Done in 15 minutes ----------Times asked 2Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet