569 Posted Topics

Member Avatar for subhu01990
Member Avatar for ome2012
0
326
Member Avatar for lscamaro

Hey, "boolean" is not a data type, look at the correct definition/declartion Also, are you defining the function prototypes before main (since you're using them after main) because if not, the program won't know where to call the fucntions. Hope this helps :)

Member Avatar for np complete
0
125
Member Avatar for phorce

Hey, I might be having a blonde moment but here goes.. I'm trying to split a massive 1D vector into blocks at different places (If that makes sense), it should basically go like this: 0 201 401 601 801 .. .. .., 57201 2 202 402 602 .. .. .. …

Member Avatar for L7Sqr
0
2K
Member Avatar for kshahnazari

Hey, Numbers_roman::tonumeral($year); *This looks like a namespace, however, I might be wrong. See: http://php.net/manual/en/language.namespaces.php* and require_once("numbers/roman.php") This this includes the file, but, instead of the "include" function which will only execute an error, this function will die if there is an error. By using the require_once, it will check to …

Member Avatar for phorce
0
324
Member Avatar for Navlag

Instead of: if($v) { } Try using: if(isset($v)) { } I don't know which part the final else statement relates to. mhmh!

Member Avatar for LastMitch
0
297
Member Avatar for Yorkiebar14

@LastMitch, I'm confused to what you mean by "Text Editor" :P Ok, back to the OP.. So, you want a profiling system for your users. It's surprisingly simple, I'll guide you through the concepts, and, you can code it or find tutorials out there.. So first off, you need a …

Member Avatar for phorce
0
326
Member Avatar for griselndria

@griseindria - Just select it off SESSIONS then..? I.e. <?php if(!isset($_SESSION['user_session'])) exit("You do not have permission to access this page, sorry"); $query = "SELECT * FROM profile WHERE user_id='{$_SESSION['user_id']}'"; $res = mysql_query($query); if(!mysql_affected_rows() == 1) exit("Couldn't find the details"); while($row = mysql_fetch_array($res)) { // only display the users details } …

Member Avatar for phorce
0
328
Member Avatar for Yorkiebar14

Shouldn't this: <?php while($row = mysql_fetch_array($result)) { echo "<a href='members_profile.php?id=<?php echo $row[0];?>' >" .$row['username'] . ', '; } ?> Be this: <?php while($row = mysql_fetch_array($result)) { echo '<a href="members_profile.php?id=' .$row[0]. '">' .$row['username']. '</a>'; } ?> Also, with this code: <?php session_start(); Connected to database here $sql = "select * from …

Member Avatar for Yorkiebar14
0
529
Member Avatar for mmcdonald

Hey, why not try mysql_affected_rows()? E.g. //This session value is created at login $username = $_SESSION['valid']; //This is written to the URL $server_id = $_GET['server']; //See if a server exists with this ID and Username $query_server = "SELECT id FROM servers WHERE id='".$server_id."' AND `administrator`='".$username."'"; $result=mysql_query($query_server); if(mysql_affected_rows() == 1) { …

Member Avatar for mmcdonald
0
202
Member Avatar for Tko_1

Hey I just tried your script, it didn't work for me so I changed it and this works: <?php $filename = 'file.php'; if(file_exists($filename)) { header( 'Location: welcome.php' ) ; } else { echo "NO FILE"; } ?>

Member Avatar for Tko_1
0
116
Member Avatar for raj-uk

@EmilyJohnson that could not possibly work. Try avoiding outputting variables in functions, but, return them: <?php function country($country) { return $country; } echo "i am going to " . country("USA") . "<br />"; ?> i am going to USA

Member Avatar for diafol
0
105
Member Avatar for riccardo-m
Member Avatar for dean.ong.14

Before you begin to integrate PHP within this HTML... This is wrong: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name = "description" content = "Wellington Real Estate"/> <meta name = "keywords" content = "home, housing, Karori, Mirimar, Te Aro, Thorndon, Farcourts, Jonnys, Relax"/> <title> Agents …

Member Avatar for rpv_sen
0
261
Member Avatar for waqas94

Hey, You need to firstly look into arrays, and, then how to pass (array pointers) into functions, once you've found these things out you can then sort the array (bubble sort e.g.) and find the lowest value. Not allowed to provide a solution to this probem!

Member Avatar for WaltP
0
118
Member Avatar for bLuEmEzzy

Yeah, like @Javvy said just use HTML tags.. So something like this: <?php date_default_timezone_set('UTC'); $d = date("M"); echo "<font color='yellow'>$d</font>"; ?>

Member Avatar for simplypixie
0
161
Member Avatar for andreasen12N

Hey, You're not breaking your cases, after each case you need to have a break otherwise it may just jump to the next case etc. Also, you need to have/suggested that you always have a default case. Here's an example: int main() { int number; switch(number) { case 0: // …

Member Avatar for np complete
0
120
Member Avatar for dean.ong.14

Try this, bit different to your script.. Have a look at yours, you have many errors: <html> <head> </head> <body> <table border='1'> <tr> <th>Agent_ID</th> <th>Address</th> <th>Bedrooms</th> <th>Price</th> <?php $connect=mysql_connect("localhost","root",""); mysql_select_db("ong_assesment",$connect); $query = "SELECT Agent_ID,Address/Suburb,Bedrooms/Bathrooms,Price FROM suburbs"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo '<tr>'; echo '<td>'. $row[Agent_ID].'</td>'; …

Member Avatar for phorce
0
289
Member Avatar for dean.ong.14

"varchar" is typically associated with MYSQL datatypes.. What field do you want to make/add "varchar" to?

Member Avatar for phorce
0
148
Member Avatar for Tko_1

Hey, I think I get what you mean: Let's say your radio button had the name of "option" and a value of either true/false <?php $a = $_POST['option']; // this will either store true/false if($a) { echo 'a is true'; //print ("A is true"); }else{ include ('test.php'); } ?> Hopefully …

Member Avatar for Tko_1
0
288
Member Avatar for Sanchixx

Aha Hello there, I like it, well done for your first project :)! You should look into jQuery/AJAX and see if there are ways in which these languages can help improve it / Make it more "elegant". Your next move to develop it further would look at how to have …

Member Avatar for Sanchixx
1
136
Member Avatar for hakeemtunde

I've never done this in PHP, but, by 'Binary', i'm guessing that you're trying to parse a binary image? (I.e. black and white)?

Member Avatar for DarkMonarch
0
110
Member Avatar for rotten69

When creating your table, did you specify the ID (primary_key) was auto increment? If so, you shouldn't have this problem..

Member Avatar for diafol
0
115
Member Avatar for Ancient Dragon

I think the system should have a feature like "Don't show this again" and then remember it, but, still give them the option (without pop-up) when they create a new thread. I know what you mean!

Member Avatar for phorce
0
85
Member Avatar for coolikedat99

Hey, try this: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; int ran_num; time_t seconds; time (&seconds) ; srand((unsigned int) seconds); ran_num = rand(); cout << ran_num << endl; cout<<"Enter this number: "; cin>> one; if (one == ran_num) { cout<<"\nSparta\n"; }else{ cout << …

Member Avatar for RainbowMatrix
0
294
Member Avatar for ckchaudhary

Just a quick question.. (I'm very tired so might be missing the point)! But if I had this code: <?php global $json_news; var_dump($json_news); echo"<br/>=======================<hr/>"; ?> It would return NULL because although you are defining $json_news as a global, you're not setting it as anything.. Surely, your function whats to return …

Member Avatar for diafol
0
218
Member Avatar for debal

@Javvy good idea! Or you could have an hidden attribute inside your form: <input type="hidden" name="submitted" value="TRUE"> Making sure it's after your submit button and then inside PHP: <?php if(isset($_POST['submitted'])) { // SQL // SQL }

Member Avatar for simplypixie
0
10K
Member Avatar for karthik_ppts

Hello, I'm not an expert in this field, but, I'm sure you can stream the security camera to a web-server. I don't really /think/ this can be done in PHP and therefore PHP only handles which camera is shown, for example switch between HOUSE 1 and HOUSE 2 and also …

Member Avatar for cereal
1
766
Member Avatar for every1play

>and whats wrong with line 25?? I think @Ancient means it should be int main() rather than void main()

Member Avatar for nishavas01
0
212
Member Avatar for Riu 2009
Member Avatar for vishalonne

On the first line of XICS.php you have this line: <?php $mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE); sec_session_start(); ?> Well, you're defining the constant "HOST", "USER", "PASSWORD", "DATABASE" in the file, process_login.php - So it looks, from looking at the code it doesn't know where it is.. So in …

Member Avatar for diafol
0
530
Member Avatar for Geowil

Hello, Vectors are arrays, but, arrays are defined in size (memory allocations) whereas Vectors are dynamically assigned, in memory. So for example, if you reach the maximum capacity in an array it will run out of memory whereas vectors will just change it's size dynamically and therefore allocate more memory. …

Member Avatar for Geowil
0
256
Member Avatar for phorce

Hello, having a weird problem and wondering if someone can help me.. Basically, I'm trying to read in a .wav file, and I have read in the header information and that's all fine, it's just the data.. Here is the code: bool Wav::readHeader(ifstream &file) { file.read(this->chunkId, 4); file.read(reinterpret_cast<char*>(&this->chunkSize), 4); file.read(this->format, …

Member Avatar for Ancient Dragon
0
236
Member Avatar for vindyauwu
Member Avatar for diafol
0
516
Member Avatar for niyasc
Member Avatar for hcbckwidpeace93

Shouldn't ask for homework.. using System; namespace ddggd { class MainClass { public static void Main (string[] args) { char[] characters = new char[8]; for (int i=0; (i < 8); i++) { Console.WriteLine ("Please enter character: " + i); characters [i] = Convert.ToChar (Console.ReadLine ()); } for (int j=0; (j …

Member Avatar for vinnitro
0
169
Member Avatar for mamdouhweb

Ok, hello! Right, first off, you haven't actually said what you want to do in speech recognition, as it is a massive area. So to answer your question: >is this project to large to be done by 4 month? is it that hard to get along with androids frameworks etc. …

Member Avatar for phorce
0
374
Member Avatar for Alexkid

Hello, Look at this example: #include <iostream> #include <string> using namespace std; string* returnString(const char* filename) { string* names = new string[3]; names[0] = "Hello"; names[1] = "World"; names[2] = "huuhaa"; return names; } int main(int argc, char *argv[]) { string* names = returnString("file.txt"); for(unsigned i=0; (i < 3); i++) …

Member Avatar for phorce
0
296
Member Avatar for 'AnKo

If the file is massive, why not load it inside memory in chucks, then find the patterns?

Member Avatar for np complete
0
108
Member Avatar for isalano

>or more advanced one: >http://www.amazon.co.uk/PHP-MySQL-Dynamic-Web-Sites/dp/032152599X/ref=sr_1_1?ie=UTF8&qid=1345629611&sr=8-1 I learnt from Larry Ullman, good recommendation :) - He's a bit ignorant, but, his books are good!

Member Avatar for almostbob
0
97
Member Avatar for phil.sutton

Hey, Please indent your code properly.. Ok, so the only error(s) I could find was that you have a function called "deposit" and a variable with the same name. This code is compiling for me: #ifndef MENU_BUILDER_H #define MENU_BUILDER_H #include<iostream> #include<string> #include<iomanip> #include<cmath> using namespace std; //Define my class class …

Member Avatar for phil.sutton
0
189
Member Avatar for Brynezzy

> a clients home and enter in the dementions, add walls where needed and add the products we offer. I see other websites that offer this option with their products. Any advice, thoughts, suggestions would be helpful. Hey, it depends how advanced you want the system, this will determine which …

Member Avatar for phorce
0
95
Member Avatar for phorce

Hello, I'm just wondering whether or not, it is possible to get the vector Dimensions without them being set? Basically, I'm converting some matlab code and there's a function size(VECTOR) which get's the dimentions of the vector being passed. For example: #include <iostream> #include <vector> using namespace std; int main(int …

Member Avatar for WaltP
0
126
Member Avatar for phorce

Hello, I'm trying to read the header information of a .wav file and I'm kind of stuck. Basically, the header information is located at different offsets in the file. So for example: (0-4) = ChunkID (4-8) = ChunkSize (8-12) = Format .. .. .. .. .. .. From this: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ …

Member Avatar for np complete
0
279
Member Avatar for devianleong

<?php ob_start(); session_start(); include('./config.php'); //protect SQL injection $username = $_POST['username']; $password = $_POST['password']; $username = stripslashes($username); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $password=hash('sha256',$password); //SQL query that sent login info to database $result = mysql_query ("SELECT * FROM admin WHERE Login ='$username' AND Password ='$password'",$con); $check = mysql_num_rows ($result); if ($check …

Member Avatar for phorce
0
132
Member Avatar for papadarl
Member Avatar for phorce

Hello, wondering if someone can help me. I'm working with a .wav file, and, I need to collect the header information. The header contains (roughly, 20 bits/bytes) before the actual data. And, each of this data is contained at different locations in the file. I need to read a particular …

Member Avatar for phorce
0
179
Member Avatar for aabbccbryanmark

Can you not just take some code, then go onto different forums (Java, C++) etc.. and ask what the code is, if you don't know what the code does, or, even what language it is in; why are you using it? It looks like Perl, or, some other scripting language..

Member Avatar for WaltP
0
301
Member Avatar for phorce

Hello, I'm trying to write the Cooley Turkey algorithm for an FFT. Now, The algorithm works well, but, only for 2 numbers - Nothing else. For example, I have used an online FFT calculated, entered the same data and got the same results. Here is the code for the algorithm: …

0
126
Member Avatar for phorce

Hello, I'm wondering if anyone knows if there is a specific way or a library that allows me to read in an audio file in which I can then manipulate and get the different frequencies? I'm basically trying to make an application that uses an FFT for the audio signals …

Member Avatar for Banfa
0
302
Member Avatar for robanatilahun

The End.