radhakrishna.p 29 Posting Whiz in Training

hi BenWard ,

i dont know exact solution for your problem but try with this

pls replace this £ symbol with '&pound' word at php side and send these results to your webpage through AJAX as it is it will produce the currency symbol as you expected

i am not sure but its work fine

let me know the status

have a great day

go through this URL it gives better clarification

http://webdesign.about.com/od/localization/l/blhtmlcodes-cur.htm

note : comments are appreciated

radhakrishna.p 29 Posting Whiz in Training

hai kaungzaythu,

i think [in your view page] you need to change this line from this

 <?php echo form_dropdown('r_e_name', $return);?>

to this

 <?php echo form_dropdown('r_e_name', $data['return']);?>

because in your controller code you placed all regions data in $data['return'] data array with index 'return'

so in our view, we need to retrive it as we stored

i think you got my point

let me know if you have any doubts in my clarification

radhakrishna.p 29 Posting Whiz in Training

hai rexmatthew,

just suggestion only:

please try to do like as follows

change from this

 <script>
    jQuery.noConflict();
       // Put all your code in your document ready area
       jQuery(document).ready(function($){
            // Do jQuery stuff using $
          $("div").hide();
        });
     // Use Prototype with $(...), etc.
      $('someid').hide();
</script>

to this (we have to use the $.noConflict() this way i think )

 <script>
jQuery = $.noConflict();
    // Put all your code in your document ready area
   jQuery(document).ready(function(){        
        jQuery("div").hide();
   });
   // Use Prototype with $(...), etc.
  jQuery('someid').hide();
</script>

let me know the status

any comments are appreciated

radhakrishna.p 29 Posting Whiz in Training

hai joseph.lyons,

i dont know whether you got my point or not

no problem at all i think you are in the learning stage

i said use either of one way but you included both

i mean in your code use this line (in this case you have to enter your input in the dialog box)

String pubName = JOptionPane.showInputDialog("Please Enter the pubs name you wish to search.");

or this line (in this case you have to enter your input at command prompt)

String pubName = sc.next();

thats it

please do accordingly and let me know the status as well as if you have any doubts in my clarification

any comments are appreciated

radhakrishna.p 29 Posting Whiz in Training

hai joseph.lyons,

you need to take the input value for pub name to search from either of the one mechanism

by using this way-1

 String pubName = JOptionPane.showInputDialog("Please Enter the pubs name you wish to search.");
 // this mechanism expects value for pubname from its input box

or using this way-2

String pubName = sc.next();    // this mechanism expects input value for pub name from the command prompt

i think this might be the one reason:

when you came after the vale given into the JoptionPane.ShowInputDialog() method your programs is waiting for the user input which takes from command prompt until you enter the value (i mean this sc.next() makes your program like that)

but you did not do that i think.

thats the reason your program was stopped there without executing the remaining statements

please use one of the above ways for getting input from the user

and make changes to your program accordingly the ways what i described above

i think you will get my point

let me know if you have any doubts in my calrification as well as the status after the modification of your program

any comments are appreciated
[modified]

radhakrishna.p 29 Posting Whiz in Training

hai silvercats,

instead of onblur() use onkeyup() or onkeypress() for this requirement

check it once by adding any of the actions to the feild

let me know the status

happy coding

radhakrishna.p 29 Posting Whiz in Training

in addtion to the above post:

try to do as follows

place this call $("#candidatetable").tablesorter(); inside the bellow function in your script code

$("#showTable").click(function(event){    
     // your code here 
    $("#candidatetable").tablesorter();
}

check it once and let me know the status

any comments are appreciated

radhakrishna.p 29 Posting Whiz in Training

hai Kert

what i guessed is

in your dynamic version page, you have to call the bellow method

$("#candidatetable").tablesorter(); 

the time after loading the results in table, not on the page load (what i mean is while loading the page there is no content in the table)

i think you got the point

check it once and let me know if you have any doubts in my clarification

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai solomon_13000,

this is just suggestion only :

i think that might be problem with your class couldn't find the path what you specified for ImageIcon class Objects

so try to change the creation of ImageIcon class Object like as follows at line no 11 and 12 in your code

ImageIcon ONE = new ImageIcon(getClass().getResource("/IFDesign/images/green.jpg"));

check it once and also do same for the remaining image icons creation code

let me know the status

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai rouse

i am confused about one thing as shown bellow

In the display the two <div>s are stacked vertically which is one of the problems

could you explain me clearly about the requirement?

and in the second thing,

you have seen some red marks right

its border style which applied by css class for your two divs called pictureBoxRight,pictureBoxleft

go in your css and find for the classes of both divs (bellow is what you are given in your css):

pictureBoxRight {
    display: block;
    width: 500px;
    height: 475px;
    border: 1px solid red;   // this css property makes that red borders around divs on your page
    padding: 0.2em;
    float: right;
}
pictureBoxLeft {
    display: block;
    width: 450px;
    height: 475px;
    border: 1px solid red; // this css property makes that red borders around divs on your page
    padding: 0.2em;
    float: left;
}

if you want to change that then try to change the border property as follows

border: 1px solid red(or) blue (or) black; // whatever color you want here 

(or)

border:none; // set this, if want no borders around divs

let me know the status

happy coding

**any comments are appreciated on my clarification **

radhakrishna.p 29 Posting Whiz in Training

hai MICHAEL,

go through the following URL

http://www.daniweb.com/software-development/java/threads/449703/randomnumber-without-duplicate

read the bguild post there (i feel thats the great solution for this kind of requirement and make that logic as you needed)

it may helps you for requirement (Random Numbers without duplicates)

happy coding

my apologies to all of you for giving this kind of response for the above requirement

radhakrishna.p 29 Posting Whiz in Training

hai MICHAEL,

colud you explain me clearly what you are going to do
whether you want 5 random numbers between 0 to 78 or something else

can you make me clear on this requirement

so that we are here to help you

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai foxwizzy,

you done for in your code for editing the entries (see at line 94).

so why dont you follow same procedure for deleting the entry (just suggestion only)? like as follows (at line no 113)

<a href="delete.php?entry_id=<? echo r['current_entry_id']?>">Delete</a>

use the same thing here for deleting entries by passing its entry id value to the appropriate page(i mean 'delete.php' if it is existed).

i think you got my point and its work fine for this kind of requirement

let me know if you feel any doubt in my answer (if you dont want like that kind of answer)

happy coding

radhakrishna.p 29 Posting Whiz in Training

hai adikimicky

please do as JamesCherrill said he is right

in order to send and receive data properly between sockets (client and server) we have to use same kind of data flow related classes in java

you used streams for receiving data at Client side but you are sending data to client which is irrelavent data type than at receiving side

replace the following code at your server side code from line no 22 to 24

OutputStream s1out=s1.getOutputStream();
DataOutputStream dos = new DataOutputStream(s1out);
dos.writeUTF("hello");
dos.flush(); // dont forget to call this method 
dos.close();

so that you will get the output as you want

let me know the status

happy coding
suggestion:

dos.flush(); // dont forget to call this method because which confirms that all the data has been sent
radhakrishna.p 29 Posting Whiz in Training

suggetion :

place 'break' statement at the end of each 'case' statement in switch() statement

otherwise all three cases will execute for each time when the control comes in the switch() statement

happy coding

tux4life commented: Good catch! ;) +13
radhakrishna.p 29 Posting Whiz in Training

hai adikimicky,

suggestions (for better programing):

make your connect method signature as follows

public void connect(String user_name,String pass){
//  your code here
}

at line 59 pass username and password values to connect() method.so that line will be as follows

connect(userName,passWord);

then finally chage the query as follows

String str = "insert into Table1 values('"+user_name+"','"+pass+"')";

thats it

happy coding

radhakrishna.p 29 Posting Whiz in Training

if you use the bellow statement for connecting to database (in the above given url)

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")

that says you are using type-1 driver which is provided by Microsoft ODBC for Oracle

incase, if you use the bellow statement for connecting to database

Class.forName("oracle.jdbc.driver.OracleDriver") 

that says you are using type-4 driver (ojdbc.jar and ojdbc14.jar files are needed to connect to database) which comes with Oracle10g Express Edition

note : check bin folder of oracle10g installation for those jar files

in java there are 4 ways to connect to database . the following url explains description of all the 4 ways

http://www.roseindia.net/jdbc/jdbc-driver-and-its-types.shtml

let me know if you have any doubts in my clarification

happy coding

radhakrishna.p 29 Posting Whiz in Training

why don't you try like this (replace your php code with bellow code it works perfectly)

<?php

echo('This is visible, all stuff below is not. So the closing tags are not visible too.');

?>
<embed src="flash/<? echo rand(1, 5);?>.swf" type="application/x-shockwave-flash" width="320" height="240"></embed>


<?
  // remaining your code 
?>
radhakrishna.p 29 Posting Whiz in Training

to be more specific str_pad() does well for this kind of requirement

$input = "41";
echo str_pad($input, 10,"0", STR_PAD_LEFT);                  

please check this too

radhakrishna.p 29 Posting Whiz in Training

try with this

$number = 41;
printf("%04d\n", $number);

printf() in php, follows some internally implemented rules for formating the numbers based on the given expression in the left side of the statemnt as shown above

please see manual for more details about this method

let me know the status

happy coidng

code739 commented: ahahah cool i really didnt think of that thing nice job +4
radhakrishna.p 29 Posting Whiz in Training

hai deadsolo,

i tried the solution for your requirement by using split(" +")

i dont know whether this is an exact solution for your requirement or not. because iam not considering any other issues like( perfomance isssue ... etc) to give this solution

i know this is not the correct way for what you are looking for but its giving a way for the solution

i apologies to all the experts/guys over here who are giving solutions for this problem

File f = new File("Your_data_file_location here");
BufferedReader br = new BufferedReader(new FileReader(f));
String strt = "";

while((strt = br.readLine()) != null){                

     if(strt.startsWith("BitTorrent")){

         System.out.println(strt);
         String[] str_toks = strt.split(" +");
        // for (int i = 0; i < str_toks.length; i++) {
        //            String string = str_toks[i];
        // }
         System.out.println("your desired value :"+str_toks[str_toks.length-2]);
}
}
br.close();

explanation of my code:
1.i have taken your data in a file
2. then i read the file data line by line
3. then i checks if the line starts with (BitTorrent) or not
if yes i split the line using the above regular expression

4.based on our requiement i get the value from the array of spllitted line

thats it

let me know whether this is right approach or not

i will wait for all your valuable comment's

note: i dont have much experience in java

radhakrishna.p 29 Posting Whiz in Training

i used the same script by doing one example

here is that example and its work great

<html>
<head>
<title>welcome to Convert Currency In Words(http://pandiyachendur.blogspot.in/2009/11/javascript-to-convert-indian-

rupees-in.html)</title>


<script type="text/javascript">


function test_value() {
    var junkVal=document.getElementById('rupees').value;
    junkVal  = Math.floor(junkVal);
    var obStr = new String(junkVal);
    numReversed= obStr.split("");
    actnumber=numReversed.reverse();

    if(Number(junkVal) >=0){
        //do nothing
    }
    else{
        alert('wrong Number cannot be converted');
        return false;
    }
    if(Number(junkVal)==0){
        document.getElementById('container').innerHTML=obStr+''+'Rupees Zero Only';
        return false;
    }
    if(actnumber.length>9){
        alert('Oops!!!! the Number is too big to covertes');
        return false;
    }

    var iWords=["Zero", " One", " Two", " Three", " Four", " Five", " Six", " Seven", " Eight", " Nine"];
    var ePlace=['Ten', ' Eleven', ' Twelve', ' Thirteen', ' Fourteen', ' Fifteen', ' Sixteen', ' Seventeen', ' Eighteen', ' 

Nineteen'];
    var tensPlace=['dummy', ' Ten', ' Twenty', ' Thirty', ' Forty', ' Fifty', ' Sixty', ' Seventy', ' Eighty', ' Ninety' ];

    var iWordsLength=numReversed.length;
    var totalWords="";
    var inWords=new Array();
    var finalWord="";
    j=0;
    for(i=0; i<iWordsLength; i++){
        switch(i)
        {
        case 0:
            if(actnumber[i]==0 || actnumber[i+1]==1 ) {
                inWords[j]='';
            }
            else {
                inWords[j]=iWords[actnumber[i]];
            }
            inWords[j]=inWords[j];
            break;
        case 1:
            tens_complication();
            break;
        case 2:
            if(actnumber[i]==0) {
                inWords[j]='';
            }
            else if(actnumber[i-1]!=0 && actnumber[i-2]!=0) {
                inWords[j]=iWords[actnumber[i]]+' Hundred and';
            }
            else {
                inWords[j]=iWords[actnumber[i]]+' Hundred';
            }
            break;
        case 3:
            if(actnumber[i]==0 || actnumber[i+1]==1) {
                inWords[j]='';
            }
            else {
                inWords[j]=iWords[actnumber[i]];
            }
            if(actnumber[i+1] != 0 || actnumber[i] > 0){
                inWords[j]=inWords[j]+" Thousand";
            }
            break;
        case 4:
            tens_complication();
            break;
        case 5:
            if(actnumber[i]==0 || actnumber[i+1]==1 ) {
                inWords[j]='';
            }
            else {
                inWords[j]=iWords[actnumber[i]];
            }
            inWords[j]=inWords[j]+" Lakh";
            break;
        case 6:
            tens_complication();
            break;
        case 7:
            if(actnumber[i]==0 || actnumber[i+1]==1 ){
                inWords[j]=''; …
radhakrishna.p 29 Posting Whiz in Training

so then take a global variable for continuing (screen capture) the loop as folllow

public static boolean loop_status = true

and then modify your code as follows (here we are making the total process of your work in a seperate thread so that its never distrub the main thread at all)

new Thread(new Runnable(){

public void run(){
   try{
        for(int x=1;;x++) 
        {
             fn= Integer.toString(x) + "filename.jpg";
             ScreenShotRobot.captureScreenShot( "folder/", "jpg", fn );
             Thread.currentThread().sleep(2000);
             if(!loop_status){ // this loops until the value of the variable changed to false
             break;
             }
        }
}catch(Exception e ){
      // handling code if any exception raises here
}

}

}).start()

whenever you want to stop the screen capturing then try make the loop_status variable value to false

pls try to make changes in your code

let me know whether this is woirking perfectly or not

happy coding

radhakrishna.p 29 Posting Whiz in Training

suggegtion only :

PixelGrabber is also another class where we can get image data in a pixel by pixel manner

radhakrishna.p 29 Posting Whiz in Training

As bguild said

take one more variable for sum_of_all_elements

and add all columns values of each row to this variable (in side for loop) like as
total variable

what i mean is

sum_of_all_elements += nums[r][c]

thats it

radhakrishna.p 29 Posting Whiz in Training

use Math.abs() instead of abs() because there is no default abs() method in js

radhakrishna.p 29 Posting Whiz in Training

i think this would be the one of use case to you requirement

Click Here

and let me know the status of my answer

radhakrishna.p 29 Posting Whiz in Training

in the main post at line 21 (test.php)

if ($newpassword = $confirmnewpassword) {

are you assignning the vallues or for comparing the values of
($newpassword and confirmnewpassword)

let me clarify once pls

radhakrishna.p 29 Posting Whiz in Training

we can achieve this by using "contenteditable" property and the following java script code

<div contenteditable="true" onclick="document.execCommand('selectAll',false,null)">

Place  your text here 

</div>

you can add your styles to this div as usual

let me know if you have any problem

Resentful commented: Awesome solution! +1
radhakrishna.p 29 Posting Whiz in Training

can you post error details what you are getting so far while running this function?

so that we try to slove your problem

radhakrishna.p 29 Posting Whiz in Training

<textarea> tag does not have value attribute

if you want to place atext inside test area then you have to plcae your code as follows

<textarea>
<?
   // plcae your data here
?>
</textarea>
radhakrishna.p 29 Posting Whiz in Training

**at line 15 **you have taken the support of some class

myFunctions m;

you haven't instantiated this variable anywhere in your code but you called some methods by using that reference somewhere like line no 331, 344, 357

thats causing the exception check that once

create an object for that class is the solution for your problem

and let me know the status after the modification

radhakrishna.p 29 Posting Whiz in Training

use onmouseout instead of onfocusout

it may works for you

radhakrishna.p 29 Posting Whiz in Training

otherwise modify your class as follows

public class Payroll
{
    public double grossPay;
    public double stateTax;
    public double federalTax;
    public double calculateNetPay()
    {
        return grossPay - (stateTax + federalTax);
    }
    public void printOutput(double yo2)
    {
        System.out.println(" Net Pay is: " + y02);
    }
}

and call printOutput() method by passing yo1 value as you called in your program like as follows
// change those lines in your program

y01 = taxes.calculateNetPay();
taxes.printOutput(y01);

happy coding
radha krishna .p