-
1
What is Vue.js?Times asked 5Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.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
Are you using Vue CLI or Vue CDN?Times asked 1Official solution
SimpleCDN se Vue script tag, CLI se full project (webpack/vite, SFC).
CDN: <script src='https://unpkg.com/vue@3'></script> — setup 1 minute, MAD2 proto ke liye theek, offline toot sakta hai.
CLI (vue create / Vite): .vue files, components, router, build step. Production apps ke liye better.
Standalone/SFC components CLI/Vite mein milte 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
Difference between Vue CLI and Vue CDN.Times asked 5Official solution
SimpleCDN se Vue script tag, CLI se full project (webpack/vite, SFC).
CDN: <script src='https://unpkg.com/vue@3'></script> — setup 1 minute, MAD2 proto ke liye theek, offline toot sakta hai.
CLI (vue create / Vite): .vue files, components, router, build step. Production apps ke liye better.
Standalone/SFC components CLI/Vite mein milte 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
-
4
What are Vue Lifecycle Hooks? Explain each.Times asked 1Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.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
Difference between v-if and v-show.Times asked 10Official 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
-
6
Difference between v-model and v-bind.Times asked 4Official solution
Simplev-bind one-way data → view, v-model two-way (input ke saath sync).
<img v-bind:src='url'> ya <img :src='url'> — url change to image change, image se url nahi. <input v-model='email'> — type karo to email variable turant update.v-model = :value + @input ka shortcut. Forms mein v-model, attributes mein v-bind.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
7
What are Props in Vue?Times asked 5Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
8
What are Slots in Vue?Times asked 2Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
9
How do you pass data from Child Component to Parent Component?Times asked 1Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
10
What is ORM?Times asked 49Official solution
SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.
Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
ORM se: User.query.get(5) ya db.session.get(User, 5)Example model
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True)FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.
Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.
MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti 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
-
11
Are you using ORM?Times asked 1Official solution
SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.
Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
ORM se: User.query.get(5) ya db.session.get(User, 5)Example model
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True)FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.
Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.
MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti 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
-
12
Advantages of ORM.Times asked 5Official solution
SimpleORM = Object Relational Mapping. Database tables ko Python classes/objects se map karta hai, raw SQL kam likhni padti hai.
Bina ORM: cursor.execute('SELECT * FROM user WHERE id=?', [5])
ORM se: User.query.get(5) ya db.session.get(User, 5)Example model
class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True)FaydePython mein soch sakte ho, SQL injection se protection (parameterized), relationships easy, DB switch thoda aasan.
Nuksaancomplex queries slow/abstract, seekhne ki layer extra, kabhi raw SQL phir bhi chahiye.
MAD1: SQLAlchemy (Flask-SQLAlchemy). Tables db.create_all() ya migrations se banti 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
-
13
What is SQLAlchemy?Times asked 8Official solution
SimpleSQLAlchemy Python ka sabse popular ORM hai. MAD1 mein Flask-SQLAlchemy wrapper use hota hai.
db = SQLAlchemy(app)
class Book(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(80), nullable=False) Operations: db.session.add(obj), .commit(), .delete(obj), Model.query.all(), .filter_by(), .get_or_404(id). db.Model ek class hai (function nahi). db object engine + session + metadata hold karta hai.SQLALCHEMY_TRACK_MODIFICATIONS=False extra signals band karta hai, performance warning hatati 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
-
14
Flask-Security vs JWT.Times asked 1Official solution
SimpleJWT = JSON Web Token — signed string jisme user id/role hota hai. Har request header mein jaata hai. Session server pe store, JWT client pe.
Login → server token deta hai → Authorization: Bearer <token>
Payload: {sub: user_id, role: admin, exp: ...} — padha ja sakta hai, change nahi (signature).
Session: browser cookie, server-rendered Flask ke liye simple.
Token: mobile/Vue SPA, scaling (server memory nahi). Store: memory/httpOnly cookie, localStorage XSS risk.
MAD1 mostly session. Flask-Security session+login, JWT APIs ke liye.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
15
What security mechanism have you used?Times asked 2Official solution
SimplePassword DB mein plain text mat rakho — hash store karo jo reverse nahi hota.
from werkzeug.security import generate_password_hash, check_password_hash user.password = generate_password_hash(request.form['password']) check_password_hash(user.password, form_password)Hashing ≠ encryption. Leak pe bhi original password nahi milta (easy passwords rainbow table se — isliye salt + strong hash).
Column String(200) kyunki hash lamba hota hai. unique=True password pe mat lagao.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
16
What are Webhooks?Times asked 7Official solution
SimpleWebSocket do-tarfa live connection, Webhook 'kisi event pe URL hit karo'.
WebSocket: chat, live scores. Connection open rehti hai.
Webhook: payment success pe Stripe tumhari /webhook URL POST karta hai. Connection nahi, ek HTTP call.
MAD1 mein usually nahi hote; REST request-response hota 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
-
17
Show how Celery works in your project.Times asked 1Official solution
SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.
User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta 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
-
18
Replace a Card View with a Table View on a page.Times asked 1Official solution
Simpleexaminer UI tweak maangta hai — CSS class ya inline, instantly dikhao.
Button color: <button class='btn btn-success'> ya style='background:#22c55e;color:#fff'
Navbar: navbar-dark bg-success / style='background:yellow' / fixed-bottom se neeche.
Center: .wrap { display:flex; justify-content:center; align-items:center; min-height:100vh; }
text-align:center heading ke liye. Bootstrap: d-flex justify-content-center, mx-auto, text-center.
Hover: .btn:hover { opacity:0.8; transform:scale(1.02); }
Half width: class='col-6' ya width:50%. Row→column: flex-direction:column / col-12 stack.
Login card: card shadow p-4 mx-auto (max-width:400px).
Table header green: th { background:green; color:white; } Bold column: td:nth-child(2){font-weight:bold}
Box shadow: box-shadow: 4px 4px 12px rgba(0,0,0,.3);
Background image: body { background: url('/static/bg.jpg') center/cover; }
Reset button: <button type='reset'>Clear</button>
Move button: ms-auto / position / flex order.
Jinja dashboard heading: <h1>{{ user.name }}'s Dashboard</h1>Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
19
Debug and fix a model issue.Times asked 1Official solution
Yeh MAD-1 viva question tumhare project ke context se linked hai. Short answer is structure se do:
Pehle 1 line definition/purpose, phir tumhare project ka example, phir chhota code/flow.
Typical Flask flowBrowser request → @app.route controller → SQLAlchemy model/DB → Jinja template response.
Auth: session['user_id'] + role check. CRUD: add/commit, query.all, field update, delete.
Live change maange to: related model → route → template, phir browser refresh karke dikhao.Example (generic create):
obj = Model(name=request.form.get('name'))db.session.add(obj); db.session.commit() return redirect(url_for('list_view'))Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
20
Perform a random code modification (project-specific).Times asked 1Official solution
Yeh feature demo hai. Account ready rakho, steps bol ke dikhao.
Role ke hisaab login → action (create/approve/book) → DB/UI pe result → edge case (fail when slots=0 / blacklisted).
Do browser windows: admin + user. Search/filter alag se dikhao.
Agar feature nahi hai to sach bolo aur 2 minute mein kaise add karoge (query + template) explain karo.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
21
Demonstrate Celery working.Times asked 1Official solution
SimpleCelery background tasks (email, CSV, reports) async chalaata hai. Redis broker/queue + cache.
User 'Export' click → Celery task queue → Redis message → worker CSV banaata hai → user baad mein download.
Saath isliye: Celery ko broker chahiye, Redis tez in-memory. MAD2 topic zyada, MAD1 mein optional.
Priority: task queues/routing. Caching: Redis mein key-value, DB hits kam.
Pub/Sub: publisher channel pe message, subscribers sunte hain — Redis yeh bhi karta 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
-
22
Explain the Vue frontend implementation.Times asked 1Official solution
SimpleVue.js frontend framework — reactive UI components. MAD2 mein common, MAD1 optional.
Component: reusable UI (Navbar.vue) + data + template.
Props: parent → child data. Child → parent: $emit('update', val).
Slots: parent child ke andar extra HTML daal sakta hai.
Lifecycle: created (data setup), mounted (DOM ready — API call), updated, unmounted.
v-model two-way bind. Vue Router SPA routes (routes.js). Vuex/Pinia global state; mutations sync change, actions async.
Standalone component: khud ke saath compile, parent register kam.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
23
Explain the backend implementation.Times asked 2Official solution
Examiner code pe ungli rakh ke poochta hai — panic mat karo, 4-line formula bolo.
1) Yeh file/line kya role hai (model / route / template / config)?
2) Input kahan se aata hai (form, URL <id>, session, JSON)?
3) DB pe kya query/write?
4) Output kya (render_template / redirect / jsonify)?Example
@app.route('/book/<int:id>', methods=['POST']) — logged-in user session se, trek id URL se, Booking add, slots--, redirect history.Unknown line: imports (request, url_for, flash), decorators, if checks, commit — har keyword ka reason ready rakho.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet