User Profile

Collapse

Profile Sidebar

Collapse
jrhitokiri
jrhitokiri
Last Activity: Nov 15 '09, 06:11 PM
Joined: Apr 3 '08
Location: Philippines
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jrhitokiri
    replied to IF statement in MySQL
    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
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    replied to IF statement in MySQL
    okay, now I' trying something like this:



    but it still does not work. :(...
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    started a topic IF statement in MySQL

    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
    Something like that? Thanks.

    Kind regards
    JR
    See more | Go to post

  • jrhitokiri
    replied to Extract time from Calendar Object
    in Java
    bumping this question.. anyone want to answer this? T_T
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    started a topic Extract time from Calendar Object
    in Java

    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);
    ...
    See more | Go to post

  • jrhitokiri
    started a topic Converting Date Object to Calendar Object
    in Java

    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 + " " +
    ...
    See more | Go to post

  • jrhitokiri
    started a topic Reservation DB Schema and Date checking

    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...
    See more | Go to post

  • nevermind. erase this..xD i got it now. sheesh..xD
    See more | Go to post

    Leave a comment:


  • 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];
    ...
    See more | Go to post

  • 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...
    See more | Go to post

  • jrhitokiri
    replied to Threading and shared array
    in Java
    got it.:D

    thanks again!:D this was quite helpful.

    KaZuo
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    replied to Threading and shared array
    in Java
    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

    Kazuo
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    replied to Threading and shared array
    in Java
    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.. :D
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    started a topic Threading and shared array
    in Java

    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
    ...
    See more | Go to post

  • jrhitokiri
    replied to Sessions not working in subsequent pages
    in PHP
    try to take out these lines from your login.php:

    Code:
    session_register('USERNAME');
    session_register('SESS_LOGGEDIN');
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    replied to Sessions not working in subsequent pages
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    replied to Sessions not working in subsequent pages
    in PHP
    try changing your code in the index.php to:

    Code:
    <?php
              session_start();
              require('header.php');
    ?>
    I hope this helps!
    See more | Go to post

    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!...
    See more | Go to post

    Leave a comment:


  • jrhitokiri
    started a topic Undergraduate Thesis Suggestions

    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.
    See more | Go to post

  • jrhitokiri
    replied to Importing CSV into a mysql DB
    in PHP
    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">
    and here's the PHP code

    Code:
    if (isset($_POST['file_submit']))
    {
       if
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...