wow, that makes sense! Although the code is more than twice as long, I can still use this. Didn't know there were procedures in MySQL. All I ever did was SELECT,INSERT,U PDATE, etc. Maybe I should start reading about MySQL more. :-/
Thanks, this was quite helpful.
Regards,
JR
User Profile
Collapse
-
okay, now I' trying something like this:
but it still does not work. :(...Leave a comment:
-
IF statement in MySQL
Can you do something like:
Code:select itemType from reservables where reservableID = #input# if (itemType='room') select * from rooms else select * from items
Kind regards
JR -
-
Extract time from Calendar Object
I just want to extract the time component of the calendar object for comparison to another. Is this possible?
here's my code:
Code:try { String str_date="2009-10-15 12:1:00"; DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd k:mm:ss"); Date date = (Date)formatter.parse(str_date); Calendar cal = Calendar.getInstance(); cal.setTime(date);
-
Converting Date Object to Calendar Object
I'm working on a wicket project, and I'm kinda stumped here on trying to get the components of the date. Thing is, I don't want to use deprecated code, so I decided on using Calendar instead.
For instance I have the following code:
Code:Date d = (Date) dateModel.getObject(); //generic Date. ... Calendar cal = Calendar.getInstance(); ... System.out.println(" " + month + " " +
-
Reservation DB Schema and Date checking
QUESTION 1:
I'm trying to create a room reservation system for school using wicket and MySQL, and I'm a bit confused with this one. I've already created the user database and rooms database. My question is how do I create a schema that accepts both repeating and non-repeating schedules?
example (repeating):
I can reserve a room for class at 9:00am - 12:00pm every Monday and Thursday, from June - October of 2009. How do... -
-
Recursive "Divide" Function gives wrong results
there is something wrong with my code. I was doing some homework trying to implement the "divide" function recursively in JS but it gives some wrong results. here's my code:
it returns the quotient and remainder.
Code:function Divide(x,y) { var result1; if (x == 0) return [0,0]; result = Divide(Math.floor(x/2),y); q = result[0]; r = result[1];
-
MPI + Parallelization of Image Processing + First Class Functions
Hi! I'm working on my undergraduate thesis on the Parallel Image Processing. This deals with optimizing a library my professor gave me and implement MPI (Message Passing Interface) on it (it is in C/C++ by the way). I can easily hard-code functions in the language, and then using the MPI functions to parallelize it.
My problem comes in when, for instance a user would like to make his/her own functions. I would need to pass the function... -
-
whoa! so that's how!:D I get it now. really appreaciate it.
Just a quick question:
so when the monitor is passed, all i have to do is create a constructor for it, and i don't have to modify the part where i wrote this
Code:(new Thread(fish1)).start(); (new Thread(frenzy)).start(); (new Thread(minnow)).start();
Thanks again Jos
KazuoLeave a comment:
-
that's exactply what i thought i wanted to do, but the question is how? err, could you spare some coded examples?
thanks for the reply Jos.. :DLeave a comment:
-
Threading and shared array
hi! whew! been a while since i last posted. anyway, I have this code, but I'm trying to figure out a way to access a shared variable within the threads.
here's the main program:
Code:public class FeedFrenzy{ public static void main(String args[]){ Frenzy frenzy = new Frenzy(); Fish fish1 = new Predator(); Prey minnow = new Prey(); frenzy.setName("Frenzy"); minnow.setName("Golden
-
try to take out these lines from your login.php:
Code:session_register('USERNAME'); session_register('SESS_LOGGEDIN');
Leave a comment:
-
glad i could be of help.. ^^,
and for your next problem, what happens in IE that does not happen in mozilla..? can you expound on the problem..?
ahahaha! XD lucky strike..?XD...Leave a comment:
-
try changing your code in the index.php to:
Code:<?php session_start(); require('header.php'); ?>
Leave a comment:
-
ugu.. That's a bit generalizing, neh? you have India and now use India for all of Asia.. I, for one, am an Asian. Not everyone delivers sloppy work. I believe in excellence, as most of my Asian counterparts do. So please do not discriminate..
And for the Sloppy working people... see what your work does... it makes the service payers to generalize. Don't include us in your own folly.
cheers!...Leave a comment:
-
Undergraduate Thesis Suggestions
Hi! I am soon to be in my final year in computer science next school year, and I would like to ask for help in picking an undergraduate thesis proposal/project. Somehow, I would like to have something connected to web development or something like that. and if you do have a suggestion, would you be willing to also help me out in doing the thesis? please do help me. thank you. -
oh, yeah, i forgot... I'm using PHP for this job. so how do you do this?
although i have started, I have this form:
Code:<INPUT type="file" name="filename" enctype="multipart/form-data" style="FONT-SIZE: 11px; FLOAT: right; FONT-FAMILY: Tahoma">
Code:if (isset($_POST['file_submit'])) { if
Leave a comment:
No activity results to display
Show More
Leave a comment: