User Profile

Collapse

Profile Sidebar

Collapse
rubyhuang
rubyhuang
Last Activity: Apr 6 '10, 06:11 PM
Joined: Dec 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rubyhuang
    started a topic SSL Client Side
    in Java

    SSL Client Side

    The task is to implement a client, which would connect to a remote host using https protocol, and print on screen the html file. I can do it successfully by using http protocol, but when I add the ssl part, it can not work. the code is like below
    Code:
    import java.net.*; 
    import javax.net.ssl.*;
    import java.security.*; 
    
    class ReadURL { 
        static final String TRUSTSTORE = "myStore.ks";
        static
    ...
    See more | Go to post

  • Thank you very much for your reply and it works.
    See more | Go to post

    Leave a comment:


  • Find the rooms in a given hotel which is unoccupied

    Hi, experts:
    I've got a question that I want to find all the rooms in a given hotel which is unoccupied and I write the query like that, but it cannot work. can anyone help me to figure out? thank you and waiting for your reply.

    the schema for the four tables look like that
    hotel(hotelNo,h otelName,city)
    room(roomNo,hot elNo,type,price )
    booking(hotelNo ,guestNo,dateFr om,dateTo,roomN o)
    guest(guestNo,g uestName,guestA ddress)...
    See more | Go to post

  • rubyhuang
    started a topic problems on ordinaryChar
    in Java

    problems on ordinaryChar

    why when i using ordinaryChar("! ") in my java file, it still count it as a word.
    Code:
    file = new FileReader(filename);
    st = new StreamTokenizer(new BufferedReader(file));
    st.ordinaryChar('!');
    anyone can help me, thank you.
    See more | Go to post

  • error on at java.io.FileInputStream.<init>(Unknown Source)

    when using eclipse, if want to read a file(eg. using bufferedReader to read), then where to put the .txt file, no matter what place i put the .txt file to, it always said at java.io.FileInp utStream.<init> (Unknown Source). so can i tell me where to put the .txt file to let in can be read. thank you.
    See more | Go to post

  • rubyhuang
    replied to php prompt if variable is 0
    in PHP
    fantastic, it works. thank you for your help.
    See more | Go to post

    Leave a comment:


  • rubyhuang
    started a topic php prompt if variable is 0
    in PHP

    php prompt if variable is 0

    how to use php to prompt if one variable is 0(the variable is initialised by 10 and decreased 1 by 1). worry to wait for answer,thank you.
    See more | Go to post

  • rubyhuang
    started a topic problem in card shuffle
    in Java

    problem in card shuffle

    the problem is A standard pack of cards can be represented as an array of 52 integers with each number representing a
    standard card. Thus:
    0 1 2 3 4 5 6 7 8 9 10 11 12.....39 40 41 42 43 44 45 46 47 48 49 50 51
    We can shuffle this pack of cards by randomly generating two indexes and swapping those two cards.
    For example if we randomly generate the indexes 8 and 50 and swap these two "cards" we would get
    ...
    See more | Go to post

  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    thank you. it works.
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    after using your code, it shows MySQL Connected,Datab ase Selected. but after looking at phpMyAdmin, the t_user still didn't have any value, but in fact i have insert some value in the form which should pass to it. please help me. print $sql, i can only got insert into t_user ('f_username',' f_password','f_ name','f_email' ) values ('fsdg','','sdg ','sdfg')
    and the structure of my table is
    Field Type Collation Attributes Null Default ...
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    after changing according to your advice, it still cannot insert value, below is my code. what is the problem about my code. please help me. thank you.
    [php]
    <?php
    $username=$_POS T['username'];
    $pwd=$_POST['pwd'];
    $repeat_pwd=$_P OST['repeat_pwd'];
    $name=$_POST['name'];
    $email=$_POST['email'];

    if(!empty($user name)){
    $db=@new mysqli("linux3" ,"zongyan.huang ","zongyan.huan g","zongyanhuan g");...
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    i have successed in connecting php with mysql, but i cannot insert value into the mysql through php. please help me.
    below is my code
    <?php
    $username=$_POS T['username'];
    $pwd=$_POST['pwd'];
    $repeat_pwd=$_P OST['repeat_pwd'];
    $name=$_POST['name'];
    $email=$_POST['email'];
    if(!empty($user name)){
    $db=@new mysqli

    ("linux3","zong yan.huang","zon gyan.huang","zo ngyanhuang");...
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    i have got the wrong db name before. now i have connected scccessfully. thank you very much for your help until now.
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    thank you for your help. after using your code, is shows that Cant connect to databaseUnable to select database. why? can you tell me. thank you.
    below is what i have used changing from your code.
    <?php
    $connect = mysql_connect($ database['linux3'], $database

    ['zongyan.huang'], $database['zongyan.huang']);

    if(!$connect)
    {
    echo "Cant connect to database";
    }...
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to how to connect php and mysql
    in PHP
    my code is
    <?php

    $database[dbserver]="localhost" ;//most of the time this is localhost if u get an error check with your hosting co
    $database[dbuser]="user";//username for db
    $database[dbname]="dbname";//db name
    $database[dbpass]="pass";//password

    $connect = mysql_connect($ database['dbserver'], $database['dbuser'], $database['dbpass']);
    ...
    See more | Go to post

    Leave a comment:


  • rubyhuang
    started a topic how to connect php and mysql
    in PHP

    how to connect php and mysql

    i am a beginner in php. i have created user and use grant command to give user rights to access mysql, why i still cannot connect php with mysql. please help me.
    See more | Go to post

  • rubyhuang
    replied to another palindrome problem
    in Perl
    i have no clue about that yet. can you give me some little hint.i will try it myself. thank you very much.
    See more | Go to post

    Leave a comment:


  • rubyhuang
    replied to another palindrome problem
    in Perl
    below is my code, i can judge palindrome disregarding upper/lower case, spaces, and punctuation symbols, but i do not know how to judge five string together. please help me.
    [code=perl]
    do{

    # read the input
    print "Type a word or phrase: ";
    $line = <>;

    # strip out stuff that would disturb the palindrome comparison
    # and convert to lowercase......
    See more | Go to post
    Last edited by numberwhun; Dec 8 '07, 02:03 PM. Reason: add code tags

    Leave a comment:


  • rubyhuang
    started a topic another palindrome problem
    in Perl

    another palindrome problem

    i'm a new perl learner, this is the first perl task i will do. please help me.

    The user can input a string, and then a script will check to see if the string is a palindrome or not, displaying the result to the user on another page (include the original string that they input in the displayed output). Disregard the case of letters, as well as spaces and any punctuation symbols in the sentence (use Perl string routines to deal with...
    See more | Go to post
No activity results to display
Show More
Working...