|
I'm not a coffee drinker, but I'll go through a bag of these in no time at all. If I was a coffee drinker, I suspect I'm the type who'd have 8 cups a day. Just as well I'm not.
|
|
|
|
|
I tried those a couple decades ago, and they're just the thing for an all night coding session; not so good for restful sleep, though. I haven't seen them in stores for a long, long time now, but I still remember how addicting they are. Yummmm!!!!
Will Rogers never met me.
|
|
|
|
|
My local supermarket sells them!
This may be a bad idea...
But...you can get them on Amazon: Chocolate covered coffee beans (USA)[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Obligatory chocolate covered bacon post:[^]
Couldn't find the coffee covered bacon; chocolate will do.
Oh, and the chocolate coffee beans have been around since the dinosaur days. Just saying...
|
|
|
|
|
Did you try bacon covered coffee?
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
Being a student, I am now able to understand the pain students have to go through because of their professors. I am currently having my exams and my teacher was teaching us web development. There is a question, "write the procedure to connect to database".
Rings some bells? Of course it should, at first I thought it was a question from a non-Googling-OP. No framework given, no guidance on what framework we are talking about, no name of database. Teachers really are sneaky suns o' beaches! Besides, he wouldn't care about anything, and will say, it was your duty.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I think you have gone some way to answering the question in noticing that no specifics are given.
It's a good opportunity to show your skills for designing a 'framework' for connecting to a database that is agnostic with regards to the database it is creating a connection for.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Nah, too hard. Play Project Manager and call for a meeting inviting as many people as possible, and the more of them that have no relevance to the issue the better.
Sin tack ear lol
Pressing the any key may be continuate
|
|
|
|
|
YES!!! I like your thinking outside of the box. It could be a team building exercise
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
GuyThiebaut wrote: It could be a team building exercise
Like Paintball, but with real guns!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
GuyThiebaut wrote: YES!!! I like your thinking outside of the box. It could be a team building exercise
Because "getting people into a BOX" is the first step in thinking outside of one?
|
|
|
|
|
It is a question in exam. We either can get full marks, or get a zero.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: There is a question, "write the procedure to connect to database". Procedural web-development? Yup, sounds like a "professor".
In the modern world, the framework provides interfaces to connect. Set the factory in the config file and of you are.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If only it was that simple.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
If you are using .NET, it is. As long as your SQL is SQL92 compliant, you'll be able to talk to most databases using simply some configuration.
Documented on MSDN
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I guess the word procedure is meant in its literal format, if so my answer would be the script/code to connect to mysql via php using your own db table username and password, and an explanation of what the arguments are for in the connection code. You might get extra marks for inferring about a stored procedure and need a connection to access the SP.
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: No framework given, no guidance on what framework we are talking about, no name of database.
void Connect(IDb db, string dbName)
{
db.Connect(dbName);
}
Done!
Marc
|
|
|
|
|
That's a method, not a procedure
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: That's a method, not a procedure
Well, SQL Server can run C# code.
Marc
|
|
|
|
|
|
PIEBALDconsult wrote: con.
let us debate the use of meaningful names in one's code. con | cnx | cn or my favorite connection.Open()
or not.
|
|
|
|
|
Maybe his framework doesn't allow names more than four characters long.
|
|
|
|
|
public void CheckDatabaseConnection()
{
try
{
using (new MyDbContext())
{
return true;
}
}
catch (Exception ex)
{
return false;
}
} I think that should be it, from the top of my head
Of course I had to make some assumptions regarding language, framework and database, but they weren't mentioned
|
|
|
|
|
void or bool on your method signature return type?
|
|
|
|
|
Uhhh... Yes, that was the homework!
Spot the error.
You passed the test.
Good work, young padawan.
|
|
|
|