The Student Room Group

FREE Programming/Coding Help Desk

Scroll to see replies

Reply 40
Do you know how to create a hotel booking system on ASP.NET?
Original post by Async
snip


Thanks for help on my graph questions. That gives me more confidence but we will cross that bridge when we come to it

ohhh right that is smart, that would be so much easier than coding after you've done the initial work . What about inseting the incorrect answers from the Multichoice table? (or was that just a shorten example of what the form would look like).

Im not sure if i understand your last question. Im using pure python and PYQT a libary to make the GUI
Reply 42
Original post by al_94
Do you know how to create a hotel booking system on ASP.NET?


You asked that question wrong. You should of asked.
"Do you know how one would go about creating a hotel booking system in ASP.NET?"

Because with programming, it's not like I know how to create everything in the world off by heart, but with all the knowledge and skills I've acquired, I can apply logic to any given task in the world and solve them.

So, yes I know how I would go about creating a book system in ASP.NET.
Reply 43
Original post by Danielb7
Thanks for help on my graph questions. That gives me more confidence but we will cross that bridge when we come to it

ohhh right that is smart, that would be so much easier than coding after you've done the initial work . What about inseting the incorrect answers from the Multichoice table? (or was that just a shorten example of what the form would look like).

Im not sure if i understand your last question. Im using pure python and PYQT a libary to make the GUI


Inserting the incorrect answer is a bit more tricky, because not all questions will be multiple choice. But it's still relatively easy provided you know what you're doing.

To Insert a multiple choice question, all you do is submit an SQL query to return the last QuestionID from the Question table. And then use that as the QuestionID on the multiple choice table.

So when I submit the query,

Insert Into QuestionTable(Topic, Question, Answer, MultiChoice) Values('Geometry', 'How big is the sun?' , 'Very big, True)

That query will be submitted first. Because the QuestionID field is auto increment, the SQL database will give it an automatic ID. What you do is submit a query to find the last QuestionID.

So

int newID = "SELCT
QuestionID From QuestionTable Order By QuestionID Desc"

Which selects the biggest QuestionID first. The largest QuestionID is the ID of the last question you just inserted. Then you simply use that Database you retrieved and use that for adding your multiple choice question. So.

Insert Into MultipleChoiceTable(QuestionID, Answer1, Answer2, Answer3) Values(newID, 'Something', 'Hey', 'LOL')

And good you're using GUI. Can you send me some sreenshots of your problem via Private Messages. So I can see what you have done so far.
(edited 9 years ago)
Original post by Async
I can apply logic to any given task in the world and solve them.


Big claim. Can you prove P = NP?
Reply 45
Original post by Jooooshy
Big claim. Can you prove P = NP?


This is not a philosophy 101. I worded what I said wrongly maybe, you know what I mean.
Reply 46
Original post by Async
You asked that question wrong. You should of asked.
"Do you know how one would go about creating a hotel booking system in ASP.NET?"

Because with programming, it's not like I know how to create everything in the world off by heart, but with all the knowledge and skills I've acquired, I can apply logic to any given task in the world and solve them.

So, yes I know how I would go about creating a book system in ASP.NET.

Ok so do you have any code you could give me to help? Thanks.
Original post by Async
This is not a philosophy 101. I worded what I said wrongly maybe, you know what I mean.


Code a k-approximation algorithm for MAX-3SAT where k < 8/7.
Reply 48
Original post by al_94
Ok so do you have any code you could give me to help? Thanks.


I can only help you if you can show me something you've tried.
(edited 8 years ago)
Reply 49
Original post by Jooooshy
Code a k-approximation algorithm for MAX-3SAT where k < 8/7.


Provided that I know how the thing works. Which I don't so I can't. If I did I could try, but why would I code something just to prove something to you?
Original post by Async
Provided that I know how the thing works. Which I don't so I can't. If I did I could try, but why would I code something just to prove something to you?


I'm just rustling your jimmies. It's impossible unless P = NP (which I don't necessarily agree is philosophy, but let's not).

Do you have much experience with PostgreSQL?
Reply 51
Original post by Jooooshy
I'm just rustling your jimmies. It's impossible unless P = NP (which I don't necessarily agree is philosophy, but let's not).

Do you have much experience with PostgreSQL?


No I don't. I'm guessing PostgreSQL is similar to MySQL or anything SQL related. Yes I'm experienced with SQL though, so if your question has elements of SQL in them, then yes I could answer a question related to there.
Original post by Async
Inserting the incorrect answer is a bit more tricky, because not all questions will be multiple choice. But it's still relatively easy provided you know what you're doing.

To Insert a multiple choice question, all you do is submit an SQL query to return the last QuestionID from the Question table. And then use that as the QuestionID on the multiple choice table.

So when I submit the query,

Insert Into QuestionTable(Topic, Question, Answer, MultiChoice) Values('Geometry', 'How big is the sun?' , 'Very big, True)

That query will be submitted first. Because the QuestionID field is auto increment, the SQL database will give it an automatic ID. What you do is submit a query to find the last QuestionID.

So

int newID = "SELCT
QuestionID From QuestionTable Order By QuestionID Desc"

Which selects the biggest QuestionID first. The largest QuestionID is the ID of the last question you just inserted. Then you simply use that Database you retrieved and use that for adding your multiple choice question. So.

Insert Into MultipleChoiceTable(QuestionID, Answer1, Answer2, Answer3) Values(newID, 'Something', 'Hey', 'LOL')

And good you're using GUI. Can you send me some sreenshots of your problem via Private Messages. So I can see what you have done so far.


This is a rather restrictive database schema Async, I'm disappointed :biggrin:

Probably should have gone for a Questions table and an Answers table with a foreign key QuestionId to create a one-to-many between questions and answers. Denormalizes the schema and much more flexible.
Reply 53
Original post by 'Ello Dave!
This is a rather restrictive database schema Async, I'm disappointed :biggrin:

Probably should have gone for a Questions table and an Answers table with a foreign key QuestionId to create a one-to-many between questions and answers. Denormalizes the schema and much more flexible.


I did recommend that to him. But for his system which is for a school project. It would be easier for him to "restrict" the schema since he is not wanting to have unlimited amount of multiple choice questions.

I suggested it in this thread.

http://www.thestudentroom.co.uk/showthread.php?t=3159119

No need to be disappointed

Posted from TSR Mobile
Original post by Async
If you need any help to do with programming. Post it here on the thread, and I will reply to all of you. If you are facing a bug, or need advise on anything post it.

I know the following languages fairly well.
C#, PHP, SQL, VB.NET.

I can answer questions related to those languages better, but I do know other languages too but yeah. I have enough experience(2 years) and uhmm yeah.

Ask away people.


Hey I have never done programming in my life but am very curious. Do you have to be literate at binary to be able to program (like know how to count or write) a computer.
Hey bro, I was wondering if you know Spreadsheet?? know how to use microsoft excel fairly well?
Reply 56
Original post by 96jaimin96
Hey I have never done programming in my life but am very curious. Do you have to be literate at binary to be able to program (like know how to count or write) a computer.


People think that programmers sit in their computers all day writing a bunch of 0s and 1s. And this is not true, no sane person would do that. We write programs same way you would write an essay, or write a poem. We write it in very meaningful English that anybody could understand. Apart from the low level languages.

Original post by infexiz
Hey bro, I was wondering if you know Spreadsheet?? know how to use Microsoft excel fairly well?

No sorry.
Original post by Async
People think that programmers sit in their computers all day writing a bunch of 0s and 1s. And this is not true, no sane person would do that. We write programs same way you would write an essay, or write a poem. We write it in very meaningful English that anybody could understand. Apart from the low level languages.

Oh I understand, but how much of binary should you be able to understand and thanks for replying to my first question.
Reply 58
Original post by 96jaimin96


Oh I understand, but how much of binary should you be able to understand and thanks for replying to my first question.


Depends on what type of level you want to be programming at. Mostly, none. You don't need any knowledge of binary to be able to program. Unless you do work or things that need binary, which most people don't really do.
Programming is not as hard as you think. It is hard, but not as hard as coding in binary, that's what people in the early 90s did.
(edited 9 years ago)
Reply 59
Original post by 96jaimin96
Hey I have never done programming in my life but am very curious. Do you have to be literate at binary to be able to program (like know how to count or write) a computer.

No, you can program without knowing what binary is, and most programming will not think about it day to day.

That said, binary is incredibly simple, so I'd recommend you forget everything you think you know about it and just research it with an open mind.

Quick Reply

Latest

Trending

Trending