rahul8590 71 Posting Whiz

well in the code set i = 2 (for 3rd row ) and iterate only for the j column and set b[j] = 0 ;


i =2 ;  // for the 3rd row 
for( j = 0 j<5;j++)
b[i][j] = 0;

i guess this should work

rahul8590 71 Posting Whiz

in ur turbo c== compiler , u can navigate to help (right mouse click) and then search for inp() and outp() .
There u will not only get a decent explanation but also an example with it.
I guess that would help u out.

rahul8590 71 Posting Whiz

Well i guess u will get more apt answers in Qtforum
It would be still efficient if ur familiar with python cuz , i have seen many nice applications which are built using PyQt

rahul8590 71 Posting Whiz

Well help will only be provided if u could show your code ... we cannot do ur home work from scratch.

rahul8590 71 Posting Whiz

In ur turbo C there exist a include folder which contains many header files , ur supposed to place the desired header file in that directory.

PS: For god sake stop using turbo , u have much better compilers to work with.

Salem commented: Bad: Don't put 3rd party header files in the compiler include directory, Good!: Ditch TurboCrap +18
rahul8590 71 Posting Whiz

The OP wants to check the existence of 0 in the number only if loop wont suffice , u will have to iterate within a while loop and keep finding the last significant number one after the another and check whether that number is equal to 0 or not.

int number, in , index , flag =0 ;

cout << " Enter a positive number count: ";
cin >> number;

index = number;

while(index > 0)
{

in = index % 10 ;
index = index / 10;

if (in == 0)
{cout << " Error! The number contains 0 in it ";
flag = 1;
break;
}
}

if(flag == 0 )
cout<<" the number does not 0 in it ";

above i have written simple code .
Since initially i focused only on getting the desired output i didn't tweak it much
u can still tweak it further and shorten the steps in it .

rahul8590 71 Posting Whiz

ohh god , i completely forgot about that..................
Well initially i had used the numbers without the quotes and i was wondering why didnt it work , then i switched over ASCII codes for that .

So , the code will be like this :

while (is.good())     // loop while extraction from file is possible
  {
    c = is.get();       // get character from file
    if (c>= '0'&& c <= '9' ) // No need of ASCII just single quotes 
      cout << c;
  }
rahul8590 71 Posting Whiz

Since u only want the numbers to be recovered , u must be aware of the ascii equivalent for the number

0 - 48
----------
----------
9 - 57


i suggest u make a char variable , fetch the input character vice and then check the ascii equivalent of the numbers , if the char "c" lies between 48 and 57 then print it , or else ignore
I hope i am giving u some idea from the code below

char c ;
while (is.good())     // loop while extraction from file is possible
  {
    c = is.get();       // get character from file
    if (c>=48 && c <= 57 )  // check the ascii range for 0-9
      cout << c;
  }
rahul8590 71 Posting Whiz

Ohh.... Common guys i need some help ..?
I did almost of wat i could think of , i would be glad if u could provide me with some guidance...


Ps: I am aware that i cannot post one after the another , (i apologies for that )

rahul8590 71 Posting Whiz

In many of the forums i have observed that , we can re direct the page like

thanks for logging in u will be redirected in 5 secs

and eventually the 5 secs decreases to 0 and the page gets redirected.


In my php code i could redirect the page simply through

header("Location: http://www.MyWebPage.com/");

How do i show the seconds and finally redirect.

rahul8590 71 Posting Whiz

Well i guess , when it comes to WEB ; scripting languages like PHP can be more efficient than C++ , although i admit that i was astounded when i learned about blat , but i guess other scripting languages can lessen ur burden .

rahul8590 71 Posting Whiz

This has a step by step method:
http://www.ehow.com/how_5079317_calculate-inverse-matrix.html

That was a nice link enlightening the procedure.

I would like to add more on it by saying that u could use matrix template library
http://www.osl.iu.edu/research/mtl/intro.php3

It might be helpful to you.

rahul8590 71 Posting Whiz

I guess this link might help you .. as even i am interested in this field and i admit that i am a complete neophyte in this too...
http://www.tenouk.com/Module40c.html

rahul8590 71 Posting Whiz

It would be better to first understand the basic of OSI layer and how things work in various levels..
Later i guess u gotto know about NIDS and NIPS systems (network intrusion detection / prevention systems ) . and finally jump over to something complex as firewall.

rahul8590 71 Posting Whiz

Well , i have created a simple chatting interface . i would not call it a chatting interface actually cuz i had something else in my mind and finally landed on something else .

i would like if you guys could excecute it and help me making it a real chatting interface .

Well the basic thing is that . i have wriiten a server side code and then client side code .
the user complies one after the another and then runs those files in different DOS windows . Well i want to extend this to a real time chatting interface


the first is the UDPServer program
u will have to save the file as UDPServer (its case sensitive ) and compile it and run in in the first DOS window


the second file is UDPClient program . u will have to follow the same and then run it.
u might be able to chat (well not the traditional meaning here) in the two windows .

i hope u guys will give me ideas n help me improving it .

rahul8590 71 Posting Whiz

Is there any distro which has pre built .
LAMP
JDK and the graphic some wat like Atlantis

rahul8590 71 Posting Whiz

Did you downloaded Connector/J and pointed your IDE or set a CLASSPATH to location of this JAR file?

Well is it a kinda of config we have to do to establish the connection.
I thought there wasnt any thing else to do

rahul8590 71 Posting Whiz

Well i am complete navie in the field of java scripting ....
But seems like i have no choice but to learn it.

rahul8590 71 Posting Whiz

i have currently 3 checkboxes.
But the thing is i only want 2 of them to b processed i.e

if check box 1 is checked then the 2 one must get blocked thus by preventing the user to check it.
similarly vice versa.
(this must be applied only to 1st 2 check boxes not the 3rd one )

Is there ne way to do it dynamically....?

rahul8590 71 Posting Whiz

i have installed mysql , and JDK . I wrote the following code to test jdbc . But it didnt work

public class Test {
  public static void main(String[] args) {
    try {
      Class.forName("root.mysql.jdbc.Driver").newInstance();
      System.out.println("Good to go");
    } catch (Exception E) {
      System.out.println("JDBC Driver error");  
    }
  }
}

its printing
JDBC Driver error


But when i script in PhP , i can connect and store in db using MySQL.

rahul8590 71 Posting Whiz

ur welcome :) , once ur comfortable with this , u can also upgrade ur self to DIRECTX programming . That will take you to the epicenter of gaming .

rahul8590 71 Posting Whiz

here is the basic program which can print itself

#include<iostream>

int main ()
{
  int c;
  FILE *f = fopen (__FILE__, "r");

  if (!f)
    return 1;

  for (c=fgetc(f); c!=EOF; c=fgetc(f))
    putchar (c);

  fclose (f);
  return 0;
}

Well at first place i didnt want to give the souce code , but i guess its the only way for u to understand on how it works and incorporate that in what ever ur doing .

rahul8590 71 Posting Whiz

Well recommend openGL , since its got more grpahic options and u will find much more help in that.
i guess these links might help u
http://www.tenouk.com/cncpluspluslibrary.html

http://www.videotutorialsrock.com/

http://www.swiftless.com/tutorials/opengl/opengltuts.html

i guess these links might give u the nudge ur looking for

rahul8590 71 Posting Whiz

yeah , but i prefer to eliminate various exceptions in the client side itself , before processing it for the server side.
If i go wrong in the server side , the it also screws up the database plus the processing of script which is a very high price to pay.

rahul8590 71 Posting Whiz

well i downloaded but how do i install those themes..?
the files are in some emerald extension.

rahul8590 71 Posting Whiz

well since i use netbeans IDE , whenever i mention any of the keywords belonging to java cryptography , they give a syntax error .

But the above code mentioned is working perfectly fine .
Thanks.

Is there ne way that i can fix the netbeans IDE

rahul8590 71 Posting Whiz

Well i am using fedora for a pretty long time and i am tired of the fedora looks
especially when i see ubuntus latest edition .
Are there any themes available or graphic packages which can enhance my OS looks.

rahul8590 71 Posting Whiz

sorry , i didnt mention this , but i tried that method also when i was getting parse error.
Well basically the parse error is in line 2
which is :

$checkbox1=$_REQUEST["checkbox1"];

this Undefined index error as i said before , is generated only on not clicking the check box , but works fine when clicked.

rahul8590 71 Posting Whiz

sDjH .. kudos to you.
But the script is working properly when the check box is checked
but if its not , its giving me a parse error.

Notice: Undefined index: checkbox1 in C:\wamp\www\db\output.php on line 2
User denied clicking the frog.

i wrote the output.html and output.php separately
When the check box is clicked its fine , when its not its displaying the message as well as the parse error . Is there ne way to remove the error with some text or so for that condition that would be great.

rahul8590 71 Posting Whiz

SDjh , well i am not quite getting in wat r u trying to tell.
can u quote a simple example on how a single check box is processed , may be i am lacking that part,
so i guess u don't use $_POST in case of check boxes rather u use
$_Request.

Well sorry if this sounds ridiculous , i am a tyro in PhP

rahul8590 71 Posting Whiz

hello everyone ! ,
I am creating a form with various check boxes in it. The check boxes represent various type of workshop the person wants to attend.

i just dont know how to process the data in check boxes.

check.html
The html code is :

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p>Please select the check boxes to for registering for the workshop</p>
<form name="form1" method="post" action="check.php">
  <input type="checkbox" name="cr" value="checkbox">
  Clinical REsearch 
</form>
<form name="form2" method="post" action="check.php">
  <input type="checkbox" name="bt" value="checkbox">
  Biotechnology 
</form>
<form name="form3" method="post" action="check.php">
  <input type="checkbox" name="mc" value="checkbox">
  Medical stuff 
</form>
<form name="form4" method="post" action="check.php">
  <input type="checkbox" name="none" value="checkbox">
  None of them , i was kidding...... heheheheh 
</form>
<form name="form5" method="post" action="check.php">
  <input type="submit" name="Submit" value="Register me now">
</form>
<p>&nbsp; </p>
</body>
</html>

the check.php code is :

<?php

$dbc = mysqli_connect('localhost','root','','aliendb')
       or die('error connecting to MySql');

$fin = 'hey';

if( (isset($_POST['cr'])) && (isset($_POST['bt'])) && (isset($_POST['mc']))  )
{
	$fin = "clinical research" . '</br>' . "Biotech" . '</br>' . "Medical crap";
}

echo 'ur registered no go home ';


$query = "INSERT INTO checkbox(workshop)".
          "VALUES ('$fin')";

$result = mysqli_query($dbc , $query) or die('Error querying db');

mysqli_close($dbc);

?>

wat i want is when the person clicks on one or more of the boxes , in my database the corresponding data must be entered in workshop coloumn.

example:

if the person clicks on
1.Medical Biotechnolgy
2.CLinical REsearch

Then in the workshop coloumn , these two …

rahul8590 71 Posting Whiz

and Wat kind of upgrade will that be..?
i mean will the aesthetics of the OS will better ? or wat else can i expect in that ?

rahul8590 71 Posting Whiz

i am planning to upgrade my windows sp2 to sp3 .
But i already have fedora installed (dual OS ).
will my upgrade from sp2 to sp3 crash my fedora ?

rahul8590 71 Posting Whiz

kudos to both essential and dukane for provodong me the answer.
but i have few doubts

1.wats the difference between

<script lang="JavaScript" type="text/javascript">

and

<script language = "JavaScript">

and

<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript">

2.IS there any java script editor which will be usefull of newbies for me ?

3.can database programming (MySQL connection where storing and retrieving the data is done )can be done using javascript or only PHP has to be used ?

rahul8590 71 Posting Whiz

the follwong is the basic java script i wrote and its not working (giving the desired output as i wanted )

<html>
<head>
<title>hello </title>
</head>
<body>

<h1 align='center'> Using Arrays </h1>

<script language = "JavaScript">

emp = new array(5)
emp[0] = rahul
emp[1] = rahul1
emp[2] = rahul2
emp[3] = rahul3
emp[4] = rahul4

document.write(emp[0]+"<br>")


document.write(emp[1]+"<br>")

document.write(emp[2]+"<br>")

document.write(emp[3]+"<br>")

</script>

</body>


</html>

i have saved this file as jscp1.html

and i thought it will print all the array values , but it displayed only the header USING ARRAY is printed , rest all is just ignored by the browser.
Is there ne way to fix it , then how..?

rahul8590 71 Posting Whiz

noelthefish kudos to you to come up with this in such short span.

but i want to ask few questions
1.which all technologies should i use in order to do such dynamic form generation, i am a complete neophyte in PHP too.

rahul8590 71 Posting Whiz

well its pretty simple
1. i am creating 2 forms
2.the second form (form2) will be generated based on the data entered by the user in the first form(form1).

3.The form one has 2 fields.
1.No of participants
2.Mode of payments

4.The form 2 has many fields in it, but the NAME field will be generated according to the data entered in form1 (no of participants).
The other fields will be same.

ex:

Form1

No of participants : 5
payment : Cash


Form 2

Enter name :
Enter name:
Enter name:
Enter name:
Enter name:

-----other details ---------


This is wat i wanted to do.

rahul8590 71 Posting Whiz

well yes ,
i framed it like this

FORM 1
1.No of participants
2.Mode of payment

FORM 2
1.Name (it will generate according to no of participants)
2.-------
3..........

other details.

Is there any idea on how to do it..?

rahul8590 71 Posting Whiz

well i am creating a registration form . the problem i am facing is
i want to generate the name text field based on the input of number of participants.

if some one wants to perform bulk registration, then he can keep filling the form again and again,
having all the details common apart from name , is there any way that i can generate a particiluar text field , mainly (the name) again based on the input of no of participants ..?

rahul8590 71 Posting Whiz

I am trying to build an application using JAVA.
Well the application is more like encrypting the message and communicating over a medium.(wired netowork/wireless)
so i came across the JCE (java cryptographic engine) but none of those programs were working in my system , well none of the keywords or objects which i created was recognized by my system, dont know wat to do?

rahul8590 71 Posting Whiz

there are many key words in java cryptography and none of them is been recognized in my system.
Is there any way i can implement java cryptography...?

rahul8590 71 Posting Whiz

I need to add a few more fields to the data base.

well in this case not only u will have to change the php script but also the MySql DB. I guess ur aware of that(just wanted to be sure).

the website where u have hosted must be having something like control panel or so to mange these things try getting that link (may be a folder name or so)
it would be like
www.domain.com/cpanel or watever the hosting company has choosen.

and i guess they would have given u user name and password.

rahul8590 71 Posting Whiz

well when i had hosted my website on web server .
I too was given a username n password.
i guess all these have a php MyAdmin module embedded in it.
it would be somewat like
www.urdomain.com/cpanel or so.

cpanel = control panel.
(it was cpanel in my case , i guess even u would be having something like that)
from there u can access the phpMyAdmin and then i used to browse my table and export the data in any format i wanted it to.

well this was my case . i am not pretty sure in urs.

rahul8590 71 Posting Whiz

actually i got it .. i couldnt believe i overlooked on that....

i just had to change the table name in
INSERT INTO query instead of alien i wrote store and now its functioning.

Ne ways thanks for ur help.

rahul8590 71 Posting Whiz

well i have indeed chosen the aliendb (database) . But the whole point is , by doing so its inserting the values by default in the first table (alien).
But i want to insert the data in the second table of the same DB , which is store. So how do i select the other table inside the DB ?

rahul8590 71 Posting Whiz
<html>
<head>
     <title> The aliens abducted me </title>

</head>

<body>
    <h2> The final report </h2>

<?php
$fname = $_POST['firstname'];
$lname = $_POST['lastname'];
$name = "$fname" .' '."$lname";
$email = $_POST['email'];



$msg = "Thanks for aubmitting the form $name". '<br/>' .
       " this is ur email is : $email".'<br/>'."we will get back to you ASAP \n we have stored the data in our database";

echo $msg;

$dbc = mysqli_connect('localhost','root','','aliendb') or die('error connecting to MySql');

$query = "INSERT INTO alien(fname,lname,email)".
         "VALUES ('$fname','$lname','$email')";

$result = mysqli_query($dbc , $query) or die('Error processing the query');

mysqli_close($dbc);

?>


</body>
</html>

intially aliendb had only one table alien .
Now i have added one more called as store.
I want the script to store the values in the other table (store).

rahul8590 71 Posting Whiz

i have created a database initially and had framed only one table.

The php script was working fine , i could store values and reterive from them.

I again created one more table in the same database , inorder to store data in it. but the PhP script is by default accessing the first table in the same DB rather than accessing the second one.
Is there any way to specify the table name..?

or will i have to create one more DB for the table ..?

rahul8590 71 Posting Whiz

no i havent checked the wamp forum. But i got that error as the one shown above. , honestly have no idea wats happening...

rahul8590 71 Posting Whiz

well i have installed Wamp server , and everything came as a whole package.
do i have to configure it before using it...?

rahul8590 71 Posting Whiz

i was just trying the new DBMS , herd it was kinda faster than MySql in some case.
the below is the code i have taken (Standard example) and still i am getting error.

<?php

// create new database (OO interface)
$db = new SQLiteDatabase("db.sqlite");

// create table foo and insert sample data
$db->query("BEGIN;
        CREATE TABLE foo(id INTEGER PRIMARY KEY, name CHAR(255));
        INSERT INTO foo (name) VALUES('Ilia');
        INSERT INTO foo (name) VALUES('Ilia2');
        INSERT INTO foo (name) VALUES('Ilia3');
        COMMIT;");

// execute a query    
$result = $db->query("SELECT * FROM foo");
// iterate through the retrieved rows
while ($result->valid()) {
    // fetch current row
    $row = $result->current();     
    print_r($row);
// proceed to next row
    $result->next();
}

// not generally needed as PHP will destroy the connection
unset($db);

?>

The error is something like this

Fatal error: Class 'SQLiteDatabase' not found in C:\wamp\www\db\db2.php on line 4

i have no idea on how to make this stuff work , i would be glad if u guys could help me out.