Icon is quite nice but as development environment it is clumsy. So I end up using Python, which has some influence from Icon. Dreaming to implement sometimes more Iconisms for Python..
i second that.
Icon is quite nice but as development environment it is clumsy. So I end up using Python, which has some influence from Icon. Dreaming to implement sometimes more Iconisms for Python..
i second that.
well i would recommend advanced number theory for encryption , since encryption involves more of math than computer science .
that is indeed a pretty serious one , besides making compiler isnt a joke ..
U gotto understand a lot of theory and concepts regarding a function of compiler , which mostly include Finite Automata Theory and parsing of grammers and a lot of things pertinent to it.
I would suggest you to first head on with building simple text editors using language of ur choice and later on venture out with new things.
and AFAIK c++ is not used for web based applications.
chuck that damn compiler ..... its totally totally obsolete .
and btw it doesnt matter , because the tubro Cpp (SCHOOL programs ) programs will also run with gcc and MinGW , although there might be some finer nuances .. like using namespaces etc the other 2 are better than turbo cpp :P
well ... i am kida baffled .
i guess u want to print the counter which increments by one .
all u gotto check is the variable assg shouldnt exceed the max points you set .
and while thats true , keep incrementing the counter .
LFS might be a bit overwhelming for me as of now .
One of the utility is file parsing to detect correct file name aliases. For this roughly 200 functions need to be called
these functions which ur wanting to call are they incorporated in some header files or members of some classes .... details ?
it would be prudent http://www.catb.org/~esr/faqs/smart-questions.html
to read it
well it will be prudent to have those functions under one class . so to check the file aliases u can pass the filename to object and allow it to pass thru the rest of the functions .
I am trying call a million function from main().
honestly .. its sounds ridiculous if your not expressing yourself articulately .
please supply some more info .. on wat are those functions ?
and there are also many complexities involved . Managing to calling them is just one milestone .
for example :
ANSI C supports only 32 exit handlers, i dont have the slightest inkling on how will you manage their exit/ return ?
if your functions involve any kind of system programming like IPC or calling API s , then you gotto think about refactoring the code .. since API s will keep switching
the execution between kernel mode and user mode which is an overhead when it comes to a million functions.... and many things like that..
Well i have been working on linux for a while , eventhough i am stuck to ubuntu only .
Well i am planning to venture out a little and understand more about how os is made and may be build os from scratch .. i mean not to code it but coalesce different units and having a satisfaction of building my own version and including programs .. stuff like these..
Is there any distro which allows me to learn more about linux in depth and delivers what i am looking forward to build ?
well u can use a check variable and initially assign = 1
then inside the iteration keep asking to the input
if the input == 0
check = 0
close the iteration
>What that limit is will depend on the system the executable will be run on.
the limit .. well in linux its stored in ARG_MAX and is usually 4096 bytes , but in other BSD s it might be a little higher .
Besides its a tedious job to pass on soo many arguments.
Out of curiosity , wat exactly are you trying to achieve ?
now supposedly , i have the name and country list stored in the DB , then in that case can i still use JSON ?
for example i extract the info using php and then communicate that to JSON .. something like that .
or am i still getting it wrong ?
well honestly , i am kinda baffled . Well if its more on client side and still we gotto use the server side programming , then in wat way is it better than the existing javascript . Well may be i am going the wrong way , but i would be grateful if you could give me (or refer) some kinda example like form or soo . i have googled examples on json and i see , it more as a subsitute for javascript (conventional one ) rather than the xml thingy ur talking about.
but how do u interact with databse using JSON ?
I thought people use php for that . can u give a small example of interaction with DB.
I recently herd the buzz about JSON and stuff was also saw the coding style , but still i am not able to appreciate it .
Well i am working in python web framework (not Django) and also using templating language.
when i wrote a program to just to add two numbers , i found it a lot cumbersome than PHP.
Well i wouldnt get into JSON language , provided its worth it . i would be glad of u could throw some light on JSON .
For example ,
As i registered in daniweb.com , a mail was sent to my email id and after clicking on that link , i could complete my registration .
i want to develop a similar module in php , where the users after signing in , i sent this particular auto-generated link to their email id and confirm their registrations.
ohh.. never knew that .. kudos to you .
well i used to always put the function call in the main programs and then execute ..then will this work
def main():
args = sys.argv[1:]
for arg in args:
cat(arg)
huh.....? i am not asking about indentation.... since i wanted to run it as a single file . should i put those 9-11 lines in main() and then run or how should i go about doing that ?
shouldnt i put the code from 9-11 in main() since i want to save it in a py file and run it from a file instead of the interpreter directly...
well if ur newbie i would suggest that u use ipython rather than python .
well in ipython u can directly enter as
$ ipython -pylab // it has already all mathplot lib and numpy and scipy
then ur code gets something like this
for c in range(-21,21):
for i in range(0,20):
print c,i
plot([c],[i],'r.')
show()
clf()
print 10000
i have a very simple program which takes in file name as argument and print the content of the file , but for some reason it isnt working
here is the code
import sys ,os
def Cat(filename):
f = open(filename)
text = f.read()
print '----', filename
print text
def main():
args = sys.argv[1:]
for arg in args:
Cat(arg)
i would be glad , if u could help me out .....
i am getting an error saying
error querying database
all the data types in the db i have set it as varchar.
i have written a small code to store the checkbox values into the db.
But its showing me a parse error . Unable to figure out what it could be .
<?php
$dbc = mysqli_connect('localhost', 'root', '', 'test')
or die('Error connecting to MySQL server.');
if(isset($_POST['language']))
{
$language = $_POST['language'];
$n = count($language);
$i = 0;
echo "$n";
echo "The languages you selected are \r\n" .
"<ul>";
while ($i < $n)
{
echo "<li>{$language[$i]}</li> \r\n";
$i++;
}
$query = "INSERT INTO check (ai,rdbms,os,cd,co) VALUES // err ('$language[$i -1]', '$language[$i - 1]', '$language[$i - 1]', // err '$language[$i - 1]', '$language[$i - 1]' ) "; // err
echo "</ul>";
$result = mysqli_query($dbc, $query)
or die('Error querying database.');
mysqli_close($dbc);
}
?>
the error its showing is
Parse error: parse error, expecting `']'' in C:\wamp\www\College Web Project\Check Box (tested).php on line 39
the html code is
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Select the area of expertise ur good at <br>
<input name="language[]" type="checkbox" value="Artificial Intelligence">
Artificial Intelligence<br>
<input name="language[]" type="checkbox" value="DataBase">
DataBase <br>
<input name="language[]" type="checkbox" value="OperatingSystems">
OperatingSystems <br>
<input name="language[]" type="checkbox" value="CompilerDesigns">
CompilerDesigns<br>
<input name="language[]" type="checkbox" value="Computer Organization">
Computer Organization<br>
<input name="send" type="submit" id="send" value="Send!">
</form>
Ps : i have incorporated the html code in the same file as the php.
then my answer is somewat close , cuz for the last case u cannot incorporate that into a nested if , it has to be in else part .
and the 1st 2 i have nested them
first , i think u gotto check whether these header files are present in the path u have set or not .
Well usually there would be an include folder in ur compiler directory , where u can find various header files .
Otherwise , if those are self made files , then i guess u gotto ensure they r in same directory .
try this code
if (status == 'P')
{
time_remaining - = 1;
if(amount >= 10000)
due_flag = true;
}
else if (status == 'O')
{
time_remaining = 0;
warning_flag = true;
}
I really cant tell wat exactly ur expecting , if u could enunciate ur problem statement , then i can help u better .
What ur seeking for , is actually a whole different field of science called artificial intelligence .
Well ur imagination is possible but requires u to know a lot of concepts and knowledge on those specifics , hence its not a viable option if ur a newbie .
i didnt completely get u ..
U mean to say
insitlaly i create a header file like
#include<shared_data>
extern int array[];
and then in normal code , i should directly use array ; ?
Will the data stored by the first program into this array can be used by another program .. ?
I have an array, which i want it common to both the f1.cpp and f2.cpp .
since f1.cpp will be used to store some values in it and f2.cpp has to use it for some other computations , is there any way i can share these 2 variables .
well i initially thought of files , but they dont completely solve my problem.
Well Froger , you got a point. In that case will javascript help me or ne other idea which will help me doing that.......
How to restrict the size of image thats to be uploaded .
I am creating a small social network and have space constraints .
So , i dont want to restrict the image size to be confined to certain limit.
its more complicated than that . its not just forms .
i thought i could integrate it , but my php app became a bit compicated .
there is a different headers and one of them i have mainly dedicated to all the functions , which i call using incclude_once.
The problem is in the functions itself , for simplicity i displayed the dats extracted from DB and using basic html tags in echo function.
Later the design was initiated and now , i dont know how to intergrate my php code with the existing page designed .
Will I have to re write my COde again . ?
Well i got some weird problem here .
We have a web team and we disributed our work equally , where i mainly created the web application in php and i am glad its working file . But for simplicity purpose i used basic html tags and created the web app .
Now the designers have completed the front end with CSS and HTML .
Now , i dont have the slightest idea on how to go about using the front end my designers have made. i would be glad if u could provide some valuable suggestions .
firstly , i appreciate your efforts . Kudos for that .. !
These are the errors i get while executing your code
Notice: Use of undefined constant one - assumed 'one' in C:\wamp\www\College Web Project\checkbox.php on line 14
Notice: Use of undefined constant two - assumed 'two' in C:\wamp\www\College Web Project\checkbox.php on line 15
Notice: Use of undefined constant three - assumed 'three' in C:\wamp\www\College Web Project\checkbox.php on line 16
Notice: Use of undefined constant one - assumed 'one' in C:\wamp\www\College Web Project\checkbox.php on line 17
Notice: Use of undefined constant two - assumed 'two' in C:\wamp\www\College Web Project\checkbox.php on line 18
Notice: Use of undefined constant three - assumed 'three' in C:\wamp\www\College Web Project\checkbox.php on line 19
Notice: Undefined index: expertises in C:\wamp\www\College Web Project\checkbox.php on line 24
Notice: Undefined index: expertises in C:\wamp\www\College Web Project\checkbox.php on line 25
Notice: Undefined index: expertises in C:\wamp\www\College Web Project\checkbox.php on line 26
Warning: Invalid argument supplied for foreach() in C:\wamp\www\College Web Project\checkbox.php on line 26
Notice: Use of undefined constant one - assumed 'one' in C:\wamp\www\College Web Project\checkbox.php on line 49Notice: Use of undefined constant two - assumed 'two' in C:\wamp\www\College Web Project\checkbox.php on line 55
Notice: Use of undefined constant three - assumed 'three' in C:\wamp\www\College Web Project\checkbox.php on line 61
take your checkbox as an array. use same name for a group of checkboxes and then retrieve respective value using foreach loop
Honestly i got no idea on how to go about doing that . I would be glad if you could throw more light on it .
i have written a code for the user to select his area of expertise with respect to fields. i am able to display selected checkboxes for those fields. But when i want tio process further like
when the user clicks on the particular checkbox and then submits i am not able to display the various options he/she has checked on.
the below is the initial html code
<html>
<head></head>
<body>
<h2>Please select your area of expertise </h2>
<p>
<form method="get" action="aoe.php">
<select name="area">
<option value="1">Computer science / Applications
<option value="2">Electronics
<option value="3">Mechanical
<option value="4">Biotechnology
</select>
<input type="submit" value="Send">
</form>
</body>
</html>
the below is the following php code
<html>
<head>
The choice whic u have selected is </head>
<body>
<?php
$day = $_GET['area'];
echo " Please select the related subjects ";
if($day == 1)
{
?>
<form name="form1" method="post" action="aoe.php">
<input type="checkbox" name="checkbox" value="checkbox">
Artificial Intelligence
<input type="checkbox" name="checkbox2" value="checkbox">
Operating Systems
<input type="checkbox" name="checkbox3" value="checkbox">
Compiler Design
<input type="submit" value="Send">
</form>
<?php
if (isset($_POST['checkbox']) )
{
?>
<p>" U have selected artificaial intelligence " </p>
<?php
}
}
elseif($day == 2)
{
?>
<form name="form2" method="post" action="aoe.php">
<input type="checkbox" name="checkbox" value="checkbox">
Microprocessor
<input type="checkbox" name="checkbox2" value="checkbox">
Electronic circuits
<input type="checkbox" name="checkbox3" value="checkbox">
Chip and dales
<input type="submit" value="Send">
</form>
<?php
}
elseif($day == 3)
{
?>
<form name="form3" method="post" action="aoe.php">
<input type="checkbox" name="checkbox" value="checkbox">
Machines
<input type="checkbox" name="checkbox2" value="checkbox">
Tools
<input type="checkbox" name="checkbox3" value="checkbox">
Aeromodelling
<input type="submit" value="Send">
</form>
<?php
}
else
{
?>
<form name="form4" method="post" …
Thanks Guys.... It worked .. kudos to you.............
i re wrote the code in this manner . but still it doesnt seem to work
<?php // formtest2.php
$flag = 0;
if (isset($_POST['name']))
{
$name = $_POST['name'];
$flag = 1 ;
}
else $name = "(Not entered)";
//echo <<<_END
?>
<html>
<head>
<title>Form Test</title>
</head>
<body>
<marquee> Your name is: $name </marquee> <br />
<form method="post" action="form1.php">
What is your NAme ?
<input type="text" name="name" />
<input type="submit" />
</form>
<?php
if ( $flag == 1 )
{
?>
<form method="post" action="form1.php">
What is your uncles NAme ?
<input type="text" name="name1" />
<input type="submit" />
</form>
<?php }
if ( $flag == 0)
echo " wish u had written your name " ;
?>
</body>
</html>
i want the user to enter the name in the query and only after entering the name the next input text appears.
Unfortunately it doesnt work the way i want it to.
here is the code
<?php // formtest2.php
$flag = 0;
if (isset($_POST['name']))
{
$name = $_POST['name'];
$flag = 1 ;
}
else $name = "(Not entered)";
//echo <<<_END
?>
<html>
<head>
<title>Form Test</title>
</head>
<body>
<marquee> Your name is: $name </marquee> <br />
<form method="post" action="form1.php">
What is your name?
<input type="text" name="name" />
<input type="submit" />
</form>
<?php
if ( $flag == 0 )
{
<form method="post" action="form1.php">
What is your Uncle s NAme ?
<input type="text" name="name" />
<input type="submit" />
</form>
}
else
echo " wish u had written your name " ;
?>
</body>
</html>
I dont know where i am going wrong.
Its an integer array pal .
The right way to print is to put it inside a for/while loop .
for ( int i= 0;i <12 ; i++)
cout<< list[i];
well there are a lot of ways in which u can do .
I think it would be prudent to , learn a bit more about functions and classes in c++ . That will give u a fairly good idea on how to organize as well as write secure code .
U can refer books authored by stanley lippman or herbert schild for this purpose . I personally felt they are quite good.
technically speaking map is a STL ( structured template library ) . There are many tutorials in net which teaches you about its usage.
I can provide u the complete code , cuz u will not learn anything . If you get stuck somewhere in this process , i might bail you out.
i found many replacements of opengl like
darkgdk
DirectX
Allegro
etc...
ANd the one i found is somewat similar to wat i want
that is sfml . I guess i want some other similar programs like sfmls
Well its pretty simple ,
ITs like in opengl , handling the primitives like circle , sphere is difficult and we have to dereive our own algorithm.
Is there any libraries which can directly do that , by just calling the cicirle primitive or something analogus to that.
its very simple ..
I guess u are not aware of map data structure.
Basically , when ur getting the character from the file , check it using a map and then the equivalent to that may be printed or stored in a file according to ur wish.
this is the simple code on how to use a map data structure .
map<char,int> mymap;
map<char,int>::iterator it;
mymap['a'] = 0;
mymap['b'] = 1;
mymap['c'] = 2;
mymap['d'] = 3;
mymap['e'] = 4;
mymap['f'] = 5;
do
{
for ( it=mymap.begin() ; it != mymap.end(); it++ )
{
if( s[i] == (*it).first ) // s[i] holds the plain text which is
{ //mapped to the 1st element of map
enc[i++] = (*it).second; // if it matches then the equivalent is
len--; // is stored in ur enc[] which is the
} //encrypted array
}
} while (len != 0);
The above is not the complete code , but gives u fair idea on how to use maps for your encryption.
Also google more on maps for its usage.
i appreciate your help , and i intend to do this all by myself .
Its just that , i am pretty good in making the front ends with jquery and joomla and other web tools . But a little naive when comes to server side scripting.
Well thanks for such elaborate reply .. it was really helpful .
I am fully aware of forum (phpbb) and this interface doesnt require that , cuz , i want the current college students to have an interaction with the alumni , not the alumni among themselves .
So , for the current students , they can search for alumni members and based on the search result , the suitable profiles must be displayed .
The next step what i thought of was, when the profile is displayed , i also wanted the questions previously asked to him , to be displayed in a fashion of comment and reply.
the reply option must be visible only for the alumni member (who logins) and the comment ( or ask question) must be available for the visitor . In this all the questions and the reply of alumni members can be displayed.
I have been working with opengl for past 2 months and find in very difficult to manage with it .
The actual code for rendering the image is very less , compared to the code written to handle the view and other opengl attributes / controls.
Is there any library of support which can lessen the burden of coding pertinent to handling opengl ?
I would be glad if u guys could help me out .
Even other ideas with respect to image rendering are welcomed.
well .. u could have posted the code in here using the code tags ..
Besides , its would be prudent to enunciate your problem , or else its difficult to find help in here.
I want to make a user profile , where in the people can login and fill in profile details .
Well basically i am wanting to make a connection between the alumni of my college with the existing students. So , i initially thought of making the alumni registered and display their profiles on the alumni page of college website.
I would be glad if you could help me out in going about this thing , since i am a noob in this field .