-
1
difference between v-if and v-showTimes asked 1Official solution
Simplev-if element DOM se hataata/jodata hai, v-show sirf CSS display toggle karta hai.
v-if='isAdmin' → false ho to element exist hi nahi. Costly toggle, lekin hidden data DOM mein nahi.
v-show='open' → display:none. Fast toggle, element hamesha DOM mein.Rare condition: v-if. Bar-bar toggle (dropdown): v-show.
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
what is caching and how you have used itTimes asked 2Official solution
SimpleCache = pehli baar hisaab karke copy rakh lo, doosri baar copy dikha do.
Baar-baar same expensive kaam (DB query, counting bookings) mat karo. Result Redis jaise store mein timeout ke saath rakh do.
Cache hit: key mil gayi, DB skip. Cache miss: DB se lao, SET karo, return karo.
Tradeoff: speed vs stale data. Admin naya venue add kare aur cache 50s ka ho to user purani list dekh sakta hai — isliye write pe invalidation zaroori hai.
Browser cache, Flask-Caching, Redis alag layers hain. MAD2 examiner Redis +
@cache.cachedcode dekhta hai.Example
@cache.cached(timeout=50, query_string=True) @app.route('/api/shows') def shows(): return jsonify([s.serialize() for s in Show.query.all()])Project example: Admin dashboard counts / venues list cache. Create/update/delete ke baad
cache.delete('venues').Viva tipprint('DB queried') function ke andar laga ke miss/hit demo karo — hit pe print nahi chalega.
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
what is cron tabTimes asked 1Official solution
SimpleCron/crontab = schedule pe job. Celery Beat app-level cron (daily email). OS crontab alag.
Example
crontab(hour=18, minute=0) # har din 6pmCommunity answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
change the nav bar position to the bottomTimes asked 2Official solution
SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.
Example
/* button red */ .btn-primary { background: red; } /* center navbar item */ .navbar { justify-content: center; }Viva tipDevTools se pehle try, phir file mein permanent change.
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
make changes so that only the cancelled appointments are visible on the admin dashboardTimes asked 2Official solution
SimpleLive UI change: relevant CSS/HTML template kholo — color, margin, flex, bootstrap class. Save + hard refresh.
Example
/* button red */ .btn-primary { background: red; } /* center navbar item */ .navbar { justify-content: center; }Viva tipDevTools se pehle try, phir file mein permanent change.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet